把它解压后不用copy到webapps里面去,因为直接copy过去不能用的,要做不少的工作才行,其中包括copy一系列与struts相关的东西到webapps里的WEB—INF文件夹里面,最直接也是不会出问题的方法是:tomcat/conf/server.xml里设定一个虚拟目录指向解压的目录 <!-- Tomcat Manager Context -->
<Context path="/struts-blank" docBase="D:\mywork\tilb\struts-blank"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-documentation" docBase="D:\mywork\tilb\struts-documentation"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-example" docBase="D:\mywork\tilb\struts-example"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-exercise-taglib" docBase="D:\mywork\tilb\struts-exercise-taglib"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-template" docBase="D:\mywork\tilb\struts-template"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-upload" docBase="D:\mywork\tilb\struts-upload"
debug="0" privileged="true"/>
<Context path="/struts-blank" docBase="D:\mywork\tilb\struts-blank"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-documentation" docBase="D:\mywork\tilb\struts-documentation"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-example" docBase="D:\mywork\tilb\struts-example"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-exercise-taglib" docBase="D:\mywork\tilb\struts-exercise-taglib"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-template" docBase="D:\mywork\tilb\struts-template"
debug="0" privileged="true"/>
<!-- Tomcat Manager Context -->
<Context path="/struts-upload" docBase="D:\mywork\tilb\struts-upload"
debug="0" privileged="true"/>
解决方案 »
- sturst2+ireport结合开发报表生成的数据都是null
- 打印checkbox选中的
- win7下,java获取本地ip问题
- mysql,spring+ibatis事务机制问题
- hibernate的几个问题,急,大内高手救我!!!
- ibatis 如何生成自增主键
- tomcat 5.5 问题
- JDBC 连接MSSQL 出错,提示: Error establishing socket
- 大家帮我推荐一本EJB入门的书,谢谢!
- 如何用简单的方式将某个指定目录下的几十个jar文件在CLASSPATH变量中注册?(50)
- 高兴,散分!!!
- 高分求教一个困扰我一周的问题。高分高分!!!!!!!!!!!!!
(先把webapps下你解压之后的目录删掉)
安装之后注意更新JAVA_HOME环境变量。
tomcat会自动解压war文件的
给分
tomcat_home
java_home
classpath
直接将struts-example.war放到webapps目录下
然后启动tomcat开始出了点小问题,
因为我自作聪明,把struts.jar放到了jdk\jre\lib\ext\目录下
结果老是报错
后来将其删掉,一切正常