![]() |
|
![]() | ||
|
Subject:
java servlet mapping for images
Category: Computers > Programming Asked by: joshy688-ga List Price: $20.00 |
Posted:
17 Jan 2003 13:53 PST
Expires: 16 Feb 2003 13:53 PST Question ID: 144888 |
I am working on a j2ee web application. I want the url http://server.com/ to go to my servlet called "Stuff". I want the url http://server.com/images/foo.gif to show the gif stored in the images directory in the root directory of the servlet. ie, I want all images (and other resources like .css and .js files) to be loaded by the default servlet built into the servlet container, but I want the / url to be sent to my servlet. What is the configuration I can set in my web.xml file to get this to happen. The solution must be j2ee app server agnostic. I can set it to map /stuff to Stuff and then the images will load, but if I map / to Stuff then everything else above / (like /images/foo.gif) get mapped to the Stuff servlet, so then the images don't load. How can I get the images to load when I set the Stuff servlet to be at /? Thanks, - Joshua |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: java servlet mapping for images
From: skorba-ga on 19 Jan 2003 19:39 PST |
Dear Joshua - I'll add this as a comment, since it is not exactly what you asked for, but I believe it will solve your problem: 1) Create a jsp-file (Java server pages) named index.jsp. 2) Embed your servlet inside index.jsp 3) Tell your server to hand out index.jsp as the default document. 4) Configure the other options as usual. Good luck! |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |