struts.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
    <constant name="struts.devMode" value="true" />
    <constant name="struts.objectFactory" value="spring"/>
   
    <package name="com.eshop.user" extends="struts-default" namespace="/user">
        <action name="login" class="userAction" method="login">
            <result name="success" type="redirect">/main.jsp</result>
            <result name="error" type="redirect">/login.jsp</result>
            <result name="admin" type="redirect">/admin.jsp</result>
        </action>

       
       
        <action name="create" class="userAction" method="createUser">
            <result name="success" type="redirect">/user/userList.action</result>
        </action>
        <action name="createPage" class="userAction" method="createUserPage">
            <result name="success">/create_user.jsp</result>
        </action>
        <action name="getUser" class="userAction" method = "getUser">
            <result name="success">/edit_user.jsp</result>
        </action>
        <action name="modifyUser" class="userAction" method = "modifyUser">
            <result name="success" type="redirect">/user/userList.action</result>
        </action>
        <action name="changePassword" class="userAction" method = "changePassword">
            <result name="success">/change_password.jsp</result>
        </action>
        <action name="changePasswordComfirm" class="userAction" method = "changePasswordComfirm">
            <result name="admin" type="redirect">/user/userList.action</result>
            <result name="list" type="redirect">/request/list.action</result>
            <result name="error" type="redirect">/user/changePassword.action</result>
        </action>
    </package>
   
    <package name="ajax" extends="json-default" namespace="/ajax">
        <action name="logout" class="userAction" method="logout">
            <result type="json">
                <param name="root">dataMap</param>
            </result>
        </action>
    </package>
   
</struts>

你可能感兴趣的:(json)