JSP and JBuilder problems
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ian_Ohlander
Posted On:   Monday, May 6, 2002 03:10 PM

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 this 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.   More>>

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 this 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:



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="/picture.jpg"

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

   <<Less

Re: JSP and JBuilder problems

Posted By:   Anonymous  
Posted On:   Monday, May 6, 2002 06:27 PM

Hey man,



I also keep my images in the same folder where all the JSP are when developing in JB. And I do have a subfolder to contain all those images.



This is how my project folder structure looks like:




(project name)
|
|-----------------|
jsp servlets
| |
|----------| |----------|-------------|
images *.jsp src classes bak
| | |
*.gif, *.jpg *.java *.class


And I refer to those photos like one of your listings:

img src="images/mypic.gif"


When I first started out with JB, like you I couldn't display my images at all only then I realise that the filenames of my images are case-sensitive. Why don't you try on the filename?



Hope this helps ya.
About | Sitemap | Contact