Once you have the latest Struts release, you need to complete the following steps to prepare for the remainder of the text. You will have to complete these steps for each Struts Web application that you intend to deploy.
Uncompress the Struts archive to your local disk. 
1.Create a new Web application, using the directory structure described in Chapter 1, “Introducing the Jakarta Struts Project and Its Supporting Components.” Make sure you substitute the name of your Web application for the value wileyapp. For our example, the name of our Web application is wileystruts.
2.Copy the following JAR files, extracted from the Jakarta Struts archive, to the
<CATALINA_HOME>/webapps/wileystruts/WEB&#8722;INF/lib directory:
struts.jar ¨ 
commons&#8722;beanutils.jar ¨ 
commons&#8722;collections.jar ¨ 
commons&#8722;dbcp.jar ¨ 
commons&#8722;digester.jar ¨ 
commons&#8722;logging.jar ¨ 
commons&#8722;pool.jar ¨ 
commons&#8722;services.jar ¨ 
commons&#8722;validator.jar ¨ 
3.Uncompress the Xerces archive to your local disk, if necessary. 
4.Copy the xerces.jar file from the Xerces root directory to the <CATALINA_HOME>/webapps/wileystruts/WEB&#8722;INF/lib/ directory.
5.Create an empty web.xml file, and copy it to the <CATALINA_HOME>/webapps/wileystruts/WEB&#8722;INF/ directory. A sample web.xml file is shown in the following code snippet:
<?xml version="1.0" encoding="ISO&#8722;8859&#8722;1"?>
<!DOCTYPE web&#8722;app
PUBLIC "&#8722;//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
"http://java.sun.com/j2ee/dtds/web&#8722;app_2_3.dtd">
<web&#8722;app>
</web&#8722;app>
Create a basic strut&#8722;config.xml file, and copy it to the
<CATALINA_HOME>/webapps/wileystruts/WEB&#8722;INF/ directory. The struts&#8722;config.xml file is the
deployment descriptor for Struts applications. It is the file that glues all of the MVC
(Model&#8722;View&#8722;Controller) components together. Its normal location is in the
<CATALINA_HOME>/webapps/ webappname/WEB&#8722;INF/ directory. We will be using this file
extensively throughout the remainder of this text. An empty struts&#8722;config.xml file is listed here:
7.
<?xml version="1.0" encoding="ISO&#8722;8859&#8722;1" ?>
<!DOCTYPE struts&#8722;config
PUBLIC
"&#8722;//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts&#8722;config_1_1.dtd">
<struts&#8722;config>
<message&#8722;resources
parameter="wiley.ApplicationResources"/>
</struts&#8722;config>
Note As of Struts 1.1 b1, you are required to have a <message&#8722;resources /> element defined in your
struts&#8722;config.xml file. For now, you simply need to create the struts&#8722;config.xml file as shown
previously. We will discuss this element’s purpose in Chapter 6, "Internationalizing Your Struts
Applications."
At this point, you have all of the necessary components to build the simplest of Struts applications. As you
begin the design and development of your Struts application, you will need to install and configure further
Struts components as necessary. In the next section, we take you through the steps that must be accomplished
when developing a Struts application.

解决方案 »

  1.   

    直接把Jbuilder的Struts的库文件换成你想要的就可以了,具体做法是把你的jar文件拷贝到jbuilder的安装目录下的struts所在的目录,也可以在lib-中把struts的jar文件指向到你的jar文件即可
    也可以自己建一个新的Struts类库呀
      

  2.   

    在library中新增一个叫做struts1.1的项,在里面把struts1.1带的文件都选上,
    在新建工程后,修改struts-config.xml (好象是这个名字,一共是两个xml文件,除了web.xml的另一个),将文件头的两个 1.0 改为1.1具体的操作步骤可以参见 jb 的帮助 搜索struts , 会出现 怎样使用struts 1.1 版, 里面有具体的操作说明,英文的,单词很简单, 或者用一个词霸?
      

  3.   

    1.下载Struts 1.1二进制包和源代码包:jakarta-struts-1.1-rc1.zip和jakarta-struts-1.1-rc1-src.zip
    2.将二进制包解压缩到Jbuilder\thirdpart
    3.将源代码包解压缩到Jbuilder\extras
    4.启动JBuilder,选择tools->config librarys->Struts,在class栏去掉原来的1.02版的Struts.jar,加入JBuilder\thirdparty\jakarta-struts-1.1-rc1\lib目录下所有的.jar;在source栏将原来的jbuilder\extras\jakarta-struts-1.0.2-src\src\share改为jbuilder\extras\jakarta-struts-1.1-rc1-src\src\share,在Documentation栏将原来内容改为jbuilder/thirdparty/jakarta-struts-1.1-rc1/webapps/struts-documentation.war]/api 
    ------------------------------------------------
    楼主把分都给我把!
      

  4.   

    还需要补充一点,这样JBuilder自动生成的struts-config.xml文件是1.0版的,发布到服务器上会出错,需要手动修改一下DTD,将原来的DTD声明由1.0改为1.1:
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">