Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java Server portlet JSP
I have a link to local server that can be accessed from the local machine only.Now I want to display that link in the internet without publishing the IP in internet.
 
I am using the java.net.url class to create the connection to local IP from the local server.But I am unable to download the jsp page and display it.
 
URL nURL=new URL("http://10.10.10.20/list.jsp");
URLConnection uc=nURL.openConnection();
HttpURLConnection h =(HttpURLConnection) uc;
h.connect();
 
Now I want to display the JSP page to the user who doesn't have access to the local machine.
 
I am able to download any files from the local link and display it to any user who doesn't have direct access by:
BufferedInputStream bis= new BufferedInputStream(uc.getInputStream());
 

But I want to display the JSP page to the user that doesn't have local access.
Can anyone help me in doing it..
 
Thanks in advance.
Posted 10-Oct-11 6:06am
Edited 11-Oct-11 22:29pm
Nagy Vilmos275.1K
v2
Comments
SAKryukov at 10-Oct-11 12:09pm
   
What is "publishing IP in the Internet"? IP is resolved via DNS. What is "opening a JSP page" from a local machine? Opening from a client side as any Web browser does? But for client side, there is no such thing as JSP page. As a file? But why it's a problem? Not clear.
--SA
Nagy Vilmos at 12-Oct-11 3:29am
   
Formatted code blocks.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

hi friend,
         I think u need a server for doing this job...
Thanks...
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 575
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,466
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,897


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 26 Oct 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100