Try with url-mapping: /friends/* both for the session filter and the servlet
On Sat, Aug 20, 2011 at 12:03 PM, <martin.ase...@mail.bg> wrote: > Hello, guys, > > I experience a strange problem with trying to provide a custom servlet with > the wicket session. > > Here is my web.xml conf: > > <filter> > <filter-name>wicketFilter</filter-name> > > <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> > <init-param> > <param-name>applicationClassName</param-name> > <param-value>com.company.apps.appname.WebApp</param-value> > </init-param> > <init-param> > <param-name>filterPath</param-name> > <param-value>/</param-value> > </init-param> > </filter> > > <filter-mapping> > <filter-name>wicketFilter</filter-name> > <url-pattern>/*</url-pattern> > </filter-mapping> > > <filter> > <filter-name>wicketSessionFilter</filter-name> > <filter-class>org.apache.wicket.protocol.http.servlet.WicketSessionFilter</filter-class> > <init-param> > <param-name>filterName</param-name> > <param-value>wicketFilter</param-value> > </init-param> > </filter> > > <filter-mapping> > <filter-name>wicketSessionFilter</filter-name> > <url-pattern>/friends</url-pattern> > <dispatcher>REQUEST</dispatcher> > <dispatcher>INCLUDE</dispatcher> > </filter-mapping> > > <servlet> > <servlet-name>friendsManager</servlet-name> > > <servlet-class>com.company.apps.appname.servlet.FriendsManagerServlet</servlet-class> > </servlet> > > <servlet-mapping> > <servlet-name>friendsManager</servlet-name> > <url-pattern>/friends</url-pattern> > </servlet-mapping> > > The exception "java.lang.IllegalStateException: you can only locate or create > sessions in the context of a request cycle" is being thrown by the 'friends' > servlet. > > Everything seems to be configured properly; however I get this error. I'm > using wicket 1.4.17. > > I would appreciate any help. > > Thank you and regards, > Martin > > ------------------------------------- > > Видя ли лятната промоция на СуперХостинг? > Дават цели ДВЕ години, като плащаш само ЕДНА! > Истина е, провери! > http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo123&utm_campaign=SummerPromo -- 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