Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp: Could not access the link from other machines

 
sowjan kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sowjan kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic