Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JSP img src problem with JBuilder

Status
Not open for further replies.

ianohlander

Programmer
Feb 28, 2002
12
US
Ok, I am having problem and the answer seems to be something simple, but darned if I can find it. Any help would be appreciated.

I have a fairly straightforward JSP. The images are all contained in c:/cgNet_Web/cgnet_images and I, for ease of testing, referred to them by that absolute URI.
But I am close to deployment, and need to make my references relative to the JSP pages.

So, for example, I changed them to the following:

img src="picture.jpg"

and then did the following (each of them is mutually exclusive. That is, I would try one, then if it didn't work, go on to another, etc).

1. put picture in c:/project/classes
2. put picture in c:/WEB-INF/classes
3. put picture in c:/
4. put picture in c:/project

none of that worked.
Then I tried:

<base=&quot;
nothing.
I tried adding the picture to the project. Nothing. (JBuilder's browser won't show it, and neither will IE's, but the absolute URI's in the page DO show up in IE).

Then I tried:

img src=&quot;/picture.jpg&quot;

and all of the above.
Still nothing.
Can somebody please help me? I just want to be able to refer to this picture relatively and it show up. So that when I deploy, if I make sure the images are in the right spot relative to the JSP, they will display.
Thank you for any help you can give.
Ian Ohlander
IanOhlander@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top