zoukankan      html  css  js  c++  java
  • struts2和jsonlib组合配置

    <?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>
    	<include file="struts-default.xml" />
    	<package name="simple" extends="struts-default">
    		<action name="download" class="fileAction" method="download">
    			<result name="success" type="stream">
    				<param name="contentType">application/octet-stream;charset=ISO8859-1</param>
    				<param name="inputName">inputStream</param>
    				<param name="contentDisposition">attachment;filename="${downloadFileName}"</param>
    				<param name="bufferSize">4096</param>
    			</result>
    		</action>
    	</package>
    	<package name="json" extends="json-default">
    		<action name="getDirectories" class="fileAction" method="getDirectories">
    			<result type="json">
    				<param name="root">nodes</param>
    				<param name="excludeNullProperties">true</param>
    			</result>
    		</action>
    		<action name="getFiles" class="fileAction" method="getFiles">
    			<result type="json">
    				<param name="root">page</param>
    				<param name="excludeNullProperties">true</param>
    				<param name="excludeProperties">conditions,limit,start,success,objCondition</param>
    			</result>
    		</action>
    		<action name="uploadFiles" class="fileAction" method="uploadFiles">
    			<result name="success" type="json">
    				<param name="includeProperties">success</param>
    			</result>
    			<result name="input" type="json">
    				<param name="includeProperties">success</param>
    			</result>
    		</action>
    		<action name="createFolder" class="fileAction" method="createFolder">
    			<result type="json">
    				<param name="includeProperties">success</param>
    			</result>
    		</action>
    		<action name="deleteFiles" class="fileAction" method="deleteFiles">
    			<result type="json">
    				<param name="includeProperties">success</param>
    			</result>
    		</action>
    		<action name="compressionFiles" class="fileAction" method="compressionFiles">
    			<result type="json">
    				<param name="includeProperties">success</param>
    			</result>
    		</action>
    		<action name="decompressionFiles" class="fileAction" method="decompressionFiles">
    			<result type="json">
    				<param name="includeProperties">success</param>
    			</result>
    		</action>
    	</package>
    </struts>
    
     
  • 相关阅读:
    Leaf-spine data center architectures
    centreon 画图x轴乱码
    二分图匹配
    牛客练习赛17
    HDU-4550-贪心
    HDU-4511-ac自动机+dp
    UVA-11761-马尔可夫/记忆化搜索
    HDU-3853-期望/dp/坑
    HDU-4405-期望dp
    zoj-3329-期望/dp/方程优化
  • 原文地址:https://www.cnblogs.com/qq1988627/p/6606924.html
Copyright © 2011-2022 走看看