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

Jsp JavaBean ServletʵÏÖMVC ϸ΢ÎÊÌâ×¢Òâ!

ÔÚJspÖе÷ÓÃSerlvetÖÐÒѾ­´æ´¢ÁËÐÅÏ¢µÄ JavaBean.
ServletÖÐÒѾ­°ÑÊý¾Ý¿âµÄÐÅÏ¢±£´æµ½JavaBeanÖÐ,ÔÙ°ÑJavaBean±£´æµ½SessionÖÐ.
Jsp¿ªÊ¼µ÷ÓÃ:
<jsp:useBean id="key" type="ClassName" scope="Session" />
<jsp:getProperty name="key" property="PropertyName" />
ÎÞ·¨¶Á³öÐÅÏ¢:
Ô­Òò: JavaBean ÖÐÊôÐ﵀ get set  ¸³ÖµÈ¡Öµ·½·¨µÄ·½·¨Ãû.ÒªÐÞ¸Ä:
Õý³£µÄget set ·½·¨: getMId setMId
Òª°ÑMÐ޸ijÉСдµÄ:  getmId setmId


Ïà¹ØÎĵµ£º

JSP·ÖÒ³¼¼Êõ

ÔÚʹÓÃÊý¾Ý¿âµÄ¹ý³ÌÖУ¬²»¿É±ÜÃâµÄÐèҪʹÓõ½·ÖÒ³µÄ¹¦ÄÜ£¬¿ÉÊÇJDBCµÄ¹æ·¶¶Ô´ËȴûÓкܺõĽâ¾ö¡£¶ÔÓÚÕâ¸öÐèÇóºÜ¶àÅóÓѶ¼ÓÐ×Ô¼ºµÄ½â¾ö·½°¸£¬±ÈÈçʹÓÃVectorµÈ¼¯ºÏÀàÏȱ£´æÈ¡³öµÄÊý¾ÝÔÙ·ÖÒ³¡£µ«ÕâÖÖ·½·¨µÄ¿ÉÓÃÐԺܲÓëJDBC±¾ÉíµÄ½Ó¿ÚÍêÈ«²»Í¬£¬¶Ô²»Í¬ÀàÐ͵Ä×ֶεÄÖ§³ÖÒ²²»ºÃ¡£ÕâÀïÌṩÁËÒ»ÖÖÓëJDBC¼æÈÝÐԷdz£ºÃµÄ·½°¸¡£
JD ......

JSP

 1  forward ºÍredirectµÄÇø±ð
     Ò»¾ä»°£¬×ª·¢ÊÇ·þÎñÆ÷ÐÐΪ£¬Öض¨ÏòÊÇ¿Í»§¶ËÐÐΪ¡£ÎªÊ²Ã´ÕâÑù˵ÄØ£¬Õâ¾ÍÒª¿´Á½¸ö¶¯×÷µÄ¹¤×÷Á÷³Ì£º
ת·¢¹ý³Ì£º¿Í»§ä¯ÀÀÆ÷·¢ËÍhttpÇëÇó----¡·web·þÎñÆ÷½ÓÊÜ´ËÇëÇó--¡·µ÷ÓÃÄÚ²¿µÄÒ»¸ö·½·¨ÔÚÈÝÆ÷ÄÚ²¿Íê³ÉÇëÇó´¦ÀíºÍת·¢¶¯×÷----¡·½«Ä¿±ê×ÊÔ´·¢Ë͸ø¿Í»§£»ÔÚÕâÀï£ ......

JSPÂÒÂëÎÊÌâ.

 ÔÚTomcatµÄserver.xmlµÄConnector²¿·ÖÌí¼ÓURIEncoding="GBK"£¬ÈçÏ£ºserver.xmlÌí¼ÓºóÄÚÈÝÈçÏ£º
Xml´úÂë 
<Connector  URIEncoding="GBK" port="8080"  
               maxThreads="150" m ......

jspÖеÄÔªËصÄidÖµºÍnameÖµ£¬ÔÚieºÍffÖеÄÇø±ð

document.getElementById("flag")ÔÚieÖУ¬jspÖеÄÔªËØûÓÐidÖµ£¬ÓÐnameֵʱ£¬Ò²Äܲé³öÀ´£¬°´ÕÕnameÖµ²é¡£
µ«ÊÇÔÚfirefoxÖУ¬Èç¹ûûÓÐidÖµ£¬Ôò²é²»³öÀ´¡£ËùÒÔieÖУ¬nameºÍidÓÐʱͨÓ㻵«ÊÇfirefoxÖУ¬ÊÇÓÐÕâÑϸñÇø±ðµÄ¡£ ......

JSPÖеÄEL±í´ïʽÏêϸ½éÉÜ

來Ô´£ºhttp://www.diybl.com/course/4_webprogram/jsp/jsp_js/2008229/102031.html
Ò»¡¢JSP ELÓïÑÔ¶¨Òå
        E L£¨Expression Language£©  Ä¿µÄ£ºÎªÁËʹJSPдÆðÀ´¸ü¼Ó¼òµ¥¡£
      
±í´ïʽÓïÑÔµÄÁé¸ÐÀ´×ÔÓÚ ECMAScript ºÍ XPath ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ