码迷,mamicode.com
首页 > 其他好文 > 详细

ssh整合--struts

时间:2016-05-04 17:06:28      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:

一 struts(jar+web.xml+struts.xml+Action)

  1import min_jars-------struts-2.3.20.3-all(struts2-blank.war)+mysql-connector+jsp-api+servlet-api

  2web.xml---------------<filter>struts2      org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

      <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">

  3struts.xml

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
    "http://struts.apache.org/dtds/struts-2.3.dtd">

<!-- START SNIPPET: xworkSample -->
<struts>
    <package name="struts" extends="struts-default">
        <action name="findEmployee" class="com.huawei.Imost.sms.employee.action.EmployeeAction" method="execute">
            <result name="success">/WEB-INF/jsp/employee/employee.jsp</result>
            <result name="other">/WEB-INF/jsp/other/other.jsp</result>
            <result name="none">/WEB-INF/jsp/error/error200.jsp</result>
        </action>
    </package>

</struts>
4.自定义Action extends ActionSupport

ssh整合--struts

标签:

原文地址:http://www.cnblogs.com/mustang51/p/5458954.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!