You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andy Foster <an...@fostersontheweb.com> on 2006/11/16 19:25:37 UTC

MS Word & IE , struts and session management

Hi all,


This has totally baffled me and I desperately need help but I have a link as
follows that I have put in a Microsoft word document that calls my struts
action to display the specified resource. This was tested to be the same
with IE6 or IE7 so its not the browser version causing the issue before
anyone ponders it.

( This link will work so you can see what I mean. Copy it into word and then
ctrl+click link to open browser - MAKE SURE ALL BROWSERS CLOSED FIRST )

http://bream.oucs.ox.ac.uk:8080/AskClient/process_browseresource.ask?selecte
ditem=f9675f3c-6c26-11db-8bda-df79a00f08cb,0,0 

The struts process action takes the selecteditem from the form stores it in
the session then client redirects using a forward as follows to the correct
display action:

<forward name="resourcedetail" path="/display_browseresource.ask"
redirect="true" />   
      
The display action is suppose to then extract the selectitem from the
session and display its data on the page but as you can see I currently
display a demo page.

You will see next to the tabs on the displayed page a res= and sessid= these
represent the resourceID of the selecteditem in the session and your session
ID. Both of these should show values.

Now click home and notice that res=null and the sessid has changed. YES
CHANGED. Somehow the session that was in the actions have changed when the
JSP runs and hence there is no longer a resource ID in the session as it's a
different one.

It gets even more bizarre now:

Now go back to word and click the link again keeping the browser open.
Notice this time that res=null and sessid remains the same as it was when
you selected the home page previously. 

I can tell you that behind the scenes the display_browseresource action gets
called twice once with the initial session from word and then again with the
proper browser session. This is why this time res=null as the JSP is run not
with words session but the browsers one instead.

  * If you do not use word and paste that url into the browser the session 
    ID remains fixed and fine whether browser open or not.
  * If you do not use word and paste that url into the XP Run the session 
    ID remains fixed and fine whether browser open or not. 

This issue seems related to WORD. I'm totally stuck as because the session
changes I have absolutely no way to display my data because the session that
holds all the display info is lost when the JSP runs. 

Please help? Any ideas? I'm baffled?

Regards

Andy Foster







---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org