guice-servlet

How to clear browser cache using java [duplicate]

China☆狼群 提交于 2019-12-02 20:49:10
问题 This question already has answers here : Prevent user from seeing previously visited secured page after logout (5 answers) Closed 4 years ago . I have a problem in sessions. When ever I logout the session is ended but then when the browsers back button is pressed I am getting the previous page. I am using jsp servlet technology and my code for logout is given below request.getSession().invalidate(); response.setHeader("Cache-Control","no-cache"); response.setDateHeader("Expires", 0); response

Weblogic 12c : Prefer-web-inf-classes and prefer-application-packages for Jersey

不打扰是莪最后的温柔 提交于 2019-12-01 17:52:15
I have to use both (oddly enough ..) " prefer-web-inf-classes " and " prefer-application-packages properties of weblogic.xml on a Weblogic 12c Server (12.2.1) It is REST application based on Jersey 1.9. * ( Jersey 1.x JAX-RS RI) and Guice. 1. Why use :prefer-web-inf-classes If you have more than one WAR you have to place at the level of war/lib the libraries for guice-jersey / guice , other way you get an Multibindings Error . It must be indicate also the prefer-web-inf-classes to true . This way works properly! I have tried to work in the same way using prefer-application-packages with

Weblogic 12c : Prefer-web-inf-classes and prefer-application-packages for Jersey

给你一囗甜甜゛ 提交于 2019-12-01 15:53:03
问题 I have to use both (oddly enough ..) prefer-web-inf-classes and prefer-application-packages properties of weblogic.xml on a Weblogic 12c Server (12.2.1) It is REST application based on Jersey 1.9. ( Jersey 1.x JAX-RS RI) and Guice. 1. Why use :prefer-web-inf-classes If you have more than one WAR you have to place at the level of war/lib the libraries for guice-jersey / guice , other way you get an Multibindings Error. It must be indicated also the prefer-web-inf-classes to true . This way it

Guice : How to bind classes that are dynamically obtained by an already binded object?

馋奶兔 提交于 2019-11-30 21:48:51
I'm developing a small web framework using Guice. I have a Router object that, once initialized, expose a getControllerClasses() method. I have to loop over all those dynamically returned classes to bind() them using Guice. I bind the Router : bind(IRouter.class).to(Router.class); But then, how can I obtain the binded Router instance, in a Module, so I can also bind the classes returned by its getControllerClasses() method? The only way I've been able to get the Router instance in a Module, is by binding this instance in a first module and then injecting it in a second module, using @Inject on

NoClassDefFoundError in web application running on Tomcat 7

戏子无情 提交于 2019-11-30 15:19:41
问题 I have web application written in Java using gucie-servlet framework being built by Maven 3. When I deploy it on Tomcat 7 container and try to access it using browser, Tomcat replies with 404 status code. This is log from Tomcat: Apr 4, 2013 11:39:50 AM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextDestroyed() Apr 4, 2013 11:39:50 AM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextDestroyed() Apr 4, 2013 11:39:55 AM org.apache

Guice : How to bind classes that are dynamically obtained by an already binded object?

只愿长相守 提交于 2019-11-30 05:40:51
问题 I'm developing a small web framework using Guice. I have a Router object that, once initialized, expose a getControllerClasses() method. I have to loop over all those dynamically returned classes to bind() them using Guice. I bind the Router : bind(IRouter.class).to(Router.class); But then, how can I obtain the binded Router instance, in a Module, so I can also bind the classes returned by its getControllerClasses() method? The only way I've been able to get the Router instance in a Module,

Guice + Tomcat potential memory leak

孤者浪人 提交于 2019-11-29 06:07:52
I have just started using Google Guice with my Tomcat webapp, and have noticed the following in the catalina.out file whenever the WAR file is undeployed: May 16, 2011 5:37:24 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/app] May 16, 2011 5:37:24 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: A web application appears to have started a thread named [com.google.inject.internal.util.$Finalizer] but has failed to stop it. This is very likely to create a memory leak. May 16, 2011 5:37:24 PM org.apache.catalina.loader