tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
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 (http://www.faqs.org/rfcs/rfc2616.html), or maybe the URL 
RFC (http://www.ietf.org/rfc/rfc2396.txt).
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 
http://somehost.somedomain.com/somedir/someapp?some=query
into
protocol: http
(separator): ://
hostname: somehost.somedomain.com
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message