wood burning stoves 2.0
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
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Image in JSP" Watch "Image in JSP" New topic

Image in JSP

Sudhanshu Mishra
Ranch Hand

Joined: May 28, 2011
Posts: 235

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.


Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
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

Joined: Jan 10, 2002
Posts: 63844

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

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