i gave it a look and, besides not understanding it well enough, i learned i was suposed to have a war file, so now my war is learning how to make one p.s. hope i dont get a third rtfm within the very same day ;)
here i go again i followed this tutorial, created the war file and tomcat works fine with it (appears in its list applications) what keeps puzzling me is this: if i enter this url: http://localhost:8080/onjava/login.jsp i get the page, but if instead of localhost i type my ip, i cant get it
here's what i read from tomcat docs:
Deployment With Tomcat 5 In order to be executed, a web application must be deployed on a servlet container. This is true even during development. We will describe using Tomcat 5 to provide the execution environment. A web application can be deployed in Tomcat by one of the following approaches:
Copy unpacked directory hierarchy into a subdirectory in directory $CATALINA_HOME/webapps/. Tomcat will assign a context path to your application based on the subdirectory name you choose. We will use this technique in the build.xml file that we construct, because it is the quickest and easiest approach during development. Be sure to restart Tomcat after installing or updating your application.
==> what i did <== Copy the web application archive file into directory $CATALINA_HOME/webapps/. When Tomcat is started, it will automatically expand the web application archive file into its unpacked form, and execute the application that way. This approach would typically be used to install an additional application, provided by a third party vendor or by your internal development staff, into an existing Tomcat installation. NOTE - If you use this approach, and wish to update your application later, you must both replace the web application archive file AND delete the expanded directory that Tomcat created, and then restart Tomcat, in order to reflect your changes.
==> tried this too <== Use the Tomcat 5 "Manager" web application to deploy and undeploy web applications. Tomcat 5 includes a web application, deployed by default on context path /manager, that allows you to deploy and undeploy applications on a running Tomcat server without restarting it. See the administrator documentation (TODO: hyperlink) for more information on using the Manager web application. (...)
i guess i did that already: in conf/server.xml, i added: <Context path="/onjava" docBase="onjava" debug="0" reloadable="true" /> i tried also: <Context path="/onjava.war" docBase="onjava.war" debug="0" reloadable="true" /> and both work with localhost only (last one only after i remove onjava folder)
If you can see it with localhost, then Tomcat is running and your app is deployed correctly.
If you're having problems seeing it with an IP, it's not a Tomcat problem. Is port 8080 open to outside traffic on your network? Are you running a firewall on that machine that is restricting access to port 8080 (maybe only allowing local host to access it?).
Again, it sounds like Tomcat and your app are both fine.