You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Quinton McCombs <qm...@nequalsone.com> on 2003/06/18 22:56:37 UTC

Possible problem with the new URI code

I have noticed a strange problem that I think might be related to the
new URI code.  When using ContentTool to generate a URI for images,
stylesheets, etc, I not get the ;jsessionid=xxxxxx appended to the end
of the URL.  This is causing my images not to load.  Of course, hitting
refresh on the browser fixes this problem.

Any ideas?

--------------------------------------------
Quinton McCombs
NequalsOne - HealthCare marketing tools
mailto:qmccombs@NequalsOne.com
http://www.NequalsOne.com 


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


Re: Possible problem with the new URI code

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"Quinton McCombs" <qm...@nequalsone.com> writes:

>I have noticed a strange problem that I think might be related to the
>new URI code.  When using ContentTool to generate a URI for images,
>stylesheets, etc, I not get the ;jsessionid=xxxxxx appended to the end
>of the URL.  This is causing my images not to load.  Of course, hitting
>refresh on the browser fixes this problem.

This should depend on your servlet container either using cookies or
jsessionid for session tracking. As far as I can see, if your
container switched to cookie based session tracking, it does not
append the jsession to your URIs.

The only other reason that you don't get a jsessionid if you do use
URI based session tracking is, that you use an object that was
initialized from a ServerData object and not from a RunData
object. Then you won't have a servlet response object and without this
no way for the URI code to get a handle on the URI.

If you want to test if this is your problem, add 

log4j.category.org.apache.turbine.util.uri = DEBUG, turbine
log4j.additivity.org.apache.turbine.util.uri = false

to your log4j properties and look for 

"No Response Object!"

messages in the log file. This comes from the encodeResponse() method
in BaseURI and it basically says "Uh, I should print out an URI but I
have no reference to the request that I was generated under and so I
can't find out whether I should add a ";jsessionid=xxx" code to the
URI. 

If you use the ContentTool request tool and get these messages, then,
congratulations, you've found a bug. ;-) Please send me more
information, I'll take a look at it. The ContentTool should always
have a current RunData object and init its internal URI object from
it.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

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