I'm posting these questions in the beginner forum because I'm a Java beginner I hope they don't really belong in the servlet forum. Here goes: 1) does "registering a servlet" simply mean putting the servlet class(es) in the classpath? and 2) if tomcat is configured such that only internal users may access the pages, how can it be changed so that all can access it? I've noticed that tomcat usually uses port 8080 but the configuration I inherited here uses 8088 if that matters at all. Thanks in advance. [ October 23, 2003: Message edited by: Barbara Norway ] [ October 24, 2003: Message edited by: Mike Curwen ]
This will get moved to the servelt forum... To register a servlet means to add it to the deployment descripter, call the web.xml. This lets the servlet container know about the servlet and what to do to it. There's a lot more there that you'll need to learn. Actually, another computer that can see your computer with tomcat on the network can just type in your ip with the port number and application name to access the app.
Servlet discussions are really beyond the scope of the beginner forum, which is more for "How do I get my HelloWorld program to compile/run". At the very least they are intermediate level topics. However, I believe you will get quick answers to your questions in the servlets forum, so I'm moving it there.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Hello and thanks for the quick and useful replies. I think I have a bigger issue with the tomcat "visibility" external to our subnet however. We can access the application using the address in the form www.ouruniversity.edu:8088/appname/admin but when trying to access it from another building on campus or from home, no. I'm a newbie to Tomcat so I'm wondering if there is setting somewhere that's causing this problem. We have a web site (Apache server) that IS accessible worldwide using port 80. I have added apps to the Tomcat server but I didn't configure it initially. I can post the code from web.xml or server.xml if that would help. Thanks again!
What URL are you typing in to access it from the outside world? I am not sure this is really a Tomcat problem. It could be a router or DNS problem within your network. Also, I am going to request your other post with this same question be closed. Since you already asked this question here, it serves no purpose to ask it again in a seperate thread. It makes it harder for us to follow your questions and progress. Thanks.
Hi, But one of my two questions isn't resolved: Everyone world-wide can reach the web server on port 80 (Apache server not using Tomcat) but the JSP application on port 8088 (and Tomcat server - separate from the Apache server) cannot be accessed outside of our building. I am wondering if there is a Tomcat setting for making the port inaccessible for security reasons or some such (and does the fact that it's using 8088 rather than the more traditional 8080 have any bearing on the problem?). Please I need help. I assumed I should repost because it appeared that my problem was solved to others but it's not. I started posting in the newbie section so I wouldn't offend anyone or waste anyone's time. How can I make this appear to not be resolved. Thanks!!! [ October 24, 2003: Message edited by: Barbara Norway ]
I am typing http://ourservername.edu:8088/name_of_app_under_webapps/admin The app comes up and all pages work fine within our building but not outside on campus or from home. We have total access to our sun server where the two web servers (apache & tomcat) are running. Thanks in advance! NOt a DNS problem because the sameserver name is used for the apache web site on port 80 and it works fine (and it's registered with the main DNS servers on campus). [ October 24, 2003: Message edited by: Barbara Norway ]
The thing is there is nothing in Tomcat that will restrict that. I would imagine that you have a firewall protecting your network. Not to mention any routers you might have. You need to open port 8088 on the firewall/router in order for your web site to be accessable from the outside world. For example, at my house I have a Linksys router. I am running 2 web servers. 1 is on port 80 and the other is on 8080. I had to set a rule in my router to tell it to forward any requests on those ports to my internal Address of those servers. You might have to do something similar at your company in order for your server to actually even get any requests on that port. Your firewall/router might be getting requests and then saying "where do this go?" and just dumping the packets. Does that make sense?