You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rafael Taboada <ka...@gmail.com> on 2009/06/16 18:18:33 UTC

Re-establish the Session

Hi,

I have session recovering problem and I don't know how to do it, I hope you
can help me.

I use FileUploader to upload a file:
http://www.sitepen.com/blog/2008/12/01/dojox-fileuploader-upgrade-to-support-flash-10/.
It seems to upload the file but I have lost my session in my Action class
and as a consequence I can't validate the user who uploaded the file.

They say one solution could be sending the session ID to the server side and
recover the session, but I don't know how to recover it in Struts2.

*"The uploader not sending cookies is a Flash bug:
**http://bugs.adobe.com/jira/browse/FP-201*<http://bugs.adobe.com/jira/browse/FP-201>

*Headers can be sent in an UrlRequest Header, but I don’t know if it would
work around your problem, as it is very restricted. The way I had done it in
the past is to get the user and session IDs and pass those as vars along
with the upload. That’s why I implemented the postVars in the latest
version."*

I can find the session ID before sending jsp upload form with:

HttpSession session

session.getId()

 Thanks in advance for your help

-- 
Rafael Taboada
Software Engineer

Cell : +511-992741026

"No creo en el destino pues no me gusta tener la idea de controlar mi vida"

Re: Re-establish the Session

Posted by Rafael Taboada <ka...@gmail.com>.
Just for the record if someone else have same issue...

I had to rewrite the URL adding Session ID

uploadUrl: "doUploadFile.action;jsessionid=" + "<s:property
value='sIdSession' />",


On Tue, Jun 16, 2009 at 11:18 AM, Rafael Taboada
<ka...@gmail.com>wrote:

> Hi,
>
> I have session recovering problem and I don't know how to do it, I hope you
> can help me.
>
> I use FileUploader to upload a file:
> http://www.sitepen.com/blog/2008/12/01/dojox-fileuploader-upgrade-to-support-flash-10/.
> It seems to upload the file but I have lost my session in my Action class
> and as a consequence I can't validate the user who uploaded the file.
>
> They say one solution could be sending the session ID to the server side
> and recover the session, but I don't know how to recover it in Struts2.
>
> *"The uploader not sending cookies is a Flash bug:
> **http://bugs.adobe.com/jira/browse/FP-201*<http://bugs.adobe.com/jira/browse/FP-201>
>
> *Headers can be sent in an UrlRequest Header, but I don’t know if it would
> work around your problem, as it is very restricted. The way I had done it in
> the past is to get the user and session IDs and pass those as vars along
> with the upload. That’s why I implemented the postVars in the latest
> version."*
>
> I can find the session ID before sending jsp upload form with:
>
> HttpSession session
>
> session.getId()
>
>  Thanks in advance for your help
>
> --
> Rafael Taboada
> Software Engineer
>
> Cell : +511-992741026
>
> "No creo en el destino pues no me gusta tener la idea de controlar mi vida"
>



-- 
Rafael Taboada
Software Engineer

Cell : +511-992741026

"No creo en el destino pues no me gusta tener la idea de controlar mi vida"