Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have no clue on JSP, so forgive me if this is way off.
You said that you're referencing the image in an HTML file. Unless your app is doing some kind of processing on the HTML file to adjust the path before serving it, giving the real local path won't work. A client browser will always interpret a path like that as relative to the web root of the server.
In order for clients to find the image, you need to put it under your DocumentRoot (as set in your Apache configuration) and use a path relative to that. So if your document root is /var/mysite, you might put the image in /var/mysite/images/image1.gif and give the URL as /images/image1.gif.
Is there any options to create a link file which maps to the /var/myapp_images directory from /opt/jboss-3.2.6/server/default/deploy/.?
Yeah, you could try making a symlink under your document root instead of putting the actual files there. That should work. Of course, you would need make sure following symlinks is enabled in your Apache configuration.
You should have a folder or directory named with .war extension under the /tmp/images/ (like, /tmp/images/abc.war), else the JBOSS server wont refer the image file. All your images should be copied inside the abc.war file. Adjust your image reference in JSP or HTML to get them from the /tmp/images/abc.war.