• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet and Image

 
Amod Deshpande
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic