Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JSPÎļþ

<%@ page language="java" import="kg.TestBean2;" %>
<%@ page contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>HelloBean</title>
</head>
<body>
<%--
<%
kg.TestBean2 testbean=(kg.TestBean2)session.setAttribute("testbean");
if(testbean==null){
testbean = new kg.TestBean2();
session.setAttribute("testbean",testbean);
}
%>
--%>
<jsp:useBean id="testbean" class="kg.TestBean2" scope="page" />
<%--
<jsp:setProperty name="testbean" property="myText" />
<jsp:getProperty name="testbean" property="myText"/>
<jsp:setProperty name="testbean" property="myPassword"/>
<jsp:getProperty name="testbean" property="myPassword"/>
--%>
<jsp:setProperty name="testbean" property="*"/>
Óû§Ãû£º<%=new String(testbean.getMyText().getBytes("ISO8859_1"),"GBK")%>
ÃÜÂ룺<%=testbean.getMyPassword()%>
</body>
</html>


Ïà¹ØÎĵµ£º

jsp useBean scopeÊôÐÔµÄÇø·Ö

      scopeÊôÐÔÓÃÓÚÖ¸¶¨JavaBeanʵÀý¶ÔÏóËù´æ´¢µÄÓò·¶Î§£¬ÆäÈ¡ÖµÖ»ÄÜÊÇpage¡¢request¡¢sessionºÍapplicationËĸöÖµÖеÄÒ»¸ö£¬ÆäĬÈÏÖµÊÇpage¡£
      ÎÒ¿ÉÒÔ²âÊÔÏÂÃæ´úÂ룺
date.jsp
---------------------------------------------------------
<jsp:useBean i ......

ÓÃjavabeanÔÚJSPÒ³ÃæÖÐʵÏÖ½ø¶ÈÌõЧ¹û


public class TaskBean extends Thread{   
  
public TaskBean(){   
}   
  
private int percent=0;   
private boolean complete=false;   
  
public synchronized&nb ......

JSPÄÚÖöÔÏó

JSP µÄÄÚÖöÔÏóÓУºresquest ¡¢response¡¢session¡¢ application ¡¢out¡£ÒÔÏÂÎÒÃǽ«
Ò»Ò»½éÉÜ¡£
response ºÍrequest ¶ÔÏóÊÇJSP µÄÄÚÖöÔÏó½ÏÖØÒªµÄÁ½¸ö£¬ÕâÁ½¸ö¶ÔÏóÌṩÁ˶ԷþÎñ
Æ÷ºÍä¯ÀÀÆ÷ͨÐÅ·½·¨µÄ¿ØÖÆ¡£Ö±½ÓÌÖÂÛÕâÁ½¸ö¶ÔÏóÇ°£¬ÒªÏȶÔHTTP ЭÒé----Word Wide
Webµ×²ãЭÒé×÷¼òµ¥½éÉÜ¡£
Word Wide WebÊÇÔõÑùÔËÐеÄÄØ£ ......

·Â°Ù¶ÈajaxËÑË÷Ìáʾ£¨jsp£©

<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>index</title>
<meta http-equiv="pragma" content="no-cache"&g ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ