----- Original Message ----- From: "Robert Drescher" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Sunday, August 03, 2008 12:27 PM
Subject: Creating a new Service


Hello everyone in this list!

This is my first post in the users-help, after successfully installing
Tomcat5.5

The default applications are running (in the /usr/share/tomcat5.5-webapps
folder), but for testing my application, I'd like to move mine to a
different location in the filesystem.
Am I right in my assumption that for this, I will need to create a new
service in the server.xml, apart from Catalina?

My structure would look like this:

/usr/share/myapp/              <-- my applications root, the equivalent to
/usr/share/tomcat5.5-webapps
/usr/share/myapp/webapp   <-- my applications webapp, the equivalent to
/usr/share/tomcat5.5-webapps/ROOT

in the end, i'd like requests going to http://localhost:1234 being mapped to
/usr/share/myapp/webapp, the same as requests going to
http://localhost:8180being now mapped to
/usr/share/tomcat5.5-webapps/ROOT

Which configurations do I have to change? I've ben messing around with the
server.xml and the configurations of my webapp for some time, with the
result of getting return code 400
Also, as soon as this is working, can I just remove the definition of
catalina from the server.xml to deactivate all the standard applications?

I'd be very happy to recieve some advice on this and maybe even example
configuration files *wink*

Robert

Hi Robert... you getting good advice in the other posts... and your question actually lands in the middle of many ways to approach this... It hints at virtual hosting, it can be done with a docbase in a context... it can be done by messing with Catalina Home and Catalina Base in the scripts... its a no mans land kinda question ;)

Heres a suggestion...
TC installs easily from a ZIP... its drop and play...

So rather go for a strategy of

   /usr/share/MyProduction/TomcatXXX
   /usr/share/MyTest/TomcatXXX1
   /usr/share/MyTest/TomcatXXX2

Because this way your test stuff is away from your production stuff... if you nuke TC with a bad app... no problem And as TC changes... new versions... you are going to want to play with all the new stuff..

The only thing it that TC's must operate on diff ports... you set this in server.XML... ie

   <Connector port="8080"
   <Server port="8005" shutdown="SHUTDOWN">

Each TC must not be the same... but after that setting..... you'll be whizing along...

http://localhost:8080/manager/html

will let you UNDEPLOY applications that you dont want

if your production server is set at

   <Connector port="80"
   <Server port="8006" shutdown="SHUTDOWN">

http://localhost/manager/html

will do the same thing....

So every port is a diff test system... otherwise an application in one is absolutely identical to another...

The only reason to start messing with Catalina BASE and Catalina Home in the scripts with the idea of having many WEBAPP locations and one bin (I feel) is when you have serious disk space problems... but TC is very small and its not worth the pain...

Then to get to your last question.... if you have to have a webapp operate outside of the default Tomcat/webapps... you can tell just that web app to operate outside using something called the context file... and setting the DocBase....

I think this setup will get you going and its easy.... later you can mess with docbase and virtual hosting and all the rest... TC is very flexible... so I think try keep it simple... drop and play idea, which works on any OS and your customer will also understand it... You dont want to get to the stage where you have so much script all over the machine, that you too afraid to install another TC...

TC is going to be the best thing you ever did.... its worth the learning curve.

Have fun...

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to