aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Image in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Image in JSP" Watch "Image in JSP" New topic
Author

Image in JSP

Sudhanshu Mishra
Ranch Hand

Joined: May 28, 2011
Posts: 217

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
Marshal

Joined: Mar 22, 2005
Posts: 42273
    
  64
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.


Ping & DNS - my free Android networking tools app
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Why would you be using getRealPath() in the first place?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image in JSP