Tomcat examples webapps
The tomcat7-examples package contains two webapps that can be used to test or demonstrate Servlets and
JSP features, which you can access them by default at http://yourserver:8080/examples. You can install
them by entering the following command in the terminal prompt:
sudo apt i n s t a l l tomcat7−examples
Using private instances
Tomcat is heavily used in development and testing scenarios where using a single system-wide instance
doesn’t meet the requirements of multiple users on a single system. The Tomcat packages in Ubuntu come
with tools to help deploy your own user-oriented instances, allowing every user on a system to run (without
root rights) separate private instances while still using the system-installed libraries.
Note
It is possible to run the system-wide instance and the private instances in parallel, as long as
they do not use the same TCP ports.
Installing private instance support
You can install everything necessary to run private instances by entering the following command in the
terminal prompt:
sudo apt i n s t a l l tomcat7−u s e r
Creating a private instance
You can create a private instance directory by entering the following command in the terminal prompt:
tomcat7−i n s t a n c e −c r e a t e my−i n s t a n c e
This will create a new my−instance directory with all the necessary subdirectories and scripts. You can for
example install your common libraries in the lib / subdirectory and deploy your webapps in the webapps/
subdirectory. No webapps are deployed by default.
Configuring your private instance
You will find the classic Tomcat configuration files for your private instance in the conf/ subdirectory. You
should for example certainly edit the conf/server .xml file to change the default ports used by your private
Tomcat instance to avoid conflict with other instances that might be running.
Do'stlaringiz bilan baham: |