A bit of history on this subject:

 * From: Craig R. McClanahan
 * Subject: Re: Why would jsessionid not appear?
 * Date: Wed, 08 Aug 2001 12:09:26 -0700 

The jsessionid path parameter will only be added if the servlet
container
does not know whether your client supports cookies.  How Tomcat handles
this (probably typical of others):

* On the first response in a session, send the session id
  both ways (cookie and encoding).

* If the subsequent request comes back with a cookie, turn
  of URL rewriting for the remainder of this session.

* If the subsequent request comes back without a cookie,
  keep on rewriting.

Craig



So, with that having been said, all you have to do is 
tell all your users to hit refresh whenever they access 
your site.  

That way, all external links and images will work.

If you find that unacceptable, you could:

Move the contents of index.jsp to index2.jsp, then:

  Put a meta refresh tag as your initial page (index.jsp).
    <META HTTP-EQUIV="refresh" 
      content="2;URL=http://www.yoursite.com/index2.jsp";> 

  or

  Add some javascript that sends the user to index2.jsp.
    (similar to above)

  or

  Use <logic:redirect> or any number of ways in a scriptlet
  to redirect to index2.jsp


On the Struts-Atlanta web site (http://www.struts-atlanta.org), 
I take a slightly different approach.
At the top of my index.jsp, I do this:

<logic:present parameter="refresh">
<bean:parameter id="refreshed" name="refresh"/>
</logic:present>

<logic:notEqual name="refreshed" value="true">
<logic:redirect page="/index.jsp?refresh=true"/>
</logic:notEqual>


What this does is refresh the page one time only.  This method works for
me because I am not posting or processing any forms with this page which
would not work correctly if I had.

Hope that helps.


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to