File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Forcing Tomcat to see css/image files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic
Author

Forcing Tomcat to see css/image files

David McCombs
Ranch Hand

Joined: Oct 17, 2006
Posts: 212
I am using a server configuration that uses both Apache and Tomcat with Apache using mod_jk to communicate with Tomcat.

The problem is that I have a JSP page under ROOT, using a path to images and css, /img and /css respectively. The only way the JSP page can see those files is if it is under httpdocs.

I am also running some php programs.

My hosts tech support says that they can remap Tomcat to see css and image files in Tomcat, but that will negatively affect my php programs. This seems wrong to me that parts of a web page have to be in a completely different directory.

Is there a way I can force my jsp file to look in its current directory for the image and css paths?


"Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration."- Stan Kelly-Bootle
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

Refer to the post in the JSP forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Forcing Tomcat to see css/image files