Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » displaying an image on JSP
displaying an image on JSP [message #231950] Thu, 28 May 2009 15:02 Go to next message
Anna  is currently offline Anna Friend
Messages: 24
Registered: July 2009
Junior Member
Hello!

I'm trying to display a simple image on my JSP. For some reason it's not
displayed.
The image is stored on my C drive, and I already used it on a plain HTML
page.
My JSP is a part of Eclipse dynamic web project.
What should be done to the image file so JSP recognizes it?

Thanks very much in advance.
Re: displaying an image on JSP [message #232122 is a reply to message #231950] Thu, 04 June 2009 02:43 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4489
Registered: July 2009
Senior Member

Anna wrote:
> I'm trying to display a simple image on my JSP. For some reason it's not
> displayed.
> The image is stored on my C drive, and I already used it on a plain HTML
> page.
> My JSP is a part of Eclipse dynamic web project.
> What should be done to the image file so JSP recognizes it?
>
> Thanks very much in advance.

Sounds like a problem when you're running the JSP in a browser. Are
you using the same tag to display the image as in the .html file?
Where does your browser think the image is located according to the
JSP's output?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: displaying an image on JSP [message #232848 is a reply to message #231950] Wed, 24 June 2009 04:25 Go to previous message
Eclipse UserFriend
Originally posted by: david_williams.linux.vnet.ibm.com

Anna wrote:
> I'm trying to display a simple image on my JSP. For some reason it's
> not displayed.
> The image is stored on my C drive, and I already used it on a plain
> HTML page.
> My JSP is a part of Eclipse dynamic web project.
>
You'll probably want to import the image into your project, and
references it from there, with some form of relative link.
I'd have to look up the details, but recall that JSPs and Servlets in
general have limitations about what they are given access to, for
security reasons. So, not sure they can access "any 'ol file" on your
file systsem. But, you can if it's in your project.
Previous Topic:Xml SourceViewer
Next Topic:Eclipse and Jdom error
Goto Forum:
  


Current Time: Fri Sep 20 06:07:53 GMT 2024

Powered by FUDForum. Page generated in 0.03971 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top