Thursday, 17 February 2011

Apache Tomcat Catalina - Basic

Once the server Apache Tomcat Catalina is installed, there are some basic steps:

For make it shorter, "$" is used to say the root directory of Catalina

Start and Stop
  • Mac& Linux: Execute following commands
    • Start
      • $/bin/catalina.sh start
    • Stop
      • $/bin/catalina.sh stop
  • Windows: Execute following commands
    • Start
      • $/bin/catalina.bat start
    • Stop
      • $/bin/catalina.bat stop
To check if it works

1. Go to those web page
http://localhost/
or
http://localhost:8080/
2. If you see any letter in one of those web pages, like "it works!" or the image of apache Tomcat, then it works. Otherwise, if you see white page in both web pages, it means something goes wrong and your server haven't started

Publication
Anything you want to publish, just put them on this directory
  • $/webapps/ROOT/
Once you have paste or modified any file there, they will appear.

Reading/Accessing the contents

To read or access the content
1. Connect your server to any network
2. Get the IP of your server
3. Write the following direction in any browser
http://xxx.xxx.xxx.xxx/
or
http://xxx.xxx.xxx.xxx:8080/
Where "xxx.xxx.xxx.xxx" is the IP of your server

If you had put any folder on the directory, it could be acceded with "/". For example, if I create the folder "example" in the $/webapps/ROOT/ directory and then create a file called "index.html" on that folder, the direction to access it is:

http://xxx.xxx.xxx.xxx/examples/index.html
or
http://xxx.xxx.xxx.xxx:8080/examples/index.html
Where "xxx.xxx.xxx.xxx" is the IP of your server

For more information:
http://en.wikipedia.org/wiki/Apache_Tomcat

No comments:

Post a Comment