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 Servlet and Image 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 "Servlet and Image" Watch "Servlet and Image" New topic
Author

Servlet and Image

Amod Deshpande
Greenhorn

Joined: Sep 04, 2003
Posts: 8
I am trying to set a background image in a servlet but it is not displaying it. I am using SunOne and TomCat and stored image in Web-Inf folder. Can anyone answer how to display the image???

Malhar Barai
Author
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
Hi,
Is it possible for you to paste your code over here, we would like to know how you are accessing the background "image", & why would you like to set an image background in a servlet..??
MB


Malhar Barai
SOA & Java Book
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
I'm assuming you want an image displayed in an HTML page - note that web servers are not allowed to directly serve ANY resource under WEB-INF so you will have to either move the image file or write servlet code to serve it. Naturally the image src in the HTML will have to match.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet and Image
 
Similar Threads
java.awt.Image to a HTML file via a servlet
servlet applet communication.
calling servlet from another servlet and reading response
request.getHeader()
dimension not perfect