tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Newbie: CSS not taking effect
Date Fri, 31 Jul 2009 15:30:00 GMT
Roman Sokolyuk wrote:
> Thank you very much for your time.
> This fixed the problem.
> I have only one question. How does the browser determine which parts of the
> URL to strip?
It has very precise rules for that, which are probably to be found in 
the HTTP RFC (, or maybe the URL 
Rather daunting documents, but anyone fiddling with WWW development 
should at least read them once (repeat 3 times) (*)

I hope nobody bites me for the following, but here is a short summary
off-the-cuff :
- split the full URL from which the current page was obtained (say
protocol: http
(separator): ://
path: /somedir/someapp
query: some=query
- keep only the path for now
- strip the last path component  (say, work backward stripping 
characters from the end until the first /)
- add any relative reference to that path
- re-assemble a URL with the protocol, host, and new path
- go get it

(*) and anyone fiddling with Tomcat should add the Servlet Specification.
(If I hadn't added this, Chuck would have)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message