想知道大家这种情况都是怎么处理的啊,是jsp+javabean还是?

解决方案 »

  1.   

    action并不一定需要actionform啊,你可以直接调用action.do来访问你的action
    不过要事先在server-config.xml文件中申明
      

  2.   

    那我需要在server-config.xml怎么申明啊
      

  3.   

    可以不用actionform,在stuts-config.xml中
    <action path="/action" scope="request" type="xxx.xxx.xxx">
      

  4.   

    多谢laoer(laoer) ,我去试试
      

  5.   

    我是action都有actionform,
    jsp+actionform
    方法是笨了点,但不会出错
      

  6.   

    在stuts-config.xml中
    的<action mappings>下添
    <action path="/action" scope="request" type="xxx.xxx.xxx">还有我觉得你用strusts不一定什么都得按照它的  中见穿插自己的jsp javabean class这些都是可以的  而且很多情况下回这样用
      

  7.   

    不一定非要actionform,按照你的情况你应该自己写一个类,或者用一下ActionForm,但是不要用Struts的构架,在页面中直接的从session或者request中取出Form读取数据。
    甚至你读取数据的工作也可以写在一个类中,免得jsp装载的时候还要现编译以提高速度。我就是这么做得。
      

  8.   

    那我下面这样处理是否妥当呢?
    不用actionForm
    <action path="/action" scope="request" type="xxx.xxx.xxx">然后在action中创建我的类
    leftTreeBean myTree = new leftTreeBean("test","test");
    session.setAttribute("myTree",myTree);
    return actionMapping.findForward("forward");然后在我的JSP页面
    <jsp:useBean id="myTree" scope="session" class="com.kh.dwfx.mybean.leftTreeBean" />
      

  9.   

    <action forward="/License.jsp" path="/license" />
      

  10.   

    然后打license.do就可以到License.jsp了。
      

  11.   

    哈哈,runmin(■怀念■) 也跑JAVA版来转?
      

  12.   

    可以不指定form的。
    <action path="/003A01" type="action bean path/003A01"  scope="request">
    <forward name="success" path="/your.jsp">
    </forward>
    </action>