用Struts2实现文件上传:
先在拦截器里配置
在result下方配置
<interceptor-ref name="defaultStack">
<param name="fileUpload.maximumSize">1000000000</param>
<param name="fileUpload.allowedTypesSet">image/jpg,image/jpeg,image/png</param>
</interceptor-ref>
页面上:
<s:form action="fileupload.action" enctype="multipart/form-data" method="post">
<s:file name="uploadFile" label="选择文件"></s:file>
<s:submit></s:submit>
</s:form>
用jquery实现文件上传:
jquery·的 file upload 插件
分页查询:
oracle: select * from
(select *,rownum no
from table where no<=endIndex)
where no >=startIndex
mysql: select * from table limit startIndex,endIndex