This is because a session is created only once for each user, until it
expires ofcourse...
If you wish to check url parameters for each request I would suggest you
do this in RequestCycle.onBeginRequest(). There is also
RequestCylce.onEndRequest() if you need to do anything at the end of the
cycle (letting go of variables and what not).

If you want to check parameters only for a few pages then you could also
choose to use the Page(PageParameters) constructor, wicket will give
that constructor a hashmap with all the parameters from the url. 

Hielke

-----Original Message-----
From: drf [mailto:davidrfi...@gmail.com] 
Sent: donderdag 12 mei 2011 15:49
To: users@wicket.apache.org
Subject: Getting Parameters from URL

We have code in our session object as follows:

public class OurSession extends WebSession {

   public OurSession(Request request)}{
       super(request)
       // GET PARAMETERS FROM REQUEST
       userId = request.getParameter("userId");
  }

}

This works the first time, so if the url has a parameter of userId=JOHN
then this can be picked up in the above code.
However, if the application is again requested from the browser (and the
session already exists), this code will not get called.
What is then the best way to pick up the parameters on the url?
Thanks


--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Getting-Parameters-from-URL-t
p3517499p3517499.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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to