-Igor
On 6/21/06, 8723056 <
[EMAIL PROTECTED]> wrote:
I'm a rookie in Wicket, please forgive me if this is a stupid question.
I have a loginServlet which is as follows:
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
//....Do some Authentication actions...
httpSession = request.getSession();
httpSession.setAttribute( "sessionid", strSessionID );
httpSession.setAttribute( "userid", strUserID );
//...
}
Now, I want to get the attributes "sessionid" and "userid" in a wicket
Application, And I wrote some codes:
-------------------------------------------------------
public class AlarmApp extends WebApplication{
private HttpSessionStore session = null;
public ISessionStore newMySessionStore(){
ISessionStore sessionStore = new HttpSessionStore();
if(RequestCycle.get().getSession() != null){
sessionStore.bind(RequestCycle.get().getRequest(),RequestCycle.get
().getSession());
System.out.print ( "UserID: " + sessionStore.getAttribute
(RequestCycle.get().getRequest(),"userid"));
System.out.print ( ",sessionid: " + sessionStore.getAttribute
(RequestCycle.get().getRequest(),"sessionid"));
}
return sessionStore;
}
public Class getHomePage()
{
newMySessionStore();
return ListAlarm.class;
}
}
---------------------------------------------------
But the result of print is always "UserID:null,sessionid:null".
How could I access the HttpSession directly?
-------------------------------------------------
交通大學資訊科學系 WebMail https://mail.cis.nctu.edu.tw
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
