First for you link click:
wicket:interface=:3:pageLink::ILinkListener
then in REDIRECT_TO_BUFFER we will first render the page.
(onBeginRequest is called)
Then the buffer will be stored and a redirect will be send.
that redirect will be the second doGet():
wicket:interface=:2::
And for this doGet the buffered response should be found:
BufferedHttpServletResponse bufferedResponse = webApplication.popBufferedResponse (
sessionId, bufferId);
if (bufferedResponse != null)
{
bufferedResponse.writeTo(servletResponse);
return;
}
if you place a system out in that if() does it get called for tomcat but it doesn't get called for WebSphere??
Then you should debug why that happens under websphere. How it is possible that it doesn't find the buffer
for that sessiond and bufferid (which is the query string)
Is there stored something? And with what key?
johan
On 3/6/06, R.A <
[EMAIL PROTECTED]> wrote:
Hi Johan,
I clicked "go to our private/ non bookmarkable page" link,
"http://localhost:9080/WicketExamples1.2Web/compref;jsessionid=0000vMFTc_kuJIPUEGIZ44gT20X:-1?wicket:interface=:1:pageLink::ILinkListener "
(WicketExamples -> compref -> wicket.markup.html.link.PageLink -> go to our
private/ non bookmarkable page)
I added System.out.println() in WicketServlet.
public final void doGet(final HttpServletRequest servletRequest, final
HttpServletResponse servletResponse) throws ServletException, IOException
{
// add
System.out.println("doGet start");
// First, set the webapplication for this thread
Application.set(webApplication);
// Try to see if there is a redirect stored
HttpSession httpSession = servletRequest.getSession(false);
if (httpSession != null
&& webApplication.getRequestCycleSettings().getRenderStrategy() ==
IRequestCycleSettings.REDIRECT_TO_BUFFER)
{
String sessionId = httpSession.getId();
String queryString = servletRequest.getQueryString();
String requestUri = servletRequest.getRequestURI();
String bufferId = requestUri;
// add
System.out.println("=== sessionId: " + sessionId);
System.out.println("=== queryString: " + queryString);
System.out.println("=== requestUri: " + requestUri);
System.out.println("=== bufferId: " + bufferId);
... snip ...
}
}
then output is here.
[06/03/06 17:53:20:531 JST] 340be96 SystemOut O doGet start
[06/03/06 17:53:20:531 JST] 340be96 SystemOut O === sessionId:
o-MhLOQnhTwyHT-KeG6IEUz
[06/03/06 17:53:20:531 JST] 340be96 SystemOut O === queryString:
wicket:interface=:1:pageLink::ILinkListener
[06/03/06 17:53:20:531 JST] 340be96 SystemOut O === requestUri:
/WicketExamples1.2Web/compref
[06/03/06 17:53:20:531 JST] 340be96 SystemOut O === bufferId:
/WicketExamples1.2Web/compref
[06/03/06 17:53:20:547 JST] 340be96 SystemOut O DEBUG - RequestCycle
- replacing request target
[EMAIL PROTECTED]
class = wicket.examples.compref.PageLinkPage, id = 1]->pageLink->interface
wicket.markup.html.link.ILinkListener.ILinkListener (request paramaters:
[RequestParameters componentPath=1:pageLink pageMapName=null
versionNumber=0 interfaceName=ILinkListener componentId=null behaviorId=null
parameters={wicket:interface=:1:pageLink::ILinkListener}]) with
[EMAIL PROTECTED] page=[Page class =
wicket.examples.compref.NonBookmarkablePage, id = 2]]
Entering onBeginRequest
[06/03/06 17:53:20:797 JST] 340be96 SystemOut O doGet start
[06/03/06 17:53:20:797 JST] 340be96 SystemOut O === sessionId:
o-MhLOQnhTwyHT-KeG6IEUz
[06/03/06 17:53:20:797 JST] 340be96 SystemOut O === queryString:
wicket:interface=:2::
[06/03/06 17:53:20:797 JST] 340be96 SystemOut O === requestUri:
/WicketExamples1.2Web/compref
[06/03/06 17:53:20:797 JST] 340be96 SystemOut O === bufferId:
/WicketExamples1.2Web/compref
[06/03/06 17:53:20:797 JST] 340be96 SystemOut O Entering onBeginRequest
queryString is change when one compares first doGet and second doGet.
And I tried using Tomcat.
Tomcat's output is here.
doGet start
=== sessionId: 936DC6A50F7810E6A7E3C03197F199BC
=== queryString: wicket:interface=:3:pageLink::ILinkListener
=== requestUri: /WicketExamples1.2Web/compref
=== bufferId: /WicketExamples1.2Web/compref
DEBUG - RequestCycle - replacing request target
wicket.request.tar
[EMAIL PROTECTED] class
= wi
cket.examples.compref.PageLinkPage, id = 3]->pageLink->interface
wicket.markup.h
tml.link.ILinkListener.ILinkListener (request paramaters: [RequestParameters
co
mponentPath=3:pageLink pageMapName=null versionNumber=0
interfaceName=ILinkListe
ner componentId=null behaviorId=null
parameters={wicket:interface=:3:pageLink::I
LinkListener}]) with [EMAIL PROTECTED] page=[Page class =
wicket.exa
mples.compref.NonBookmarkablePage , id = 4]]
Entering on BeginRequest
doGet start
=== sessionId: 936DC6A50F7810E6A7E3C03197F199BC
=== queryString: wicket:interface=:4::
=== requestUri: /WicketExamples1.2Web/compref
=== bufferId: /WicketExamples1.2Web/compref
queryString is change and doGet was called two times too, but onBeginRequest
was called one time.
Is this outcome in the right?
--
View this message in context: http://www.nabble.com/PageLink-called-request-two-times-t1205926.html#a3258689
Sent from the Wicket - User forum at Nabble.com.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user