Which JAR contains the weblogic.servlet.security.S

2019-05-28 23:00发布

问题:

I trying to create a servlet to logout from multiple JSF applications running on Oracle Glassfish. I tried the following code,

weblogic.servlet.security.ServletAuthentication.logout(request);
weblogic.servlet.security.ServletAuthentication.invalidateAll(request);
weblogic.servlet.security.ServletAuthentication.killCookie(request);

but I am not able to find the JAR file containing the required class in order to get the code to compile. I downloaded Oracle WebLogic and tried various of its JARs, but no one of them made the code to compile.

Which JAR does contain the required class and where can I find it?

回答1:

The class you are looking for is in a jar named wls-api.jar.

However, you're probably searching for the wrong thing because if you are developing applications to run on Glassfish you should stick with the standard techniques (e.g. JSR-196 described here or here).

Because it isn't obvious what you are trying to implement I can't give any further detailed advice but there is plenty of documentation available about Java EE Security.



回答2:

I think u need this jar file:

<JDeveloper Home>\Middleware\wlserver_10.3\server\lib\weblogic.jar



回答3:

The file is located at <WLS_HOME>\middleware\wlserver\server\lib\wls-api.jar