Hi:
Thanks for Liying's answer,I have a try just now,and it works well(say the
result,it meet my requirements).

However I found that my codes are rathre ugly,have no logic.

So I wonder any one can spare some time to have a check?

Notice:I remove the jars in the WEB-INF/lib. You should add it yourself.

BWT,I wonder if saving all the session information in the server side is a
good idea,if too many user login,the memeory is a problem,but if save the
session in the db or file system,it will slow down the response speed. :(
However,thanks Li ying and other guys anyway.


2010/12/2 Li Ying <[email protected]>

> ActionContext is just a wrap class for convenience.
>
>
> If you need the real HttpSession.
> You should get the HttpRequest first, from
> ServletActionContext.getRequest().
>
> See:
>
> http://struts.apache.org/2.2.1/struts2-core/apidocs/org/apache/struts2/ServletActionContext.html
>
> And then, you can get the HttpSession from
> HttpServletRequest.getSession();
>
> See:
>
> http://download.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html
>
>
>
>
> 2010/12/2 maven apache <[email protected]>:
> > Thanks,your answer can not be detailed more. :)
> >
> > only a little confused.
> >
> > Map attibutes = ActionContext.getContext().getSession()
> >
> > I can get the session this manner,but it seems that it is a Map,not a
> > HttpSession,so what is the id?
> >
> > I have debug the session yet,and I found there is a property in the Map:
> > struts.troken,is this unique can be used as the session id?
> >
>
>  ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Attachment: StrutsDemo.rar
Description: application/rar

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to