hehe 你在www.apache.org上面下载struts-example
呵呵不错的

解决方案 »

  1.   

    用jb9集成struts1.1作一最简单的例子如下:
    1.new project;
    2.new ->web application;
    3.new ->web->ActionForm,name为Untitled1ActionForm,添加一id,其他为默认设置
    4.new->web->Action,name为Untitled1Action,FormBean name选第三步建立的formbean,scope->request,validate formbean->false,其他为默认设置
    5.new->web->jsp from actionForm name为UntitledJsp1,actionForm选择第三步建立的formbean,其他为默认设置
    6.在root directory下新建一jsp1.jsp.
    7.修改action代码为:
    public ActionForward excute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
    return actionMapping.findForward("forward");
    }
    struts-config.xml 为:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="untitled1ActionForm" type="untitled7.Untitled1ActionForm" />
    </form-beans>
    <action-mappings>
    <action name="untitled1ActionForm" type="untitled7.Untitled1Action" validate="false" scope="request" path="/untitled1Action">
    <forward name="forward" path="/jsp1.jsp" />
    </action>
    </action-mappings>
    </struts-config>UntitledJsp1部分代码为:
    <html:form action="/untitled1Action.do" method="POST">
    <html:text property="id"/>
    <br>
    <html:submit property="submit" value="Submit"/><br>
    <html:reset value ="Reset"/>
    </html:form>同样做法在struts1.0正常
      

  2.   

    laoer(laoer):自己带的例子在哪啊