在Tomcat 4.1文件夹下有一个webapps文件夹,你把那几个war包Copy进去就可以了

解决方案 »

  1.   

    倒...那些struts*.jar 和*.tld 是拷贝到你的程序的WEB-INF 下的啦...
      

  2.   

    嗯?楼上两位师兄的意思是,
    1、在Tomcat 4.1文件夹下有一个webapps文件夹,把那几个war包Copy进去
    2、把解压后lib/下所有的struts*.jar 和*.tld 、commons-*.jar全部COPY
    到我自己的JSP程序目录下的WEB-INF 里是吗? 别告诉我,每写一个WEB程序就要COPY一次?
      

  3.   

    struts自带的几个包是文档和示例
    可以用容器来发布.$STRUTS_HOME/lib 下的所有的jat和*.tld 是要拷贝到web程序的WEB-INF下也不是很繁杂啊.你用什么开发环境呢?
      

  4.   

    楼主你的TOMCAT为什么要放的那么深呢?直接放到C盘 OR D盘不可以么?我就把STRUTS1。1放到 TOMCAT的 WEBAPP文件夹下了可以运行STRUTS的例子我也只是知道这么多呵呵
    郁闷
    STRUTS学习之中
      

  5.   

    試一試很容易的
    我現在也正在學習Struts
      

  6.   

    Installing and Using Struts
    ---------------------------You can utilize a binary distribution of Struts in your own web applications
    by following these steps.  All of these steps are required if you want to
    run the Struts application framework (including executing the example
    application).  If you simply wish to use the Struts custom tag library,
    and not the MVC framework, only the steps ed (*) are required.- (*) Download and install a Java2 (version 1.2 or later) Java Development Kit
      Kit implementation for your operating system platform.  Define an environment
      variable JAVA_HOME that points at the base directory of your JDK
      installation, and add the directory "$JAVA_HOME/bin" to your PATH variable.- Download and install an XML parser that is compatible with the Java
      API for XML Parsing (JAXP) 1.1 specification.  A useful XML parser is the
      JAXP Reference Implementation, version 1.1 or later, that is available
      at <http://java.sun.com/xml>.  Another JAXP-compatible parser that has
      been reported to work fine with Struts is Xerces, version 1.3.1,
      available at <http://xml.apache.org>.  Be sure to add the "jaxp.jar" and
      "crimson.jar" (or whatever JAR file comes with your parser) files to
      your CLASSPATH environment variable.- Download and install the JDBC 2.0 Optional Package Binary (formerly known
      as the Standard Extensions package) from the Java Software web site
      <http://java.sun.com/products/jdbc>, and install the "jdbc2_0-stdext.jar"
      file on your classpath (or as a system extension).- Download and install Xalan-J, from <http://xml.apache.org/xalan-j"> (or
      use the version that came with your JAXP/1.1 download), and install
      xalan.jar in the "lib" directory of your Ant installation.- (*) Download and install a servlet container that supports the Servlet
      API Specification, version 2.2 or later, and the JavaServer Pages (JSP)
      Specification, version 1.1 or later.  A useful servlet container is
      Tomcat, version 3.2 or later, that is available at
      <http://jakarta.apache.org>.- (*) Download and unpack a Struts binary distribution, available from
      <http://jakarta.apache.org/builds/jakarta-struts/nightly/>.- (*) Install the Struts documentation application by deploying file
      "lib/struts-documentation.war" into your servlet container, using the
      standard techniques supported by that container.  (For Tomcat, simply
      copy this file to the $TOMCAT_HOME/webapps directory and restart Tomcat).- Install the Struts example application by deploying file
      "lib/struts-example.war" into your servlet container, using the standard
      techniques supported by that container.  (For Tomcat, simply copy this
      file to the $TOMCAT_HOME/webapps directory and restart Tomcat).- (*) Copy the files "lib/struts*.tld" from the Struts distribution into the
      "WEB-INF" directory of your web application.- (*) Copy the JAR files from the "lib" directory of the Struts distribution
      (such as "struts.jar" and "commons-*.jar") into the "WEB-INF/lib" directory
      of your web application.- (*) Modify your "WEB-INF/web.xml" file to include a <servlet> element to
      define the controller servlet, and a <servlet-mapping> element to establish
      which request URIs are mapped to this servlet.  Normally, you will map
      the controller servlet to a wildcard pattern ("/execute/*") or a filename
      extension pattern ("*.do").  Use the "WEB-INF/web.xml" file from the
      example application (see below) for an example of how this is done.- (*) Modify the "WEB-INF/web.xml" file for your web application to include
      a tag library declaration like this for each Struts tag library you will
      be using: <taglib>
        <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
        <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>- Create a file "WEB-INF/struts-config.xml" that defines the mappings for your
      requests to specific action classes.  Use the "struts-config.xml" file from
      the example application (see below) as a guide.- (*) In each JSP page that will use the Struts custom tags, add a line at
      the top of the page like this (for each Struts tag library needed): <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="struts-bean" %>  (If you wish, you can use a prefix other that "struts-bean").- When compiling your web application components, be sure that the
      JAR files (copied above) are included on the CLASSPATH environment
      variable used by your Java compiler.
      

  7.   

    直接解压缩到tomcat
    的虚拟目录,
    不用每次都copy.