¹ØÓÚjspµÄһЩСÎÊÌâ - Web ¿ª·¢ / JavaScript
ÎÒÏëÓÃjavabeanʵÏÖ¼ÆÊý
´úÂëÈçÏ£º
ComputerCount.java
package tom.jiafei;
import java.io.*;
public class ComputerCount{
int number=0;
boolean iscome=false;
File file=new File("Count.dat");
private void countpeople(){
if(!file.exists())
{
number++;
try{
file.createNewFile();
FileOutputStream out=new FileOutputStream(file);
DataOutputStream dataOut=new DataOutputStream(out);
dataOut.writeInt(number);
out.close();
dataOut.close();
}
catch(IOException ee){}
}
else
{ try{ FileInputStream in=new FileInputStream(file);
DataInputStream dataIn=new DataInputStream(in);
number=dataIn.readInt();
number++;
in.close();
dataIn.close();
FileOutputStream out=new FileOutputStream(file);
DataOutputStream dataOut=new DataOutputStream(out);
dataOut.writeInt(number);
out.close();
dataOut.close();
}
catch(IOException ee){}
}
iscome=true;
}
&nbs
Ïà¹ØÎÊ´ð£º
ÔÚ²éѯºó½«²éѯ³öÀ´µÄÖµ¸³¸ø¸÷ÊäÈë¿ò
<c:if test="${not empty dataValue}">
fm.SAMPLING_DATE.value=" <c:out value='${dataValue.SAMPLING_DATE}'/ ......
ÎÒÔÚjspÒ³Ãæ´æÉÏÒ»¸ösession,±¾Ò³Ã滹¿ÉÒÔÈ¡³öÖµÀ´.
µ«ÊÇһˢÐÂ,»òÕß´ò¿ªÐµÄÒ³Ãæ¾ÍÈ¡²»³öÖµÀ´ÁË.
Ææ¹ÖµÄÊÇ,ÎÒ²âÊÔÁíÒ»¸ö³ÌÐòʱºò
ÔÚjspÒ³Ãæ´æÉÏÒ»¸ösession,±¾Ò³Ãæ¿ÉÒÔÈ¡³öÖµÀ´,ˢлò´ò¿ªÐÂÒ³ÃæÖµÄÜÈ¡³öÀ´ÁË.
......
Ò»¸ö¾²Ì¬µÄhtmlÒ³Ã棬ÃÀ»¯£¬½çÃæ²¼¾ÖÒѾ´¦ÀíºÃÁË £¬ÔÚ±àд³ÌÐòµÄʱºòÐèÒªÔÚת»¯³ÉJSPÒ³Ã棬
ËùÒÔн¨Ò»¸öJSPÒ³Ã棬½²ÔÀ´µÄ´úÂ뿽±´µ½ÀïÃæÈ¥£¬½á¹û²¼¾Ö±äÁË£¿
²»´æÔÚ·¾¶ÎÊÌâ!
ûÈË? Õæʧ°Ü!
......
ÎÒµãºóÍËʱÊÇ¿Õ°×Ò³Ãæ
ÐèˢвÅÄÜÏÔʾ
Õâ¸öÔõô´¦Àí°¡
Çë´ó¼Ò°ï°ïæ
°ÑÎÊÌâ˵µÄÏêϸһЩ£¬ÕâÑùÓÐÖúÓÚÎÊÌâµÄ»Ø¸´£¬¼°´ð°¸µÄ׼ȷÐÔ£¡
ÎÒ¾õµÃÊÇÄãµÄä¯ÀÀÆ÷Æ÷µÄÎÊÌâ°É£¬ÎÒÒÔÇ°Óöµ½¹ýÕâÑùµÄÎÊÌ⣬°ÑIEµÄËùÓÐÊôÐÔÖ ......
ÎÒÏëµÇ¼ºó£¬Èç¹ûµÇ¼³É¹¦¾ÍÈ¥Ö´ÐÐij¸öÒ³Ãæ
ÎÒÏÖÔڵĴúÂëÊÇÕâÑùµÄ£º
if(rs.next()){
session.setAttribute( "username" , user);
<jsp:include page="login.jsp" />// ......