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

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 2003 ¾Í±ØÐë°²×° JDK£¬ÒòΪ Windows server 2003 ÊDz»´ø JVM µÄ-Windows server 2003 ·¢ÐÐʱ MS ºÍ SUN ¸ÕºÃÄÖ±ðŤÄØ)¡£°²×°Íêºó£¬ÒªÉèÖü¸¸ö»·¾³±äÁ¿£º
    JAVA_HOME = E:\j2sdk1.4.2_04
    CLASSPATH = E:\j2sdk1.4.2_04\lib;E:\j2sdk1.4.2_04\lib\tools.jar
    Path ÖÐ¼Ó .;E:\j2sdk1.4.2_04\bin;
    CATALINA_HOME = E:\Tomcat 5.0
    TOMCAT_HOME = E:\Tomcat 5.0
    ½âÊÍÈçÏ£ºÎÒµÄ JDK°æ±¾ÊÇ 1.4.2£¬°²×°ÔÚ E:\j2sdk1.4.2_04 Îļþ¼ÐÏ¡£
    »·¾³±äÁ¿ JAVA_HOME ºÍ CATALINA_HOME ÊÇÒ»¶¨Òª¼ÓµÄ(ÖÁÉٲο¼×ÊÁ϶¼ÊÇÕâô˵µÄ)¡£CLASSPATH Ҳ˵Ҫ¼Ó£¬µ«ÊÇÎÒû¼ÓËƺõҲûʲôӰÏì¡£Path ÖÐ¼Ó “.;E:\j2sdk1.4.2_04\bin;”Ò²Ò»Ñù£¬ÎÒ²»¼Ó jsp Ò²ÄÜÔËÐÐÆðÀ´£¬µ«ÊÇÔÚ DOS ´°¿ÚÏÂÊÖ¹¤±àÒë .java Àൽ .class ÎļþÓÐÓ°Ï죬ÒòΪÕÒ²»µ½ javac.exe ±àÒëÃüÁîÎļþ¡£ÖÁÓÚ path ÖмӵÄÄǸöµã“.”£¬ÎÒÔ­À´ÔÚ resin ÏÂÊÇÐèÒªµÄ£¬ÔÚ Tomcat Ï»¹Ã»È·¶¨ËüÊDz»ÊDZØÐëµÄ¡£
    ´ó¼Ò»¹·¢ÏÖ CATALINA_HOME ºÍ TOMCAT_HOME µÄÖµÊÇÒ»ÑùµÄ£¬ÎÒ¹À¼Æ TOMCAT_HOME ÊÇ Tomcat µÄ¾É°æ±¾Ê¹Óõģ¬ÏÖÔÚÓõĶ¼ÊÇ CATALINA_HOME¡£²»¹ýÕâ2¸öºÃÏó²¢²»ÊDz»ÏàÈݵģ¬¶¼¼ÓÉÏ£¬»òÕß¼ÓÆäÖÐÈÎÒâÒ»¸ö£¬Jsp ¶¼²»ÊÖÓ°Ïì¡£²»¹ýÎÒ½¨ÒéÓÃÒ»¸ö CATALINA_HOME ¾ÍËãÁË¡£
    Tomcat5.0 ÉèÖÃÐéÄâ·¾¶±È½Ï·½±ãÁË£¬ÒòΪ¿ÉÒÔÔÚ Web »·¾³Ï¹ÜÀí¡£http://[url]:8080/admin ¿ÉÒÔ½øÈë¹ÜÀí½çÃæ(¹ÜÀíÔ±adminÃÜÂëÔÚ Tomcat °²×°¹ý³ÌÖпÉÒÔÉèÖÃ)£¬ÔÚ Tomcat Server-Service (Catalina)-Host (localhost)Ï¿ÉÒÔÌí¼Ó Context£¬ÀàËÆÓÚ IIS
ÀïµÄÐéÄâ·¾¶£ºDocument Base Ö¸µÄÊÇ´Óʵ¼Ê E:\Tomcat 5.0\webapps\ROOT ΪÆðµãµÄÎļþ·¾¶£¬Path Ö¸µÄÊÇ´ÓÐéÄâ“/”¿ªÊ¼µÄÐéÄâ·¾¶Ãû£¬Èç“/mytest”¡£ÕâÀï Tomcat ºÃÏóÉè¼ÆµÄÓе㲻ÍêÉÆ£¬Ö»Òª¼ÓÁËÐ嵀 Context£¬±£´æ£¬ÔÙµã“Commit Changes”


Ïà¹ØÎĵµ£º

ORACLE directory Ŀ¼

Create directoryÈÃÎÒÃÇ¿ÉÒÔÔÚOracleÊý¾Ý¿âÖÐÁé»îµÄ¶ÔÎļþ½øÐжÁд²Ù×÷£¬¼«´óµÄÌá¸ßÁËOracleµÄÒ×ÓÃÐԺͿÉÀ©Õ¹ÐÔ¡£
ÆäÓ﷨Ϊ:
CREATE [OR REPLACE] DIRECTORY directory AS 'pathname';
±¾°¸Àý¾ßÌå´´½¨ÈçÏÂ:
create or replace directory exp_dir as '/tmp';
Ŀ¼´´½¨ÒԺ󣬾ͿÉÒ԰ѶÁдȨÏÞÊÚÓèÌض¨Óû§£¬¾ßÌåÓï·¨ÈçÏ ......

jspÖÐÁ¬½ÓÊý¾Ý¿âµÄÎÊÌâ

½ñÌìÔÚѧϰjspÖÐÊý¾Ý¿âµÄʹÓÃʱ£¬Óöµ½Ò»¸öºÜÆæ¹ÖµÄÇé¿ö£¨ÖÁÉÙÏÖÔÚ¿´À´Êǵģ©¡£jspÖÐÁ¬½ÓmysqlÊý¾Ý¿â£¬¿ªÆômysqlÊý¾Ý¿âºó£¬ÔÚjspÒ³ÃæÖÐǶÈëµÄjavaÁ¬½ÓmysqlÊý¾Ý¿âµÄÄǼ¸¾ä´úÂë¡£ºÃÏñ Class.forName("org.gjt.mm.mysql.Driver");ûÆðµ½×÷Óã¬Ö»ÐèÒªConnection con=DriverManager.getConnection("jdbc:mysql://localhost/test? ......

¸ßÐÔÄÜ Oracle JDBC ±à³Ì

¸ßÐÔÄÜ Oracle JDBC ±à³Ì
Á˽âÈçºÎÀûÓÃÁ¬½ÓºÍÓï¾ä³ØÌØÐÔÀ´Ìá¸ß Oracle Çý¶¯µÄ JDBC ³ÌÐòµÄÐÔÄÜ¡£

×÷ÕߣºYuli Vasiliev
2009 Äê 4 Ô·¢²¼
ʹÓÃÖîÈçÁ¬½Ó³ØºÍÓï¾ä³ØµÈ³Ø¼¼Êõ¿ÉÒÔÏÔÖøÌá¸ßÊý¾Ý¿âÃܼ¯ÐÍÓ¦ÓóÌÐòµÄÐÔÄÜ£¬ÒòΪÕâÑù¿ÉÒÔʵÏÖ¶ÔÏóÖØÓ㬶øÎÞÐ軨·Ñʱ¼äºÍ×ÊÔ´ÖØд´½¨¶ÔÏó¡£
Èç¹ûÓ¦ÓóÌÐòÓëÊý¾Ý¿âƵ·±½»»¥²¢Ç ......

jspÁ¬½ÓMySQLÊý¾Ý¿â 2

¡ñjspÁ¬½ÓMySQLÊý¾Ý¿â
testmysql.jspÈçÏ£º
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<html>
<body>
<%Class.forName("org.gjt.mm.mysql.Driver").newInstance();
String url ="jdbc:mysql://localhost/softforum?
user=soft&pas ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ