Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploying .war

 
Sami Casab
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi:
I have a .war file with some servlets and jsp (i dont have ejb). I tested it on hp-as ands works fine but i need to deploy it in a pure tomcat server but i dont know how to deploy it.
so, where do i should put this file? and how i deploy it? ...
Thanks in advance.
 
Jim Petersen
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sami
Here is one way to do it (as of TC version 3.2)
1. Stop Tomcat.
2. Delete an existing deployment (If you tried before and it went pear-shaped). If you previously deployed "foo.war" in TOMCAT_HOME/webapps, then it has been unpacked into webapps/foo/... You must delete this directory and all its contents.
On Unix, this can be done with
rm -r $TOMCAT_HOME/webapps/foo or
del %TOMCAT_HOME%/webapps/foo on Win
3. Copy WAR file to TOMCAT_HOME/webapps/.
Start Tomcat.
( A "deploy tool" apparently is on the Tomcat "to-do" list)
If you deploy a WAR file in this manner, you do not need to make any changes to server.xml -- its automatically recognized and activated. However, if you wish to specify non-default options for this webapp, you may do so by adding an element like
<Context docBase="webapps/foo" ...
to server.xml.
 
Sami Casab
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you help, my servlet is now working under http://www.smartware.com.mx:8080/sami/s3. Now i am trying to configure my apache web server because i dont want to use the 8080 port, could you give me a tip?
Thanks in advace.
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sami. this URL might help ya:
http://javaboutique.internet.com/tutorials/Tomcat/configure.html#Configure-Tomcat
it says how to change from port 8080 to 80
cheers
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic