请问<action
            attribute="TestForm"
            input="/hello.jsp"
            name="TestForm"
            path="/HelloWorld"
            type="hello.personbeanAction">
            <forward name="Testok" path="/hello.jsp" redirect="true" />
        </action>里面的每一项都表示什么?刚学struts

解决方案 »

  1.   

    <action
                attribute="TestForm"
                input="/hello.jsp"  跳转失败返回页面
                name="TestForm"     form实例名
                path="/HelloWorld"  跳转路径
                type="hello.personbeanAction"> 处理的action类
                <forward name="Testok" path="/hello.jsp" redirect="true" />action处理中的跳转路径
            </action>//???
      

  2.   

    <action
         attribute="TestForm"
         input="/hello.jsp"  处理失败后跳转到的页面
         name="TestForm"     actionform的一个实例,用来获取你的表单信息
         path="/HelloWorld"  当URL末尾为/HelloWorld结尾时,就调转到这个action
         type="hello.personbeanAction"> 处理的action类
         <forward name="Testok" path="/hello.jsp" redirect="true"/>action处理中跳转路径,属于局部跳转
    </action>
      

  3.   

    呵呵,楼主到现在还没学struts啊 加油啊
      

  4.   

    attribute="TestForm" 这个了???
      

  5.   

    楼主是不是在看一本《Struts kick start》的书,这段代码好象就是书里面的
      

  6.   

    attrib  好象是外部调用这个Action时用的名称吧
      

  7.   

    /**
         * Returns the request-scope or session-scope attribute name under which our
         * form bean is accessed, if it is different from the form bean's
         * specified <code>name</code>.
         * @return  attribute name under which our form bean is accessed.
         */
        public String getAttribute() {
            if (this.attribute == null) {
                return (this.name);
            } else {
                return (this.attribute);
            }
        }
    贴一段struts的代码吧,其他的也不说了
      

  8.   

    这里好多星啊,跟楼主一起学习,
    也没学过struts
      

  9.   

    attribute="TestForm" 这个干什么用的了?
      

  10.   

    attribute="TestForm"跟那个name差不多,用来设置form实例在request,或者session中的key