Front controller path problem

I want my links to be like www.mydomain.com/album/13

with the help of the front controller i will translate the url to mydomain.com/album.jsp?id=3 and dispatch it to the jsp file...

at web.xml i configured the url pattern like below

<servlet>

<servlet-name>Controller</servlet-name>

<servlet-class>com.mydomain.Controller</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>Controller</servlet-name>

<url-pattern>/album/*</url-pattern>

</servlet-mapping>

Everything is ok if i type the url like mydomain.com/album

But if i type mydomain.com/album/ or mydomain.com/album/13 my pages are displayed but the images,css files,js files cannot be imported....This is because application tries to get the images from like mycontext/album/images/xxx.gif but in fact the images are under mycontext/images/xxx.gif

My all files are catched by controller even images and css files. How can i correct this problem?

Thank you

[1049 byte] By [netsonicca] at [2007-11-27 11:52:01]
# 1

It's a normal and even sound behavior from any standard Web sever. You should rewrite the URLs for CSS etc., on your document, or change the folder where they are stored.

hiwaa at 2007-7-29 18:41:49 > top of Java-index,Java Essentials,Java Programming...
# 2

If i rewrite the url's it must be like http://mydomain.com/images/xxx.jpeg because the servlet path always changes when the url changes.

But this time i will have to make httprequest for every image and it means extra heavyness for the web server isnt it?

netsonicca at 2007-7-29 18:41:49 > top of Java-index,Java Essentials,Java Programming...
# 3

i solved the way at last.

http://forum.java.sun.com/thread.jspa?messageID=9793863

netsonicca at 2007-7-29 18:41:49 > top of Java-index,Java Essentials,Java Programming...