aspose file tools*
The moose likes Tomcat and the fly likes Tomcat access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat access" Watch "Tomcat access" New topic
Author

Tomcat access

Waldemar Macijewski
Ranch Hand

Joined: Jun 22, 2012
Posts: 32
Hi all. I never had experience setting up webservers, so I have some silly questions regarding configuration and access. It seems that I have successfully installed Tomcat on my Ubuntu (11.10), although I didn't set up any environment variables, and yet when I execute ./startup.sh everything works fine. I understand that these environment variables are needed for the scripts and not Tomcat itself, so when I start it, all values in these variables are correct (except for JRE_HOME it just points to /usr, but when I try to check if Tomcat is running, it's there). So is it mandatory to set up these variables? Also, how do I access the server from another machine? I mean, it's a silly question, but when I type http://myipaddress:8080 it just won't connect. (only http://localhost:8080), do I need to configure something? Or is the connection just being blocked? If yes, how do I resolve that?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16313
    
  23

You have to set up JAVA_HOME (or JRE_HOME). Tomcat will deduce the other items based on that and on the location of the startup script (actually, the catalina.sh script). You can override when these defaults are not sufficient - for example, when you have multiple Tomcats so that CATALINA_HOME and CATALINA_BASE have different values.

For settings within Tomcat itself, you can create a setenv.sh inside TOMCAT_HOME/bin. Use this, for example, to override the default JVM memory settings.

To access Tomcat from another machine, you have to open Tomcat's port (8080) in the machine's firewall (iptables). Also open up port 8443, if you will be using SSL/TLS.


Customer surveys are for companies who didn't pay proper attention to begin with.
Waldemar Macijewski
Ranch Hand

Joined: Jun 22, 2012
Posts: 32
Thanks for reply. I see that this is a common configuration issue, also forgot I was using my router.. :d
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat access