Bizarre ... dunno what's up with my config, then. Not a biggie, I guess - my workaround still works, I guess. I just wanted to use this because I was using a scriptlet to generate some *very* dynamic code and got into a situation where I couldn't use <html:rewrite> because it'd be nested within an <html:link> tag (in an onmouseover attribute) - so I wanted to use that code to get the prefix to just insert with another scriptlet. But, I think I've worked around that now, too.

It is truly amazing how a JSP can be compiled from custom JSP tags (tiles, struts, etc.), java code scriptlets, and EL expressions within tags, to something that actually works. I am truly amazed at times! :)

Kris Schneider wrote:

If it's any consolation, I just tried the original JSP-only code I posted with
TC 4.1.24 and it worked fine...

Quoting "Ruth, Brice" <[EMAIL PROTECTED]>:



James Mitchell wrote:



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.





Thanks, James.

Ignoring for the moment how these workarounds smack of "hack", this doesn't solve the problem of people visiting the site w/o cookies enabled. What I don't understand is why the delimiter ';' is being used, instead of the traditional '?' - which Apache wouldn't have a problem stripping off and serving up the proper file with ...

Just to clarify - by calling these workarounds "hacks" - I mean no disrespect - I am just looking for a cleaner method of handling this. That's all.

Brice

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.






-- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc.



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



Reply via email to