Struts1框架建立Web程序的基本步骤

    技术2022-07-03  137

     

    1. Struts的入口是ActionServlet,所以要在web.xml配置一个Servlet;

     

    2. 编写Action类(继承org.apache.struts.action.Action类);

     

    3. 编写ActionForm类(继承org.apache.struts.action.ActionForm类);

     

    4. 在Struts-config.xml配置Action和ActionForm;

     

     

    如果要接收客户端数据,需要编写JSP页面,并通过JSP中的Form提交给相应的Action。如果不需要接收,那么第三步骤可以省略。


    最新回复(0)