Using Servlet 3.0 with Weblogic 10.3
Asked Answered
N

1

4

I am working on a form-based authentication and using following statements. I have realized on the way of implementation that HttpServletRequest->login method comes with servlet 3.0.(with help of stackoverflow users)

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

So I am using weblogic as an AppServer, I have prepared a war file without any compilation error and it works at glassfish 3.1 appserver. But since weblogic 10.3 has implicit support 2.5 it overwrites Servlet 3.0.1.jar so having following error.

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

How I can run my war file with servlet 3.0 api on weblogic 10.3 , in other words how I can stop weblogic overwriting servlet 3.0 api?

Notecase answered 21/6, 2013 at 7:42 Comment(1)
Simple answer - you cannot. The servlet API is just the API, not an implementation. You must migrate to a newer WebLogic version... it might be possible to integrate another container, but I'd rather not try that.Ilianailine
V
18

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

Victimize answered 21/6, 2013 at 7:52 Comment(3)
Thanks. I do not want to migrate weblogic 10.3 to new version at least in a short term. Therefore I have to find ou how to perform form-based authentication via Servlet 2.5Notecase
@AhmetKarakaya did you find any solution for your problem?Sokol
yes I did, I have left weblogic alone forever and moved Springboot :)Notecase

© 2022 - 2024 — McMap. All rights reserved.