jsp:scriptletÊÇʲô?
ÎÒÏÂÎç¾Í¸Ð¾õ¹ÖÁË,ÀÏʦºöÈ»²»Ð´ <% ¸ÄÓà <jsp:scriptlet> µ±Ê±Ã»È¥¶àÏë Ëû˵ΪÁ˸ñʽ¸üºÃÒ»µã
ÎÒ½ñÍíÔÚ¼ÒÔÚ myeclipse7.0 Ôõô´òÔõôûÓÐ ÒÔΪÊÇÏÂÎçËû¸Õ½²µÄ EL±í´ïʽ ½á¹û²»ÊÇ
ÏëÏë»á²»»áÊÇ ÏÂÎçÁí½²µÄ JSTL Ò²²»ÊÇ µ«ÊÇ Ò³Ãæ´ò²»³öÀ´ ÊÇÔõô»ØÊ°¡
<jsp:scriptlet> Õâ¸öÎҼǵÃÓа¡
Ï£Íû´ó¼Ò½²½âһϠ<jsp:scriptlet> ÕâÊÇʲô ÎÒÔÎËÀÁË
ÔÚÍøÉÏÕÒÁ˺þà ºÃÏñҲûÓÐÕâÖÖ±í´ï·½·¨ µ«myeclipseÖкÃÏñÒ²ÓÐһЩ <jsp:userbean>
ÄѵÀÕâЩ¶¼ÊÇ Ò»ÑùµÄ ²»¹ýÎÒºÜÄÉÃÆ <jsp:scriptlet> ΪʲôûÓÐ
ÕâЩµ½µ×ÊÇʲô ½Ðʲô ÔÚÍøÉÏÕæÈÃÎÒºÃÕÒ
<jsp:scriptlet>ÊÇjspµÄxmlÓï·¨ÐÎʽ£¬ËüÓë <% %>ÊǵÈЧµÄ¡£Ö»ÊÇÒªÇóxmlÓï·¨µÄÎĵµÖÐÖ»ÄÜʹÓÃÇ°Õß.
ÆäËûµÄjsp±êÇ©Ò²¶¼ÓжÔÓ¦µÄxmlÓï·¨ÐÎʽ
´ó¸çÏëÎÊһϠÔÚjspÒ³ÃæÔõôÓò»ÁË°¡ <jsp:scriptlet>
ÔÎ ÎÊÀ´ÎÊ »¹ÊÇûÈËÖªµÀ ËûÊÇjspÓï·¨µÄxmlд·¨ ÕâÎÒÃ÷°×ÁË
ÎÒ²»¹ÜjspxÎļþ ÎÒÖ»ÏëÖªµÀjspÒ³ÃæÈçºÎÓà <jsp:scriptlet> Õâ²ÅÊÇÖصã
ÍøÉ϶¼Ã»ÓÐ˵Ӧ¸ÃÔõôÑù²ÅÄÜÓà Êǵ¼°ü »¹ÊÇ.......
»òÕßjspÒ³Ãæ¸ù±¾²»ÄÜÓÃ
MyeclipseºÃÏñ²»Ö§³ÖjspxÎļþµÄ±àд£¬
Intellij idea¾ÍÓкܺõÄÖ§³Ö£¬
²»¹ýºÃÏñÓõÄÈ
Ïà¹ØÎÊ´ð£º
Ò»¸öJSPÒ³Ãæ½ÓÊÕÆäËûÒ³ÃæÌá½»¹ýÀ´µÄFORM±íµ¥£¬µ«ÊÇÒªÇóÖ»½ÓÊÕµ±Ç°Õ¾µã¼°Æä×ÓÕ¾µãÌá½»¹ýÀ´µÄFORM±íµ¥£¬ÆäËûÕ¾µãÌá½»¹ýÀ´µÄ±íµ¥²»½ÓÊÕ£¬Õâ¸öÔõôÉèÖã¿
ÓùýÂËÆ÷
filter
½«µ±Ç°Õ¾µã¼°Æä×ÓÕ¾µã·ÅÒ»¸öĿ¼
È» ......
ÎÒÊǸöÐÂÊÖ£¬×öÒ»¸öJSPÍøÒ³£¬ÎÒÒª¶Á³öÊý¾Ý¿âÕý³££¬µ«ÊÇÎÒÒªÐ޸ĵÄʱºò£¬Ò²¾ÍÊǶÁÈëµÄʱºò³öÏÖÂÒÂ룬Çë¸ßÊÖ¸æËßÎÒÔõô½â¾ö£¬ÏÈллÁË¡£
request.setCharacterEncoding("UTF-8");
°Ñ±àÂëͳһ
/**
......
ËÑË÷ÁËһϣºhttp://so.csdn.net/bbsSearchResult.aspx?q=jsp+%e4%bc%a0%e9%80%92&p=1£¬Ã»Óз¢ÏÖÄÜÓõġ£ÒòΪÎÒÊdzõѧjsp£¬Òò´ËÓÐЩҲÐíÄÜÓã¬Ö»ÊÇÎÒ¿´²»Ã÷°×£¿
Ò»¡¢ÎÒµÄÇéÐΣº
a.html ͨ¹ý<form action=&q ......
1¡¢ÎÒÓÃservletÉú³ÉµÄËæ»úÑéÖ¤Â룬·ÅÈësession
2¡¢ÔÚ·þÎñÆ÷¶ËÑéÖ¤Óû§ÊäÈëµÄÑéÖ¤ÂëÊÇ·ñÕýȷûÓÐÎÊÌâ
3¡¢¿ÉÊÇservlet´«µ½jspµÄÑéÖ¤ÂëºÍÎÒÔÚjsp´ÓsessionÖÐÈ¡µÃµÄÑéÖ¤Âë²»Ò»Ö£¬Ò³ÃæÏÔʾµÄ±ÈÎÒ´ÓsessionÖÐÈ¡µ½µÄÒª¿ì ......
ÎÒµÄ˼·ÊÇ ÉÏ´«£¨ÎļþÑ¡Ôñ¿ò£©-> ͨ¹ý·¾¶¶ÁÈ¡Îļþ£¬×ª³É¶þ½øÖÆÁ÷¶ÁÈëÊý¾Ý¿â ->Êý¾Ý¿â»ñÈ¡¶þ½øÖÆÁ÷£¬±£´æΪ.pdf ->ÏÔʾ
ÏÖÔÚÇ°Èý²½¶¼ÊÇʵÏÖÁË£¬±£´æµÄPDF¹Ì¶¨Â·¾¶ÒÔ¼°Ãû³Æ£¨·ÅÔÚWebRootĿ¼Ï£¬out.pdf£© ......