下载文件
<action name="download" class="thirdIssueAction" method="getDownloadPdf"> <result name="fileNotFound">/error-404-file.jsp</result> <result name="success" type="stream">
获取输入流的入口,对应action中的 public InputStream getViewInputStream(){} 必须写 <param name="inputName">viewInputStream</param>
返回浏览器时,浏览器的对应读取方式,,有image/jpg等 <param name="contentType">application/pdf</param>,
让浏览器,下载文件,fileName为action 属性名
<param name="contentDisposition"> attachment; filename=${fileName}</param>
缓冲区大小
<param name="bufferSize">1024</param>
</result> </action>
标签使用
https://blog.csdn.net/q547550831/article/details/53326042
var为当前遍历到的索引,begin end 执行几次 0 - 0 为一次 notices为action测成员属性,,提供get set 方法
<s:iterator value="notices" var="var" begin="0" end="2">
</s:iteraor>
输出表达式 可以将request中的值取出
<s:property value="#request.issueTypeStr"/>
if 的使用(String的判断)
<s:if test='%{#var.ext == "jpg"}'></s:if> (数字的判断) <s:if test='#var。ext == 1'></s:if>