• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Tomcat access  RSS feed

 
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: 20745
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • 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
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!