• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Tomcat access

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Bartender
Posts: 20982
128
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Waldemar Macijewski
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply. I see that this is a common configuration issue, also forgot I was using my router.. :d
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!