Re: Clearing Cache after Logout
Yes that was browser behaviour. But the http protocol has some degree of control on this at least. And Wicket is flexible enough to take advantage of that! I added this to my main page. After logout, clicking the back button makes the browser (ff 3.5) show the login page but not the main page :) response.setHeader(Cache-Control, no-cache, max-age=0, must-revalidate); // no-store response.setHeader(Cache-Control, no-store); response.setDateHeader(Expires, 0); response.setHeader(Pragma, no-cache); pointbreak+wicketstuff wrote: That you get back to your last page when hitting the back button has nothing to do with Wicket. It's just what browsers do when you hit the back button. I guess you are using firefox (3), and firefox 3 will show a page from its in-memory cache, even if the page headers tell it the page is expired long ago, must be reloaded, and must be revalidated (which is what wicket tells it by default). Google on firefox cache reload or something for how firefox caches pages and for suggestions on how to force a page reload. On Thu, 04 Dec 2008 18:35:09 +0200, Serkan Camurcuoglu serkan.camurcuo...@telenity.com said: you can set your application's home page as your expired page or throw a restartresponseexception (to home page) from the constructor of your page expired page.. at least I do it that way.. vishy_sb wrote: Thanks for the reply there Nino. I have set up a custom expired page and have set the following in Application class getApplicationSettings().setPageExpiredErrorPage(PageExpired.class); Now the page expired is set to this page. But still on hitting the back button I get back to the page. I tried using the SimplePageAuthorizationStrategy in my Application.init() method. The code that put in there looks something like this SimplePageAuthorizationStrategy authorizationStrategy = new SimplePageAuthorizationStrategy( LimitManagerPage.class, PageExpired.class) { protected boolean isAuthorized() { // Authorize access based on user authentication in the session if(((WebSession) Session.get()).isSessionInvalidated()){ return false; } else { return true; } } }; getSecuritySettings().setAuthorizationStrategy(authorizationStrategy); But this doesn't provide the desired result as well. This doesn't even show my custom PageExpired web page. Any ideas about why this is not working or something else that I can do to get this to work. Thanks in advance, vishy - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Clearing-Cache-after-Logout-tp20823965p2771.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Clicking add to cart repeatedly
) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Complete stack: java.lang.RuntimeException: Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:406) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311) at org.apache.wicket.Session.getPage(Session.java:751) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:448) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1229) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1349) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387) display page view * jwcarman wrote: full stack trace please? Are you using persistent sessions in tomcat? On Sat, Aug 30, 2008 at 7:54 AM, wil2008 [EMAIL PROTECTED] wrote: I am new to Wicket (but not new to HTML, Java and Spring). I tried to follow the examples in the ebook of Wicket in Action. Everything is fine until Chapter 3. I followed the cheese application which demonstrates a plain shopping cart. I compiled and ran the front page successfully (including the Index.html and Index.java, up to page 60). I could add to cart and remove successfully. So far so good. When I clicked add to cart repeatedly and slowly, it was still good. But If I clicked quickly enough, the following bunch of Unexpected RuntimeException appeared. I am not sure this is particular to this specific example or is general for other Wicket components. Did I miss something? Does anyone come across something similar? This is important if I am to propose Wicket in a serious project. Thank you very much! Wicket version: 1.3.4 output Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411) Caused by: java.lang.ClassNotFoundException: [Lmycheese.Cheese; at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) . /output -- View this message in context: http://www.nabble.com/Clicking-%22add-to-cart%22-repeatedly-tp19232702p19232702.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Clicking-%22add-to-cart%22-repeatedly-tp19232702p19243657.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clicking add to cart repeatedly
I am new to Wicket (but not new to HTML, Java and Spring). I tried to follow the examples in the ebook of Wicket in Action. Everything is fine until Chapter 3. I followed the cheese application which demonstrates a plain shopping cart. I compiled and ran the front page successfully (including the Index.html and Index.java, up to page 60). I could add to cart and remove successfully. So far so good. When I clicked add to cart repeatedly and slowly, it was still good. But If I clicked quickly enough, the following bunch of Unexpected RuntimeException appeared. I am not sure this is particular to this specific example or is general for other Wicket components. Did I miss something? Does anyone come across something similar? This is important if I am to propose Wicket in a serious project. Thank you very much! Wicket version: 1.3.4 output Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411) Caused by: java.lang.ClassNotFoundException: [Lmycheese.Cheese; at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) . /output -- View this message in context: http://www.nabble.com/Clicking-%22add-to-cart%22-repeatedly-tp19232702p19232702.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]