tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juergen Weber <webe...@yahoo.com>
Subject Relative links do not work with controller servlet.
Date Sun, 22 Feb 2004 00:20:25 GMT
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message