Use Ant to make you programs (5)

xiaoxiao2021-03-06  109

Summary: Build_Tomcat.xml, Tomcat.xml

Now introduce how to cooperate with Tomcat.

Java's program is largely involved in web, which is still very convenient to use Tomcat when you test.

So it is necessary to introduce it.

BUILD_TOMCAT.XML under Work / Common / Tomcat.xml is with

Tomcat works with the profile of work, it is very simple.

The following is the contents of build_tomcat.xml file:

Copyright 2004 CAMRY.WU@gmail.com

This Program Is Free Software; You Can Redistribute IT and / or Modify

It Under The Terms of The GNU General Public License As Published by

The Free Software Foundation; Either Version 2 of the license, OR

ANY LATER VERSION.

This Program is Distributed in the Hope That IT Will Be Useful,

But without Any Warranty; WITHOUT EVEN THE IMPLIED WARRANTY OF

Merchantability or fitness for a particular purpose. See the

GNU General Public License for more details.

You Should Have Received A Copy of The GNU General Public License

Along with this program; if not, Write to the Free Software

Foundation, inc.

->

Semanticattributes = "true" keEProot = "false" />

Depends = "compile" Description = "deploy application">

Depends = "jar" description = "Deploy Application As a War File">

UserName = "$ {tomcat.manager.username}"

Password = "$ {Tomcat.Manager.password}"

PATH = "/ $ {component.name}"

WAR = "$ {component.name} .war" />

UserName = "$ {tomcat.manager.username}"

Password = "$ {Tomcat.Manager.password}"

PATH = "/ $ {component.name}" />

UserName = "$ {tomcat.manager.username}"

Password = "$ {Tomcat.Manager.password}"

PATH = "/ $ {component.name}" />

UserName = "$ {tomcat.manager.username}"

Password = "$ {Tomcat.Manager.password}"

PATH = "/ $ {component.name}" />

UserName = "$ {tomcat.manager.username}"

Password = "$ {Tomcat.Manager.password}" />

The following is the content of Tomcat.xml.

Copyright 2004 CAMRY.WU@gmail.com

Ant Build Environment for Tomcat

->

http://127.0.0.1:8080/Manager

CAMRY

xxxxx

War

$ {Tomcat.home} / webapps

When using, pay attention to establish a WAR directory in the WORK / engineering directory /

The WAR directory structure is:

Work / Engineering Catalog / WAR

WEB-INF / CLASSEES / # Place Class files

LIB / # 放 需要 需要 需要 j j

Web.xml # web configuration file

With these configurations, just start Tomcat, then don't use it when you cooperate with Tomcat.

Tubing Tomcat, as long as Ant Deploy, Ant Stop, Ant Start, etc.

The task is OK.

转载请注明原文地址:https://www.9cbs.com/read-101433.html

New Post(0)