File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Image display in websphere4.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Image display in websphere4.0" Watch "Image display in websphere4.0" New topic
Author

Image display in websphere4.0

sorupa
Greenhorn

Joined: Dec 07, 2001
Posts: 4
i'm trying to run my application in websphere4.0.
application is running.But the images are not loaded in my application.
Images are in Images folder.
calling my image is (/images/ss.gif).
But it's not able to show the image.if i calling the image using context root (ctx/images/ss.gif).
the image is loaded.what's solution for loading the image without using context root.
pls send me the answer.
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
Originally posted by subasorupa:
i'm trying to run my application in websphere4.0.
application is running.But the images are not loaded in my application.
Images are in Images folder.
calling my image is (/images/ss.gif).
But it's not able to show the image.if i calling the image using context root (ctx/images/ss.gif).
the image is loaded.what's solution for loading the image without using context root.
pls send me the answer.

How are you wanting to "show" the images? Are you trying to find out how to construct a URL for the <img> tag's href attribute? Try...
request.getContextPath() + "/images/ss.gif"
Or, you could use the Struts <html:img> tag, which will do this for you automagically.


James Carman, President<br />Carman Consulting, Inc.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image display in websphere4.0
 
Similar Threads
Images not displaying using JSF?
JSP not getting rendered
Image not getting displayed
file access in web application
Deploying MyApp as default application on JBoss server