struts使用

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

下载文件

     <action name="download" class="thirdIssueAction" method="getDownloadPdf">
<result name="fileNotFound">/error--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="" end="">
</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>

引入其他JSP

<s:include value="simulate_receive_extract.jsp" />

导入其他包的页面 需加上父级包名
<s:include value="/view-main/tree/tree.jsp" />

 
阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6