Home arrow static arrow Java Programming [Archive] - java / jsp / html
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - java / jsp / html
This topic has 6 replies on 1 page.

Posts:392
Registered: 3/7/03
java / jsp / html  
Jun 18, 2004 3:45 AM



 
1. <a href="somelink"> <img border='0' src="wiki/./C:\pic\picture1.gif"> </a>

2. <a href="somelink"> <img border='0' src="wiki/./\webapps\pic\picture1.gif"> </a>
(the path in both statements is correct)

Hi,
When i call the pic by the 1st method the picture wiki/./(.gif) is displayed on the localhost machine but cannot be accessed from the remote machine.
with the second mothod the localhost and the remote user both cannot see the icon.
does any one know how to solve this problem?
thnx
 

Posts:2,909
Registered: 13.8.2003
Re: java / jsp / html  
Jun 18, 2004 3:49 AM (reply 1 of 6)



 
well, the first one won't work obiviously (if you don't see how it's obivious, maybe you shouldn't be doing jsp).

The second one would work with the correct path which depends on your server and filestructure and configuration, I would try src="wiki/./webapps/pic/picture1.gif" or src="wiki/./pic/picture1.gif".
 

Posts:392
Registered: 3/7/03
Re: java / jsp / html  
Jun 18, 2004 5:30 AM (reply 2 of 6)



 
I did try this it still doesn't work :(
 

Posts:7,499
Registered: 02-11-14
Re: java / jsp / html  
Jun 18, 2004 5:42 AM (reply 3 of 6)



 
I did try this it still doesn't work :(

You tried both:
webapps/pics/picture1.gif
AND
pics/picture1.gif
?

Type in on the address bar: http://localhost:8080/pics/picture1.gif
Does the image show up? If so, and wiki/./pics/picture1.gif does not work, try wiki/.//pics/picture1.gif.

If it does not show up, try moving the pics folder under your ROOT webapp so it would be:
webapps/ROOT/pics/picture1.gif
Then try accessing with
pics/picture1.gif
/pics/picture1.gif
or
../pics/picture1.gif
 

Posts:7,499
Registered: 02-11-14
Re: java / jsp / html  
Jun 18, 2004 5:43 AM (reply 4 of 6)



 
woops, forgot to mention, the bolder part of the url (:8080) is the port number you are running on and might be different. Change as necessary...
 

Posts:7,499
Registered: 02-11-14
Re: java / jsp / html  
Jun 18, 2004 5:45 AM (reply 5 of 6)



 
Or, you could right-click on the image placeholder, choose View Image (or your browser's equivelant), and see what the full URL the img is using. Then adjust a relative path to that...
 

Posts:392
Registered: 3/7/03
Re: java / jsp / html  
Jun 20, 2004 7:48 PM (reply 6 of 6)



 
thnx stevejluke
your suggestions worked.
i tried the "localhost" suggestion
it did work thnx. :)
 
This topic has 6 replies on 1 page.