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

jsp°üº¬Îļþ¼°Ê¹ÓÃjavabean

£¨Ò»£©°üº¬ÆäËûÒ³ÃæµÄ·½·¨£º
includeÖ¸Á<%@ include file = "test1.jsp" %>
 ¾²Ì¬°üº¬£¬¿ÉÒÔ°üº¬ÈÎÒâ¸ñʽµÄÎļþ£¨²»¹âÊÇjspÎļþ£¬»¹¿ÉÒÔÊÇtxtµÈÎı¾Îļþ£©£¬¾²Ì¬°üº¬¾ÍÊǽ«±»°üº¬ÎļþµÄÄÚÈÝ¿½±´µ½°üº¬ÎļþÖУ¬½øÐÐÖ´ÐС£µ±Ç°Ò³ÃæºÍtest1.jspÖв»ÄÜÓÐÖØÃûµÄ±äÁ¿¡£
include¶¯×÷ <jsp:include page = "test1.jsp"/>
 ¶¯Ì¬°üº¬£¬Ö»ÄÜ°üº¬¶¯Ì¬Ò³Ã棬¶¯Ì¬°üº¬ÊÇÏÈÖ´Ðб»°üº¬Îļþ£¬È»ºó½«½á¹û°üº¬µ½Îļþ¡£µ±Ç°Ò³Ãæ¿ÉÒÔºÍtest1.jspÖÐÓÐͬÃûµÄ±äÁ¿£¬ÒòΪËüÖ»°üº¬×îºóµÄ½á¹û¡£
£¨¶þ£©
É趨²ÎÊýÖµ£º
<%@ page pageEncoding = "GBK"%>
<%@ page imort = "cn.javabean.*"%>        //µ¼Èëjavabean°ü
<% request.setCharacterEncoding("GBK")%>  //postÌá½»µÄÊý¾ÝÖгöÏÖÖÐÎÄʱ·ÀÖ¹³öÏÖÂÒÂë
<jsp:useBean id = "userid" class = "cn.javabean.User"/>   //ʹÓÃjavabeanÖеÄUserÀà
<jsp:setPropert property = "beanUserName" param = "FormUserName" name = "userid"/>
Ò»°ãÇé¿öÏÂjavabeanÖеÄ×Ö¶ÎÃûÓëǰ̨jspÖÐform±íµ¥µÄnameÊÇÒ»ÑùµÄ,¼ÙÈ綼Ϊusername£¬Ôò
¿ÉÒÔд³É£º<jsp:setPropert property = "username" name = "userid"/>
»òÕß:<jsp:setPropert property = "*" name = "userid"/> ±íʾËùÓеÄ×ֶΰüÀ¨ÆäËûµÄÈç“ÃÜÂ딵ÈÃû×Ö¶¼ÊÇÓëjavabeanÖеÄ×Ö¶ÎÃûÏà¶ÔÓ¦µÄ¡£
»ñÈ¡²ÎÊýÖµ£º
Óû§Ãû£º<%= userid.getBeanUserName()%> »òÕß<jsp:getPropert property = "beanUserName" name = "userid">


Ïà¹ØÎĵµ£º

jspµÄ¸Å¿ö



 
JSP³£ÓÃÎÊ´ð
ÊÕ²Ø



< type="text/javascript">
document.body.oncopy = function() {
if (window.clipboardData) {
......

jspÔËÐл·¾³µÄÅäÖÃ

      Õâ¶Îʱ¼äÔÚѧϰJSP£¬×ÜÌåÀ´Ëµ£¬JSPѧϰÆðÀ´¸Ð¾õ»¹²»´í£¬²»ÖªµÀÊDz»ÊÇÓÐÁËJAVAµÄ¹¦µ×£¬Ã»¸Õ¸Õ¿ªÊ¼Ñ§Ï°CÓïÑÔµÄʱºòÄÇô³ÔÁ¦¡£²»¹ÜÊÇҪѧϰJSP»¹ÊÇÆäËû±à³ÌÓïÑÔ£¬ÎÒÃǶ¼Ó¦¸ÃÄÜѧ»á×Ô¼ºÊìÁ·µÄ°²×°ºÍÅäÖÃÐèÒªÓõ½µÄ¿ª·¢Èí¼þ¡£ÓÐÁË¿ª·¢Èí¼þ¾Í»áÊ°빦±¶¡£Ð´´úÂëÒ²»á¸ü¿ì½ÝºÍ·½±ã£¬ÓÐЩ¹Ø¼ü´Ê»ò´íÎ ......

JSP×Ô¶¨Òå±êÇ©


Ò»¡¢JSP×Ô¶¨Òå±êÇ©¼ò½é
±êÇ©ÊÇÒ»ÖÖXMLÔªËØ£¬Í¨¹ý±êÇ©¿ÉÒÔʹJSPÍøÒ³±äµÃ¼ò½à²¢ÇÒÒ×ÓÚά»¤£¬»¹¿ÉÒÔ·½±ãµØʵÏÖͬһ¸öJSPÎļþÖ§³Ö¶àÖÖÓïÑÔ°æ±¾¡£ÓÉÓÚ±êÇ©ÊÇXMLÔªËØ£¬ËùÒÔËüµÄÃû³ÆºÍÊôÐÔ¶¼ÊÇ´óСдÃô¸ÐµÄ
±ê×¼JSP±êÇ©ÊÇÓÃÀ´µ÷ÓÃJavaBean×é¼þµÄ²Ù×÷£¬´¦Àí¶¨ÏòÇëÇóÒÔ¼ò»¯JSPÒ³Ã濪·¢Óëά»¤¡£JSP¼¼ÊõÌṩÁËÒ»ÖÖ·â×°ÆäËü¶¯Ì¬ÀàÐÍ ......

ÔÚjspÀïʹÓÃCookie

дCookie£º
   //´Óä¯ÀÀÆ÷È¡µÃÓû§Ãû
        String username = request.getParameter("username");
        //´Óä¯ÀÀÆ÷È¡µÃÃÜÂë
        String password = request.getParameter(" ......

Á˽âJSPÖÐrequestÊôÐÔµÄÓ÷¨


±¾ÎĽéÉÜJSPÖÐrequestÊôÐÔµÄÓ÷¨£¬ÒÔ¼°request.getParameter() ºÍrequest.getAttribute() Çø±ð¡£
Ò»¡¢request.getParameter() ºÍrequest.getAttribute() Çø±ð
1.request.getParameter()È¡µÃÊÇͨ¹ýÈÝÆ÷µÄʵÏÖÀ´È¡µÃͨ¹ýÀàËÆpost£¬getµÈ·½Ê½´«ÈëµÄÊý¾Ý£¬request.setAttribute()ºÍgetAttribute()Ö»ÊÇÔÚwebÈÝÆ÷ÄÚ²¿Á÷ת£¬½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ