The <BASE> tag may help you here (or <html:base> if you are using struts)
-----Original Message----- From: Juergen Weber [mailto:[EMAIL PROTECTED] Sent: 22 February 2004 00:20 To: [EMAIL PROTECTED] Subject: Relative links do not work with controller servlet. I want to run all requests through a controller servlet. The requests should be like /controller/dir/fileXXX.html This is done with a <servlet-mapping> <servlet-name>Controller</servlet-name> <url-pattern>/controller/*</url-pattern> </servlet-mapping> request.getPathInfo() is "dir/fileXXX.html" fileXXX.html in reality are JSPs, which the Controller servlet forwards to. In the JSPs are relative links to images and CSS. Well, as in the browsers view the html files are below /controller, it requests these relative links also below /controller, but the controller cannot and should not handle CSS and images. This problem surfaces often in the newsgroups, but I did not find a solution. Is there a good, portable solution to the problem ? Ideally would be a <url-pattern-exclude>*.css,*.jpg,*.gif</url-pattern-exclude> Tag in web.xml. Thanks, Juergen __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
