• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

image not displaying in tomcat server

 
bhates bhates
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have apache tomcat installed on G:\
I have a file.jsp and image.jpg at webapps\root
wat should be the correct url to display the image.jpg in the file.jsp on apache tomcat server.
Please help
Thanks in advance.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have Tomcat installed correctly so that you can get the normal Tomcat startup page, then you can study the way that the Tomcat example jsp pages refer to images.

Bill
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"bhates bhates", please check your private messages for an important administrative matter.
 
asdf lkjh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you image and jsp file are under same directory, you can give just a name of the image.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"sush pop", please check your private messages for a VERY important administrative matter.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sush pop:
If you image and jsp file are under same directory, you can give just a name of the image.
Which is a very poor way to structure a web app.

See this JSP FAQ entry for information on properly addressing resources in a JSP.
[ October 18, 2008: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic