jspÔõÑù»ñµÃÎļþ¼Ð£¿(ÀàËÆHTML µÄfile¿Ø¼þ)
ÓÃʲô·½Ê½ÊµÏÖ¶¼ÐС£¡£
Java code:
String aa = request.getRealPath("/UserFtp/"+listproduct.get(i));
File MyDir = new File(aa+".");
String filename[] = MyDir.list();
ÎÒµÄÒâ˼ÊÇÀàËÆfile¿Ø¼þ Ñ¡µÄ html file Ö»ÄÜÑ¡ÔñÎļþÃû ÎÒÏÖÔÚÐèҪѡÔñÎļþ¼Ð
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>JSʵÏÖ´ò¿ªÎļþ¼Ð¶Ô»°¿ò </title>
</head>
<script language="javascript">
function chooseFolder(){
var savePath;
var objSrc=new ActiveXObject("Shell.Application").BrowseForFolder(0,'ÇëÑ¡ÔñÎļþĿ¼:',0,'');
if(objSrc!=null){
savePath=objSrc.Items().Path;
document.all.savePath.value=savePath;
}
}
</script>
<body>
<input type="te" size="30" name="savePath"/>
<input type="button" na
Ïà¹ØÎÊ´ð£º
//Óÿͻ§µÄsessionµÄid½¨Á¢Ò»¸öÁÙʱÎļþ£º
//String tempFileName=(String)session.getId();
String tempFileName = (String)session.getId();
//out.println(& ......
ÎÒÏëÓÃjavabeanʵÏÖ¼ÆÊý
´úÂëÈçÏ£º
ComputerCount.java
package tom.jiafei;
import java.io.*;
public class ComputerCount{
int number=0;
boolean iscome=false;
File file=new ......
ÎÒÏë×ö¹»¹ºÎï³µÓÃsession µ«ÊDz»ÖªµÀÔõô»ñÈ¡¹ºÂòÊýÁ¿ ËÓоßÌåµÄ´úÂëÂð Ï£ÍûÄܸîÉá
ÏÂÃæÊǹºÎï³µµÄºËÐÄ´úÂë
ÓÐÁËÕâ¸ö ¾ÍÓ¦¸ÃÄܹ»×ö³öÀ´°É
Java code:
public void doPost(HttpServletRequest reque ......
ÇëÎʸ÷λ´óÅ££¬¶ÔÓÚÒ»¸ö֪ʶÁ˽âhtmlµÄÈËÀ´Ëµ£¬Ñ§Ï°jspÒª´ïµ½ÈëÃŵÄÒªÇóÒ»°ãÐèÒª¶à³¤Ê±¼äºÍ¿´Ò»Ð©Ò»Ð©Ê²Ã´Êé¼®£¿
3ÖÜ×óÓÒ ¿ÉÒÔµ½ÍøÉÏÕÒЩԴ´úÂë¿´¿´
ÄãÐèҪѧ
java
¹ØÏµÊý¾Ý¿â
javascript
ÓÐÈËѧµÃ¿ì£¬ÓÐÈËÑ ......
<html><head><title>[@title]</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<script language='javascript'>
function diyCheck ......