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

ÓÃjspÉè¼ÆÍøÒ³µÄʱºòÈçºÎ¸úºǫ́Êý¾Ý¿âÏàÁ¬

ÓõÄÊý¾Ý¿âÊÇmysql
¡¾µÚÒ»ÖÖ·½Ê½£¬ÓÃJSPʵÏÖ¡¿
<%@ page contentType="text/html; charset=gb2312" language="java" 
import="java.sql.*"%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
     //**************************************
     *********  JDBC_ODBCÁ¬½ÓMySqlÊý¾Ý¿â£¬²»ÐèÒªÉèÖÃÊý¾ÝÔ´
    *********************************/  
               
     //********** Êý¾Ý¿âÁ¬½Ó´úÂë ¿ªÊ¼ ******/  
    //ÒÔϼ¸ÏîÇë×ÔÐÐÐÞ¸Ä
    String server="localhost";        //MYSQL ·þÎñÆ÷µÄµØÖ·
    String dbname="test";            //MYSQL Êý¾Ý¿âµÄÃû×Ö
    String user="root";                //MYSQL Êý¾Ý¿âµÄµÇ¼Óû§Ãû
    String pass="chfanwsp";            //MYSQL Êý¾Ý¿âµÄµÇ¼ÃÜÂë
    String port="3306";    //SQL Server ·þÎñÆ÷µÄ¶Ë¿ÚºÅ£¬Ä¬ÈÏΪ1433
   
    //Êý¾Ý¿âÁ¬½Ó×Ö·û´®
    String url ="jdbc:mysql://"+server+":"+port+"/"+dbname+"?user="+user+"&password="+pass+"&useUnicode=true&characterEncoding=GB2312";
    //¼ÓÔØÇý¶¯³ÌÐò
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    //½¨Á¢Á¬½Ó
    Connection conn= DriverManager.getConnection(url);
    //´´½¨Óï¾ä¶ÔÏó
    Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    // ****     Êý¾Ý¿âÁ¬½Ó´úÂë ½áÊø *******
   
  


Ïà¹ØÎĵµ£º

JSP»ù´¡

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

jsp ÑéÖ¤

³¤¶ÈÏÞÖÆJavaScript´úÂë
CODE:
<script> function test() { if(document.a.b.value.length>50) { alert("²»Äܳ¬¹ý50¸ö×Ö·û£¡"); document.a.b.focus(); return
false; } } </script> <form. name=a nsubmit="return test()"> <textarea name="b" cols="40" wrap="VIRTUAL" rows="6"></te ......

jsp·ÃÎÊMySQLÊý¾Ý¿â´íÎó

²»ÖªµÀÊDz»ÊÇÇý¶¯¼ÓÔØÓÐÎÊÌ⣬ÔÚMyEclipseÖÐдÁ˼òµ¥µÄÊý¾Ý¿â²âÊÔ³ÌÐòÕÒ²»µ½Çý¶¯À࣬ϣÍû´óϺÄܸøÓè°ïÖú£¬Ð»ÁË¡£
ÑÏÖØ: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: org.aspectj.lang.Signature
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClas ......

jsp·ÖÒ³£¨oracle+jsp+apache£©

Ò» Ç°Ìá 
Ï£Íû×îеļͼÔÚ¿ªÍ·¸øÄãµÄ±í½¨Á¢²éѯ£º
±í£ºmytable 
²éѯ£ºcreate or replace view as mytable_view from mytable order by id desc ÆäÖУ¬×îºÃʹÓÃÐòÁкÅcreate sequence mytable_sequence À´×Ô¶¯Ôö¼ÓÄãµÄ¼ ......

resin·þÎñÆ÷ÖÐͨ¹ýSSI°üº¬JSPÒ³Ãæ

1¡¢Ò»¡¢ÏÈÌáÌõ¼þ£º ÔÚweb.xmlÖмÓÒÔÏÂÓï¾ä£¨Ô­Òò²Î¿¼RESIN¹Ù·½Îĵµ£©    
<servlet>
         <servlet-name>SSIServlet</servlet-name>
        <servlet-class>com.caucho.servlets.ssi.SS ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ