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

JSP ±Ê¼Ç


JSP£¨Java Server Page£©
JSPÊÇ·þÎñÆ÷¶ËÔËÐеÄÒ³Ã棬JSP±¾¾ÍÊÇÒ»¸öÎĵµ£¬Ëû²»½ö¿ÉÒÔ°üº¬¾²Ì¬µÄHTML´úÂ룬Ҳ¿ÉÒÔ°üº¬¶¯Ì¬µÄJAVA´úÂ룬·þÎñÆ÷ÈÝÆ÷¿ÉÒÔ½«JSPת»»³ÉServlet·¢²¼£¬²¢½ÓÊÜÇëÇó¡£
JspÎļþÖ»Ðè·ÅÔÚÓ¦ÓÃÎļþϾͿÉÒÔÁË¡£
JSPÀý×Ó£º
<html>
<head><title>time</title></head>
<body>
    <h1><%=new
java.util.Date()%></h1>
</body>
</html>
JSPÔËÐйý³Ì
1£¬JSPÎļþÏÈÒª·­Òë³ÉJavaÎļþ£¨Servlet£©£¬ÔÚtomcatÖз­ÒëºóµÄjavaÎļþÔÚtomcatϵÄwork\Catalina\localhostÖÐÏàÓ¦Ãû×ÖµÄÓ¦ÓÃĿ¼Àï¡£
2£¬±àÒëJavaÎļþ
3£¬ÔËÐÐ.classÎļþ
TomcatµÄÈ«¾ÖÅäÖÃÎļþ
ÔÚTomcatϵÄconfĿ¼ÖеÄweb.xmlÊÇ·þÎñÆ÷È«¾ÖµÄÅäÖÃÎļþ£¬ÆäÖÐÒªÏë¹Ø±ÕÁбíÏÔʾ½ÐÒª°Ñ
<init-param>
     
<param-name>listings</param-name>
     
<param-value>false</param-value>
</init-param>
TomcatµÄ¹ÜÀíÔ±ÉèÖÃ
ÔÚtomcatϵÄconfĿ¼ÖеÄtomcat-use.xmlÎļþÖпÉÒÔÅäÖÃtomcatµÄÓû§½ÇÉ«
<tomcat-users>
 
<role rolename="manager" description=""/>
 
<role rolename="admin"/><!--É趨½ÇÉ«µÄÃû×Ö£¬adminÊǹÜÀíÔ±£¬managerÊÇÏîÄ¿¹ÜÀí-->
 
<user username="manager" password="123"
roles="manager"/><!--É趨Óû§ÃûÃÜÂ룬ºÍ½ÇÉ«-->
 
<user username="admin" password="123"
roles="admin"/>
</tomcat-users>
 
JSPµÄÌصã
1£¬JSP²»ÐèÒª±àÒë
2£¬JSP²»ÐèÒª½øÐÐÅäÖÃ
3£¬JSP±¾ÖÊÉϾÍÊÇÒ»¸öServlet
4£¬JSPÊÇÒÔ¾²Ì¬Ò³ÃæΪÖ÷µÄ¡£
 
JSPµÄÓï·¨¸ñʽ
<%=...%>±í´ïʽ£¬Ð´±í´ïʽʱ²»Òª¼ÓÉϷֺţ¬±í´ïʽ£¬·­Òë³ÉJava´úÂëÒ²¾ÍÊÇÖ±½ÓʹÓÃÁ÷Êä³ö£¬Ò²¾Í²»ÄܼӷֺÅÁË¡£
<%! int a=0; %>ÉùÃ÷£¬Ê¹ÓÃÉùÃ÷µÄ±äÁ¿£¬Ëù´´½¨µÄ±äÁ¿ÊÇÔÚservice·½·¨ÌåÍ⣬Ҳ¾ÍÊÇ·­Òë³ÉʵÀý±äÁ¿£¬ÉùÃ÷Ò²¿ÉÒÔÉùÃ÷ÄÚ²¿Àà»òÕßÊÇ·½·¨µÄÉùÃ÷¡£
<% if(a==0){ a=3;}%>´úÂëƬ¶Ï£¬´úÂë¶Î»áÔ­Ñù·­Òë¡£ÔÚ´úÂë¶ÎÖÐÉùÃ÷µÄ±äÁ¿£¬¾Í»á±»·­ÒëµÄserviceµÄ·½·¨ÌåÖУ¬Ò²¾ÍÊDZ»·­Òë³É¾Ö²¿±äÁ¿¡£
Ç°ÈýÖÖJSPµÄÓï·¨Ò²½Ð×öJSP´úÂ룬ÒÔÉϵıíʾ·½·¨£¬¶¼ÓÐÓëÖ®Ïà¶ÔÓ¦µÄxml±í´ïÐÎʽ£¬ÒòΪ¿É¶ÁÐԽϲËùÒÔ½ÏÉÙʹÓá£
<


Ïà¹ØÎĵµ£º

jspʵÏÖÎļþÏÂÔØÓëÖÐÎÄÎļþÃûÂÒÂëÎÊÌâ½â¾ö

ÎÊÌâÈçÏ£º
֮ǰ,д¹ýÒ»¸öDownload.jspÎļþ,¿ÉÒÔ½â¾öÏÂÔØÎļþÂÒÂëÎÊÌâ(ÖîÈç:DOC,XSLÎļþµÈµÈ).
ºóÀ´·¢ÏÖ,Óöµ½ÖÐÎÄÃûµÄÎļþµÄʱºò,ÎļþÏÂÔؽ«»á±¨´í~~~~
½ñÌì,ͨ¹ý¸ÄдԭDownload.jspÎļþÒѾ­³¹µ×½â¾öÁËÕâ¸öÎÊÌâ~
ÏÖÔÚ,°ÑÒ»ÕûÌ×µÄÎļþÉÏ´«ÏÂÔصķ½·¨¸øÌù³öÀ´~~~ÒÔ±ã´ó¼Ò½è¼ø!~!~!~!~! 
×÷Õß:¹Å°£¼°·¨ÀÏ
download ......

JSP/FreeMarkerÉú³ÉRSS


¡¡¡¡ RSS2.0ÔÚÍøÂçÉÏ´óÐÐÆäµÀ,¸÷ÖÖÍøÕ¾¶¼¼ÓÉÏRSSÖ§³Ö,¹ØÓÚRSS¹æ·¶,¿ÉÒÔä¯ÀÀһϠhttp://blogs.law.harvard.edu/tech/rss
Ôڼƻ®Éú³ÉRSSÎļþµÄʱºò,˳±ãËÑË÷ÁËÒ»ÏÂJIRAºÍConfluenceµÄ³ÌÐò,·¢ÏÖËüÃÇ·Ö±ðÊÇÓÃÄ£°å·½Ê½ºÍJSP¶¯Ì¬Ò³ÃæÀ´Õ¹Ê¾µÄ.
ÓÚÊÇÎÒÒ²Ïëµ½Á½ÖÖ·½Ê½:
¡¡¡¡1.ÓÃFreeMarkerÉú³É¾²Ì¬Îļþ,ÊÊÓÃÓÚ¸üв ......

Jsp·½Ãæ

1¡¢forward ºÍredirectµÄÇø±ð
´ð£ºforwardÊÇ·þÎñÆ÷ÇëÇó×ÊÔ´£¬·þÎñÆ÷Ö±½Ó·ÃÎÊÄ¿±êµØÖ·µÄURL£¬°ÑÄǸöURLµÄÏìÓ¦ÄÚÈݶÁÈ¡¹ýÀ´£¬È»ºó°ÑÕâЩÄÚÈÝÔÙ·¢¸øä¯ÀÀÆ÷£¬ä¯ÀÀÆ÷¸ù±¾²»ÖªµÀ·þÎñÆ÷·¢Ë͵ÄÄÚÈÝÊÇ´ÓÄĶùÀ´µÄ£¬ËùÒÔËüµÄµØÖ·À¸Öл¹ÊÇÔ­À´µÄµØÖ·¡£
    redirect¾ÍÊÇ·þÎñ¶Ë¸ù¾ÝÂß¼­,·¢ËÍÒ»¸ö״̬Âë,¸æËßä ......

ÔÚjspÒ³Ãæ¼ä´«µÝ²ÎÊý

£¨1£©Ö±½ÓÔÚURLÇëÇóºóÌí¼Ó
¡¡¡¡ È磺<a href="thexuan.jsp?action=transparams&detail=directe")Ö±½Ó´«µÝ²ÎÊý/a> 
¡¡¡¡ ÌرðµÄÔÚʹÓÃresponse.sendRedirect×öÒ³ÃæתÏòµÄʱºò£¬Ò²¿ÉÒÔÓÃÈçÏ´úÂ룺
¡¡¡¡ response.sendRedirect("thexuan.jsp?action=transparams&de ......

Jsp Á¬½Ó mySQL¡¢Oracle Êý¾Ý¿â±¸Íü

Jsp Á¬½Ó mySQL¡¢Oracle Êý¾Ý¿â±¸Íü
2009-12-15 16:47
Jsp »·¾³Ä¿Ç°×îÁ÷ÐеÄÊÇ Tomcat5.0¡£Tomcat5.0 ×Ô¼º°üº¬Ò»¸ö Web ·þÎñÆ÷£¬Èç¹ûÊDzâÊÔ£¬¾Íû±ØÒª°Ñ Tomcat Óë IIS »ò Apache ¼¯³ÉÆðÀ´¡£ÔÚ Tomcat ×Ô´øµÄ Web ·þÎñÆ÷Ï¿ÉÒÔ½øÐÐ Jsp ²âÊÔ¡£
    °²×° Tomcat5.0 Ç°ÐèÒª°²×° JDK(Èç¹ûÊÇ Windows server ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ