Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÄÚÖöÔÏó

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

JSP¾Å´óÄÚÖöÔÏó¼°Ëĸö×÷ÓÃÓò½éÉÜ

JSP¾Å´ó¶ÔÏó£º
ÄÚÖöÔÏó£¨ÓÖ½ÐÒþº¬¶ÔÏó£¬ÓÐ9¸öÄÚÖöÔÏó£©:²»ÐèÒªÔ¤ÏÈÉùÃ÷¾Í¿ÉÒÔÔڽű¾´úÂëºÍ±í´ïʽÖÐËæÒâʹÓÃ
1-out:
javax.servlet.jsp.JspWriterÀàÐÍ£¬´ú±íÊä³öÁ÷µÄ¶ÔÏó¡£×÷ÓÃÓòΪpage£¨Ò³ÃæÖ´ÐÐÆÚ£©
request£ºjavax.servlet.ServletRequestµÄ×ÓÀàÐÍ£¬´Ë¶ÔÏó·â×°ÁËÓÉWEBä¯ÀÀÆ÷»òÆäËü¿Í»§¶ËÉú³ÉµØHTTP
ÇëÇóµÄϸ½Ú£¨² ......

JSP»ù±¾Óï·¨Ó붨Òå


JSP»ù±¾Óï·¨Ó붨Òå


ÏÈÀ´¿´Ò»¶Î¼òµ¥µÄС³ÌÐò£º
³ÌÐò£º
1.jsp
<html>
<head>
<title>example</title>
</head>
1
¡¡
<%@ page language=”java” %>
2
¡¡
<%@ page
contentType=”text/html,charset=”GB2312””>
3
¡¡ ......

JSP±ÜÃâFormÖظ´Ìá½»µÄÈýÖÖ·½°¸

¡¡¡¡1 Javascript £¬ÉèÖÃÒ»¸ö±äÁ¿£¬Ö»ÔÊÐíÌá½»Ò»´Î¡£
¡¡¡¡#lt;script language="javascript"#gt;
¡¡¡¡ var checkSubmitFlg = false;
¡¡¡¡ function checkSubmit() {
¡¡¡¡ if (checkSubmitFlg == true) {
¡¡¡¡ return false;
¡¡¡¡ }
¡¡¡¡ checkSubmitFlg = true;
¡¡¡¡ return true;
¡¡¡¡ }
¡¡¡¡ document.ondblcli ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ