yes it is correct and it never changed this was also the case even in 1.1

first the request comes in for the pagelink.
That request is handled and the response is set in a buffer.
Then a redirect is send to the browser and the second request comes in to really serve the page (that is in the buffer)

johan'

On 4/3/06, R.A <[EMAIL PROTECTED]> wrote:

Hi Johan,

Can I ask you a question on and on?
I downloaded wicket-1.2-beta3 today and I noticed WicketServlet#doGet's
change.
Using this new archives, WicketServlet#doGet is called two times again...
But this time, WebSphere and Tomcat is under the same conditions.
So. Is this correct?

I opened WicketExamples -> compref -> wicket.markup.html.link.PageLink -> go
to our private/ non bookmarkable page.
WebShere's output is here.
06/04/03 12:16:07:844 JST] 766c0cfe SystemOut     O === doGet
[06/04/03 12:16:07:844 JST] 766c0cfe SystemOut     O === sessionId:
y_BoFxSDfww7MCNTjwjWZ3L
[06/04/03 12:16:07:844 JST] 766c0cfe SystemOut     O === queryString:
wicket:interface=:1:pageLink::ILinkListener
[06/04/03 12:16:07:844 JST] 766c0cfe SystemOut     O === bufferedResponse:
null
[06/04/03 12:16:07:906 JST] 766c0cfe MarkupCache   I
wicket.markup.MarkupCache  Loading markup from
file:/D:/dev/wsappdev51/workspace/WicketExamples1.2-b3Web/WebContent/WEB-INF/classes/wicket/examples/compref/NonBookmarkablePage.html
[06/04/03 12:16:08:000 JST]  1e74cfe SystemOut     O === doGet
[06/04/03 12:16:08:000 JST]  1e74cfe SystemOut     O === sessionId:
y_BoFxSDfww7MCNTjwjWZ3L
[06/04/03 12:16:08:000 JST]  1e74cfe SystemOut     O === queryString:
wicket:interface=:2::
[06/04/03 12:16:08:000 JST]  1e74cfe SystemOut     O === bufferedResponse:
[EMAIL PROTECTED]

Tomcat's output is here.
=== doGet
=== sessionId: 7D282BAB9EC7D92772D7513C6309176E
=== queryString: wicket:interface=:4:pageLink::ILinkListener
=== bufferedResponse: null
INFO  - MarkupCache                - Loading markup from
file:/C:/Program%20File
s/Apache%20Group/Tomcat%204.1/webapps/WicketExamples1.2-b3Web/WEB-INF/classes/wi
cket/examples/compref/NonBookmarkablePage.html
=== doGet
=== sessionId: 7D282BAB9EC7D92772D7513C6309176E
=== queryString: wicket:interface=:5::
=== bufferedResponse:
[EMAIL PROTECTED]

I set system out in WicketServlet#doGet as follows.
        public final void doGet(final HttpServletRequest servletRequest,
                        final HttpServletResponse servletResponse) throws ServletException,
IOException
        {
System.out.println("=== doGet");
                long time = System.currentTimeMillis ();

                // 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();

System.out.println("=== sessionId: " + sessionId);
System.out.println("=== queryString: " + queryString);

                        if (queryString != null)
                        {
                                BufferedHttpServletResponse bufferedResponse =
webApplication.popBufferedResponse(
                                                sessionId, queryString);

System.out.println("=== bufferedResponse: " + bufferedResponse);

                                if (bufferedResponse != null)
                                {
                                        bufferedResponse.writeTo(servletResponse);
                                        // redirect responses are ignored for the request logger...
                                        return;
                                }
                        }
                }

Thank you.
R.A
--
View this message in context: http://www.nabble.com/PageLink-called-request-two-times-t1205926.html#a3719486
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to