jsp:getProperty±êÇ©
jsp:getProperty±êÇ©ÓÃÓÚ»ñÈ¡±»¼ÓÔØµ½µ±Ç°Ò³ÃæÖеÄJavaBeanÖÐij¸öÊôÐÔµÄÖµ
¸ñʽ£º<jsp:getProperty name=? property=? />
name£ºJavaBeanµÄ¶ÔÏóÃû£¬ÓÃÓÚÖ¸¶¨´ÓÄĸöJavaBeanÖлñÈ¡ÊôÐÔÖµ
property£ºJavaBeanÖеÄÊôÐÔÃû£¬ÓÃÓÚÖ¸¶¨»ñÈ¡JavaBeanÖеÄÄĸöÊôÐÔÖµ
×¢Ò⣺µ±JavaBeanÖеÄÊôÐÔÃûΪxxx£¬¶ø»ñÈ¡¸ÃÊôÐÔÖµµÄ·½·¨ÃûΪgetYyy()£¬Ôòproperty="yyy"£¬¶ø²»ÊÇproperty="xxx"
Ïà¹ØÎĵµ£º
Exception¶ÔÏóÊÇÓÃÀ´´¦ÀíJspÒ³ÃæÎļþÔÚÖ´ÐÐʱËùÓз¢ÉúµÄ´íÎóºÍÒì³££»JspÒ³ÃæÎļþ±ØÐëÔÚisErrorPage=trueµÄÇé¿öϲſÉÒÔʹÓøöÔÏ󣻸öÔÏóÒ»°ãÅäºÏPageÖ¸ÁîÒ»ÆðʹÓã¬Í¨¹ýÖ¸¶¨Ä³¸öÒ³ÃæÎª´íÎó´¦ÀíÒ³Ãæ£¬°ÑËùÓеĴíÎó¶¼¼¯Öе½ÄǸöÒ³Ãæ½øÐд¦Àí£¬¿ÉÒÔʹÕû¸öϵͳµÄÐÔÄܵõ½¼ÓÇ¿£»³£Ó÷½·¨ÈçÏÂ
getMes ......
jspÄÚÖöÔÏó
¡¡¡¡¶¨Ò壺¿ÉÒÔ²»¼ÓÉùÃ÷¾ÍÔÚJSPÒ³Ãæ½Å±¾£¨Java³ÌÐòƬºÍJava±í´ïʽ£©ÖÐʹÓõijÉÔ±±äÁ¿
¡¡¡¡JSP¹²ÓÐÒÔÏÂ9ÖÖ»ù±¾ÄÚÖÃ×é¼þ£¨¿ÉÓëASPµÄ6ÖÖÄÚ²¿×é¼þÏà¶ÔÓ¦£©£º
¡¡¡¡
ÄÚÖöÔÏó
´ú±íÄÚÈÝ
·¶Î§
request
´¥·¢·þÎñµ÷ÓõÄÇëÇó
request
response
¶ÔÇëÇóµÄÓ¦´ð
page
session
ΪÇëÇóµÄ¿Í»§´´½¨µÄsessio ......
Ê×ÏÈ£¬ËµËµJSP/ServletÖеö±àÂëµÄ×÷Óá£
ÔÚJSP/ServletÖÐÖ÷ÒªÓÐÒÔϼ¸¸öµØ·½¿ÉÒÔÉèÖñà Â룬pageEncoding="UTF-8"¡¢contentType="text/html;charset=UTF-8"¡¢request.setCharacterEncoding("UTF-8")ºÍ response.setCharacterEncoding("UTF-8")£¬ÆäÖÐǰÁ½¸ ......
½ñÌì×ÜËã°Ñ
response.setHeader("progma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires" ......
µ±ÄãÔÚ¿Í»§¶ËÓÃview source¿´JSPÉú³ÉµÄ´úÂëʱ£¬»á·¢ÏÖÓкܶà¿ÕÐУ¬ËûÃÇÊÇÓÉ< %...% >ºóµÄ»Ø³µ»»ÐжøÉú³ÉµÄ£¬Ò²¾ÍÊÇ˵ÿһÐÐÓÉ< %...% >°üº¬µÄJSP´úÂëµ½¿Í»§¶Ë¶¼±ä³ÉÒ»¸ö¿ÕÐУ¬ËäÈ»²»Ó°Ïìä¯ÀÀ£¬µ«»¹ÊÇÏ£ÍûÄܰÑËûÃÇɾµô¡£ÕâÀォΪ´ó¼Ò½éÉÜÈçºÎɾ³ýJSP±àÒëºóµÄ¿ÕÐС£
Tomcatɾ³ýJSP±àÒëºóµÄ¿ÕÐа취ÈçÏ£º
1. ......