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

jspºÍServlet¸÷×ÔÌصã

1. servletÊÇÔÚjavaÀïǶÌ×html,jspÊÇÔÚhtmlÀïÃæǶÌ×java,jspÐèÒªÏȱàÒë³Éservlet²ÅÄÜÖ´ÐÐ.
2. jsp×îÖÕ·­Òë³ÉservletÖ´ÐÐ.jspÈÝÒ×ÉÏÊֺͱàд¶øservletÐèÒª×Ô¼ºÊÖ¶¯±àÒë,ºÜÂé·³µÄ
3. servletÏÖÔÚ¸ü¶àÊdz䵱MVCÄ£ÐÍ¿ØÖÆÆ÷µÄ½ÇÉ«,ÓÉËü¸ù¾Ý¿Í»§µÄÇëÇó,À´¶¯Ì¬×éÖ¯·µ»ØÊý¾Ý»òÒ³ÃæµÄÖض¨Ïò,¶øJSPÖ»×öÏÔʾ(MVCÄ£ÐÍ,ÏÔʾ¿ØÖÆÄ£ÐÍ ÏÔʾ:jsp ¿ØÖÆ: servlet)
Therefore: JSP×öÏÔʾ¸üÊʺÏ,SERVLET×ö¿ØÖƸüºÃ
JSP¡¢Servlet¡¢EJBµÄÌص㣺
JSP(Java Server Pages)ÊÇÓÉSun Microsystems¹«Ë¾³«µ¼¡¢Ðí¶à¹«Ë¾²ÎÓëÒ»Æð½¨Á¢µÄÒ»ÖÖ¶¯Ì¬ÍøÒ³¼¼Êõ±ê×¼¡£ JSP¼¼ÊõÊÇÓÃJAVAÓïÑÔ×÷Ϊ½Å±¾ÓïÑԵģ¬JSPÍøҳΪÕû¸ö·þÎñÆ÷¶ËµÄJAVA¿âµ¥ÔªÌṩÁËÒ»¸ö½Ó¿ÚÀ´·þÎñÓÚHTTPµÄÓ¦ÓóÌÐò¡£
ÔÚ´«Í³µÄÍøÒ³HTMLÎļþ(*.htm,*.html)ÖмÓÈëJava³ÌÐòƬ¶Î(Scriptlet)ºÍJSP±ê¼Ç(tag)£¬¾Í¹¹³ÉÁËJSPÍøÒ³(*.jsp)¡£Web·þÎñÆ÷ÔÚÓöµ½·ÃÎÊJSPÍøÒ³µÄÇëÇóʱ£¬Ê×ÏÈÖ´ÐÐÆäÖеijÌÐòƬ¶Î£¬È»ºó½«Ö´Ðнá¹ûÒÔHTML¸ñʽ·µ»Ø¸ø¿Í»§¡£³ÌÐòƬ¶Î¿ÉÒÔ²Ù×÷Êý¾Ý¿â¡¢ÖØж¨ÏòÍøÒ³ÒÔ¼°·¢ËÍ email µÈµÈ£¬Õâ¾ÍÊǽ¨Á¢¶¯Ì¬ÍøÕ¾ËùÐèÒªµÄ¹¦ÄÜ¡£ËùÓгÌÐò²Ù×÷¶¼ÔÚ·þÎñÆ÷¶ËÖ´ÐУ¬ÍøÂçÉÏ´«Ë͸ø¿Í»§¶ËµÄ½öÊǵõ½µÄ½á¹û£¬¶Ô¿Í»§ä¯ÀÀÆ÷µÄÒªÇó×îµÍ£¬¿ÉÒÔʵÏÖÎÞPlugin£¬ÎÞActiveX£¬ÎÞJava Applet£¬ÉõÖÁÎÞFrame¡£
JSPµÄÓŵ㣺
·¶ÔÓÚÓû§½çÃæµÄ¸üУ¬Æäʵ¾ÍÊÇÓÉ Web Server½øÐеģ¬ËùÒÔ¸øÈ˵ĸоõ¸üкܿ졣
·ËùÓеÄÓ¦Óö¼ÊÇ»ùÓÚ·þÎñÆ÷µÄ£¬ËùÒÔËüÃÇ¿ÉÒÔʱ¿Ì±£³Ö×îа汾¡£
·¿Í»§¶ËµÄ½Ó¿Ú²»ÊǺܷ±Ëö£¬¶ÔÓÚ¸÷ÖÖÓ¦ÓÃÒ×ÓÚ²¿Êð¡¢Î¬»¤ºÍÐ޸ġ£
ServletÊÇʹÓÃJava Servlet Ó¦ÓóÌÐòÉè¼Æ½Ó¿Ú£¨API£©¼°Ïà¹ØÀàºÍ·½·¨µÄ Java ³ÌÐò¡£³ýÁË Java Servlet API£¬Servlet »¹¿ÉÒÔʹÓÃÓÃÒÔÀ©Õ¹ºÍÌí¼Óµ½ API µÄ Java ÀàÈí¼þ°ü¡£Servlet ÔÚÆôÓà Java µÄ Web ·þÎñÆ÷ÉÏ»òÓ¦Ó÷þÎñÆ÷ÉÏÔËÐв¢À©Õ¹Á˸÷þÎñÆ÷µÄÄÜÁ¦¡£Java servlet¶ÔÓÚWeb·þÎñÆ÷¾ÍºÃÏóJava applet¶ÔÓÚWebä¯ÀÀÆ÷¡£Servlet×°ÈëWeb·þÎñÆ÷²¢ÔÚWeb·þÎñÆ÷ÄÚÖ´ÐУ¬¶øapplet×°ÈëWebä¯ÀÀÆ÷²¢ÔÚWebä¯ÀÀÆ÷ÄÚÖ´ÐС£Java Servlet API ¶¨ÒåÁËÒ»¸öservlet ºÍJavaʹÄܵķþÎñÆ÷Ö®¼äµÄÒ»¸ö±ê×¼½Ó¿Ú£¬ÕâʹµÃServlets¾ßÓпç·þÎñÆ÷ƽ̨µÄÌØÐÔ¡£
Servlet ͨ¹ý´´½¨Ò»¸ö¿ò¼ÜÀ´À©Õ¹·þÎñÆ÷µÄÄÜÁ¦£¬ÒÔÌṩÔÚ Web ÉϽøÐÐÇëÇóºÍÏìÓ¦·þÎñ¡£µ±¿Í»§»ú·¢ËÍÇëÇóÖÁ·þÎñÆ÷ʱ£¬·þÎñÆ÷¿ÉÒÔ½«ÇëÇóÐÅÏ¢·¢Ë͸ø Servlet£¬²¢Èà Servlet ½¨Á¢Æð·þÎñÆ÷·µ»Ø¸ø¿Í»§»úµÄÏìÓ¦¡£ µ±Æô¶¯ Web ·þÎñÆ÷»ò¿Í»§»úµÚÒ»´ÎÇëÇó·þÎñʱ£


Ïà¹ØÎĵµ£º

FCKeditor 2.5 jsp struts2

Ò».ÏÂÔØfckeditor-java-demo-2.5.war
           ÏÂÔصØÖ·£ºhttp://java.fckeditor.net/demo.html£¬²¿Êðµ½tomcatÏ£¬Æô¶¯ºó¾Í¿ÉÒÔ·ÃÎÊ´Ëdemo.
¶þ.jsp¼¯³É
           1. copy "fckeditor"Îļþ¼Ðµ½ÍøվĿ¼&n ......

jspÔËÐÐʱ¾­³£Óöµ½µÄ¼¸¸öÎÊÌâ

1¡¢ÈçºÎÏÔʾĿ¼ÁÐ±í£º
ÎÒÃÇÔÚ±¾»ú²âÊÔ³ÌÐòʱ£¬Ò»°ã¶¼Ï°¹ßÔÚä¯ÀÀÆ÷ÖоÍÄܱéÀúµ½Ä³¸öĿ¼Ï¶¼ÓÐÄÄЩÎļþ£¬Õâ¾ÍÐèÒªweb·þÎñÆ÷Ö§³ÖĿ¼ÁÐ±í£º
´ò¿ªÎļþconf/web.xml£¬ÕÒµ½ÒÔÏ´úÂ룺
<param-name>listings</param-name>
<param-value>false</param-value>
½«ÆäÖеÄfalse¸Ä³Étrue
2¡¢ÅäÖÃerror-p ......

¹ØÓÚJSPÖÐrequest.getRealPath()

ÔÚΪ·þÎñÆ÷¶Ë×é¼þ±à³Ìʱ£¬ÄãºÜ¿ÉÄÜÒª´ÓÏà¶ÔÓÚweb¸ùµÄ·¾¶À´È¡µÃij¸öÎļþµÄÕæʵ·¾¶£¬µ«´ËÎļþʵ¼ÊÉÏÔÚÕ¾µãµÄÒ»¸öÐéÄâ·¾¶ÉÏ¡£
ʲôÊÇÐéÄâ·¾¶£¿
ÔÚÒ»¸öweb·þÎñÆ÷ÉÏ£¬ÐéÄâ·¾¶½«ÎïÀíÉÏ·ÖÀëµÄ¸÷Îļþ×éºÏÔÚÒ»Æ𣬷ÅÔÚͬһ¸öÕ¾µã·¾¶ÉÏ£¬ÔÚÓ¦Ó÷þÎñÆ÷ÉÏ£¬Ã¿¸öÓ¦Óö¨Î»ÓÚÆä×Ô¼ºµÄÐéÄâ·¾¶ÉÏ£¬Êµ¼ÊÉÏÏ໥֮¼äÓÐ×ÅÍêÃÀµØ·ÖÀë¡£ ......

JSP·ÖÒ³¼¼Êõ

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