dcsimg
What web.xml to use?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Wilko_Hische
Posted On:   Friday, March 23, 2001 08:51 AM

I have a servlet that renders HTML pages that refer to images with a relative path like In the production environment I am using a servletmapping so I can use a URL like: http://myhost/myapp/servletname Since the images directory is a subdirectory of the docbase directory this works fine. However with the Tomcat server integrated with JBuilder4 the URL is default something like: http://localhost:8080/servlet/servletclassname With a URL like that the path to my image will be resolved to: http://localhost:8080/servlet/images/logo.gif and so I get a "ClassNotFound" error. I have tried several things as a workaround, but nothing seems to work (especially si   More>>

I have a servlet that renders HTML pages that refer to images with a relative path like

In the production environment I am using a servletmapping so I can use a URL like:

http://myhost/myapp/servletname

Since the images directory is a subdirectory of the docbase directory this works fine. However with the Tomcat server integrated with JBuilder4 the URL is default something like:

http://localhost:8080/servlet/servletclassname

With a URL like that the path to my image will be resolved to:
http://localhost:8080/servlet/images/logo.gif

and so I get a "ClassNotFound" error.

I have tried several things as a workaround, but nothing seems to work (especially since I have not been able to prevent JBuilder to regenerate the web.xml each time the application is started).

What can I do???

Wilko Hische

   <<Less

Re: What web.xml to use?

Posted By:   Patrick_McMichael  
Posted On:   Thursday, April 12, 2001 05:46 AM

Be sure you have your WEB-INFweb.xml in place before JB4 generates it, then run JB4, and you will be all set!
About | Sitemap | Contact