WicketFilter without web.xml
Hi guys, I just wanted to ask if this approach is the one to go with if I don't use the web.xml (false): @WebFilter(displayName = "App", filterName = "app", urlPatterns = "/*", initParams = { @WebInitParam(name = "applicationClassName", value = "com.app.web.WebApplication") }) public class WicketInitFilter extends WicketFilter { } looks a bit empty. :-) kind regards Tobias
Re: WicketFilter without web.xml
I can send you my configuration, that works in my project with Wicket 7.1 It really is empty - because all configuration information is contained in annotations above. import org.apache.wicket.protocol.http.WicketFilter; import javax.servlet.annotation.WebFilter; import javax.servlet.annotation.WebInitParam; @WebFilter( filterName = "AppWicketFilter", urlPatterns = {"/*"}, initParams = { @WebInitParam(name = "applicationClassName", value = "algoritmix.website.client.application.WicketApplication"), @WebInitParam(name="configuration", value="development"), @WebInitParam(name="filterMappingUrlPattern", value="/*"), } ) public class AppWicketFilter extends WicketFilter { } On Tue, Dec 8, 2015 at 8:07 PM, Tobias Soloschenko < tobiassolosche...@googlemail.com> wrote: > Hi guys, > > I just wanted to ask if this approach is the one to go with if I don't use > the web.xml (false): > > @WebFilter(displayName = "App", filterName = "app", urlPatterns = "/*", > initParams = { > > @WebInitParam(name = "applicationClassName", value = > "com.app.web.WebApplication") }) > > public class WicketInitFilter extends WicketFilter > > { > > } > > > looks a bit empty. :-) > > kind regards > > Tobias >
WicketFilter-filestore overflow
About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang
Re: WicketFilter-filestore overflow
Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter-filestore overflow
Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindingEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbindValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doInvalidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).timeout() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: WicketFilter-filestore overflow
Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindingEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbindValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doInvalidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).timeout() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskD ataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.jav a:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable. run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: WicketFilter-filestore overflow
It looks like a bug as the behavior is not consistent across all servers. Would anything setting in Tomcat affect how Wicket clean up the folders? -Fang -Original Message- From: Fang Lin Sent: Thursday, December 01, 2011 11:26 AM To: users@wicket.apache.org Subject: RE: WicketFilter-filestore overflow Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindingEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbindValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doInvalidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).timeout() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskD ataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.jav a:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable. run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter-filestore overflow
On Thu, Dec 1, 2011 at 8:31 PM, Fang Lin fang...@u.washington.edu wrote: It looks like a bug as the behavior is not consistent across all servers. Would anything setting in Tomcat affect how Wicket clean up the folders? Did you debug it ? -Fang -Original Message- From: Fang Lin Sent: Thursday, December 01, 2011 11:26 AM To: users@wicket.apache.org Subject: RE: WicketFilter-filestore overflow Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindingEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbindValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doInvalidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).timeout() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskD ataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.jav a:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable. run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: WicketFilter-filestore overflow
Please advise how I can debug it? -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 11:52 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow On Thu, Dec 1, 2011 at 8:31 PM, Fang Lin fang...@u.washington.edu wrote: It looks like a bug as the behavior is not consistent across all servers. Would anything setting in Tomcat affect how Wicket clean up the folders? Did you debug it ? -Fang -Original Message- From: Fang Lin Sent: Thursday, December 01, 2011 11:26 AM To: users@wicket.apache.org Subject: RE: WicketFilter-filestore overflow Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindin gEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbin dValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doInv alidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).timeo ut() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChanne l (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(Disk D ataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.ja v a:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable. run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com
RE: WicketFilter-filestore overflow
It did clean up some folders, but not all of them. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 11:52 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow On Thu, Dec 1, 2011 at 8:31 PM, Fang Lin fang...@u.washington.edu wrote: It looks like a bug as the behavior is not consistent across all servers. Would anything setting in Tomcat affect how Wicket clean up the folders? Did you debug it ? -Fang -Original Message- From: Fang Lin Sent: Thursday, December 01, 2011 11:26 AM To: users@wicket.apache.org Subject: RE: WicketFilter-filestore overflow Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindin gEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbin dValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doInv alidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).timeo ut() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChanne l (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(Disk D ataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.ja v a:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable. run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development
Re: WicketFilter-filestore overflow
Attach the debugger at HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindingEvent) line: 430 and follow it as in the stacktrace I pasted. Maybe something keeps reference to the files - indexing service, virus scanner, ... On Thu, Dec 1, 2011 at 8:57 PM, Fang Lin fang...@u.washington.edu wrote: Please advise how I can debug it? -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 11:52 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow On Thu, Dec 1, 2011 at 8:31 PM, Fang Lin fang...@u.washington.edu wrote: It looks like a bug as the behavior is not consistent across all servers. Would anything setting in Tomcat affect how Wicket clean up the folders? Did you debug it ? -Fang -Original Message- From: Fang Lin Sent: Thursday, December 01, 2011 11:26 AM To: users@wicket.apache.org Subject: RE: WicketFilter-filestore overflow Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindin gEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbin dValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doInv alidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).timeo ut() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChanne l (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(Disk D ataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.ja v a:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable. run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http
Re: WicketFilter-filestore overflow
Set the session timeout to 1, log in and wait 1 minute with the debugger at that method and follow the execution On Thu, Dec 1, 2011 at 8:59 PM, Fang Lin fang...@u.washington.edu wrote: It did clean up some folders, but not all of them. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 11:52 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow On Thu, Dec 1, 2011 at 8:31 PM, Fang Lin fang...@u.washington.edu wrote: It looks like a bug as the behavior is not consistent across all servers. Would anything setting in Tomcat affect how Wicket clean up the folders? Did you debug it ? -Fang -Original Message- From: Fang Lin Sent: Thursday, December 01, 2011 11:26 AM To: users@wicket.apache.org Subject: RE: WicketFilter-filestore overflow Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindin gEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbin dValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doInv alidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).timeo ut() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChanne l (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(Disk D ataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.ja v a:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable. run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What concerns me now is that the ones created on previous days were not removed completely. Therefore the number of sub-directories is increasing every day. Our session-timeout is 60 minutes. Thanks, Fang -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users
RE: WicketFilter-filestore overflow
All the session folders are cleaned up during the test on the development server. Nothing left. Could it be possible that the issue only occur when multiple concurrent sessions exist? I am going to set up a cronjob to clean up the folders daily as a work around. Thanks! -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 12:03 PM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Set the session timeout to 1, log in and wait 1 minute with the debugger at that method and follow the execution On Thu, Dec 1, 2011 at 8:59 PM, Fang Lin fang...@u.washington.edu wrote: It did clean up some folders, but not all of them. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 11:52 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow On Thu, Dec 1, 2011 at 8:31 PM, Fang Lin fang...@u.washington.edu wrote: It looks like a bug as the behavior is not consistent across all servers. Would anything setting in Tomcat affect how Wicket clean up the folders? Did you debug it ? -Fang -Original Message- From: Fang Lin Sent: Thursday, December 01, 2011 11:26 AM To: users@wicket.apache.org Subject: RE: WicketFilter-filestore overflow Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindi n gEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbi n dValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doIn v alidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).time o ut() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/ 0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/ 0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/ 0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChann e l (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(Dis k D ataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.j a v a:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable. run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened.[o.a.w.p.DiskDataStore] There were total 129,852 sub-directories under /data/logs/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/, named by session ID and host name. Removed all the sub-directories, cleared the problem. What
Re: WicketFilter-filestore overflow
Is there a cluster of Tomcat instances ? Maybe the sessionExpired notification has ran on just one of the instances and all other leak these folders. On Thu, Dec 1, 2011 at 10:37 PM, Fang Lin fang...@u.washington.edu wrote: All the session folders are cleaned up during the test on the development server. Nothing left. Could it be possible that the issue only occur when multiple concurrent sessions exist? I am going to set up a cronjob to clean up the folders daily as a work around. Thanks! -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 12:03 PM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Set the session timeout to 1, log in and wait 1 minute with the debugger at that method and follow the execution On Thu, Dec 1, 2011 at 8:59 PM, Fang Lin fang...@u.washington.edu wrote: It did clean up some folders, but not all of them. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 11:52 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow On Thu, Dec 1, 2011 at 8:31 PM, Fang Lin fang...@u.washington.edu wrote: It looks like a bug as the behavior is not consistent across all servers. Would anything setting in Tomcat affect how Wicket clean up the folders? Did you debug it ? -Fang -Original Message- From: Fang Lin Sent: Thursday, December 01, 2011 11:26 AM To: users@wicket.apache.org Subject: RE: WicketFilter-filestore overflow Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBindi n gEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unbi n dValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doIn v alidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).time o ut() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/ 0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/ 0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore/ 0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChann e l (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(Dis k D ataStore.java:328) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.j a v a:176) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable. run(AsynchronousDataStore.java:356) at java.lang.Thread.run(Thread.java:662) WARN 29 08:01:57.666 Cannot save page with id '0' because the data file cannot be opened
RE: WicketFilter-filestore overflow
There are two hosts in our server cluster. On each host we run two Tomcats. But the app that uses Wicket only runs on one Tomcat. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 1:49 PM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Is there a cluster of Tomcat instances ? Maybe the sessionExpired notification has ran on just one of the instances and all other leak these folders. On Thu, Dec 1, 2011 at 10:37 PM, Fang Lin fang...@u.washington.edu wrote: All the session folders are cleaned up during the test on the development server. Nothing left. Could it be possible that the issue only occur when multiple concurrent sessions exist? I am going to set up a cronjob to clean up the folders daily as a work around. Thanks! -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 12:03 PM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Set the session timeout to 1, log in and wait 1 minute with the debugger at that method and follow the execution On Thu, Dec 1, 2011 at 8:59 PM, Fang Lin fang...@u.washington.edu wrote: It did clean up some folders, but not all of them. -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 11:52 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow On Thu, Dec 1, 2011 at 8:31 PM, Fang Lin fang...@u.washington.edu wrote: It looks like a bug as the behavior is not consistent across all servers. Would anything setting in Tomcat affect how Wicket clean up the folders? Did you debug it ? -Fang -Original Message- From: Fang Lin Sent: Thursday, December 01, 2011 11:26 AM To: users@wicket.apache.org Subject: RE: WicketFilter-filestore overflow Thanks for checking into this quickly! We don’t use Jetty. We use Apache Tomcat/6.0.29. On the server that had the overflow, there were 3,111 directories created yesterday still there now. -Fang -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 01, 2011 10:59 AM To: users@wicket.apache.org Subject: Re: WicketFilter-filestore overflow Everything seems to be OK. I just tested it with Jetty 7.5 When a session expires this call is executed: Daemon Thread [HashSessionScavenger-0] (Suspended (breakpoint at line 454 in DiskDataStore$SessionEntry)) DiskDataStore$SessionEntry.unbind() line: 454 DiskDataStore.removeData(String) line: 166 AsynchronousDataStore.removeData(String) line: 209 DefaultPageStore.removePageData(String) line: 109 DefaultPageStore.unbind(String) line: 161 PageStoreManager.sessionExpired(String) line: 413 WicketApplication(Application).sessionUnbound(String) line: 478 WicketApplication(WebApplication).sessionUnbound(String) line: 509 HttpSessionStore$SessionBindingListener.valueUnbound(HttpSessionBind i n gEvent) line: 430 HashSessionManager$HashedSession(AbstractSessionManager$Session).unb i n dValue(String, Object) line: 1246 HashSessionManager$HashedSession(AbstractSessionManager$Session).doI n v alidate() line: 1080 HashSessionManager$HashedSession(AbstractSessionManager$Session).tim e o ut() line: 1037 HashSessionManager.scavenge() line: 318 HashSessionManager$2.run() line: 273 TimerThread.mainLoop() line: 512 TimerThread.run() line: 462 and it deletes the folder with the session data. You may try it with your application server On Thu, Dec 1, 2011 at 7:25 PM, Martin Grigorov mgrigo...@apache.org wrote: Hm, Maybe there is a bug. That's easy to check. I will let you know soon. On Thu, Dec 1, 2011 at 6:56 PM, Fang Lin fang...@u.washington.edu wrote: About two weeks after we deployed Wicket 1.5.3, we ran into a file system issue on one of our server. The following appeared in the application log on each page load: ERROR 29 08:01:57.665 Failed to create directory: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore / 0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11 [o.a.w.u.f.Files] ERROR 29 08:01:57.666 /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore / 0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) [o.a.w.p.DiskDataStore] java.io.FileNotFoundException: /usr/local/tomcat/work/Catalina/localhost/_/WicketFilter-filestore / 0 A 91844EB9E584DD7CA8C48AD558AB2D.myuw11/data (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:212) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChan n e l (DiskDataStore.java:410) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(Di s k D ataStore.java:328
WicketFilter cannot resolve filterPath if filterMappingUrlPattern is not configured
Hi, We noticed this while running our application in an environment where firewall blocks all connections to outside addresses. Adding filterMappingUrlPattern parameter helped. so for instance helloworld's web.xml (http://wicket.apache.org/learn/examples/helloworld.html) would be something like: web-app display-nameWicket Examples/display-name filter filter-nameHelloWorldApplication/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valueorg.apache.wicket.examples.helloworld.HelloWorldApplication/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-value/*/param-value /init-param /filter filter-mapping filter-nameHelloWorldApplication/filter-name url-pattern/*/url-pattern /filter-mapping /web-app Regards, Mikko
WicketFilter 1.5 ignorePaths - any changes?
Are there any changes to the way the ignorePaths init-param works in 1.5? I have a web.xml that has been working fine in 1.4 with a set of ignorePaths but it appears as though Wicket 1.5 is trying to process some of the requests that it was ignoring in 1.4. init-param param-nameignorePaths/param-name param-valueimages/,admin//param-value /init-param Anyone seen this issue or have I done something else wrong?
Re: WicketFilter 1.5 ignorePaths - any changes?
It should be the same behavior but since this method has been lost and re-introduced in 1.5 it may have issues. It has test in WicketFilterTest. Extend the test with the failures and attach it in a ticket. On Mon, Sep 26, 2011 at 11:22 AM, Chris Colman chr...@stepaheadsoftware.com wrote: Are there any changes to the way the ignorePaths init-param works in 1.5? I have a web.xml that has been working fine in 1.4 with a set of ignorePaths but it appears as though Wicket 1.5 is trying to process some of the requests that it was ignoring in 1.4. init-param param-nameignorePaths/param-name param-valueimages/,admin//param-value /init-param Anyone seen this issue or have I done something else wrong? -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: WicketFilter 1.5 ignorePaths - any changes?
Doh! That was my bad. Was building the 1.5 version of our app in a different directory but didn't change the docBase in the app's Tomcat config to reflect that new directory so it continued to pull unchanged web.xml from the old 1.4 directory Embarrassed =] It should be the same behavior but since this method has been lost and re-introduced in 1.5 it may have issues. It has test in WicketFilterTest. Extend the test with the failures and attach it in a ticket. On Mon, Sep 26, 2011 at 11:22 AM, Chris Colman chr...@stepaheadsoftware.com wrote: Are there any changes to the way the ignorePaths init-param works in 1.5? I have a web.xml that has been working fine in 1.4 with a set of ignorePaths but it appears as though Wicket 1.5 is trying to process some of the requests that it was ignoring in 1.4. init-param param-nameignorePaths/param-name param-valueimages/,admin//param-value /init-param Anyone seen this issue or have I done something else wrong? -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - 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
WicketFilter always sets expires header to 1h for shared resources if browser sends if-modified-since header
Hey all, I've just been investigating some performance problems indicated by Page Speed. It reported that some of my resources did not send far future expiry headers, although my default expiry and my expiry for all resources is set to one year. After some debugging, I found out that Wicket always sets the expiry header to 1 hour if the browser sends a request including an IF-MODIFIED-SINCE-header. The relevant code is in WicketFilter (1.4.16) 347-350: httpServletResponse.setStatus(HttpServletResponse.SC_NOT_MODIFIED); httpServletResponse.setDateHeader(Expires, System.currentTimeMillis() + Duration.hours(1).getMilliseconds()); There already is an issue for this that seems to have been fixed some time in the past: WICKET-1748 https://issues.apache.org/jira/browse/WICKET-1748 . However, there is currently no way to change this default expiry. Would it be possible to re-use the web application's default cache duration or even the actual resource cache duration? Cheers, Thomas
Re: WicketFilter always sets expires header to 1h for shared resources if browser sends if-modified-since header
Caching is improved a lot in Wicket 1.5, consider upgrading. You can always override headers set by Wicket by introducing your own servlet filter which wraps WicketFilter and resets the headers after WicketFilter returns, i.e. chain.doFilter() call in your filter. On Mon, Sep 5, 2011 at 5:42 PM, Thomas Heigl tho...@umschalt.com wrote: Hey all, I've just been investigating some performance problems indicated by Page Speed. It reported that some of my resources did not send far future expiry headers, although my default expiry and my expiry for all resources is set to one year. After some debugging, I found out that Wicket always sets the expiry header to 1 hour if the browser sends a request including an IF-MODIFIED-SINCE-header. The relevant code is in WicketFilter (1.4.16) 347-350: httpServletResponse.setStatus(HttpServletResponse.SC_NOT_MODIFIED); httpServletResponse.setDateHeader(Expires, System.currentTimeMillis() + Duration.hours(1).getMilliseconds()); There already is an issue for this that seems to have been fixed some time in the past: WICKET-1748 https://issues.apache.org/jira/browse/WICKET-1748 . However, there is currently no way to change this default expiry. Would it be possible to re-use the web application's default cache duration or even the actual resource cache duration? Cheers, Thomas -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter always sets expires header to 1h for shared resources if browser sends if-modified-since header
Hi Martin, Thanks for the fast reply! Upgrading to Wicket 1.5 is on our roadmap but is quite a lot of work for a bigger project and we most likely won't upgrade until the final release. As we use a Wicket application managed by JBoss-Seam, wrapping the wicket filter is not trivial either. Is there any reason against changing the hard-coded expires header in the filter to the application's default cache duration in one of the next minor releases? Cheers, Thomas On Mon, Sep 5, 2011 at 4:55 PM, Martin Grigorov mgrigo...@apache.orgwrote: Caching is improved a lot in Wicket 1.5, consider upgrading. You can always override headers set by Wicket by introducing your own servlet filter which wraps WicketFilter and resets the headers after WicketFilter returns, i.e. chain.doFilter() call in your filter. On Mon, Sep 5, 2011 at 5:42 PM, Thomas Heigl tho...@umschalt.com wrote: Hey all, I've just been investigating some performance problems indicated by Page Speed. It reported that some of my resources did not send far future expiry headers, although my default expiry and my expiry for all resources is set to one year. After some debugging, I found out that Wicket always sets the expiry header to 1 hour if the browser sends a request including an IF-MODIFIED-SINCE-header. The relevant code is in WicketFilter (1.4.16) 347-350: httpServletResponse.setStatus(HttpServletResponse.SC_NOT_MODIFIED); httpServletResponse.setDateHeader(Expires, System.currentTimeMillis() + Duration.hours(1).getMilliseconds()); There already is an issue for this that seems to have been fixed some time in the past: WICKET-1748 https://issues.apache.org/jira/browse/WICKET-1748 . However, there is currently no way to change this default expiry. Would it be possible to re-use the web application's default cache duration or even the actual resource cache duration? Cheers, Thomas -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter always sets expires header to 1h for shared resources if browser sends if-modified-since header
Because this change may confuse some apps which just work at the moment and start behaving strangely in 1.4.19 On Mon, Sep 5, 2011 at 6:37 PM, Thomas Heigl tho...@umschalt.com wrote: Hi Martin, Thanks for the fast reply! Upgrading to Wicket 1.5 is on our roadmap but is quite a lot of work for a bigger project and we most likely won't upgrade until the final release. As we use a Wicket application managed by JBoss-Seam, wrapping the wicket filter is not trivial either. Is there any reason against changing the hard-coded expires header in the filter to the application's default cache duration in one of the next minor releases? Cheers, Thomas On Mon, Sep 5, 2011 at 4:55 PM, Martin Grigorov mgrigo...@apache.orgwrote: Caching is improved a lot in Wicket 1.5, consider upgrading. You can always override headers set by Wicket by introducing your own servlet filter which wraps WicketFilter and resets the headers after WicketFilter returns, i.e. chain.doFilter() call in your filter. On Mon, Sep 5, 2011 at 5:42 PM, Thomas Heigl tho...@umschalt.com wrote: Hey all, I've just been investigating some performance problems indicated by Page Speed. It reported that some of my resources did not send far future expiry headers, although my default expiry and my expiry for all resources is set to one year. After some debugging, I found out that Wicket always sets the expiry header to 1 hour if the browser sends a request including an IF-MODIFIED-SINCE-header. The relevant code is in WicketFilter (1.4.16) 347-350: httpServletResponse.setStatus(HttpServletResponse.SC_NOT_MODIFIED); httpServletResponse.setDateHeader(Expires, System.currentTimeMillis() + Duration.hours(1).getMilliseconds()); There already is an issue for this that seems to have been fixed some time in the past: WICKET-1748 https://issues.apache.org/jira/browse/WICKET-1748 . However, there is currently no way to change this default expiry. Would it be possible to re-use the web application's default cache duration or even the actual resource cache duration? Cheers, Thomas -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketSessionFilter and ignorePaths in WicketFilter
Hello, after some investigation I reached to the following: when a wicket session is created it is added as attribute to the HttpSession: HttpSessionStore.bind(), and inside it setAttribute(request, getSessionAttribute(), newSession); If we assume that inside web.xml the WicketFilter name is WICKET_FILTER, the getSessionAttribute() method returns sessionWICKET_FILTER. Then, inside setAttribute(request, getSessionAttribute(), newSession); the attribute name, by which the wicket session will be stored in the HttpSession is formed as String attributeName = getSessionAttributePrefix(request) + name;, where name is sessionWICKET_FILTER and getSessionAttributePrefix(request) returns wicket:WICKET_FILTER: As a result of all this the wicket session is stored in HttpSession with attribute named wicket:WICKET_FILTER:sessionWICKET_FILTER On the other hand when the WicketSessionFilter is asked for the session, it forms it's own attribute value of the stored session: Inside WicketSessionFilter.getSession() (line 208): sessionKey = application.getSessionAttributePrefix(null, filterName) + Session.SESSION_ATTRIBUTE_NAME;, where application.getSessionAttributePrefix(null, filterName) returns wicket:WICKET_FILTER: and Session.SESSION_ATTRIBUTE_NAME is session. As a result WicketSessionFilter tries to get the session with attribute named wicket:WICKET_FILTER:session The attribute names from HttpSessionStore (wicket:WICKET_FILTER:sessionWICKET_FILTER) and WicketSessionFilter(wicket:WICKET_FILTER:session) are different and the session cannot be retrieved. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WicketSessionFilter-and-ignorePaths-in-WicketFilter-tp3570291p3570577.html Sent from the Users forum 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: WicketSessionFilter and ignorePaths in WicketFilter
Is this Wicket 1.5 ? Create a quickstart and attach it to Jira. On Fri, Jun 3, 2011 at 2:24 PM, hok ivanvasi...@gmail.com wrote: Hello, after some investigation I reached to the following: when a wicket session is created it is added as attribute to the HttpSession: HttpSessionStore.bind(), and inside it setAttribute(request, getSessionAttribute(), newSession); If we assume that inside web.xml the WicketFilter name is WICKET_FILTER, the getSessionAttribute() method returns sessionWICKET_FILTER. Then, inside setAttribute(request, getSessionAttribute(), newSession); the attribute name, by which the wicket session will be stored in the HttpSession is formed as String attributeName = getSessionAttributePrefix(request) + name;, where name is sessionWICKET_FILTER and getSessionAttributePrefix(request) returns wicket:WICKET_FILTER: As a result of all this the wicket session is stored in HttpSession with attribute named wicket:WICKET_FILTER:sessionWICKET_FILTER On the other hand when the WicketSessionFilter is asked for the session, it forms it's own attribute value of the stored session: Inside WicketSessionFilter.getSession() (line 208): sessionKey = application.getSessionAttributePrefix(null, filterName) + Session.SESSION_ATTRIBUTE_NAME;, where application.getSessionAttributePrefix(null, filterName) returns wicket:WICKET_FILTER: and Session.SESSION_ATTRIBUTE_NAME is session. As a result WicketSessionFilter tries to get the session with attribute named wicket:WICKET_FILTER:session The attribute names from HttpSessionStore (wicket:WICKET_FILTER:sessionWICKET_FILTER) and WicketSessionFilter(wicket:WICKET_FILTER:session) are different and the session cannot be retrieved. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WicketSessionFilter-and-ignorePaths-in-WicketFilter-tp3570291p3570577.html Sent from the Users forum 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 -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketSessionFilter and ignorePaths in WicketFilter
Yes, it's wicket 1.5 https://issues.apache.org/jira/browse/WICKET-3769 https://issues.apache.org/jira/browse/WICKET-3769 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/WicketSessionFilter-and-ignorePaths-in-WicketFilter-tp3570291p3570704.html Sent from the Users forum 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: WicketFilter 1.5
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/requestmapper/LocaleFirstMapper.java?view=log http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/requestmapper/LocaleFirstMapper.java?view=logI think this will help you. On Thu, Mar 31, 2011 at 8:58 AM, Jan Kriesten kries...@mail.footprint.dewrote: Hi, WicketFilter with 1.5 doesn't seem to use/support 'getRelativePath' any more. I used to override this to apply Locale selection and stripping this information off: /de/myRelativeWicketPath - /myRelativeWicketPath + Session Locale 'de' Where can I hook that now? Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
WicketFilter 1.5
Hi, WicketFilter with 1.5 doesn't seem to use/support 'getRelativePath' any more. I used to override this to apply Locale selection and stripping this information off: /de/myRelativeWicketPath - /myRelativeWicketPath + Session Locale 'de' Where can I hook that now? Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Why is method getLastModified in WicketFilter package-protected?
Hi, Why is the method getLastModified in WicketFilter package-protected? My problem is that I extend WicketFilter in an OSGi context. I'd like to delegate all calls to my own getLastModified method to the underlying WicketFilter. Since I am in an OSGi context and the package org.apache.wicket.protocol.http is already exported by the wicket core osgi bundle I can not simply put my class in the same package, nor can I place a small wrapper class in this package which increases the method visibility. So, question is if there are any side effects which justify that I can't delegate to this method. I don't see any. Maybe it makes sense to increase the visibility of this method. The same problem exists with parameter SERVLET_PATH_HOLDER in WicketFilter. Since this is only a parameter one could easily copy it, but since it is final already why not make it public? Or at least protected to use it in Subclasses? Regards, Steffen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why is method getLastModified in WicketFilter package-protected?
Which version of Wicket do you use ? In latest 1.4-SNAPSHOT it is protected. In 1.5 this method does not even exists anymore. The same for SERVLET_PATH_HOLDER. This one is used in WicketFilter#init() and WicketServlet#init(). Do you completely re-write those ? On Tue, Nov 30, 2010 at 3:45 PM, Steffen Fritzsche fritzs...@scriptroom.dewrote: Hi, Why is the method getLastModified in WicketFilter package-protected? My problem is that I extend WicketFilter in an OSGi context. I'd like to delegate all calls to my own getLastModified method to the underlying WicketFilter. Since I am in an OSGi context and the package org.apache.wicket.protocol.http is already exported by the wicket core osgi bundle I can not simply put my class in the same package, nor can I place a small wrapper class in this package which increases the method visibility. So, question is if there are any side effects which justify that I can't delegate to this method. I don't see any. Maybe it makes sense to increase the visibility of this method. The same problem exists with parameter SERVLET_PATH_HOLDER in WicketFilter. Since this is only a parameter one could easily copy it, but since it is final already why not make it public? Or at least protected to use it in Subclasses? Regards, Steffen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why is method getLastModified in WicketFilter package-protected?
I'm using 1.4.13, where the method is still package-protected. I've seen right now that 1.4.14 was released yesterday, is it changed there already? Yes, I'm completely rewriting the init-method for my filter, because I have to take into account some Osgi and Spring specific issues. Why is this method removed in 1.5? In my opinion it makes sense to override this HttpServlet method to indicate site changes. -sf Am 30.11.2010 um 16:12 schrieb Martin Grigorov: Which version of Wicket do you use ? In latest 1.4-SNAPSHOT it is protected. In 1.5 this method does not even exists anymore. The same for SERVLET_PATH_HOLDER. This one is used in WicketFilter#init() and WicketServlet#init(). Do you completely re-write those ? On Tue, Nov 30, 2010 at 3:45 PM, Steffen Fritzsche fritzs...@scriptroom.dewrote: Hi, Why is the method getLastModified in WicketFilter package-protected? My problem is that I extend WicketFilter in an OSGi context. I'd like to delegate all calls to my own getLastModified method to the underlying WicketFilter. Since I am in an OSGi context and the package org.apache.wicket.protocol.http is already exported by the wicket core osgi bundle I can not simply put my class in the same package, nor can I place a small wrapper class in this package which increases the method visibility. So, question is if there are any side effects which justify that I can't delegate to this method. I don't see any. Maybe it makes sense to increase the visibility of this method. The same problem exists with parameter SERVLET_PATH_HOLDER in WicketFilter. Since this is only a parameter one could easily copy it, but since it is final already why not make it public? Or at least protected to use it in Subclasses? Regards, Steffen - 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
Re: Why is method getLastModified in WicketFilter package-protected?
I've switched to 1.4.14 where the getLastModified-Method is already declared protected. That solves my problem :) -sf Am 30.11.2010 um 16:49 schrieb Steffen Fritzsche: I'm using 1.4.13, where the method is still package-protected. I've seen right now that 1.4.14 was released yesterday, is it changed there already? Yes, I'm completely rewriting the init-method for my filter, because I have to take into account some Osgi and Spring specific issues. Why is this method removed in 1.5? In my opinion it makes sense to override this HttpServlet method to indicate site changes. -sf Am 30.11.2010 um 16:12 schrieb Martin Grigorov: Which version of Wicket do you use ? In latest 1.4-SNAPSHOT it is protected. In 1.5 this method does not even exists anymore. The same for SERVLET_PATH_HOLDER. This one is used in WicketFilter#init() and WicketServlet#init(). Do you completely re-write those ? On Tue, Nov 30, 2010 at 3:45 PM, Steffen Fritzsche fritzs...@scriptroom.dewrote: Hi, Why is the method getLastModified in WicketFilter package-protected? My problem is that I extend WicketFilter in an OSGi context. I'd like to delegate all calls to my own getLastModified method to the underlying WicketFilter. Since I am in an OSGi context and the package org.apache.wicket.protocol.http is already exported by the wicket core osgi bundle I can not simply put my class in the same package, nor can I place a small wrapper class in this package which increases the method visibility. So, question is if there are any side effects which justify that I can't delegate to this method. I don't see any. Maybe it makes sense to increase the visibility of this method. The same problem exists with parameter SERVLET_PATH_HOLDER in WicketFilter. Since this is only a parameter one could easily copy it, but since it is final already why not make it public? Or at least protected to use it in Subclasses? Regards, Steffen - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WicketFilter doesn't chain?
I'm having some problems with org.springframework.orm.hibernate3.support.OpenSessionInViewFilter in some cases. I did some debugging and found that org.apache.wicket.protocol.http.WicketFilter isn't doing ServletFilter chaining: when it is called when a Wicket page is requested, it is breaking the filter chain by not calling the Filter.doFilter method (from Servlet API), causing other filters defined in web.xml not to work within the same url-pattern. (A workaround is to define WicketFilter as last entry in web.xml.) When a non-wicket url is called within the same url-pattern, then WicketFilter does perform a doFilter, allowing other filters to do some work. In Servlet applications (which Wicket basically also is), I think it is expected behaviour that all filters within some url-pattern should always be called. But WicketFilter seems to break it. Is this expected behaviour? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter doesn't chain?
If it handles the request, it doesn't need to execute the rest of the chain. Put OSIV in front of WicketFilter. On Fri, May 14, 2010 at 5:19 PM, J bluecar...@gmx.com wrote: I'm having some problems with org.springframework.orm.hibernate3.support.OpenSessionInViewFilter in some cases. I did some debugging and found that org.apache.wicket.protocol.http.WicketFilter isn't doing ServletFilter chaining: when it is called when a Wicket page is requested, it is breaking the filter chain by not calling the Filter.doFilter method (from Servlet API), causing other filters defined in web.xml not to work within the same url-pattern. (A workaround is to define WicketFilter as last entry in web.xml.) When a non-wicket url is called within the same url-pattern, then WicketFilter does perform a doFilter, allowing other filters to do some work. In Servlet applications (which Wicket basically also is), I think it is expected behaviour that all filters within some url-pattern should always be called. But WicketFilter seems to break it. Is this expected behaviour? - 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
Re: WicketFilter Config
Igor, We are using WicketFilter with SpringWebApplicationFactory. This works fine, but I've noticed SpringWebApplication has been deprecated, and since SpringWebApplicationFactory returns a SpringWebApplication we tried the ContextParamWebApplicationFactory which also works. Which is preferred, since SpringWebApplication is deprecated should we avoid using it by using the ContextParamWebApplicationFactory? Igor Vaynberg igor.vaynb...@gmail.com 03/25/2010 05:03 PM Please respond to users@wicket.apache.org To users@wicket.apache.org cc Subject Re: WicketFilter Config recommended configuration is on our wiki's spring page -igor On Thu, Mar 25, 2010 at 11:22 AM, mzem...@osc.state.ny.us wrote: Due to the fact that SpringWebApplication is deprecated, we evaluated several ways of configuring Wicket using WicketFilter. I found ContextParamWebApplicationFactory to work with a Spring Annotation approach. SpringWebApplicationFactory also works with a Spring Annotation approach, but since it returns a SpringWebApplication (deprecated) should it be avoided? I would love to hear from the Wicket team as far as the recommended configuration. Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information.
Re: WicketFilter Config
Do you want/need to configure your application via Spring? On Mon, Mar 29, 2010 at 4:27 PM, mzem...@osc.state.ny.us wrote: Igor, We are using WicketFilter with SpringWebApplicationFactory. This works fine, but I've noticed SpringWebApplication has been deprecated, and since SpringWebApplicationFactory returns a SpringWebApplication we tried the ContextParamWebApplicationFactory which also works. Which is preferred, since SpringWebApplication is deprecated should we avoid using it by using the ContextParamWebApplicationFactory? Igor Vaynberg igor.vaynb...@gmail.com 03/25/2010 05:03 PM Please respond to users@wicket.apache.org To users@wicket.apache.org cc Subject Re: WicketFilter Config recommended configuration is on our wiki's spring page -igor On Thu, Mar 25, 2010 at 11:22 AM, mzem...@osc.state.ny.us wrote: Due to the fact that SpringWebApplication is deprecated, we evaluated several ways of configuring Wicket using WicketFilter. I found ContextParamWebApplicationFactory to work with a Spring Annotation approach. SpringWebApplicationFactory also works with a Spring Annotation approach, but since it returns a SpringWebApplication (deprecated) should it be avoided? I would love to hear from the Wicket team as far as the recommended configuration. Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information.
Re: WicketFilter Config
Yes we are using Spring. Our Spring configuration works with either the SpringWebApplicationFactory or ContextParamWebApplicationFactory. James Carman jcar...@carmanconsulting.com 03/29/2010 04:31 PM Please respond to users@wicket.apache.org To users@wicket.apache.org cc Subject Re: WicketFilter Config Do you want/need to configure your application via Spring? On Mon, Mar 29, 2010 at 4:27 PM, mzem...@osc.state.ny.us wrote: Igor, We are using WicketFilter with SpringWebApplicationFactory. This works fine, but I've noticed SpringWebApplication has been deprecated, and since SpringWebApplicationFactory returns a SpringWebApplication we tried the ContextParamWebApplicationFactory which also works. Which is preferred, since SpringWebApplication is deprecated should we avoid using it by using the ContextParamWebApplicationFactory? Igor Vaynberg igor.vaynb...@gmail.com 03/25/2010 05:03 PM Please respond to users@wicket.apache.org To users@wicket.apache.org cc Subject Re: WicketFilter Config recommended configuration is on our wiki's spring page -igor On Thu, Mar 25, 2010 at 11:22 AM, mzem...@osc.state.ny.us wrote: Due to the fact that SpringWebApplication is deprecated, we evaluated several ways of configuring Wicket using WicketFilter. I found ContextParamWebApplicationFactory to work with a Spring Annotation approach. SpringWebApplicationFactory also works with a Spring Annotation approach, but since it returns a SpringWebApplication (deprecated) should it be avoided? I would love to hear from the Wicket team as far as the recommended configuration. Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information.
Re: WicketFilter Config
Well, if you need to configure (i.e. set properties on, etc) your application object via Spring, then you either need to use SpringWebApplicationFactory or write your own class that does the same thing (that's not deprecated). On Mon, Mar 29, 2010 at 4:36 PM, mzem...@osc.state.ny.us wrote: Yes we are using Spring. Our Spring configuration works with either the SpringWebApplicationFactory or ContextParamWebApplicationFactory. James Carman jcar...@carmanconsulting.com 03/29/2010 04:31 PM Please respond to users@wicket.apache.org To users@wicket.apache.org cc Subject Re: WicketFilter Config Do you want/need to configure your application via Spring? On Mon, Mar 29, 2010 at 4:27 PM, mzem...@osc.state.ny.us wrote: Igor, We are using WicketFilter with SpringWebApplicationFactory. This works fine, but I've noticed SpringWebApplication has been deprecated, and since SpringWebApplicationFactory returns a SpringWebApplication we tried the ContextParamWebApplicationFactory which also works. Which is preferred, since SpringWebApplication is deprecated should we avoid using it by using the ContextParamWebApplicationFactory? Igor Vaynberg igor.vaynb...@gmail.com 03/25/2010 05:03 PM Please respond to users@wicket.apache.org To users@wicket.apache.org cc Subject Re: WicketFilter Config recommended configuration is on our wiki's spring page -igor On Thu, Mar 25, 2010 at 11:22 AM, mzem...@osc.state.ny.us wrote: Due to the fact that SpringWebApplication is deprecated, we evaluated several ways of configuring Wicket using WicketFilter. I found ContextParamWebApplicationFactory to work with a Spring Annotation approach. SpringWebApplicationFactory also works with a Spring Annotation approach, but since it returns a SpringWebApplication (deprecated) should it be avoided? I would love to hear from the Wicket team as far as the recommended configuration. Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information.
WicketFilter Config
Due to the fact that SpringWebApplication is deprecated, we evaluated several ways of configuring Wicket using WicketFilter. I found ContextParamWebApplicationFactory to work with a Spring Annotation approach. SpringWebApplicationFactory also works with a Spring Annotation approach, but since it returns a SpringWebApplication (deprecated) should it be avoided? I would love to hear from the Wicket team as far as the recommended configuration. Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information.
Re: WicketFilter Config
recommended configuration is on our wiki's spring page -igor On Thu, Mar 25, 2010 at 11:22 AM, mzem...@osc.state.ny.us wrote: Due to the fact that SpringWebApplication is deprecated, we evaluated several ways of configuring Wicket using WicketFilter. I found ContextParamWebApplicationFactory to work with a Spring Annotation approach. SpringWebApplicationFactory also works with a Spring Annotation approach, but since it returns a SpringWebApplication (deprecated) should it be avoided? I would love to hear from the Wicket team as far as the recommended configuration. Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter Config
See if http://jweekend.com/dev/LegUp gives you an easy way to get started. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com On 25 March 2010 18:22, mzem...@osc.state.ny.us wrote: Due to the fact that SpringWebApplication is deprecated, we evaluated several ways of configuring Wicket using WicketFilter. I found ContextParamWebApplicationFactory to work with a Spring Annotation approach. SpringWebApplicationFactory also works with a Spring Annotation approach, but since it returns a SpringWebApplication (deprecated) should it be avoided? I would love to hear from the Wicket team as far as the recommended configuration. Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WicketServlet/WicketFilter client cache lifetime How-to ?
Hi! I want to allow client browsrs to cache static resources from /webapp/* (namely /webapp/images, /webapp/css /webapp/js, etc.). I thought I could achieve this by configuring jetty: http://stackoverflow.com/questions/1906745/how-to-configure-cache-for-static-resources-in-web-xml-for-jetty/ However, as it turns out (after some debugging) all the static resources are served via WicketServlet too. Could someone help me in configuring either wicketservlet (compannioned with wicketfilter??) or wicketfilter such that static resources in /webapp/* get a client cache lifetime of 1 hour. Currently all static content from /webapp/* is served without cache headers, which puts quite a strain on the server. ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter
hm, i remember that filter also setting the application. maybe i did not remember correctly. anyways, you can simply write your own filter then. -igor 2009/8/30 Uwe Schäfer u...@thomas-daily.de: Igor Vaynberg schrieb: even though it is session specific it still sets application threadlocal. does not work, and does not look like it would: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpServletRequest = ((HttpServletRequest)request); HttpSession httpSession = httpServletRequest.getSession(false); if (httpSession != null) { ... // sorry, dont have one } else { log.debug(could not set Wicket session: no http session was created yet for {},{}, httpServletRequest.getContextPath(), httpServletRequest.getServerName()); } try { // go on with processing chain.doFilter(request, response); } finally { Session.unset(); // was not set before in this case? } } what am i missing ? cu uwe - 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
Re: WicketFilter
Igor Vaynberg schrieb: hm, i remember that filter also setting the application. maybe i did not remember correctly. anyways, you can simply write your own filter then. done. but i´d love to grab the webApplication reference from the original filter by other means than nasty reflection *g* would it be possible to add protected Application getApplication(){ return webApplication; } to the WicketFilter? thx, uwe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter
Igor Vaynberg schrieb: how are you getting a reference to the filter itself to start with? MyFunkyFilter extends WicketFilter :) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter
ok, i added a protected getter. remember, you can only call it after the filter's init() has been called. -igor 2009/8/31 Uwe Schäfer schae...@thomas-daily.de: Igor Vaynberg schrieb: how are you getting a reference to the filter itself to start with? MyFunkyFilter extends WicketFilter :) - 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
Re: WicketFilter
Igor Vaynberg schrieb: ok, i added a protected getter. remember, you can only call it after the filter's init() has been called. sure, thanks Igor. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter
Igor Vaynberg schrieb: map WicketSessionFilter in front of those servlets, you will get both Session.get() and Session.get().getApplication(), and Application.get() awesome. i was not aware of this. thanks Igor. cu uwe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter
even though it is session specific it still sets application threadlocal. -igor 2009/8/30 Uwe Schäfer u...@thomas-daily.de: Igor Vaynberg schrieb: map WicketSessionFilter in front of those servlets, you will get both Session.get() and Session.get().getApplication(), and Application.get() actually, (as the name implies), this is quite session centric. my current use case is web services where i don´t have a session. subclassing WicketFilter is not too easy as well, because it does not reveal the application reference (private, no getter). this makes me do nasty reflection tricks to get it, which - while it works - feels even much more dirty than using the singleton approach to get an application reference. any idea, how this could be done with a cleaner approach? or would WicketFilter: protected WebApplication getApplication() be an alternative? cu uwe --- current nasty impl: �...@override public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException { super.doFilter(request, response, new ModifiedChain(chain, getApplication())); } private Application getApplication() { // very very nasty return (Application) getFieldValue(this, webApplication); } public static Object getFieldValue(final Object obj, final String string) { // did i say nasty? try { final Field declaredField = obj.getClass().getSuperclass().getDeclaredField(string); declaredField.setAccessible(true); return declaredField.get(obj); } catch (final Throwable e) { throw new RuntimeException(e); } } } class ModifiedChain implements FilterChain { private FilterChain orgChain; private final Application application; public ModifiedChain(final FilterChain chain, final Application application) { this.orgChain = chain; this.application = application; } public void doFilter(final ServletRequest request, final ServletResponse response) throws IOException, ServletException { Application.set(this.application); try { this.orgChain.doFilter(request, response); } finally { Application.unset(); } } } - 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
Re: WicketFilter
Igor Vaynberg schrieb: even though it is session specific it still sets application threadlocal. does not work, and does not look like it would: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpServletRequest = ((HttpServletRequest)request); HttpSession httpSession = httpServletRequest.getSession(false); if (httpSession != null) { ... // sorry, dont have one } else { log.debug(could not set Wicket session: no http session was created yet for {},{}, httpServletRequest.getContextPath(), httpServletRequest.getServerName()); } try { // go on with processing chain.doFilter(request, response); } finally { Session.unset(); // was not set before in this case? } } what am i missing ? cu uwe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WicketFilter
Hi once in a while, i´d like to create a servlet (or worse) that can grab data from the wicket application. currently, i do it through singletons which feels quite dirty. i was wondering, if it would be possible to extend the WicketFilter, to offer a reference to anyone processing the request (further in the chain) to the application the request belongs to. It might confuse some existing code if Application.get() suddenly would work, even though Wicket is not processing the request, but there are plenty of other possibilties, like request-attributes (might be very cheap in terms of performance) or dedicated threadLocals. one could certainly do that by subclassing myself, but as this is the 3rd or 4th time i come across this need, i was wondering, if i am alone or simply missing something. cu uwe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter
map WicketSessionFilter in front of those servlets, you will get both Session.get() and Session.get().getApplication(), and Application.get() -igor 2009/8/29 Uwe Schäfer u...@thomas-daily.de: Hi once in a while, i´d like to create a servlet (or worse) that can grab data from the wicket application. currently, i do it through singletons which feels quite dirty. i was wondering, if it would be possible to extend the WicketFilter, to offer a reference to anyone processing the request (further in the chain) to the application the request belongs to. It might confuse some existing code if Application.get() suddenly would work, even though Wicket is not processing the request, but there are plenty of other possibilties, like request-attributes (might be very cheap in terms of performance) or dedicated threadLocals. one could certainly do that by subclassing myself, but as this is the 3rd or 4th time i come across this need, i was wondering, if i am alone or simply missing something. cu uwe - 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
WicketFilter and nullpointerexception
Hi all, I am using wicket and blazeds. The users logs in through wicket and they use blazeds services as well. I need to verify in MessageBrokerServlet (blazeds servlet) that the user has logged in. Then I added the WicketSessionFilter to get the session. But I got a null pointer exception: java.lang.NullPointerException at org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:158) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:250) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) 43360 [btpool0-1] ERROR org.mortbay.log - /messagebroker/amf java.lang.NullPointerException at org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:158) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:250) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) I dont realize why this is happening. Because 1. I logged in 2. The MessageBrokerServlet as well as WicketSessionFilter point to the same url Thanks in advance. -- Fernando Wermus. www.linkedin.com/in/fernandowermus
WicketFilter Session Information
I want to create a custom filter by extending WicketFilter. How do I get the Wicket Session object in my custom filter? Richard Rowe
Re: WicketFilter Session Information
Session.get() if the parent filter has already initialized it -- Jeremy Thomerson http://www.wickettraining.com On Thu, Jun 25, 2009 at 10:39 AM, Rowe, Richard A.richard.a.r...@saic.com wrote: I want to create a custom filter by extending WicketFilter. How do I get the Wicket Session object in my custom filter? Richard Rowe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketFilter Session Information
alternatively add WicketSessionFilter infront of yours. -igor On Thu, Jun 25, 2009 at 10:12 AM, Jeremy Thomersonjer...@wickettraining.com wrote: Session.get() if the parent filter has already initialized it -- Jeremy Thomerson http://www.wickettraining.com On Thu, Jun 25, 2009 at 10:39 AM, Rowe, Richard A.richard.a.r...@saic.com wrote: I want to create a custom filter by extending WicketFilter. How do I get the Wicket Session object in my custom filter? Richard Rowe - 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
Re: HTTP error code 404 is returned by Wicket1.3.5(WicketFilter) and WAS6.0.1(And FixPack 21).
Not sure if this applies to your case but have you seen http://cwiki.apache.org/WICKET/websphere.html Notes on using Wicket with WebSphere ? -- View this message in context: http://www.nabble.com/HTTP-error-code-404-is-returned-by-Wicket1.3.5%28WicketFilter%29-and-WAS6.0.1%28And-FixPack-21%29.-tp21155885p21156851.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: HTTP error code 404 is returned by Wicket1.3.5(WicketFilter) and WAS6.0.1(And FixPack 21).
Thank you for the giving information. To our regret, I already had confirmed this information. HTTP error code 404 is not generated because I am using WicketServlet now. However, the use of WicketFilter is recommended from WicketServlet since Wicket1.3. I want to learn the achievement method in WicketFilter. If I can do, I want to learn the achievement method in WicketFilter. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HTTP error code 404 is returned by Wicket1.3.5(WicketFilter) and WAS6.0.1(And FixPack 21).
To our regret, I already had confirmed this information. HTTP error code 404 is not generated because I am using WicketServlet now. However, the use of WicketFilter is recommended from WicketServlet since Wicket1.3. I want to learn the achievement method in WicketFilter. If I can do, I want to learn the achievement method in WicketFilter. -- View this message in context: http://www.nabble.com/HTTP-error-code-404-is-returned-by-Wicket1.3.5%28WicketFilter%29-and-WAS6.0.1%28And-FixPack-21%29.-tp21155885p21156900.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: HTTP error code 404 is returned by Wicket1.3.5(WicketFilter) and WAS6.0.1(And FixPack 21).
The WicketSerlvet class is still fully supported -- if you look closely at its code, you will see that it basically hands everything off to the WicketFilter class. My experience has been that the servlet solution works best with WebSphere 6.1. -- View this message in context: http://www.nabble.com/HTTP-error-code-404-is-returned-by-Wicket1.3.5%28WicketFilter%29-and-WAS6.0.1%28And-FixPack-21%29.-tp21155885p21156963.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
HTTP error code 404 is returned by Wicket1.3.5(WicketFilter) and WAS6.0.1(And FixPack 21).
I am using Wicket1.3.5 and WAS6.1.0(And FixPack21) now, and when WicketFilter is used, HTTP error code 404 is occur(It is not occur in Tomcat5.0.28). The following question is here. In the close() method of BufferedWebResponse, the Writer instance might have to be shut. For instance, after the write() method is called, I think that getHttpServletResponse().getWriter().close() is necessary. When the close method of BufferedWebResponse was corrected as follows, the problem is canceled. public void close() { // If a redirection was specified if (redirectURL != null) { // actually redirect super.redirect(redirectURL); } else { // Write the buffer to the response stream if (buffer.length() != 0) { super.write(buffer); //-- TODO 2008/12/16 kanou add start -- try { getHttpServletResponse().getWriter().flush(); getHttpServletResponse().getWriter().close(); } catch (IOException ioe) { throw new WicketRuntimeException(getClass().getName() + close() failed.); } //-- 2008/12/16 kanou add end -- } } } [Note] When WicketServlet is used, the servlet container closes the response object. However, when WicketFilter is used, I think that I depend on the servlet container. It is being written in the specification of servlet API2.4 of Sun. -- SRV.5.5 Closure of Response Object When a response is closed, the container must immediately flush all remaining content in the response buffer to the client. The following events indicate that the servlet has satisfied the request and that the response object is to be closed: ・The termination of the service method of the servlet. ・The amount of content specified in the setContentLength method of the response has been written to the response. ・The sendError method is called. ・The sendRedirect method is called. -- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CometServlet and WicketFilter
it seems that jetty 6 really uses servlet api 2.5 yes (this is by the way very hard to find... they really should have a list just as tomcat has) so somehow you have another servlet.jar there On Thu, May 8, 2008 at 3:32 AM, freak182 [EMAIL PROTECTED] wrote: Hello Johan, I think im running on servlet 2.5 container because in the wicket-push example it uses the embeded jetty server 6.1.1 and in our project we are using embeded jetty server 6.1.4..i guess higher version make a difference or i might be wrong,pls advise?...Thanks a lot...Cheers.. Johan Compagner wrote: you can upgrade your compile servlet api just fine But are you also running in a container that uses 2.5??? johan On Wed, May 7, 2008 at 11:45 AM, freak182 [EMAIL PROTECTED] wrote: Hello, my problem im having problem integrating the wicket-push example to our project using wicketfilter and since the wicket-push examples using wicketservlet..how can i configure this changes?i already ported to servlet-api 2.5. i change from... ServletContext servletContext = ((WebApplication)Application.get()).getServletContext(); to ServletContext servletContext = ((WebApplication)Application.get()).getWicketFilter().getFilterConfig().getServletContext(); but still error... java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String; at org.wicketstuff.push.cometd.CometdAbstractBehavior.getCometdServletPath(CometdAbstractBehavior.java:221) at org.wicketstuff.push.cometd.CometdAbstractBehavior.clinit(CometdAbstractBehavior.java:25) ...any idea how to do this thing??? Thanks a lot...Cheers -- View this message in context: http://www.nabble.com/CometServlet-and-WicketFilter-tp17101068p17101068.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] -- View this message in context: http://www.nabble.com/CometServlet-and-WicketFilter-tp17101068p17117634.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]
Re: CometServlet and WicketFilter
Hello Johan, Thanks for the advice...i will try to look at for any servlet.jar...anyway our project is big and i dont know want jars my teammate added-n-added... :-) Thanks a lot..Cheers Johan Compagner wrote: it seems that jetty 6 really uses servlet api 2.5 yes (this is by the way very hard to find... they really should have a list just as tomcat has) so somehow you have another servlet.jar there On Thu, May 8, 2008 at 3:32 AM, freak182 [EMAIL PROTECTED] wrote: Hello Johan, I think im running on servlet 2.5 container because in the wicket-push example it uses the embeded jetty server 6.1.1 and in our project we are using embeded jetty server 6.1.4..i guess higher version make a difference or i might be wrong,pls advise?...Thanks a lot...Cheers.. Johan Compagner wrote: you can upgrade your compile servlet api just fine But are you also running in a container that uses 2.5??? johan On Wed, May 7, 2008 at 11:45 AM, freak182 [EMAIL PROTECTED] wrote: Hello, my problem im having problem integrating the wicket-push example to our project using wicketfilter and since the wicket-push examples using wicketservlet..how can i configure this changes?i already ported to servlet-api 2.5. i change from... ServletContext servletContext = ((WebApplication)Application.get()).getServletContext(); to ServletContext servletContext = ((WebApplication)Application.get()).getWicketFilter().getFilterConfig().getServletContext(); but still error... java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String; at org.wicketstuff.push.cometd.CometdAbstractBehavior.getCometdServletPath(CometdAbstractBehavior.java:221) at org.wicketstuff.push.cometd.CometdAbstractBehavior.clinit(CometdAbstractBehavior.java:25) ...any idea how to do this thing??? Thanks a lot...Cheers -- View this message in context: http://www.nabble.com/CometServlet-and-WicketFilter-tp17101068p17101068.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] -- View this message in context: http://www.nabble.com/CometServlet-and-WicketFilter-tp17101068p17117634.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] -- View this message in context: http://www.nabble.com/CometServlet-and-WicketFilter-tp17101068p17139611.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]
CometServlet and WicketFilter
Hello, my problem im having problem integrating the wicket-push example to our project using wicketfilter and since the wicket-push examples using wicketservlet..how can i configure this changes?i already ported to servlet-api 2.5. i change from... ServletContext servletContext = ((WebApplication)Application.get()).getServletContext(); to ServletContext servletContext = ((WebApplication)Application.get()).getWicketFilter().getFilterConfig().getServletContext(); but still error... java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String; at org.wicketstuff.push.cometd.CometdAbstractBehavior.getCometdServletPath(CometdAbstractBehavior.java:221) at org.wicketstuff.push.cometd.CometdAbstractBehavior.clinit(CometdAbstractBehavior.java:25) ...any idea how to do this thing??? Thanks a lot...Cheers -- View this message in context: http://www.nabble.com/CometServlet-and-WicketFilter-tp17101068p17101068.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]
Re: CometServlet and WicketFilter
you can upgrade your compile servlet api just fine But are you also running in a container that uses 2.5??? johan On Wed, May 7, 2008 at 11:45 AM, freak182 [EMAIL PROTECTED] wrote: Hello, my problem im having problem integrating the wicket-push example to our project using wicketfilter and since the wicket-push examples using wicketservlet..how can i configure this changes?i already ported to servlet-api 2.5. i change from... ServletContext servletContext = ((WebApplication)Application.get()).getServletContext(); to ServletContext servletContext = ((WebApplication)Application.get()).getWicketFilter().getFilterConfig().getServletContext(); but still error... java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String; at org.wicketstuff.push.cometd.CometdAbstractBehavior.getCometdServletPath(CometdAbstractBehavior.java:221) at org.wicketstuff.push.cometd.CometdAbstractBehavior.clinit(CometdAbstractBehavior.java:25) ...any idea how to do this thing??? Thanks a lot...Cheers -- View this message in context: http://www.nabble.com/CometServlet-and-WicketFilter-tp17101068p17101068.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]
Re: CometServlet and WicketFilter
Hello Johan, I think im running on servlet 2.5 container because in the wicket-push example it uses the embeded jetty server 6.1.1 and in our project we are using embeded jetty server 6.1.4..i guess higher version make a difference or i might be wrong,pls advise?...Thanks a lot...Cheers.. Johan Compagner wrote: you can upgrade your compile servlet api just fine But are you also running in a container that uses 2.5??? johan On Wed, May 7, 2008 at 11:45 AM, freak182 [EMAIL PROTECTED] wrote: Hello, my problem im having problem integrating the wicket-push example to our project using wicketfilter and since the wicket-push examples using wicketservlet..how can i configure this changes?i already ported to servlet-api 2.5. i change from... ServletContext servletContext = ((WebApplication)Application.get()).getServletContext(); to ServletContext servletContext = ((WebApplication)Application.get()).getWicketFilter().getFilterConfig().getServletContext(); but still error... java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String; at org.wicketstuff.push.cometd.CometdAbstractBehavior.getCometdServletPath(CometdAbstractBehavior.java:221) at org.wicketstuff.push.cometd.CometdAbstractBehavior.clinit(CometdAbstractBehavior.java:25) ...any idea how to do this thing??? Thanks a lot...Cheers -- View this message in context: http://www.nabble.com/CometServlet-and-WicketFilter-tp17101068p17101068.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] -- View this message in context: http://www.nabble.com/CometServlet-and-WicketFilter-tp17101068p17117634.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]
Re: Exception starting filter WicketFilter on Glassfish
Or the other way around. Are you somehow including your own servlet.jar in your webapp. And is that one picked up that shouldnt be picked up On 4/17/08, PJ Pillai [EMAIL PROTECTED] wrote: Hello, I deployed my first hello world application on Glass Fish server. I am using Netbeans 6. I am getting following error: WebModule[/MyApp]PWC1270: Exception starting filter WicketFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) Please help Thanks, Pravin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exception starting filter WicketFilter on Glassfish
Hello, I deployed my first hello world application on Glass Fish server. I am using Netbeans 6. I am getting following error: WebModule[/MyApp]PWC1270: Exception starting filter WicketFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) Please help Thanks, Pravin
Re: Exception starting filter WicketFilter on Glassfish
heh, your glassfish install is missing servlet.jar...weird. you sure your install is kosher, doesnt really make sense. unless in glassfish every module is supposed to provide its own servlet jar and glasshfish can run multiple concurrent versions? -igor On Wed, Apr 16, 2008 at 11:05 PM, PJ Pillai [EMAIL PROTECTED] wrote: Hello, I deployed my first hello world application on Glass Fish server. I am using Netbeans 6. I am getting following error: WebModule[/MyApp]PWC1270: Exception starting filter WicketFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) Please help Thanks, Pravin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exception starting filter WicketFilter on Glassfish
I searched the glassfish directory and it does not exist. Glassfish came with netbean 6. Other webapplications are working fine. Where can I get the servlet.jar? On 4/16/08, Igor Vaynberg [EMAIL PROTECTED] wrote: heh, your glassfish install is missing servlet.jar...weird. you sure your install is kosher, doesnt really make sense. unless in glassfish every module is supposed to provide its own servlet jar and glasshfish can run multiple concurrent versions? -igor On Wed, Apr 16, 2008 at 11:05 PM, PJ Pillai [EMAIL PROTECTED] wrote: Hello, I deployed my first hello world application on Glass Fish server. I am using Netbeans 6. I am getting following error: WebModule[/MyApp]PWC1270: Exception starting filter WicketFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) Please help Thanks, Pravin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tip:ServletContext from WicketFilter
thanks, works great! On 1/21/08, Igor Vaynberg [EMAIL PROTECTED] wrote: there is a webapplication.getservletcontext(). -igor On Jan 21, 2008 7:42 AM, Ayodeji Aladejebi [EMAIL PROTECTED] wrote: Well, I have started migrating some code to 1.3, however i had some STOP-AND-CONFIRM situation In 1.2.x ServletContext context = Application.getWicketServlet ().getServletContext() ? doSomethingWithContext(context); Migrating to 1.3.x ServletContext context = Application.getWicketFilter().getFilterConfig().getServletContext() ? doSomethingWithContext(context); I guess by doing this, my previous code wont break, even though there is no WicketServlet configured in my web.xml? Or must I configure a WicketServlet to be able to do this thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tip:ServletContext from WicketFilter
Well, I have started migrating some code to 1.3, however i had some STOP-AND-CONFIRM situation In 1.2.x ServletContext context = Application.getWicketServlet().getServletContext() ? doSomethingWithContext(context); Migrating to 1.3.x ServletContext context = Application.getWicketFilter().getFilterConfig().getServletContext() ? doSomethingWithContext(context); I guess by doing this, my previous code wont break, even though there is no WicketServlet configured in my web.xml? Or must I configure a WicketServlet to be able to do this thanks
Re: Tip:ServletContext from WicketFilter
that should still work. On Jan 21, 2008 4:42 PM, Ayodeji Aladejebi [EMAIL PROTECTED] wrote: Well, I have started migrating some code to 1.3, however i had some STOP-AND-CONFIRM situation In 1.2.x ServletContext context = Application.getWicketServlet ().getServletContext() ? doSomethingWithContext(context); Migrating to 1.3.x ServletContext context = Application.getWicketFilter().getFilterConfig().getServletContext() ? doSomethingWithContext(context); I guess by doing this, my previous code wont break, even though there is no WicketServlet configured in my web.xml? Or must I configure a WicketServlet to be able to do this thanks t
Re: Tip:ServletContext from WicketFilter
there is a webapplication.getservletcontext(). -igor On Jan 21, 2008 7:42 AM, Ayodeji Aladejebi [EMAIL PROTECTED] wrote: Well, I have started migrating some code to 1.3, however i had some STOP-AND-CONFIRM situation In 1.2.x ServletContext context = Application.getWicketServlet().getServletContext() ? doSomethingWithContext(context); Migrating to 1.3.x ServletContext context = Application.getWicketFilter().getFilterConfig().getServletContext() ? doSomethingWithContext(context); I guess by doing this, my previous code wont break, even though there is no WicketServlet configured in my web.xml? Or must I configure a WicketServlet to be able to do this thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketServlet vs. WicketFilter
also wicket filter is much better at handling /* mapping The only problem with this mapping is that filter is invoked for all requests that fetch static web resources (css, images, etc). I may be wrong but I don't think it's good for performance. Especially if you use some other filter, for example, OpenEntityManagerInViewFilter which opens a JPA session for each request. Maris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketServlet vs. WicketFilter
I think it's Websphere: http://joshuajava.wordpress.com/2007/11/12/my-first-impression-about-wicket/ On 1/11/08, Gwyn Evans [EMAIL PROTECTED] wrote: On 10/01/2008, Igor Vaynberg [EMAIL PROTECTED] wrote: example weblogic has pretty broken filter support, Wasn't that Websphere rather than Weblogic, or did I miss something? -- I'm a coder not a drag-n-dropper Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketServlet vs. WicketFilter
yes there is some overhead. but it is much better then the servlet. the filter can let the resource fall through and be served by the servlet cotainer. if you use a servlet then the servlet itself has to stream the resource out. guess which will have a more optimized implementation... -igor On Jan 11, 2008 5:33 PM, Maris Orbidans [EMAIL PROTECTED] wrote: also wicket filter is much better at handling /* mapping The only problem with this mapping is that filter is invoked for all requests that fetch static web resources (css, images, etc). I may be wrong but I don't think it's good for performance. Especially if you use some other filter, for example, OpenEntityManagerInViewFilter which opens a JPA session for each request. Maris - 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]
WicketServlet vs. WicketFilter
Hi All, Are there any criteria in choosing WicketFilter over WicketServlet? In the api it says, Please use WicketFilter if you require advanced chaining of resources. What does this mean? If you have deeply rooted Panel within a Panel with a Panel? Thanks, WT -- The only constant in life is change. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketServlet vs. WicketFilter
sometimes you might want to chain preprocessors/postprocessors around wicket - in that case you have to use filters since you cant chain servlets. also wicket filter is much better at handling /* mapping generally i would recommend wicketfilter. wicketservlet is there as a backup for situations where it is harder to use the filter - for example weblogic has pretty broken filter support, also some osgi containers only support registration of servlets. -igor On Jan 10, 2008 11:44 AM, Beyonder Unknown [EMAIL PROTECTED] wrote: Hi All, Are there any criteria in choosing WicketFilter over WicketServlet? In the api it says, Please use WicketFilter if you require advanced chaining of resources. What does this mean? If you have deeply rooted Panel within a Panel with a Panel? Thanks, WT -- The only constant in life is change. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - 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]
Re: WicketServlet vs. WicketFilter
Thanks Igor! I understand it now. Best, WT -- The only constant in life is change. - Original Message From: Igor Vaynberg [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Thursday, January 10, 2008 11:48:04 AM Subject: Re: WicketServlet vs. WicketFilter sometimes you might want to chain preprocessors/postprocessors around wicket - in that case you have to use filters since you cant chain servlets. also wicket filter is much better at handling /* mapping generally i would recommend wicketfilter. wicketservlet is there as a backup for situations where it is harder to use the filter - for example weblogic has pretty broken filter support, also some osgi containers only support registration of servlets. -igor On Jan 10, 2008 11:44 AM, Beyonder Unknown [EMAIL PROTECTED] wrote: Hi All, Are there any criteria in choosing WicketFilter over WicketServlet? In the api it says, Please use WicketFilter if you require advanced chaining of resources. What does this mean? If you have deeply rooted Panel within a Panel with a Panel? Thanks, WT -- The only constant in life is change. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - 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] Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]