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

5ÔÂ19ÈÕ JSP»ù´¡

1.essionÄڵĴæ·ÅµÄÊǶÔÏóµÄÒýÓÃ,ËùÒÔÐÞ¸ÄÄÚÖöÔÏóºó,²»ÐèÒªÖØÐ·ÅÖõ½sessionÖÐ
2.ÅäÖÃContext³õʼ»¯²ÎÊý
<Context-param>
<param-name></paran-name>
<param-value></param-value>
<Context-param>
this.getServletContext().getInitParameter(arg0);
-----------------------------------------------------------------------------------------------------------------
3.ÅäÖÃservlet³õʼ»¯²ÎÊý
<init-param>
   <param-name></param-name>
   <param-value></param-value>
</inti-param>
ServletConfig config=this.getServletConfig();
config.getParameter(""); 
-----------------------------------------------------------------------------------------------------------------
4ÅäÖÃÎļþ properties
¸ñʽ: key=value  ÆäÖÐkey²»±ä valueÊDZ仯µÄ
ÀýÈç: #ÆäÖÐ"#"ΪעÊÍ
   Îļþ db.properties
    username=ÇØÑæÅà
    password=peiaihua 
×îºÃ·ÅÖõ½/WEB-INF/db.properties  
 ¶ÁÈ¡ÊôÐÔÎļþµÄÐÅÏ¢:
 /ÔÚwebÓ¦ÓÃÖÐ,getServletContext().getRealPath±íʾµÄ
 ÊÇweb¹¤³ÌµÄ¸ù·¾¶,
 Èç:"C:\Program Files\apache-tomcat-6.0.18\webapps\TestURL"
 
 String path=this.getServletContext().getRealPath("");
 FileImputSream fi=new FileInputStream(path);
 Properties pro=new Properties();
 pro.load(fi);
 pro.getProperty("key");
 
 String realPath=this.getServletContext().getResourceAsStream("/WEB-INF/db.properties")
 ±íʾµÄÒ²ÊÇ´Ó¸ù·¾¶¿ªÊ¼¼ÓÔØÎļþ:
 -----------------------------------------------------------------------------------------------------------------
 <!--  ¸Ã±êÇ©±íʾ·þÎñÆ÷Æô¶¯Ê±,×Ô¶¯´´½¨servlet¶ÔÏó,¶øÇÒÊý×ÖÔ½ÏÈÓÅÏȼ¶Ô½¸ß-->
 <Load-on-startup>0,1,2,3,....</Load-on-srartup>
 -----------------------------------------------------------------------------------------------------------------
 servletͨÐÅ(communicate):
  ·¾¶ÉèÖÃ:
&n


Ïà¹ØÎĵµ£º

JSPÖÐincludeÖ¸ÁîºÍincludeÐÐÎªÇø±ð

 ÎÒÃǶ¼ÖªµÀÔÚjspÖÐincludeÓÐÁ½ÖÖÐÎʽ,·Ö±ðÊÇ
<%@ include file=” ”%>
<jsp:include page=” ” flush=”true”/>
    ǰÕßÊÇÖ¸ÁîÔªËØ¡¢ºóÕßÊÇÐÐÎªÔªËØ¡£¾ßÌåËüÃǽ«Ôںδ¦Óã¿ÈçºÎÓü°ËüÃÇÓÐÊ²Ã´Çø±ð£¿ÕâÓ¦¸ÃÊǺܶàÈË¿´ ......

301ÖØ¶¨ÏòÉèÖü°³ÌÐò´úÂëʵÏÖÈ«¼¯(ASP|.NET|PHP|JSP)

Ê×ÏÈÉêÃ÷£ºÕâ¸öÊÇÎÒ×ªÔØµÄ£¬ÖÂÁ¦ÓÚΪÏñÎÒÒ»ÑùµÄÐÂÊÖÌṩ°ïÖú£¡
1¡¢IISÏÂ301ÉèÖà InternetÐÅÏ¢·þÎñ¹ÜÀíÆ÷ -> ÐéÄâĿ¼ -> ÖØ¶¨Ïòµ½URL£¬ÊäÈëÐèҪתÏòµÄÄ¿±êURL£¬²¢Ñ¡Ôñ“×ÊÔ´µÄÓÀ¾ÃÖØ¶¨Ïò”¡£
2¡¢ASPϵÄ301תÏò´úÂë
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanent ......

jspÓëSQL Server 2000 µÄÁ¬½Ó

ÖÕÓڸ㶨JSPÁ¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌâÁË
2008Äê01ÔÂ29ÈÕ ÐÇÆÚ¶þ 15:54
    ǰ¼¸Ì죬ƽƽͬѧһֱÔÚ¸ãJSP Á¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌ⣬һֱÁ¬²»ÉÏ£¬È»ºó½ÐÎÒÈ¥°ïËû¿´¿´£¬Æ¾×ÅÒÔǰµÄ¾­Ñ飬¸ãÁËÒ»¸öÏÂÎ磬ºÙºÙ£¡ÖÕÓÚ°ïËûÁ¬½ÓÉÏÁË£¬Ö÷Òª²½ÖèÈçÏ£º
    1¡¢ÐèÒªµÄ¶«Î÷´ó¼Ò¿ÉÒÔµ½Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ