Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

a simple Tomcat question

Thread view: 
Leo - 06 Mar 2006 01:07 GMT
Dear All,

In my office at the university, I usually work on a linux computer. I
also have a personal notebook computer, which runs Windows XP. I have
installed Tomcat server in the notebook. Open a web browser in the
Windows XP computer and type in URL: http://localhost:8080 shows that
the server is running correctly in the notebook computer.

Now, I want to access to the notebook computer from my linux computer
through the internet. My notebook internet IP address is: xxxxxxxx. It
is not static IP address, it is dynamic. In the linux computer, I opened
Netscape, typed in: http://xxxxxxxxx. I hope the browser takes me to the
notebook computer running Tomcat server. But the browser was just keep
running and nothing showed up. What did I do wrong? Should I type in
something different from "http://xxxxxxxxxx"? Should I have writen a
hello_world.html and put it in the Tomcat server? Where should I put it?

Can I use the two computers to learn CGI, JSP, Structs?

Thank you very much. Greatly appreciate it.
Jeff.C - 06 Mar 2006 07:05 GMT
at least you need use url http://xxxxxxxxx:8080 to access your pc.
Leo - 06 Mar 2006 03:15 GMT
I just tried. It didn't work, either.

> at least you need use url http://xxxxxxxxx:8080 to access your pc.
Chris Uppal - 06 Mar 2006 10:31 GMT
> Now, I want to access to the notebook computer from my linux computer
> through the internet.

Do you mean though the university's LAN ?  Or is your laptop connected directly
to the Net proper (a dial-up connection to your ISP or something like that) ?
If it's the former then there should be no problem (except see below), if the
latter then you will have to take care ensuring that you are adequately
protected against attacks from the Net.

In either case it's probable that the firewall built into XP is blocking
inbound connections on the port 8080.  I believe it does by default (as it
damned well should!).  But don't just open up ports until after you have
thought the security implications.  It's no use being able to access your
webserver from your Linux box if in the process you loose control of your
laptop.

If the laptop /is/ connected directly to the Net, then you Linux box will have
to connect to it via the university's LAN, and thus it will have to connect
through whatever protection the admin people have put around the LAN.  There
are at least two potential problems: one is that they may not allow outbound
connections to port 8080 at all, another is that they may not allow connections
to servers hosted on a "domestic" ISP.  Which, if either, is actually a problem
will depend on your system admin people and how hard-line security minded they
are.  If you are connecting the laptop to their LAN rather than a dialup then
neither of these should affect you.

> My notebook internet IP address is: xxxxxxxx. It
> is not static IP address, it is dynamic. In the linux computer, I opened
> Netscape, typed in: http://xxxxxxxxx.

Once you have managed to make a connection between the Linux box and the
laptop, this /may/ cause another problem.  I'm not sure about Tomcat
specifically, but most HTTP servers are capable of multi-hosting.  That means
they use the hostname (e.g. "java.sun.com") embedded in the HTTP request to
decide which of several apparently independent websites they are pretending to
be.  If you type a numerical IP address into Firefox (or whatever) then the
hostname which is sent to the server will also be numerical, and so the server
may get confused about which of its websites it should emulate.  You should get
/some/ response, though, even if it's not the response you want ;-)

   -- chris
Nigel Wade - 06 Mar 2006 12:12 GMT
> Dear All,
>
[quoted text clipped - 12 lines]
> something different from "http://xxxxxxxxxx"? Should I have writen a
> hello_world.html and put it in the Tomcat server? Where should I put it?

Routing and firewalls are the most likely reason. Without more information than
xxxxxxxx it's impossible to say.

Are both systems on the same subnet? If not, how are packets routed between
them?
Does the XP system have Windows firewall (or some other firewall) enabled which
is blocking port 8080?

> Can I use the two computers to learn CGI, JSP, Structs?

I don't do philosophy.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

Leo - 06 Mar 2006 12:58 GMT
Both computers are connected directly to the wall. So they are through
university's LAN.

I have just tried vncserver(virtual networking computing server). Start
vncsever in my notebook Windows XP. From my linux computer, I can
successfully access notebook computer in a web browser:
http://notebook.ip.address:5800
(vncserver listens http at port 5800 by default)

Now try Tomcat. Start Tomcat server in notebook computer. In the linux
box web browser, http://notebook.ip.address:8080 has nothing. In the
notebook web browser, http://localhost:8080 shows tomcat is running.

I am very confused. I am doing this is to have them for me to practice
JSP, CGI tutorials.

Thank you very much for your help.
Chris Uppal - 07 Mar 2006 15:03 GMT
> I have just tried vncserver(virtual networking computing server). Start
> vncsever in my notebook Windows XP. From my linux computer, I can
[quoted text clipped - 5 lines]
> box web browser, http://notebook.ip.address:8080 has nothing. In the
> notebook web browser, http://localhost:8080 shows tomcat is running.

Then there's connectivity between the two machines.  The mostly likely problem
is that port 8080 is blocked in the XP box's firewall (as mentioned).  Another
possibility is that Tomcat might need to be configured before it will accept
connections that don't originate on the local machine (I don't know Tomcat, so
I don't know whether there might be such a config option).

   -- chris
robert - 07 Mar 2006 18:55 GMT
> Then there's connectivity between the two machines.  The mostly likely problem
> is that port 8080 is blocked in the XP box's firewall (as mentioned).  Another
[quoted text clipped - 3 lines]
>
>     -- chris

Tomcat does not block remote calls by default, but some firewall
somewhere sure might. The best bet is to go to this site and test the
remote access of the port:

http://www.grc.com/default.htm

Go to Shields Up  - almost at the end

>From there click thru and enter 8080 in the edit box and type enter.
>From there you'll get a new screen and then click 'probe this port' .

(This site is getting harder to click thru. Need to find a new one).

HTH,
Robert
http://www.braziloutsource.com/
Juha Laiho - 07 Mar 2006 20:07 GMT
"Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> said:

>> I have just tried vncserver(virtual networking computing server). Start
>> vncsever in my notebook Windows XP. From my linux computer, I can
[quoted text clipped - 11 lines]
>connections that don't originate on the local machine (I don't know Tomcat, so
>I don't know whether there might be such a config option).

Tomcat can be configured to only listen on a given interface (such as
localhost), but that's not the default set-up. The XP firewall is the
most probable culprit.
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.