Hi Marty,

> I am very new at this.  I have tomcat running and I can view the
> index.jsp in my browser set to localhost: 8080

That's a good start.

> Now I want to deploy or install (not sure which one) a .war   I
> put the .war in webapps and tried to use the manager command of
> both deploy and install by giving it the path..

If you put the war in your webapps then you have manually deployed it - you
don't need to do anything else except restart tomcat, and hit the url.

> No go..it doesn't recognize my command deploy.

You have to do a few things to get the manager working, like add a manager
role, username, and password to the tomcat-users.xml file. Once you've done
that the easiest way to use it is through ANT.

First you need one of the Catalina ant tasks, like this:

<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"/>

To make this work you need to add the Catalina ant tasks to your
classpath - they're in server/lib/catalina-ant.jar.

Then you need a target that uses this task, something like:

<target name="deploy" depends="init">
  <deploy url="${url}" username="${un}" password="${pw}"
path="${context-path}" war="file://${war}" />
</target>

In the init target you'll need to set the variables up:

<target name="init">
  <property name="dist" value="dist" />
  <property name="projectName" value="book" />
  <property name="war" value="${dist}/${projectName}.war" />
  <property name="url" value="http://localhost/manager"; />
  <property name="context-path" value="/${projectName}" />
  <property name="un" value="admin" />
  <property name="pw" value="admin" />
</target>

Then you can simply call ant's deploy task whenever you want to deploy your
war file.

Cheers,

Bryan



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to