tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <>
Subject RE: Pb with session
Date Thu, 19 Oct 2000 16:21:45 GMT

	[Kitching Simon]  
	Hmm, yes I see. 

	If a browser requests a URL, and gets back a page containing
	relative paths in it (eg to jsp files, or anchors/links), then the
	browser is going to resolve those relative paths into absolute
	paths before issuing a request to the web server; the browser
	will use the *original* URL to resolve these relative paths with,
	because it doesn't know that the original URL actually did an
	internal forward operation.

	This is not too bad if a jsp is called via only one controlling
	servlet, because all urls in the jsp can be set to be relative
	to the calling servlet. But if a jsp can be called from multiple
	controlling servlets, it has a problem. 

	Is there a method that returns the original URL that the
	calling browser requested, even if the request has been
	forwarded? If so, then everywhere you output a path in 
	a jsp, you could call a function which converts from
	relative-to-jsp into relative-to-original-url. However, this
	really isn't a nice solution.

	This kind of thing is going to occur all the time when using the
	MVC approach for designing websites. I wonder how STRUTS
	solves this problem?


> -----Original Message-----
> From:	Jean-Paul Le Fevre []
> Sent:	Thursday, October 19, 2000 6:02 PM
> To:
> Subject:	Re: Pb with session
> I posted a couple of messages to the list concerning
> difficulties with sessions. Actually, It turns out that
> sessions are managed correctly by Tomcat. My problem
> was due to wrong contexts. It seems that many people
> (like me) are having a lot of problems with context
> path, mapping ...
> Doc, tutorial, hints, tips would be welcome !
> Here is my new problem :
> My servlet forwards the response to a jsp. But
> the browser shows the servlet's url not the jsp's one.
> As a consequence I need to use absolute url everywhere
> in my js pages since I don't know, a priori, what will bring
> them to the browser.
> Is there a way to fix that ?
> -- 
> __________________________________________________________________________
> __
> Jean-Paul Le Fèvre * CEA Saclay DAPNIA/SEI * Mail :

View raw message