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

jspдµÄÑéÖ¤Âë

µÚÒ»²½£º½¨Á¢Ò»¸öcode.jspµÄÒ³Ã棬²úÉúËæ»úÂë
   <%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"
     import="java.io.*,
          java.util.*,
          com.sun.image.codec.jpeg.*,
          java.awt.*,
          java.awt.image.*"%>
<%
  String s = "";
        int intCount = 0;
        /**
      * ÑéÖ¤Âë¿í¶È
      */
      int width=100;
     /**
      * ÑéÖ¤Âë¸ß¶È
      */
      int height=25;
        /**
      * ÑéÖ¤Âë×Ö·û¼¯
      */
      char[] code=new char[]{
      'A','B','C','D','E','F','G','H','I','J','K','L','M','N','P','Q','R','S','T','U','V','W','X','Y','Z',
      'a','b','c','d','e','f','g','h','i','j','k','l','m','n','p','q','r','s','t','u','v','w','x','y','z',
       '2','3','4','5','6','7','8','9','¿ª','¾ø','Ìì','µØ','ÎÒ','¼Ò','˱','¹â','°®','ÀÖ','Ц','ÌÃ','С','°º'};
    
        /**
         *  ´´½¨Ò»¸öËæ»úÊýÉú³ÉÆ÷Àà
         */
        Random random = new Random(); 
      
       // Ëæ»ú²úÉúcodeCountÊý×ÖµÄÑéÖ¤Âë¡£  
        for (int i = 0; i < 4; i++) {&nbs


Ïà¹ØÎĵµ£º

[ת¡¿Ñ§Ï°jspÐĵÃ

jspѧϰÐĵÃ
    ѧϰJSP¼¼ÊõÒ²¿ì°ëÄê¶àÁË°É£¬×Ô¼ºÒ²¶¯ÊÖ±àдÁËһЩ¼òµ¥µÄ¶¯Ì¬ÍøÒ³°É¡£ÖÚËùÖÜÖª¶¯Ì¬ÍøÒ³Èý´ó¼¼ÊõASP£¬JSP£¬PHP»ù±¾ÉÏÊÇÈý·ÖÌìÏ£¬µ±È»»¹ÓÐÆäËûÓïÑÔÏñRuby£¬PythonµÈÒ²Õ¼¾Ý²»Ð¡µÄ·Ý¶î¡£
   ѧϰJSP¹ý³ÌÖÐÎҸд¥×îÉîµÄÊÇÈçϼ¸µã£º
  1.JSPÊÇÒ»ÖÖ±íʾ²ãµÄ¼¼Êõ
 &nb ......

´¦ÀíSSϵÁÐJSPµÄһЩÂÒÂëÎÊÌâ

×òÌìÔÚ䶫Î÷µÄʱºò£¬Êý¾Ý¿âÓõıàÂëÊǣգԣƣ­£¸£¬Ò³ÃæÒ²Êǣգԣƣ­£¸£¬È»ºó´æ½øÊý¾Ý¿âµÄʱ·¢ÏÖ»¹ÊÇÂÒÂë¡£ÖÐÎĵÄʱºò£¬Ëæºó£ä£å£â£õ£ç£¬²éµ½£Á£ã£ô£é£ï£îÀïÃæµÃµ½µÄ±íµ¥ÄÚÈÝÒ²ÊÇÂÒÂ룬¹þ¹þ
ÎÊÌâÕÒµ½ÁË£¬Ô­À´Êǣƣï£ò£í±íµ¥»òÕßÆäËûµØ·½ÓÐÎÊÌâ
ºóÀ´ÔÚ£÷£å£â£®£ø£í£ìÖмÓÉ϶ԣӣð£ò£é£î£ç±àÂëµÄ¿ØÖÆÓï¾ä£¬ºÃÁË£®£®£®ºÇºÇ
......

tomcat6.0 + JSP + mysqlÊý¾Ý¿âÁ¬½Ó³ØÅäÖÃ


tomcat6.0 + JSP + mysqlÊý¾Ý¿âÁ¬½Ó³ØÅäÖÃ
»·¾³£ºtomcat6.0 £¬mySQL 5.021
°ÑmysqlÇý¶¯°ü·Ö±ð·Åµ½%TOMCAT_HOME%/lib ºÍÄãµÄÓ¦ÓõÄWEB-INF\libÎļþ¼ÐÏÂÃæ
1¡¢ÐÞ¸Ä%TOMCAT_HOME%/conf/server.xml,Ìí¼ÓÈçÏÂÄÚÈÝ£¨²¿·Ö²ÎÊýÇë±¾µØ»¯£©£º
      <Context path="/web" docBase="web" ......

jsp¾ÅÖÖÄÚÖöÔÏó

request, reponse, out, session, application, config, pagecontext, page, exception.

Ò».request¶ÔÏ󣺸öÔÏó·â×°ÁËÓû§Ìá½»µÄÐÅÏ¢£¬Í¨¹ýµ÷ÓøöÔÏóÏàÓ¦µÄ·½·¨¿ÉÒÔ»ñÈ¡·â×°µÄÐÅÏ¢£¬¼´Ê¹ÓøöÔÏó¿ÉÒÔ»ñÈ¡Óû§Ìá½»ÐÅÏ¢¡£
1.Request¶ÔÏó¿ÉÒÔʹÓÃgetParameter(string s)·½·¨»ñÈ¡¸Ã±íµ¥Í¨¹ýtextÌá½»µÄÐÅÏ¢¡£È磺
Requ ......

JSP»ù´¡

Ò»¡¢JSP¼ò½é
JSP (Java Server Pages)ÊÇ·þÎñÆ÷¶ËµÄ½Å±¾ÓïÑÔ£¬ÊÇÒ»ÖÖÔÚHTMLÒ³ÃæÖмÓÈëJavaÓïÑÔ¶øÉú³É¶¯Ì¬Ò³ÃæµÄ¼¼Êõ£º¼ÓÈëÁËеıêÇ©£¨<%£¬%>£¬…£©¡£
JSPÊÇÒÔJavaºÍServletΪ»ù´¡¿ª·¢¶ø³ÉµÄ¶¯Ì¬ÍøÒ³Éú³É¼¼Êõ£¬ËüµÄµ×²ãʵÏÖÊÇJava Servlet¡£
JSPÒ³ÃæÓÉHTML´úÂëºÍǶÈëÆäÖеÄJava´úÂëËù×é³É¡£·þÎñÆ÷ÔÚÒ³Ãæ±»¿Í» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ