PDA

View Full Version : How to access JSP and Servlet remotely ?


deathgod86
18-11-2008, 13:18
I have installed Tomcat 6 in my personal computer (Win XP).
However, I want this computer to act as server and I am accessing the JSP and Servlet placed on this computer remotely (access JSP and Servlet from another computer).

Remote computer connect to this Tomcat computer via private network.
Tomcat computer ip : 192.168.1.1
Remote computer ip : 192.168.1.22

I had tried accessing the JSP and Servlet on the Tomcat computer (192.168.1.1) and it is successful. (http://localhost:8080/myfile.jsp)

So, my question is:
How do I configure so that I can access the JSP and Servlet from another computer ?
(Means using 192.168.1.22 access JSP and Servlet file on 192.168.1.1)

I had tried http://192.168.1.1:8080/myfile.jsp and it failed.

*Please be note that, the computer installed tomcat is not a server, is just a normal pc.

Thx in advance.

kjkoster
18-11-2008, 13:28
Dear deathgod86,

I'm confused. What is the IP address of your Window XP box? So you have a servlet in one Tomcat instance on 192.168.1.1 and the JSP on 192.168.1.22?

Kees Jan

PS. There is no difference between a 'server' and a 'normal pc'. That's just what Microsoft wants you to believe to charge extra money.

Kees de Kooter
18-11-2008, 14:46
I guess you should check the firewall settings of your "server" and open up port 8080.

deathgod86
18-11-2008, 15:44
Both 192.168.1.1 and 192.168.1.22 is running on XP

all the files (jsp + servlet) is all on the 192.168.1.1 (tomcat also)

there is no files at all in 192.168.1.22

192.168.1.22 will access the jsp and servlet file using web browser by using the url http://192.168.1.1:8080/myfile.jsp

So, what actually that give me problem cannot access ?
** The error is connection timeout.

kjkoster
18-11-2008, 20:23
Kees, you were correct (http://www.nabble.com/How-to-access-JSP-and-Servlet-remotely---tp20558511p20563758.html).

Kees Jan

Kees de Kooter
18-11-2008, 20:46
Yeah, he should have read my reply more closely. And stick to the forum where the real experts hang out ;-)

kjkoster
18-11-2008, 21:03
Can't blame the guy for trying all channels.