Using Servlet 3.0 with Weblogic 10.3

I am working on form-based validation and use the following instructions. I realized on the implementation path that the HttpServletRequest-> login method comes from servlet 3.0 (using stackoverflow users)

HttpServletRequest request = getHttpServletRequest(); request.login() 

So, I use weblogic as AppServer, I prepared a war file without any compilation error, and it works on Glassfish 3.1 application server. But since weblogic 10.3 has implicit support for 2.5, it overwrites Servlet 3.0.1.jar with the following error.

 java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.login(Ljava/lang/String;Ljava/lang/String;)V 

How can I run my war file from a servlet 3.0 api on weblogic 10.3, in other words, how can I stop a reboot of a servlet 3.0 api?

+4
source share
1 answer

Weblogic 10.3.x is a Servlet 2.5 container. You need to use Weblogic 12c and above. It provides support for Servlet 3.0 .

+16
source

Source: https://habr.com/ru/post/1212576/


All Articles