Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image in JSP

 
Sudhanshu Mishra
Ranch Hand
Posts: 236
1
Eclipse IDE Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I want to display an image as below.
<center><img src="/></center>

The image displays successfully but the problem is that the path of the image is displayed too.How do I stop the name of path being displayed?

I am new to JSP and trying to learn.

Please help me out Ranchers.

Thanks....
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what the problem is. Can you post the HTML you're getting, and the HTML you'd like to get instead? Obviously, an image can only be displayed if its path is part of the web page.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you be using getRealPath() in the first place?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic