You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ma...@mail.bg on 2011/08/20 11:03:25 UTC
java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
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
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by ma...@mail.bg.
Sorry, my mistake...
Session is not null at servlet. There I have:
session is: org.apache.catalina.session.StandardSessionFacade@412f4b
while the statement in logs from wicketsessionfilter is:
20-08-2011 13:25:57,753 DEBUG
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.bindSession:180
- could not set Wicket session: key null not found in http session for
/appname,IP_ADDRESS, or http session does not exist
----- Цитат от martin.asenov@mail.bg, на 20.08.2011 в 13:31 -----
yes, really session is null.... :O
at servlet:
req.getSession() returns null
and wicketsessionfilter in debug mode prints
20-08-2011 13:25:57,753 DEBUG
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.bindSession:180
- could not set Wicket session: key null not found in http session for
/appname,IP_ADDRESS, or http session does not exist
I really don't get it... null http session... could this really be true?
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 13:16 ----- try with
getWebRequest().getHttpServletRequest().getHttpSession(false)
in your page before making the call to the servlet.
It should return non-null.
Additionally turn on DEBUG logging for WSF
On Sat, Aug 20, 2011 at 12:54 PM, wrote:
Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:44 ----- the mapping is OK. we see WicketSessionFilter
in the stack
there is the following code in WSF#bindSession():
if (session == null)
{
if (logger.isDebugEnabled())
{
logger.debug("could not set Wicket session: key " + sessionKey +
" not found in http session for " +
((HttpServletRequest)request).getContextPath() + "," +
request.getServerName() +
", or http session does not exist");
}
}
Maybe you don't have active HttpSession yet.
On Sat, Aug 20, 2011 at 12:24 PM, wrote:
Here is the exception:
java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle
at org.apache.wicket.Session.findOrCreate(Session.java:209)
at org.apache.wicket.Session.get(Session.java:253)
at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)
at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:17 ----- paste the last few lines of the exception
On Sat, Aug 20, 2011 at 12:11 PM, wrote:
Hi, namesake :)
Already tried that, no result.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
session filter and the servlet
On Sat, Aug 20, 2011 at 12:03 PM, 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:
wicketFilter
org.apache.wicket.protocol.http.WicketFilter
applicationClassName
com.company.apps.appname.WebApp
filterPath
/
wicketFilter
/*
wicketSessionFilter
org.apache.wicket.protocol.http.servlet.WicketSessionFilter
filterName
wicketFilter
wicketSessionFilter
/friends
REQUEST
INCLUDE
friendsManager
com.company.apps.appname.servlet.FriendsManagerServlet
friendsManager
/friends
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ,
като втората е бонус!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Видя ли лятната промоция на
СуперХостинг?
Дават цели ДВЕ години, като плащаш само
ЕДНА!
Истина е, провери!
-------------------------------------
Видя ли лятната промоция на СуперХостинг?
Дават цели ДВЕ години, като плащаш само ЕДНА!
Истина е, провери!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo123&utm_campaign=SummerPromo
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by ma...@mail.bg.
yes, really session is null.... :O
at servlet:
req.getSession() returns null
and wicketsessionfilter in debug mode prints
20-08-2011 13:25:57,753 DEBUG
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.bindSession:180
- could not set Wicket session: key null not found in http session for
/appname,IP_ADDRESS, or http session does not exist
I really don't get it... null http session... could this really be true?
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 13:16 ----- try with
getWebRequest().getHttpServletRequest().getHttpSession(false)
in your page before making the call to the servlet.
It should return non-null.
Additionally turn on DEBUG logging for WSF
On Sat, Aug 20, 2011 at 12:54 PM, wrote:
Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:44 ----- the mapping is OK. we see WicketSessionFilter
in the stack
there is the following code in WSF#bindSession():
if (session == null)
{
if (logger.isDebugEnabled())
{
logger.debug("could not set Wicket session: key " + sessionKey +
" not found in http session for " +
((HttpServletRequest)request).getContextPath() + "," +
request.getServerName() +
", or http session does not exist");
}
}
Maybe you don't have active HttpSession yet.
On Sat, Aug 20, 2011 at 12:24 PM, wrote:
Here is the exception:
java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle
at org.apache.wicket.Session.findOrCreate(Session.java:209)
at org.apache.wicket.Session.get(Session.java:253)
at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)
at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:17 ----- paste the last few lines of the exception
On Sat, Aug 20, 2011 at 12:11 PM, wrote:
Hi, namesake :)
Already tried that, no result.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
session filter and the servlet
On Sat, Aug 20, 2011 at 12:03 PM, 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:
wicketFilter
org.apache.wicket.protocol.http.WicketFilter
applicationClassName
com.company.apps.appname.WebApp
filterPath
/
wicketFilter
/*
wicketSessionFilter
org.apache.wicket.protocol.http.servlet.WicketSessionFilter
filterName
wicketFilter
wicketSessionFilter
/friends
REQUEST
INCLUDE
friendsManager
com.company.apps.appname.servlet.FriendsManagerServlet
friendsManager
/friends
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ,
като втората е бонус!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Видя ли лятната промоция на СуперХостинг?
Дават цели ДВЕ години, като плащаш само ЕДНА!
Истина е, провери!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo123&utm_campaign=SummerPromo
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by ma...@mail.bg.
Thanks a lot for your time, it did the trick :)
Best regards,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 14:31 ----- Call Session.get().bind() before the POST call
and it will be fine.
On Sat, Aug 20, 2011 at 1:57 PM, wrote:
In the page, which calls the servlet afterwards,
getWebRequestCycle().getWebRequest().getHttpServletRequest().getSession(false)
returns null
Do you have any ideas why this occurs?
Thank you,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 13:16 ----- try with
getWebRequest().getHttpServletRequest().getHttpSession(false)
in your page before making the call to the servlet.
It should return non-null.
Additionally turn on DEBUG logging for WSF
On Sat, Aug 20, 2011 at 12:54 PM, wrote:
Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:44 ----- the mapping is OK. we see WicketSessionFilter
in the stack
there is the following code in WSF#bindSession():
if (session == null)
{
if (logger.isDebugEnabled())
{
logger.debug("could not set Wicket session: key " + sessionKey +
" not found in http session for " +
((HttpServletRequest)request).getContextPath() + "," +
request.getServerName() +
", or http session does not exist");
}
}
Maybe you don't have active HttpSession yet.
On Sat, Aug 20, 2011 at 12:24 PM, wrote:
Here is the exception:
java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle
at org.apache.wicket.Session.findOrCreate(Session.java:209)
at org.apache.wicket.Session.get(Session.java:253)
at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)
at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:17 ----- paste the last few lines of the exception
On Sat, Aug 20, 2011 at 12:11 PM, wrote:
Hi, namesake :)
Already tried that, no result.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
session filter and the servlet
On Sat, Aug 20, 2011 at 12:03 PM, 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:
wicketFilter
org.apache.wicket.protocol.http.WicketFilter
applicationClassName
com.company.apps.appname.WebApp
filterPath
/
wicketFilter
/*
wicketSessionFilter
org.apache.wicket.protocol.http.servlet.WicketSessionFilter
filterName
wicketFilter
wicketSessionFilter
/friends
REQUEST
INCLUDE
friendsManager
com.company.apps.appname.servlet.FriendsManagerServlet
friendsManager
/friends
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ,
като втората е бонус!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Видя ли лятната промоция на
СуперХостинг?
Дават цели ДВЕ години, като плащаш само
ЕДНА!
Истина е, провери!
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Видя ли, че СуперХостинг БГ са пуснали домейните почти без пари?
"Домейн .EU на изключителна цена от 1,99 лв!"
http://www.superhosting.bg/domain-eu.php?utm_source=MailBG&utm_medium=FooterLink&utm_content=DomainEU1&utm_campaign=EUDomainPromo
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by Martin Grigorov <mg...@apache.org>.
Call Session.get().bind() before the POST call and it will be fine.
On Sat, Aug 20, 2011 at 1:57 PM, <ma...@mail.bg> wrote:
>
>
>
> In the page, which calls the servlet afterwards,
> getWebRequestCycle().getWebRequest().getHttpServletRequest().getSession(false)
> returns null
>
>
> Do you have any ideas why this occurs?
>
>
> Thank you,
> Martin
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 13:16 ----- try with
> getWebRequest().getHttpServletRequest().getHttpSession(false)
> in your page before making the call to the servlet.
> It should return non-null.
> Additionally turn on DEBUG logging for WSF
>
>
> On Sat, Aug 20, 2011 at 12:54 PM, wrote:
>
>
> Actually I load a wicket page at root context and obtain a session.
> Afterwards I hit a button that posts to the servlet. I think I'm supposed
> to have HttpSession at the time.
>
>
> Best,
> Martin
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 12:44 ----- the mapping is OK. we see WicketSessionFilter
> in the stack
>
>
> there is the following code in WSF#bindSession():
>
>
> if (session == null)
> {
> if (logger.isDebugEnabled())
> {
> logger.debug("could not set Wicket session: key " + sessionKey +
> " not found in http session for " +
> ((HttpServletRequest)request).getContextPath() + "," +
> request.getServerName() +
> ", or http session does not exist");
> }
> }
>
>
> Maybe you don't have active HttpSession yet.
>
>
> On Sat, Aug 20, 2011 at 12:24 PM, wrote:
>
>
> Here is the exception:
>
>
> java.lang.IllegalStateException: you can only locate or create sessions in
> the context of a request cycle
>
>
> at org.apache.wicket.Session.findOrCreate(Session.java:209)
>
>
> at org.apache.wicket.Session.get(Session.java:253)
>
>
> at
> com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)
>
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)
>
>
> at
> org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>
>
> at
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
>
>
> at
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
>
>
> at
> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
>
>
> at java.lang.Thread.run(Thread.java:662)
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 12:17 ----- paste the last few lines of the exception
>
>
> On Sat, Aug 20, 2011 at 12:11 PM, wrote:
>
>
> Hi, namesake :)
>
>
> Already tried that, no result.
>
>
> Best,
>
>
> Martin
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
> session filter and the servlet
>
>
> On Sat, Aug 20, 2011 at 12:03 PM, 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:
>
>
> wicketFilter
> org.apache.wicket.protocol.http.WicketFilter
>
>
> applicationClassName
> com.company.apps.appname.WebApp
>
>
> filterPath
> /
>
>
> wicketFilter
> /*
>
>
> wicketSessionFilter
> org.apache.wicket.protocol.http.servlet.WicketSessionFilter
>
>
> filterName
> wicketFilter
>
>
> wicketSessionFilter
> /friends
> REQUEST
> INCLUDE
>
>
> friendsManager
> com.company.apps.appname.servlet.FriendsManagerServlet
>
>
> friendsManager
> /friends
>
>
> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> -------------------------------------
>
>
> Виж какво открих...
> Поръчваш си ЕДНА - получаваш цели ДВЕ,
> като втората е бонус!
> http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> -------------------------------------
>
>
> 50% Отстъпка за Хостинг услуги от ICN.Bg
> Хоствай до 101 сайта на 1 Хостинг и
> Вземи Безплатно Домейн име.
> http://www.icn.bg/default.icn?show=about&status=about-news&news=173
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> -------------------------------------
>
>
> 50% Отстъпка за Хостинг услуги от ICN.Bg
> Хоствай до 101 сайта на 1 Хостинг и
> Вземи Безплатно Домейн име.
> http://www.icn.bg/default.icn?show=about&status=about-news&news=173
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
> -------------------------------------
>
> Видя ли лятната промоция на СуперХостинг?
> Дават цели ДВЕ години, като плащаш само ЕДНА!
> Истина е, провери!
> 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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by ma...@mail.bg.
In the page, which calls the servlet afterwards,
getWebRequestCycle().getWebRequest().getHttpServletRequest().getSession(false)
returns null
Do you have any ideas why this occurs?
Thank you,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 13:16 ----- try with
getWebRequest().getHttpServletRequest().getHttpSession(false)
in your page before making the call to the servlet.
It should return non-null.
Additionally turn on DEBUG logging for WSF
On Sat, Aug 20, 2011 at 12:54 PM, wrote:
Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:44 ----- the mapping is OK. we see WicketSessionFilter
in the stack
there is the following code in WSF#bindSession():
if (session == null)
{
if (logger.isDebugEnabled())
{
logger.debug("could not set Wicket session: key " + sessionKey +
" not found in http session for " +
((HttpServletRequest)request).getContextPath() + "," +
request.getServerName() +
", or http session does not exist");
}
}
Maybe you don't have active HttpSession yet.
On Sat, Aug 20, 2011 at 12:24 PM, wrote:
Here is the exception:
java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle
at org.apache.wicket.Session.findOrCreate(Session.java:209)
at org.apache.wicket.Session.get(Session.java:253)
at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)
at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:17 ----- paste the last few lines of the exception
On Sat, Aug 20, 2011 at 12:11 PM, wrote:
Hi, namesake :)
Already tried that, no result.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
session filter and the servlet
On Sat, Aug 20, 2011 at 12:03 PM, 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:
wicketFilter
org.apache.wicket.protocol.http.WicketFilter
applicationClassName
com.company.apps.appname.WebApp
filterPath
/
wicketFilter
/*
wicketSessionFilter
org.apache.wicket.protocol.http.servlet.WicketSessionFilter
filterName
wicketFilter
wicketSessionFilter
/friends
REQUEST
INCLUDE
friendsManager
com.company.apps.appname.servlet.FriendsManagerServlet
friendsManager
/friends
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ,
като втората е бонус!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Видя ли лятната промоция на СуперХостинг?
Дават цели ДВЕ години, като плащаш само ЕДНА!
Истина е, провери!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo123&utm_campaign=SummerPromo
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by Martin Grigorov <mg...@apache.org>.
try with getWebRequest().getHttpServletRequest().getHttpSession(false)
in your page before making the call to the servlet.
It should return non-null.
Additionally turn on DEBUG logging for WSF
On Sat, Aug 20, 2011 at 12:54 PM, <ma...@mail.bg> wrote:
>
>
>
> Actually I load a wicket page at root context and obtain a session.
> Afterwards I hit a button that posts to the servlet. I think I'm supposed
> to have HttpSession at the time.
>
>
> Best,
> Martin
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 12:44 ----- the mapping is OK. we see WicketSessionFilter
> in the stack
>
>
> there is the following code in WSF#bindSession():
>
>
> if (session == null)
> {
> if (logger.isDebugEnabled())
> {
> logger.debug("could not set Wicket session: key " + sessionKey +
> " not found in http session for " +
> ((HttpServletRequest)request).getContextPath() + "," +
> request.getServerName() +
> ", or http session does not exist");
> }
> }
>
>
> Maybe you don't have active HttpSession yet.
>
>
> On Sat, Aug 20, 2011 at 12:24 PM, wrote:
>
>
> Here is the exception:
>
>
> java.lang.IllegalStateException: you can only locate or create sessions in
> the context of a request cycle
>
>
> at org.apache.wicket.Session.findOrCreate(Session.java:209)
>
>
> at org.apache.wicket.Session.get(Session.java:253)
>
>
> at
> com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)
>
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)
>
>
> at
> org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>
>
> at
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
>
>
> at
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
>
>
> at
> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
>
>
> at java.lang.Thread.run(Thread.java:662)
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 12:17 ----- paste the last few lines of the exception
>
>
> On Sat, Aug 20, 2011 at 12:11 PM, wrote:
>
>
> Hi, namesake :)
>
>
> Already tried that, no result.
>
>
> Best,
>
>
> Martin
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
> session filter and the servlet
>
>
> On Sat, Aug 20, 2011 at 12:03 PM, 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:
>
>
> wicketFilter
> org.apache.wicket.protocol.http.WicketFilter
>
>
> applicationClassName
> com.company.apps.appname.WebApp
>
>
> filterPath
> /
>
>
> wicketFilter
> /*
>
>
> wicketSessionFilter
> org.apache.wicket.protocol.http.servlet.WicketSessionFilter
>
>
> filterName
> wicketFilter
>
>
> wicketSessionFilter
> /friends
> REQUEST
> INCLUDE
>
>
> friendsManager
> com.company.apps.appname.servlet.FriendsManagerServlet
>
>
> friendsManager
> /friends
>
>
> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> -------------------------------------
>
>
> Виж какво открих...
> Поръчваш си ЕДНА - получаваш цели ДВЕ,
> като втората е бонус!
> http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> -------------------------------------
>
>
> 50% Отстъпка за Хостинг услуги от ICN.Bg
> Хоствай до 101 сайта на 1 Хостинг и
> Вземи Безплатно Домейн име.
> http://www.icn.bg/default.icn?show=about&status=about-news&news=173
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
> -------------------------------------
>
> 50% Отстъпка за Хостинг услуги от ICN.Bg
> Хоствай до 101 сайта на 1 Хостинг и
> Вземи Безплатно Домейн име.
> http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by ma...@mail.bg.
Actually I load a wicket page at root context and obtain a session.
Afterwards I hit a button that posts to the servlet. I think I'm supposed
to have HttpSession at the time.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:44 ----- the mapping is OK. we see WicketSessionFilter
in the stack
there is the following code in WSF#bindSession():
if (session == null)
{
if (logger.isDebugEnabled())
{
logger.debug("could not set Wicket session: key " + sessionKey +
" not found in http session for " +
((HttpServletRequest)request).getContextPath() + "," +
request.getServerName() +
", or http session does not exist");
}
}
Maybe you don't have active HttpSession yet.
On Sat, Aug 20, 2011 at 12:24 PM, wrote:
Here is the exception:
java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle
at org.apache.wicket.Session.findOrCreate(Session.java:209)
at org.apache.wicket.Session.get(Session.java:253)
at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)
at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:17 ----- paste the last few lines of the exception
On Sat, Aug 20, 2011 at 12:11 PM, wrote:
Hi, namesake :)
Already tried that, no result.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
session filter and the servlet
On Sat, Aug 20, 2011 at 12:03 PM, 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:
wicketFilter
org.apache.wicket.protocol.http.WicketFilter
applicationClassName
com.company.apps.appname.WebApp
filterPath
/
wicketFilter
/*
wicketSessionFilter
org.apache.wicket.protocol.http.servlet.WicketSessionFilter
filterName
wicketFilter
wicketSessionFilter
/friends
REQUEST
INCLUDE
friendsManager
com.company.apps.appname.servlet.FriendsManagerServlet
friendsManager
/friends
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ,
като втората е бонус!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by Martin Grigorov <mg...@apache.org>.
the mapping is OK. we see WicketSessionFilter in the stack
there is the following code in WSF#bindSession():
if (session == null)
{
if (logger.isDebugEnabled())
{
logger.debug("could not set Wicket session: key " + sessionKey +
" not found in http session for " +
((HttpServletRequest)request).getContextPath() + "," +
request.getServerName() +
", or http session does not exist");
}
}
Maybe you don't have active HttpSession yet.
On Sat, Aug 20, 2011 at 12:24 PM, <ma...@mail.bg> wrote:
>
>
>
> Here is the exception:
>
>
> java.lang.IllegalStateException: you can only locate or create sessions in
> the context of a request cycle
>
>
> at org.apache.wicket.Session.findOrCreate(Session.java:209)
>
>
> at org.apache.wicket.Session.get(Session.java:253)
>
>
> at
> com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)
>
>
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)
>
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)
>
>
>
> at
> org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)
>
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
>
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)
>
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
>
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
>
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>
>
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
>
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>
>
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
>
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
>
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>
>
>
> at
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
>
>
>
> at
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
>
>
>
> at
> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
>
>
> at java.lang.Thread.run(Thread.java:662)
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 12:17 ----- paste the last few lines of the exception
>
>
> On Sat, Aug 20, 2011 at 12:11 PM, wrote:
>
>
> Hi, namesake :)
>
>
> Already tried that, no result.
>
>
> Best,
>
>
> Martin
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
> session filter and the servlet
>
>
> On Sat, Aug 20, 2011 at 12:03 PM, 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:
>
>
> wicketFilter
> org.apache.wicket.protocol.http.WicketFilter
>
>
> applicationClassName
> com.company.apps.appname.WebApp
>
>
> filterPath
> /
>
>
> wicketFilter
> /*
>
>
> wicketSessionFilter
> org.apache.wicket.protocol.http.servlet.WicketSessionFilter
>
>
> filterName
> wicketFilter
>
>
> wicketSessionFilter
> /friends
> REQUEST
> INCLUDE
>
>
> friendsManager
> com.company.apps.appname.servlet.FriendsManagerServlet
>
>
> friendsManager
> /friends
>
>
> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> -------------------------------------
>
>
> Виж какво открих...
> Поръчваш си ЕДНА - получаваш цели ДВЕ,
> като втората е бонус!
> http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
> -------------------------------------
>
> 50% Отстъпка за Хостинг услуги от ICN.Bg
> Хоствай до 101 сайта на 1 Хостинг и
> Вземи Безплатно Домейн име.
> http://www.icn.bg/default.icn?show=about&status=about-news&news=173
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by ma...@mail.bg.
Here is the exception:
java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle
at org.apache.wicket.Session.findOrCreate(Session.java:209)
at org.apache.wicket.Session.get(Session.java:253)
at
com.company.apps.appname.servlet.FriendsManagerServlet.doPost(FriensManagerServlet.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(AppicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationilterChain.java:206)
at
org.apache.wicket.protocol.http.servlet.WicketSessionFilter.doFilter(WicketSessionFilter.java:150)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jva:370)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Thread.java:662)
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:17 ----- paste the last few lines of the exception
On Sat, Aug 20, 2011 at 12:11 PM, wrote:
Hi, namesake :)
Already tried that, no result.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
session filter and the servlet
On Sat, Aug 20, 2011 at 12:03 PM, 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:
wicketFilter
org.apache.wicket.protocol.http.WicketFilter
applicationClassName
com.company.apps.appname.WebApp
filterPath
/
wicketFilter
/*
wicketSessionFilter
org.apache.wicket.protocol.http.servlet.WicketSessionFilter
filterName
wicketFilter
wicketSessionFilter
/friends
REQUEST
INCLUDE
friendsManager
com.company.apps.appname.servlet.FriendsManagerServlet
friendsManager
/friends
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ,
като втората е бонус!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
50% Отстъпка за Хостинг услуги от ICN.Bg
Хоствай до 101 сайта на 1 Хостинг и
Вземи Безплатно Домейн име.
http://www.icn.bg/default.icn?show=about&status=about-news&news=173
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by Martin Grigorov <mg...@apache.org>.
paste the last few lines of the exception
On Sat, Aug 20, 2011 at 12:11 PM, <ma...@mail.bg> wrote:
>
>
>
> Hi, namesake :)
>
>
> Already tried that, no result.
>
>
> Best,
>
>
> Martin
>
>
> ----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
> 20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
> session filter and the servlet
>
>
> On Sat, Aug 20, 2011 at 12:03 PM, 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:
>
>
> wicketFilter
> org.apache.wicket.protocol.http.WicketFilter
>
>
> applicationClassName
> com.company.apps.appname.WebApp
>
>
> filterPath
> /
>
>
> wicketFilter
> /*
>
>
> wicketSessionFilter
> org.apache.wicket.protocol.http.servlet.WicketSessionFilter
>
>
> filterName
> wicketFilter
>
>
> wicketSessionFilter
> /friends
> REQUEST
> INCLUDE
>
>
> friendsManager
> com.company.apps.appname.servlet.FriendsManagerServlet
>
>
> friendsManager
> /friends
>
>
> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
> -------------------------------------
>
> Виж какво открих...
> Поръчваш си ЕДНА - получаваш цели ДВЕ, като втората е бонус!
> http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by ma...@mail.bg.
Hi, namesake :)
Already tried that, no result.
Best,
Martin
----- Цитат от Martin Grigorov (mgrigorov@apache.org), на
20.08.2011 в 12:09 ----- Try with url-mapping: /friends/* both for the
session filter and the servlet
On Sat, Aug 20, 2011 at 12:03 PM, 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:
wicketFilter
org.apache.wicket.protocol.http.WicketFilter
applicationClassName
com.company.apps.appname.WebApp
filterPath
/
wicketFilter
/*
wicketSessionFilter
org.apache.wicket.protocol.http.servlet.WicketSessionFilter
filterName
wicketFilter
wicketSessionFilter
/friends
REQUEST
INCLUDE
friendsManager
com.company.apps.appname.servlet.FriendsManagerServlet
friendsManager
/friends
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
-------------------------------------
Виж какво открих...
Поръчваш си ЕДНА - получаваш цели ДВЕ, като втората е бонус!
http://www.superhosting.bg/SummerHostingPromo/?utm_source=MailBG&utm_medium=FooterLink&utm_content=SummerPromo124&utm_campaign=SummerPromo
Re: java.lang.IllegalStateException: you can only locate or create
sessions in the context of a request cycle even through WicketSessionFilter
Posted by Martin Grigorov <mg...@apache.org>.
Try with url-mapping: /friends/* both for the session filter and the servlet
On Sat, Aug 20, 2011 at 12:03 PM, <ma...@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org