当前页面: 开发资料首页 → Java 专题 → tomcat下web应用的build.xml文件
tomcat下web应用的build.xml文件
摘要: tomcat下web应用的build.xml文件
</td>
</tr>
<tr>
<td height="35" valign="top" class="ArticleTeitle">
首先 ,在我们的工作目录(如我的是c:\java)创建一个springapp的目录(你可以将这个目录建在任何地方),然后,在springapp目录下创建子目录src,用来保存java资源文件。 建立WEB-INF子目录,和它的classes,lib子目录。 把你应用中所需要的*.jar文件拷入lib目录。
<table width="672" border="0">
<tr>
<td width="388">OK,你的目录应该这个样子:
-spirngapp
-WEB-INF
-classes
-lib
-src
下面是ant的build.xml文件:
<?xml version="1.0" encoding="gb2312"?>
</td>
<td width="274">
</td>
</tr>
</table>
destdir=""
access="private"
author="true"
version="true"
use="true">
这个Ant脚本包含了建立应用主要的工具命令,但是,这个脚本要配合build.properties使用.
# Ant properties for building the springapp
#deploy.path=/home/trisberg/jakarta-tomcat-4.1.24/webapps
deploy.path=d:/Tomcat 5.5/webapps
#deploy.path=c:/bea/user_projects/domains/mydomain/applications
#tomcat.home=/home/trisberg/jakarta-tomcat-4.1.24
tomcat.home= d:/Tomcat 5.5
#tomcat.manager.url=http://localhost:8080/manager
#tomcat.manager.username=admin
#tomcat.manager.password=tomcat
现在我们运行build, deploywar命令,并启动tomcat,
这样我们就成功地建立了一个mvc应用,访问http://loaclhost:8080/springapp/hello.htm
function TempSave(ElementID)
{
CommentsPersistDiv.setAttribute("CommentContent",document.getElementById(ElementID).value);
CommentsPersistDiv.save("CommentXMLStore");
}
function Restore(ElementID)
{
CommentsPersistDiv.load("CommentXMLStore");
document.getElementById(ElementID).value=CommentsPersistDiv.getAttribute("CommentContent");
}
</td>
</tr>
<tr>
↑返回目录
前一篇: java的几种对象(PO,VO,DAO,BO,POJO)解释
后一篇: Meta标签详解