That's the request dispatcher. Images and CSS are all 'called' from the
client and have nothing to do with the dispatcher.
If you type in http://www.foo.com/target
then to the browser, the resource requested is 'target'
and your image and css links, if they're relative, are going to be
relative
You are so right Mike, thanks so much.
Well I guess now my problem is that for requests ending in /target, my
img tags need to look like /images/image.gif wheras for requests
ending in
/target/ my img tags need to look like ../images/image.gif.
I can't imagine I'm the first person to try to
No, if you use img=/foo.gif
then '/' ALWAYS indicates to the browser to request it from the domain
root.
-Original Message-
From: Alan Weissman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 1:26 PM
To: 'Tomcat Users List'
Subject: RE: ServletRequest's path elements
Howdy,
No, if you use img=/foo.gif
then '/' ALWAYS indicates to the browser to request it from the domain
root.
Yeah, but you don't want to do that because what if the context path
changes? A relative link would be better, and it's good that the
original poster is already trying to do that,
Ok, so what was said about using img src=/foo.gif theoretically seems
true, but in practice it does not work.
And I don't have the ability to mandate a request.getContextPath() for
every
Link on the site.
All I want to do is do what apple does if you go to
www.apple.com/ipodmini or
Howdy,
All I want to do is do what apple does if you go to
www.apple.com/ipodmini or www.apple.com/ipodmini/ you get the same
page.
This shouldn't be that hard, but whats the best way to do it?
Going to apple.com/ipodmini leaves the URL as-is, I just tried it, so
I'm not sure what you mean.
I think the difference between those seeing the redirect and those who
are not is what browser they are using. Some browsers add the trailing
slash for you, some do not. I tried this on Windows NT 4, IE 6(does add
the /), and on Galeon/Mozilla on SUSE Linux (no / added).
Client side, not server