JSP¿ìËÙÈëÃŽ̳̗—È«Ê®½²
µÚÒ»½²£¨²Î¿¼¡¶Java Web³ÌÐòÉè¼Æ»ù´¡½Ì³Ì¡·µÚ1Õ£©
1 JSP ºÍ JavaµÄ¹Øϵ
Ò»°ãJavaÖ¸µÄ±ê×¢°æ Java SE
ÁíÍâÁ½¸ö°æ±¾£ºJava EE ºÍ Java ME
JSPÊôÓÚJava EEµÄÒ»²¿·Ö¡£
Java EE£º
×é¼þ£ºWeb²ã×é¼þ£¨JSP£«Servlet£©£«ÒµÎñ²ã×é¼þ£¨EJB£©
·þÎñ£ºJNDI JDBC RMI JAAS JavaMailµÈµÈ
Java EE°üÀ¨2¸öÌåϵ£º±ê×¼£¨ÉÏÃæ½éÉܵģ©£«Á÷ÐУ¨Struts£«Hibernate£«Spring£©
Á½Ì×Ìåϵ¶¼ÊÇJSP£«ServletΪ»ù´¡¡£
2 JSP»áÉæ¼°ÄÄЩÄÚÈÝ
JSPÓï·¨»ù´¡£¨Java£«HTML£©£º
¶ÔÓÚJava£¬ÐèÒªÕÆÎÕJavaµÄ»ù±¾Óï·¨£¨ÀඨÒå ¶ÔÏó¶¨ÒåºÍʹÓà ³£ÓÃÀà¿âjava.lang.*,java.util.*£©
¶ÔÓÚHTML£¬Ö÷Òª±íµ¥ÔªËØ£¨ÊäÈ룩£«±í¸ñ£¨ÏÔʾÐÅÏ¢£©£«»ù±¾HTML
JSTL£¬±ê×¼±êÇ©¿â£¬ÓÃÓÚÊä³öºÍ¿ØÖÆ
EL£¬Í¨³£ÓëJSTLÒ»ÆðʹÓã¬Ö÷ÒªÓÃÓÚÊä³ö
Servlet£¬¼¸ºõËùÓнéÉÜJSPµÄÊéºÍ¿Î³Ì¶¼°üº¬Servlet£¬ÒòΪJSPʵ¼ÊÉÏÖ¸µÄÊÇJava Web¿ª·¢¡£ÓÃServletÖ÷ÒªÊÇ¿ØÖÆÆ÷¡£
JDBC£¬¶ÔÊý¾Ý¿âµÄ·ÃÎÊ¡£
JavaBean£¨JavaÀࣩ
3 JSPµÄÔËÐл·¾³
JDK
·þÎñÆ÷£ºÎÒÃÇÓÃTomcat¡£ÆäËüµÄ·þÎñÆ÷£ºIBM Websphere + BEA WebLogic + JBoss£¨Ãâ·ÑµÄ£© + GlassFish(гöµÄJava EE 5·þÎñÆ÷)
4 JSPµÄ¿ª·¢»·¾³
Ò³Ã棺DreamWeaver¿ª·¢Ò³Ãæ
´úÂ룺±¾Îıà¼Æ÷ Eclipse NetBeans JBuilder
×¢£ºÎÒÃDzÉÓüÇʱ¾¡£
5 TomcatÎļþ¼Ð
webapps Ö÷Òª¸÷¸öÓ¦Ó㬱àдµÄÿ¸öÓ¦Óã¨ÍøÕ¾£©¶¼¿ÉÒÔ·ÅÔÚÕâ¸öλÖÃ
bin Õâ¸öÊÇÆô¶¯·þÎñÆ÷µÄÏà¹ØÎļþ£¬tomcat6ÓÃÓÚÃüÁîÐз½Ê½µÄÆô¶¯£¬tomcat6wÓÃÓÚwindows·½Ê½µÄÆô¶¯
conf ÓÃÓÚÅäÖ㬳£ÓõÄÊÇserver.xml ÁíÍâÒ»¸öÊÇweb.xml
work ´æ·ÅÁÙʱÎļþ
logs ϵͳÔËÐÐʱºòµÄÈÕÖ¾ÐÅÏ¢
6 ʵÀý£ºhello.jsp
´´½¨Ò»¸öÓ¦Óã¬Êµ¼ÊÉÏÐèÒªÔÚwebappsÖд´½¨Îļþ¼Ð£¬bookstore£¬Ï൱ÓÚÓ¦ÓõÄÃû×Ö
Îļþ¼ÐÖÐÒª´´½¨Ò»¸ö×ÓÎļþ¼ÐWEB-INF£¬Õâ¸öÿ¸öÓ¦ÓÃwebÓ¦Óö¼ÐèÒªµÄ¡£
ÔÚWEB-INFÖÐÐèÒªweb
Ïà¹ØÎĵµ£º
JSPµÄÔËÐÐÄÚÄ»
¾³£ÓÐÅóÓÑÎÊÆð£¬JSPºÍServletÖ®¼äÓÐʲôÇø±ð£¬Á½ÕßÖ®¼äÓÖÓÐʲôÁªÏµ£¿ÆäʵServlet¼¼ÊõµÄ³öÏÖʱ¼äºÜÔ磬Êǵ±Ê±ÎªÁËJavaµÄ·þÎñÆ÷¶ËÓ¦Óöø¿ª·¢µÄ¡£´ó¼Ò¶¼ÖªµÀAppletÊÇÓ¦ÓÃС³ÌÐò£¬Servlet¾ÍÊÇ·þÎñÆ÷¶ËС³ÌÐòÁË¡£µ«ÔÚMicrosoft¹«Ë¾µÄASP¼¼Êõ³öÏÖºó£¬Ê¹Óà Servlet½øÐÐÏìÓ¦Êä³öʱһÐÐÐеÄÊä³öÓï¾ä¾ÍÏԵ÷dz£±¿×¾£ ......
1¡¢·Ö±ð°²×°Èý¸ö»·¾³£¬²¢ÉèÖò»Í¬¶Ë¿Ú
PHP:80
JSP:8080
ASP:8081
2¡¢ÉèÖÃ/Apache2/conf/httpd.conf
È¥µôÒÔÏÂÈýÐÐÇ°µÄ×¢ÊÍ£º
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
¼ÓÈëÒÔϼ¸ÐУº ......
¡¡¡¡ RSS2.0ÔÚÍøÂçÉÏ´óÐÐÆäµÀ,¸÷ÖÖÍøÕ¾¶¼¼ÓÉÏRSSÖ§³Ö,¹ØÓÚRSS¹æ·¶,¿ÉÒÔä¯ÀÀһϠhttp://blogs.law.harvard.edu/tech/rss
Ôڼƻ®Éú³ÉRSSÎļþµÄʱºò,˳±ãËÑË÷ÁËÒ»ÏÂJIRAºÍConfluenceµÄ³ÌÐò,·¢ÏÖËüÃÇ·Ö±ðÊÇÓÃÄ£°å·½Ê½ºÍJSP¶¯Ì¬Ò³ÃæÀ´Õ¹Ê¾µÄ.
ÓÚÊÇÎÒÒ²Ïëµ½Á½ÖÖ·½Ê½:
¡¡¡¡1.ÓÃFreeMarkerÉú³É¾²Ì¬Îļþ,ÊÊÓÃÓÚ¸üв ......
²úÉú״̬ÏìÓ¦Âë
100¡«199£º±íʾ·þÎñ¶Ë³É¹¦½ÓÊÕÇëÇ󣬵«ÒªÇó¿Í»§¶Ë¼ÌÐøÌá½»ÏÂÒ»´ÎÇëÇó²ÅÄÜÍê³ÉÈ«²¿´¦Àí¹ý³Ì¡£
200¡«299£º±íʾ·þÎñ¶ËÒѾ³É¹¦½ÓÊÕÇëÇ󣬲¢Íê³ÉÁËÈ«²¿´¦Àí¹ý³Ì¡£
300¡«399£º±íʾ¿Í»§¶ËÇëÇóµÄ×ÊÔ´ÒѾÒƵ½Á˱ðµÄλÖ㬲¢Ïò¿Í»§¶ËÌṩһ¸öеĵØÖ·£¬Ò»°ãÕâ¸öеØÖ·ÓÉHTTPÏìÓ¦ÏûϢͷµÄLocation×Ö¶ÎÖ¸¶¨¡£
400¡ ......
ÅäÖÃTOMCAT+ECLIPSE+MYSQLµÄJSP»·¾³
¹Ø¼ü´Ê£º JSP»·¾³ÅäÖà TOMCAT+ECLIPSE+ &nbs ......