Click here to Skip to main content
15,886,632 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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.

Java
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:
Java
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
Updated 11-Oct-11 21:29pm
v2
Comments
Sergey Alexandrovich Kryukov 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 12-Oct-11 3:29am    
Formatted code blocks.

1 solution

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

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900