日期:2014-05-18  浏览次数:20737 次

jsp浏览服务器上的文件
兄弟我想设计一个浏览服务器上的文件的JSP网页,服务器上有N个文件夹,文件夹里存放着不同类型的文件(有.TXT;.PDF;.DOC;.JPG   ……)
      我想问一下各位兄弟:能否将要打开的文件显示在网页上?

------解决方案--------------------
<%@ page contentType= "text/html;charset=GBK " %>
<%@ page session= "true " %>
<table width= "700 " border= "0 " cellspacing= "1 " cellpadding= "1 " align= "center ">
<tr>
<td width= "30% " >
<div align=center> <iframe width=150 height=400 name=bb frameborder=1 src= "help\helpmenu.html " > </iframe> </div>
</td>
<td width= "10% ">
<div align=center> &nbsp; </div>
</td>
<td width= "60% " >
<div align=center> <iframe width=600 height=400 name=aa frameborder=1 src= "help\help1.html "> </iframe> </div>
</td>
</tr>
</table>

<HTML>
<HEAD>
<TITLE> helpmenu </TITLE>
<META NAME= "Generator " CONTENT= "EditPlus ">
<META NAME= "Author " CONTENT= " ">
<META NAME= "Keywords " CONTENT= " ">
<META NAME= "Description " CONTENT= " ">
</HEAD>

<BODY bgcolor= "#DEF3CE ">
<table width= "120 " border= "0 " cellspacing= "1 " cellpadding= "1 " >
<tr> <td width= "100% "> <font size=2 color=blue> <b> 系统帮助 </b> </font> </td> </tr>
<tr> <td width= "100% "> &nbsp; </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "help1.html " target=aa> 1.系统描述 </a> </font> </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "help2.html " target=aa> 2.系统安装 </a> </font> </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "help3.html " target=aa> 3.系统目录 </a> </font> </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "help4.html " target=aa> 4.设计描述 </a> </font> </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "help5.html " target=aa> 5.工作流使用 </a> </font> </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "help6.html " target=aa> 6.流程配置 </a> </font> </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "help7.html " target=aa> 7.系统权限描述 </a> </font> </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "help8.html " target=aa> 8.其它注意事项 </a> </font> </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "../images/oa-system.JPG " target=aa> 9.系统框架示意图 </a> </font> </td> </tr>
<tr> <td width= "100% "> . <font size=2 color=red> <a href= "../images/oa-lc.JPG " target=aa> 10.工作流示意图 </a> </fon