ÓÃjavabeanÔÚJSPÒ³ÃæÖÐʵÏÖ½ø¶ÈÌõЧ¹û
public class TaskBean extends Thread{
public TaskBean(){
}
private int percent=0;
private boolean complete=false;
public synchronized void run() {
while(true){
if(percent>=100){
complete=true;
return;
}
try {
Thread.sleep(1000);
} catch (Exception e) {
System.err.println("TaskBean.run()"+e.getMessage());
}
percent+=10;
}
}
public boolean isComplete(){
return complete;
}
public int getPercent(){
return percent;
}
}
start.jsp
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>">
&n
Ïà¹ØÎĵµ£º
ÎÒÃǶ¼ÖªµÀÔÚjspÖÐincludeÓÐÁ½ÖÖÐÎʽ,·Ö±ðÊÇ
<%@ include file=” ”%>
<jsp:include page=” ” flush=”true”/>
ǰÕßÊÇÖ¸ÁîÔªËØ¡¢ºóÕßÊÇÐÐÎªÔªËØ¡£¾ßÌåËüÃǽ«Ôںδ¦Óã¿ÈçºÎÓü°ËüÃÇÓÐÊ²Ã´Çø±ð£¿ÕâÓ¦¸ÃÊǺܶàÈË¿´ ......
±àд×Ô¶¨Òå±êÇ©²½Öè
±àд±êÇ©´¦ÀíÆ÷£¨´¦Àí±êÇ©µÄJavaÀࣩ£¬ÕâЩÀàÐèҪʵÏÖһЩ¹æ·¶»¯µÄ±êÇ©½Ó¿Ú
±àд±êÇ©¿âÃèÊöÎļþ£¨TLD£©£¬Õâ¸öÎļþÃèÊöÁËÿ¸ö±êÇ©ºÍ¶ÔÓ¦µÄJava±êÇ©´¦ÀíÆ÷ÀàÖ®¼äµÄÓ³Éä¹ØÏµ
ÔÚweb.xmlÖÐÅäÖñêÇ©¿âÎļþµÄURI
ÔÚJSPÒ³ÃæÖÐÀûÓÃtaglibÖ¸Á±êÇ©¿âÒýÈëµ½Ò³ÃæÖÐ
......
ÃæµÄÉϱã»áµ¯³öÓò¿ØÑéÖ¤µÄ
¸÷λ,ÉÏ´ÎÔÚȺÖÐÎʵ½¹ØÓÚJsp WEBϵͳµÇ¼ÓëÓò¿Ø½áºÏ×öÓû§ÑéÖ¤µÄÎÊÌâ,ÏÖÔÚÒѾ½â¾ö,½«½â¾ö°ì·¨Óë¸÷λ·ÖÏíÏÂ:
½â¾ö·½°¸:ʹÓÃsamba×éÖ¯µÄ¿ªÔ´ÏîÄ¿jCIFS
ÏîÄ¿Ê×Ò³:http://jcifs.samba.org/
²Î¿¼×ÊÁÏ:
ʹÓÃjcifs.jar¿ÉÒԷdz£ºÃʵÏÖ£¬ÏÂÔØÒ»¸ö×îеÄjcifs.jar£¬·Åµ½WEB-INFlibÏÂÃæ£¬È»ºóÐÞ¸Ä ......
JSP¾Å´óÄÚÖöÔÏó£º
1.ÓëServletÓйصÄÒþº¬µÄ¶ÔÏó
(1)page page¶ÔÏó¶ÔÓ¦JavaÖеĹؼü×Öthis,Ëü´ú±íµ±Ç°JSPÒ³Ãæ
(2)config Config¶ÔÏóʹÓÃWebÈÝÆ ......
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servle ......