You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kai Behncke <Ka...@gmx.de> on 2009/06/05 14:02:54 UTC

Deploying .war-file in Tomcat 5.5

Dear users,

I have installed Tomcat with apt-get install tomcat5.5 tomcat5.5-admin
tomcat5.5-webapps


The default webapps-deirectoy is now:

/usr/share/tomcat5.5-webapps/ROOT/

Tomcat is running and I copy a .war file in 
/usr/share/tomcat5.5-webapps/ROOT/

But how is this .war-file unpacked/deployed?

I restarted Tomcat already with /etc/init.d/tomcat restart

but don't get the filestructure of that war-file?



-- 
View this message in context: http://www.nabble.com/Deploying-.war-file-in-Tomcat-5.5-tp23886971p23886971.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Deploying .war-file in Tomcat 5.5

Posted by Kai Behncke <Ka...@gmx.de>.
Hi Peter,

first of all thank you for your reply.


Peter Crowther wrote:
> 
>> From: Kai Behncke [mailto:Kai-Behncke@gmx.de]
>> I have installed Tomcat with apt-get install tomcat5.5 tomcat5.5-admin
>> tomcat5.5-webapps
> 
>>>From which we can assume you're running on Debian, rather than one of the
many other platforms on >which Tomcat runs?
> 
> Yes, I use Debian etch.
> 
>> Tomcat is running and I copy a .war file in
>> /usr/share/tomcat5.5-webapps/ROOT/
>>
>> But how is this .war-file unpacked/deployed?
> 
>>It won't be.  Copy/move it to /usr/share/tomcat5.5-webapps instead.
> 
> I tried this without succes, I started Tomcat again but the .war-file is
> not unpacked.
> 
> I made a couple of tests here.
> 
> When I just did "apt-get install tomcat 5.5" and I copied the .war file
> then to /var/lib/tomcat5.5/webapps
> 
> it`s unpacked without any problems. But if I call then
> http://www.mysite.de:8180/my_servlet  I don`t see anything in the
> browser??
> 
> If I install "apt-get install tomcat 5.5 tomcat5.5-webapps"
> 
> The .war file in /usr/share/tomcat5.5-webapps/ is not unpacked.
> 
> But if I copy the unpacked-sources from
> /var/lib/tomcat5.5/webapps/my_servlet
> 
> to /usr/share/tomcat5.5-webapps/ROOT/ I get a result by doing
> 
> http://www.mysite.de:8180/my_servlet
> 
> Why might this be?
> Do I need "apt-get install tomcat5.5-webapps" to see a result in the
> browser?
> 
> And what is the difference between tomcat 5.5 and tomcat5.5-webapps?
> 
> Thank you very much, Kai
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Deploying-.war-file-in-Tomcat-5.5-tp23886971p23887719.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Deploying .war-file in Tomcat 5.5

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Kai Behncke [mailto:Kai-Behncke@gmx.de]
> I have installed Tomcat with apt-get install tomcat5.5 tomcat5.5-admin
> tomcat5.5-webapps

>From which we can assume you're running on Debian, rather than one of the many other platforms on which Tomcat runs?

> The default webapps-deirectoy is now:
>
> /usr/share/tomcat5.5-webapps/ROOT/

Yes.  So that is the directory for the default (ROOT) webapp.  The directory for webapps is its parent directory.

> Tomcat is running and I copy a .war file in
> /usr/share/tomcat5.5-webapps/ROOT/
>
> But how is this .war-file unpacked/deployed?

It won't be.  Copy/move it to /usr/share/tomcat5.5-webapps instead.

> I restarted Tomcat already with /etc/init.d/tomcat restart
> but don't get the filestructure of that war-file?

That's not surprising.  Put it in the right directory and try again.

                - Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Deploying .war-file in Tomcat 5.5

Posted by Peter Crowther <Pe...@melandra.com>.
> From: news [mailto:news@ger.gmane.org] On Behalf Of Marcus Better
> On Debian you should put it in /var/lib/tomcat5.5/webapps.

Ah - thanks, Marcus.  Debian's rather odd symlinking policy strikes again!

                - Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Deploying .war-file in Tomcat 5.5

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Kai Behncke [mailto:Kai-Behncke@gmx.de]
> Subject: Re: Deploying .war-file in Tomcat 5.5
> 
> it`s unpacked without any problems. But if I call then
> http://www.mysite.de:8180/my_servlet  I don`t see anything in the
> browser??

You need to include the name of your webapp in the URL; the webapp name is the name of your .war file.

> But if I copy the unpacked-sources from
> /var/lib/tomcat5.5/webapps/my_servlet
> to /usr/share/tomcat5.5-webapps/ROOT/ I get a result by doing
> http://www.mysite.de:8180/my_servlet

That's because you just made your webapp an extension of Tomcat's default webapp - probably not a good thing to do.  If you want your webapp to be the default, delete Tomcat's default (/usr/share/tomcat5.5-webapps/ROOT), rename your .war file to ROOT.war, and place it in /usr/share/tomcat5.5-webapps/ROOT.  You will also want to clean out Tomcat's work directory; I have no idea where the dismal Debian repackaging of Tomcat would have put that.

> And what is the difference between tomcat 5.5 and tomcat5.5-webapps?

The Debian repackaging of Tomcat is a mess - files are scattered all over, and then symlinked back together to try to get things to run.  There's no end of issues with that scheme, which is why many of us recommend throwing away that junk and installing a real Tomcat from tomcat.apache.org.

 - Chuck

 
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Deploying .war-file in Tomcat 5.5

Posted by Kai Behncke <Ka...@gmx.de>.
Thank you all very much for your help.

I did now like:

$ wget
'http://apache.crihan.fr/dist/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz'
$ tar xvzf apache-tomcat-6.0.20.tar.gz
$ cp MapFishPrintModule/print-servlet/target/print-servlet-1.1.war
apache-tomcat-6.0.20/webapps
$ cd apache-tomcat-6.0.20/bin
$ ./startup.sh


....and all the problems are gone :-)

Best regards, Kai




Caldarale, Charles R wrote:
> 
>> From: Christopher Schultz [mailto:chris@christopherschultz.net]
>> Subject: Re: Deploying .war-file in Tomcat 5.5
>> 
>> I disagree with Chuck's complaint about this packaging: it actually
>> looks quite sane to me: system-installed stuff goes into
>> /usr/share/tomcat5.5/webapps and probably has XML context files in an
>> appropriate location (don't ask me where!) to load those.
>> /var/lib/tomcat5.5/webapps is the auto-deploy directory that mere
>> mortals get to use (though usually /var is read-only for non-root
>> users, so... wtf?).
> 
> Your "don't ask me where" and "wtf" comments seem to conflict with your
> "looks quite sane to me" statement...
> 
> The Debian file scattering approach makes it extremely difficult for
> anyone not running that Debian level and that specific Debian repackaged
> version of Tomcat to provide anything other than general advice.  When the
> repackagers start to muck around in server.xml changing defaults (some of
> them do), it gets even worse.
> 
> Ergo, if you want advice from the Tomcat users mailing list, it's best to
> use a standard Tomcat; otherwise, you will likely need help from a
> platform-specific forum.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Deploying-.war-file-in-Tomcat-5.5-tp23886971p23960188.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Deploying .war-file in Tomcat 5.5

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Subject: Re: Deploying .war-file in Tomcat 5.5
> 
> I disagree with Chuck's complaint about this packaging: it actually
> looks quite sane to me: system-installed stuff goes into
> /usr/share/tomcat5.5/webapps and probably has XML context files in an
> appropriate location (don't ask me where!) to load those.
> /var/lib/tomcat5.5/webapps is the auto-deploy directory that mere
> mortals get to use (though usually /var is read-only for non-root
> users, so... wtf?).

Your "don't ask me where" and "wtf" comments seem to conflict with your "looks quite sane to me" statement...

The Debian file scattering approach makes it extremely difficult for anyone not running that Debian level and that specific Debian repackaged version of Tomcat to provide anything other than general advice.  When the repackagers start to muck around in server.xml changing defaults (some of them do), it gets even worse.

Ergo, if you want advice from the Tomcat users mailing list, it's best to use a standard Tomcat; otherwise, you will likely need help from a platform-specific forum.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


Re: Deploying .war-file in Tomcat 5.5

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kai,

On 6/5/2009 9:04 AM, Kai Behncke wrote:
> Thank you very much.
> When I just did "apt-get install tomcat 5.5" and I copied the .war file then
> to /var/lib/tomcat5.5/webapps
> 
> it`s unpacked without any problems.

So, the webapps directory is really /var/lig/tomcat5.5/webapps. You were
trying /usr/lib/tomcat5.5/webapps before, which is why it didn't work.

> But if I call then
> http://www.mysite.de:8180/my_servlet  I don`t see anything in the browser?? 

See Chuck's response: you aren't using the right URL. Give us some
specifics (like the name of the WAR file and the url mapping for the
servlet you're trying to invoke) and we'll try to help you make contact.

> But if I copy the unpacked-sources from
> /var/lib/tomcat5.5/webapps/my_servlet
> 
> to /usr/share/tomcat5.5-webapps/ROOT/ I get a result by doing
> 
> http://www.mysite.de:8180/my_servlet

That's because you're re-naming your own webapp to ROOT, essentially.

> Do I need "apt-get install tomcat5.5-webapps" to see a result in the
> browser?

No.

> And what is the difference between tomcat 5.5 and tomcat5.5-webapps?

tomcat5.5-webapps just includes the sample webapps that come with
Tomcat, probably including the default ROOT webapp.

I disagree with Chuck's complaint about this packaging: it actually
looks quite sane to me: system-installed stuff goes into
/usr/share/tomcat5.5/webapps and probably has XML context files in an
appropriate location (don't ask me where!) to load those.
/var/lib/tomcat5.5/webapps is the auto-deploy directory that mere
mortals get to use (though usually /var is read-only for non-root users,
so... wtf?).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkopRMsACgkQ9CaO5/Lv0PDnNQCfWWqdfJ5MHG/9ljiiMSVusRtW
dOcAnRsDkdQ6vbpaL344923rboSj1Ars
=Kr6M
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Deploying .war-file in Tomcat 5.5

Posted by Kai Behncke <Ka...@gmx.de>.
Hi Marcus,



>On Debian you should put it in /var/lib/tomcat5.5/webapps.

Thank you very much.
When I just did "apt-get install tomcat 5.5" and I copied the .war file then
to /var/lib/tomcat5.5/webapps

it`s unpacked without any problems. But if I call then
http://www.mysite.de:8180/my_servlet  I don`t see anything in the browser?? 


That`s the thing I don`t get (well, I`m really a Tomcat newbie).


But if I copy the unpacked-sources from
/var/lib/tomcat5.5/webapps/my_servlet

to /usr/share/tomcat5.5-webapps/ROOT/ I get a result by doing

http://www.mysite.de:8180/my_servlet

Why might this be?
Do I need "apt-get install tomcat5.5-webapps" to see a result in the
browser?

And what is the difference between tomcat 5.5 and tomcat5.5-webapps? 

Best regards, Kai

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkopFOoACgkQXjXn6TzcAQmIjQCeOnOrjj0+uO5bNe0m6gu8jrTA
LzwAnRNH2GwYHHoYG0A0b865HXX8Jo+C
=Dl/o
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




-- 
View this message in context: http://www.nabble.com/Deploying-.war-file-in-Tomcat-5.5-tp23886971p23887798.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Deploying .war-file in Tomcat 5.5

Posted by Marcus Better <ma...@better.se>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kai Behncke wrote:
> Tomcat is running and I copy a .war file in
> /usr/share/tomcat5.5-webapps/ROOT/

On Debian you should put it in /var/lib/tomcat5.5/webapps.

(And if you run Debian squeeze you can install the tomcat6 package.)

Cheers,

Marcus

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkopFOoACgkQXjXn6TzcAQmIjQCeOnOrjj0+uO5bNe0m6gu8jrTA
LzwAnRNH2GwYHHoYG0A0b865HXX8Jo+C
=Dl/o
-----END PGP SIGNATURE-----



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org