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

JSP¼Ü¹¹¡¢JSP¿ª·¢¹¤¾ßÓÅȱµã±È½Ï

   Ëæ׿¼ÊõµÄÈÕÐÂÔÂÒì £¬JSPµÄм¼ÊõÒ²²ã³ö²»ÇΪÁË·½Ãæ´ó¼ÒµÄѧϰÓ빤×÷£¬ÏÂÃ潫¼òµ¥µÄ½éÉÜÒ»ÏÂJSP¼Ü¹¹¡¢JSP¿ª·¢¹¤¾ß¡¢Web·þÎñÆ÷¼°Æäîñȱµã¡£
    JSP¼Ü¹¹£º
    struts£º  Struts¸úTomcat¡¢TurbineµÈÖî¶àApacheÏîÄ¿Ò»Ñù£¬ÊÇ¿ªÔ´Èí¼þ£¬ÕâÊÇËüµÄÒ»´óÓŵ㣬ʹ¿ª·¢ÕßÄܸüÉîÈëµÄÁ˽âÆäÄÚ²¿ÊµÏÖ»úÖÆ¡£
    ³ý´ËÖ®Í⣬StrutsµÄÓŵãÖ÷Òª¼¯ÖÐÌåÏÖÔÚÁ½¸ö·½Ã棺TaglibºÍÒ³Ãæµ¼º½¡£TaglibÊÇStrutsµÄ±ê¼Ç¿â£¬±È½ÏÁé»î£¬ÄÜ´ó´óÌá¸ß¿ª·¢Ð§ÂÊ¡£ÁíÍ⣬¾ÍÄ¿Ç°¹úÄÚµÄJSP¿ª·¢Õ߶øÑÔ£¬³ýÁËʹÓÃJSP×Ô´øµÄ³£Óñê¼ÇÍ⣬ºÜÉÙ¿ª·¢×Ô¼ºµÄ±ê¼Ç£¬»òÐíStrutsÊÇÒ»¸öºÜºÃµÄÆðµã¡£strutsÀú¾­6Äê¶àµÄ·¢Õ¹£¬ÊÇÄ¿Ç°Óû§Êý×î¶à¡¢¿ª·¢ÍŶӺÍÉçÇø×î»ðÈȵĿò¼Ü£¬ÊÊÓÃÓÚÖÐСÐÍÏîÄ¿µÄ¿ìËÙ¿ª·¢¡£
    tapestry£º TapestryÊÇÒ»¸ö¿ªÔ´µÄ»ùÓÚservletµÄÓ¦ÓóÌÐò¿ò¼Ü£¬ËüʹÓÃ×é¼þ¶ÔÏóÄ£ÐÍÀ´´´½¨¶¯Ì¬µÄ£¬½»»¥µÄwebÓ¦Óá£Ò»¸ö×é¼þ¾ÍÊÇÈÎÒâÒ»¸ö´øÓÐjwcidÊôÐÔµÄhtml±ê¼Ç¡£ÆäÖÐjwcµÄÒâ˼ÊÇJava Web Component.TapestryʹµÃjava´úÂëÓëhtmlÍêÈ«·ÖÀ룬ÀûÓÃÕâ¸ö¿ò¼Ü¿ª·¢´óÐÍÓ¦ÓñäµÃÇá¶øÒ×¾Ù¡£²¢ÇÒ¿ª·¢µÄÓ¦ÓúÜÈÝÒ×ά»¤ºÍÉý¼¶¡£TapestryÖ§³Ö±¾µØ»¯£¬Æä´íÎ󱨸æÒ²ºÜÏêϸ¡£TapestryÖ÷ÒªÀûÓÃjavabeanºÍxml¼¼Êõ½øÐпª·¢£¬ÊÇÒ»¸ö×é¼þʽµÄ¡¢Ê¼þÇý¶¯µÄ¿ò¼Ü£¬ÀíÄîºÜÏȽø£¬ÏëʵÏÖÀàËÆÓÚ×ÀÃæ³ÌÐò¿ª·¢µÄÄÇÖÖ±ã½Ýģʽ¡£µ«ÊÇËüµÄѧϰÇúÏ߱Ƚ϶¸ÇÍ£¬Òª»¨²»ÉÙʱ¼ä²ÅÄÜÕÆÎÕËü¡£ËüÊʺϴóÐÍÏîÄ¿¿ª·¢£¬Ëæ×Å×é¼þµÄ»ýÀÛ£¬¿ª·¢Ô½µ½ºóÆڿɸ´ÓõÄ×é¼þÔ½¶à£¬¿ª·¢ËÙ¶ÈÔ½¿ì¡£
    spring mvc£º Spring µÄ Web MVC ¿ò¼ÜÊÇΧÈÆ DispatcherServlet Éè¼ÆµÄ£¬Ëü°ÑÇëÇó·ÖÅɸø´¦Àí³ÌÐò£¬Í¬Ê±´øÓпÉÅäÖõĴ¦Àí³ÌÐòÓ³Éä¡¢ÊÓͼ½âÎö¡¢±¾µØÓïÑÔ¡¢Ö÷Ìâ½âÎöÒÔ¼°ÉÏÔØÎļþÖ§³Ö¡£Ä¬ÈϵĴ¦Àí³ÌÐòÊǷdz£¼òµ¥µÄ Controller ½Ó¿Ú£¬Ö»ÓÐÒ»¸ö·½·¨ ModelAndView handleRequest£¨request£¬ response£©¡£Spring ÌṩÁËÒ»¸ö¿ØÖÆÆ÷²ã´Î½á¹¹£¬¿ÉÒÔÅÉÉú×ÓÀà¡£Èç¹ûÓ¦ÓóÌÐòÐèÒª´¦ÀíÓû§ÊäÈë±íµ¥£¬ÄÇô¿ÉÒԼ̳РAbstractFormController.Èç¹ûÐèÒª°Ñ¶àÒ³ÊäÈë´¦Àíµ½Ò»¸ö±íµ¥£¬ÄÇô¿ÉÒԼ̳РAbstractWizardFormController.springÌṩµÄ¶«¶«£¬Ê¹ÓÃÁËspringµÄIoC£¬²¢ÇÒÒ²·Ç³£Ç¿´ó£¬µ«ÊǸоõËü±È½Ï½Ó½üµÍ²ã£¬Òª¹Ø×¢µÄ¶«Î÷ºÜ¶à¡£
    JSF£º JSF¸ºÔð¶Ô¿Í»§¶ËÉ豸²úÉúÓ°Ï죬ËüÌṩÁ˽«±íʾ²ã¡¢Ó¦ÓòãºÍÒµÎñÂß¼­²ãÕûºÏÔÚÒ»ÆðµÄ¹¤¾ß£¬µ«ÊÇ£¬JSFµÄ·¶Î§±»ÏÞÖÆÔÚ±íʾ


Ïà¹ØÎĵµ£º

JSP¾Å´óÄÚÖöÔÏó¼°Ëĸö×÷ÓÃÓò½éÉÜ

JSP¾Å´ó¶ÔÏó£º
ÄÚÖöÔÏó£¨ÓÖ½ÐÒþº¬¶ÔÏó£¬ÓÐ9¸öÄÚÖöÔÏó£©:²»ÐèÒªÔ¤ÏÈÉùÃ÷¾Í¿ÉÒÔÔڽű¾´úÂëºÍ±í´ïʽÖÐËæÒâʹÓÃ
1-out:
javax.servlet.jsp.JspWriterÀàÐÍ£¬´ú±íÊä³öÁ÷µÄ¶ÔÏó¡£×÷ÓÃÓòΪpage£¨Ò³ÃæÖ´ÐÐÆÚ£©
request£ºjavax.servlet.ServletRequestµÄ×ÓÀàÐÍ£¬´Ë¶ÔÏó·â×°ÁËÓÉWEBä¯ÀÀÆ÷»òÆäËü¿Í»§¶ËÉú³ÉµØHTTP
ÇëÇóµÄϸ½Ú£¨² ......

JSPÊý¾Ý¿âÁ¬½ÓÒÉÎÊ£¨Mysql£©

package com.wxpn.tutorial.db;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.Date;
/**
 * ÃèÊö: Êý¾Ý¿âÁ¬½Ó³ØÀà
 * 
 * 
&n ......

ÈÃhtmlÒÔ¼°jspÒ³Ãæ²»±»»º´æ

¶ÔÓÚHTMÍøÒ³£¬¼ÓÈ룺
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<meta HTTP-EQUIV="expires" CONTENT="0">
È»ºó£¬jspÒ³ÃæÖмÓÈ룺
<%
     response.setHeader("Cache-Control","no-store") ......

JSPÎļþ

<%@ page language="java" import="kg.TestBean2;" %>
<%@ page contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>HelloBean</title>
</head>
<body>
<%--
<%
kg.TestBean2 testbean=(kg.TestBean2)session.setAttribute("testbean");
if ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ