void

GMT:JAVA整理

com.sysdeo.eclipse.tomcat_3.3.0
site-1.6.5

$('#dialog-form').serialize()


Action基类
public class BaseAction  extends ActionSupport implements ServletRequestAware,ServletResponseAware,ServletContextAware

JSON
@ParentPackage("json-default")
@InterceptorRefs( {
@InterceptorRef("MyInterceptor"),
@InterceptorRef("defaultStack")
})
@InterceptorRefs(@InterceptorRef("parmsUrl"))
, interceptorRefs=@InterceptorRef("json-default")


<!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.i18n.encoding" value="gbk"></constant> 
        <constant name="struts.convention.action.packages" value="cn.net.gmt.gitf" />
        
        <constant name="struts.convention.default.parent.package" value="crud-default" />
        <constant name="struts.convention.package.locators" value="web" />
        <constant name="struts.convention.package.locators.basePackage" value="org.springside.examples.miniweb" />

 

    <package name="crud-default" extends="convention-default,json-default" >
       
        <interceptors>
            <interceptor name="urlparm" class="cn.net.gmt.gitf.welcome.LoginInterceptor"></interceptor>
            
            <interceptor-stack name="crudStack">
                <interceptor-ref name="store">
                    <param name="operationMode">AUTOMATIC</param>
                </interceptor-ref>        
                <interceptor-ref name="paramsPrepareParamsStack" />
            </interceptor-stack>
            
            <interceptor-stack name="parmsUrl">
                <interceptor-ref name="urlparm"/>
                <interceptor-ref name="crudStack"/>   
            </interceptor-stack>
            
        </interceptors>
 
                
        <default-interceptor-ref name="parmsUrl" />
        
        <global-results>
            <result name="login" type="redirect">/login.action</result>
            
        </global-results>
        

    </package>
 
        
        
</struts>



posted on 2013-07-23 10:16 void 阅读(301) 评论(0)  编辑  收藏 所属分类: JsStruts2公司


只有注册用户登录后才能发表评论。


网站导航: