This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Displaying images using JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Displaying images using JSP" Watch "Displaying images using JSP" New topic
Author

Displaying images using JSP

Belloumi
Greenhorn

Joined: May 28, 2001
Posts: 5
Hi again,
Well I am new to JSP so just bare with me. I am trying to open a JSP file, but when I do the images, which I've on the page are not showing. Actually even when I click on the images directly when I am on http://localhost:8080/images I keep on getting page not found. Is there any way to get the images to be shown.
Thanks in advance
karl koch
Ranch Hand

Joined: May 25, 2001
Posts: 388
hi,
make sure you've set the context for your images.
eg. in tomcat you have the server.xml in the TOMCAT_HOME/conf directory. open this with texteditor and take a look at it. you can see from the existing contexts how you should define your new contexts.... hope this helps
karl
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

?? images shouldn't need a separate context.

It might be a mistake in the HTML. If the page displays, but the images are the typical box with a little red 'x', then make sure the <img src="/images/image1.gif"> tag is correct. In this example, you'd need an images directory under the <webaps>/<webroot> directory.
 
 
subject: Displaying images using JSP
 
Similar Threads
link the folder outside servletContext realPath?
Does someone access an image?
Head First Sample Code
Regarding Invalidation of JSP Session
Displaying a .jsp page using Tomcat Server