This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes jsp: Could not access the link from other machines Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp: Could not access the link from other machines" Watch "jsp: Could not access the link from other machines" New topic
Author

jsp: Could not access the link from other machines

sowjan kumar
Greenhorn

Joined: Oct 09, 2004
Posts: 23
Hi all,
I have a link in the jsp page that pops up image when i click it. Iam getting the image from the database and storing it in some location. Iam taking this location from the properties file. When i do things from my system everything works fine. But when i click the link from other system then it's creating a problem.

I got the error as "The page could not be displayed". Why is this so? can anyone help me in this regard?

Thanks,
sowjanya
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
check the URL for the popup.
Most likely it's pointing to an address on your own machine (either directly on your harddisk or hard to http://localhost/... ).
Change that to the real URL for the file (make it a relative URL to the page you're linking from) and it should appear.


42
sowjan kumar
Greenhorn

Joined: Oct 09, 2004
Posts: 23
This is how i had coded for my link

I'm making use of click = javascript:window.open('viewLogo.jsp,'Logo','toolbar=no,width=150,height=150');
return false;

For each and every subId, there will be a different image stored in the database. When i access this link from other system I could get the bytes that's being read(I could see this from my stdout.txt) but the image is not getting displayed....

How to go about it?
sowjan kumar
Greenhorn

Joined: Oct 09, 2004
Posts: 23
can u pls help in changing to real URL?
Iam hard coing it as E://Project//image.png...This is the problem I suppose

As u said when i point to http://localhost:9001/image.png... then the image is not getting stored there. I'm getting as "the page cannot be displayed"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

sowjan,

JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

thanks,
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp: Could not access the link from other machines
 
Similar Threads
access denied
how to call servlet from jsp
image JSP
JSp page is not displaying run-time new image
Opening CHM file directly.