项目工程中的web-inf目录在工程的根目录?
解决方案 »
- 项目中加入dwr comet后,前端选项卡请求后台变慢或不请求了
- java.lang.NullPointerException
- 列表勾选值显示问题
- [新手提问]一个关于package的问题
- 如何将JDK+Tomcat+MySQL+Web程序一起打包为exe的完整安装程序?
- sax方式如何获得xml文件的元素、属性、文本
- 寻求struts资料
- 关于Hibernate保存的问题.
- 在weblogic7.0中jdk是1.3而要使用DataSource是JDK1.4这样不是就要不兼容了吗?
- 关于Tepesty和Wade入门
- 关于tomcat和oracle的问题?(急)
- 在用java做一个小项目时遇到的问题,关于socket的请高手过来看看,怎么做最好
请问你的Tomcat版本是多少,4.1.27之前的版本用struts1.1会出问题的
Installing Struts
To install the binary version of Struts, a few things must be in place. First, make sure that there is an installed version of the Java Development Kit, version 1.2 or later. This shouldn't be a problem because WebLogic ships with a JDK, but it's available for download from Sun if you don't have it. Second, an XML parser that's compatible with the Java API for XML (JAXP) version 1.1 or later is required to parse the various XML files. Again, WebLogic includes an XML parser, but if you want to use another one, Apache offers an open source parser named Xerces that works fine. Just remember to add the associated .jar files to the classpath. Third, download the binary version 1.1 or greater of Struts. A source version is also available, but it requires more libraries and must be compiled. This is beyond the scope of this chapter. Table 19.1 shows all the software needed to run Struts.Table 19.1. Software Downloads Required to Use Struts
Software
Download Site
Java2 Development Kit version 1.2 or greater (optional; included with WebLogic)
http://java.sun.com/j2se
Xerces XML parser 1.3.1 (optional; included with WebLogic) Struts 1.1 or greater
http://xml.apache.org/xerces-jhttp://jakarta.apache.org/struts
Now that Struts is downloaded, installation is simple. Unpack the zip file into a temp directory. Then copy the struts.jar, jakarta-oro.jar, jdbc2_0-stdext.jar, and all the common*.jar files to the WEB-INF/lib directory of the application you want to use Struts with. Then copy all the struts*.tld files and all the *.dtd files into the WEB-INF directory. Now make sure that all the JAR files are in the startup classpath of WebLogic. Table 19.2 shows the directory position of the files.Table 19.2. Struts Application Files Per Directory
Directory
Files
WEB-INF/lib
struts.jar, jdbc2_0-stdext.jar, commons-*.jar
WEB-INF/
struts-*.tld, *.dtd
All the files necessary for Struts are now in the proper place in your Web application. However, before using Struts, certain configuration has to be done.
<taglib>
<taglib-uri>/tags/c.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
*.jsp:
<%@ taglib prefix="c" uri="/tags/c.tld" %>
<c:set var="pageSize" value="10"/>我这样没有错的!