锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩一二三区视频,亚洲高清久久,免费日韩一区二区三区http://www.aygfsteel.com/chenlb/category/24164.html濂借鎬т笉濡傜儌絎斿ご!zh-cnTue, 21 Aug 2007 11:13:54 GMTTue, 21 Aug 2007 11:13:54 GMT60tomcat 紱佹鍒楀嚭鐩綍http://www.aygfsteel.com/chenlb/archive/2007/08/07/134945.html嫻佹氮姹?/dc:creator>嫻佹氮姹?/author>Tue, 07 Aug 2007 05:58:00 GMThttp://www.aygfsteel.com/chenlb/archive/2007/08/07/134945.htmlhttp://www.aygfsteel.com/chenlb/comments/134945.htmlhttp://www.aygfsteel.com/chenlb/archive/2007/08/07/134945.html#Feedback0http://www.aygfsteel.com/chenlb/comments/commentRss/134945.htmlhttp://www.aygfsteel.com/chenlb/services/trackbacks/134945.html
      鍦═omcat鐨刢onf/web.xml鏂囦歡閲屾妸listings鍊兼敼涓篺alse
濡?

    <servlet>
        
<servlet-name>default</servlet-name>
        
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        
<init-param>
            
<param-name>debug</param-name>
            
<param-value>0</param-value>
        
</init-param>
        
<init-param>
            
<param-name>listings</param-name>
            
<param-value>false</param-value>
        
</init-param>
        
<load-on-startup>1</load-on-startup>
    
</servlet>


]]>
get 鏂瑰紡涓枃闂http://www.aygfsteel.com/chenlb/archive/2007/07/17/130922.html嫻佹氮姹?/dc:creator>嫻佹氮姹?/author>Tue, 17 Jul 2007 12:37:00 GMThttp://www.aygfsteel.com/chenlb/archive/2007/07/17/130922.htmlhttp://www.aygfsteel.com/chenlb/comments/130922.htmlhttp://www.aygfsteel.com/chenlb/archive/2007/07/17/130922.html#Feedback0http://www.aygfsteel.com/chenlb/comments/commentRss/130922.htmlhttp://www.aygfsteel.com/chenlb/services/trackbacks/130922.html
濡?br>
    <Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads
="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups
="false" redirectPort="8443" acceptCount="100"
               connectionTimeout
="20000" disableUploadTimeout="true" uRIEncoding="gbk"/>


]]>
涓嶄嬌鐢╯erver.xml閰嶇疆JNDI on Tomcat 5.5.Xhttp://www.aygfsteel.com/chenlb/archive/2007/04/20/112326.html嫻佹氮姹?/dc:creator>嫻佹氮姹?/author>Fri, 20 Apr 2007 14:24:00 GMThttp://www.aygfsteel.com/chenlb/archive/2007/04/20/112326.htmlhttp://www.aygfsteel.com/chenlb/comments/112326.htmlhttp://www.aygfsteel.com/chenlb/archive/2007/04/20/112326.html#Feedback0http://www.aygfsteel.com/chenlb/comments/commentRss/112326.htmlhttp://www.aygfsteel.com/chenlb/services/trackbacks/112326.html 

浠婂ぉ璇曠敤浜咼SP絀洪棿,

紼嬪簭涓庢彁渚涘晢鏈変竴浜涚煕鐩撅紝鎻愪緵鍟嗗厑璁告垜浠敼server.xml

閭i棶棰樺氨鏉ワ紝鎴戠敤浜咼NDI

榪欐棭灝辨剰璇嗗埌錛屽氨鎶奐NDI鎶藉彇鍒癱onf/Catalina/localhost鐩綍

濡倀est.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/test" reloadable="true" docBase="D:\web\test" workDir="D:\web\test\WEB-INF\work">
  
<Resource
    
name="jdbc/TEST"
    type
="javax.sql.DataSource"
    password
=""
    driverClassName
="com.mysql.jdbc.Driver"
    maxIdle
="2"
    maxWait
="5000"
    username
="root"
    url
="jdbc:mysql://localhost:3306/test"
    maxActive
="4"/>
</Context>


榪欒繕鏄夯鐑︼紝鏈鍚庢妧鏈漢鍛樺緩璁湪META-INF/鐩綍涓嬫斁context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context>
  
<Resource
    
name="jdbc/TEST"
    type
="javax.sql.DataSource"
    password
=""
    driverClassName
="com.mysql.jdbc.Driver"
    maxIdle
="2"
    maxWait
="5000"
    username
="root"
    url
="jdbc:mysql://localhost:3306/test"
    maxActive
="4"/>
</Context>



]]>
tomcat5涓媕sp鍑虹幇getOutputStream() has already been called for this response寮傚父鐨勫師鍥犲拰瑙e喅鏂規硶http://www.aygfsteel.com/chenlb/archive/2007/03/19/104714.html嫻佹氮姹?/dc:creator>嫻佹氮姹?/author>Mon, 19 Mar 2007 04:57:00 GMThttp://www.aygfsteel.com/chenlb/archive/2007/03/19/104714.htmlhttp://www.aygfsteel.com/chenlb/comments/104714.htmlhttp://www.aygfsteel.com/chenlb/archive/2007/03/19/104714.html#Feedback1http://www.aygfsteel.com/chenlb/comments/commentRss/104714.htmlhttp://www.aygfsteel.com/chenlb/services/trackbacks/104714.html銆愭爣  棰樸戯細tomcat5涓媕sp鍑虹幇getOutputStream() has already been called for this response寮傚父鐨勫師鍥犲拰瑙e喅鏂規硶
銆愬叧閿瓧銆戯細tomcat5,jsp,getOutputStream,has,already,been,called,for,this,response
銆愭潵  婧愩戯細http://blog.csdn.net/alexwan/archive/2007/02/13/1508871.aspx

tomcat5涓媕sp鍑虹幇getOutputStream() has already been called for this response寮傚父鐨勫師鍥犲拰瑙e喅鏂規硶

鍦╰omcat5涓媕sp涓嚭鐜版閿欒涓鑸兘鏄湪jsp涓嬌鐢ㄤ簡杈撳嚭嫻侊紙濡傝緭鍑哄浘鐗囬獙璇佺爜錛屾枃浠朵笅杞界瓑錛夛紝
娌℃湁濡ュ杽澶勭悊濂界殑鍘熷洜銆?br>
鍏蜂綋鐨勫師鍥犲氨鏄?br>鍦╰omcat涓璲sp緙栬瘧鎴恠ervlet涔嬪悗鍦ㄥ嚱鏁癬jspService(HttpServletRequest request, HttpServletResponse response)鐨勬渶鍚?br>鏈変竴孌佃繖鏍風殑浠g爜
finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
榪欓噷鏄湪閲婃斁鍦╦sp涓嬌鐢ㄧ殑瀵硅薄錛屼細璋冪敤response.getWriter(),鍥犱負榪欎釜鏂規硶鏄拰
response.getOutputStream()鐩稿啿紿佺殑錛佹墍浠ヤ細鍑虹幇浠ヤ笂榪欎釜寮傚父銆?/p>

鐒跺悗褰撶劧鏄鎻愬嚭瑙e喅鐨勫姙娉曪紝鍏跺疄鎸虹畝鍗曠殑錛堝茍涓嶆槸鍜屾煇浜涙湅鍙嬭鐨勯偅鏍?-
灝唈sp鍐呯殑鎵鏈夌┖鏍煎拰鍥炶濺絎﹀彿鎵鏈夐兘鍒犻櫎鎺夛級錛?/p>

鍦ㄤ嬌鐢ㄥ畬杈撳嚭嫻佷互鍚庤皟鐢ㄤ互涓嬩袱琛屼唬鐮佸嵆鍙細
out.clear();
out = pageContext.pushBody();

鏈鍚庤繖閲屾槸涓涓緭鍑哄僵鑹查獙璇佺爜渚嬪瓙錛堣繖鏍風殑渚嬪瓙鍑犱箮闅忓鍙錛?br>imag.jsp

 

<% @ page   import = " java.awt.*,java.awt.image.*,java.util.*,javax.imageio.* "   %>
<% @ page  import = " java.io.OutputStream "   %>
<%!
Color getRandColor(
int  fc, int  bc){
Random random 
=   new  Random();
if (fc > 255 ) fc = 255 ;
if (bc > 255 ) bc = 255 ;
int  r = fc + random.nextInt(bc - fc);
int  g = fc + random.nextInt(bc - fc);
int  b = fc + random.nextInt(bc - fc);
return   new  Color(r,g,b);
}
%>
<%
try {
response.setHeader(
" Pragma " , " No-cache " );
response.setHeader(
" Cache-Control " , " no-cache " );
response.setDateHeader(
" Expires " 0 );
int  width = 60 , height = 20 ;
BufferedImage image 
=   new  BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
OutputStream os
= response.getOutputStream();
Graphics g 
=  image.getGraphics();
Random random 
=   new  Random();
g.setColor(getRandColor(
200 , 250 ));
g.fillRect(
0 0 , width, height);

g.setFont(
new  Font( " Times New Roman " ,Font.PLAIN, 18 ));
g.setColor(getRandColor(
160 , 200 ));
for  ( int  i = 0 ;i < 155 ;i ++ )
{
int  x  =  random.nextInt(width);
int  y  =  random.nextInt(height);
int  xl  =  random.nextInt( 12 );
int  yl  =  random.nextInt( 12 );
g.drawLine(x,y,x
+ xl,y + yl);
}
String sRand
= "" ;
for  ( int  i = 0 ;i < 4 ;i ++ ){
String rand
= String.valueOf(random.nextInt( 10 ));
sRand
+= rand;
g.setColor(
new  Color( 20 + random.nextInt( 110 ), 20 + random.nextInt( 110 ), 20 + random.nextInt( 110 )));
g.drawString(rand,
13 * i + 6 , 16 );
}
session.setAttribute(
" rand " ,sRand);
g.dispose();

ImageIO.write(image, 
" JPEG " ,os);
os.flush();
os.close();
os
= null ;
response.flushBuffer();
out.clear();
out 
=  pageContext.pushBody();
}
catch (IllegalStateException e)
{
System.out.println(e.getMessage());
e.printStackTrace();
}
%>

 



]]>
Jndi and c3p0 in Tomcathttp://www.aygfsteel.com/chenlb/archive/2007/03/18/104571.html嫻佹氮姹?/dc:creator>嫻佹氮姹?/author>Sun, 18 Mar 2007 08:46:00 GMThttp://www.aygfsteel.com/chenlb/archive/2007/03/18/104571.htmlhttp://www.aygfsteel.com/chenlb/comments/104571.htmlhttp://www.aygfsteel.com/chenlb/archive/2007/03/18/104571.html#Feedback0http://www.aygfsteel.com/chenlb/comments/commentRss/104571.htmlhttp://www.aygfsteel.com/chenlb/services/trackbacks/104571.html鎶涘純Tomcat鑷甫鐨勮繛鎺ユ睜銆備嬌鐢╟3p0 銆?br>
鐜錛歍omcat 5.5.20
涓嬮潰閰嶇疆鍙傚悎Tomcat 5.5.X


涓嬮潰鏉ョ湅Jndi 涓?c3p0 緇撳悎錛?br>c3p0 涓嬭澆鍦板潃錛?a >http://nchc.dl.sourceforge.net/sourceforge/c3p0/c3p0-0.9.0.4.bin.zip
鎶?c3p0-0.9.0.4.jar 鏀懼埌搴旂敤鏈嶅姟鐨刉EB-INF/lib鐩綍涓嬨傚錛欴BTest/WEB-INF/lib

1.鍦╯erver.xml涓?lt;Context></Context>鍐呭姞<Resource />錛屽畬鏁寸殑紺轟緥錛?br>
<Context path="/DBTest" docBase="DBTest"
        debug
="5" reloadable="true" crossContext="true">
<Resource auth="Container"
 driverClass
="com.mysql.jdbc.Driver"
                                    maxPoolSize
="50" minPoolSize="2" acquireIncrement="2"
                                    name
="jdbc/connPool" user="root" password=""
                                    factory
="org.apache.naming.factory.BeanFactory"
                                    type
="com.mchange.v2.c3p0.ComboPooledDataSource"
                                    jdbcUrl
="jdbc:mysql://localhost:3306/test" />
</Context>


2.鍦╳eb.xml娣誨姞錛?br>
  <resource-ref>
      
<description>DB Connection</description>
      
<res-ref-name>jdbc/connPool</res-ref-name>
      
<res-type>javax.sql.DataSource</res-type>
      
<res-auth>Container</res-auth>
  
</resource-ref>

3.嫻嬭瘯欏甸潰testConnPool.jsp
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<sql:query var="rs" dataSource="jdbc/connPool">
select id, typename from text
</sql:query>

<html>
  
<head>
    
<title>DB Test Conn Pool c3p0 and Jndi</title>
  
</head>
  
<body>

  
<h2>Results</h2>
  
<c:forEach var="row" items="${rs.rows}">
    id: ${row.id}
<br/>
    name: ${row.typename}
<br/>
</c:forEach>

  
</body>
</html>


]]>
Tomcat緹ら泦http://www.aygfsteel.com/chenlb/archive/2007/03/15/104055.html嫻佹氮姹?/dc:creator>嫻佹氮姹?/author>Thu, 15 Mar 2007 08:59:00 GMThttp://www.aygfsteel.com/chenlb/archive/2007/03/15/104055.htmlhttp://www.aygfsteel.com/chenlb/comments/104055.htmlhttp://www.aygfsteel.com/chenlb/archive/2007/03/15/104055.html#Feedback0http://www.aygfsteel.com/chenlb/comments/commentRss/104055.htmlhttp://www.aygfsteel.com/chenlb/services/trackbacks/104055.htmlhttp://www.360doc.com/showWeb/0/0/207707.aspx

鐜錛?br>Tomcat 5.5.20
Apache 2.2.3


1.鏈哄櫒A 閲屾湁TomcatA\webapps\Test鐩綍錛?鏈哄櫒B閲孴omcatB\webapps\Test鐩綍銆傚叾web.xml鏂囦歡涓鏍鳳紝涓や釜閮藉湪</web-app>涔嬪墠鍔犱笂<distributable/>

2.涓や釜Tomcat\conf\server.xml鐨勫涓嬪唴瀹瑰幓鎺夋敞閲婏紝娌℃湁灝卞湪</Host>涔嬪墠鍔犱笂鍘伙細


<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                 managerClassName
="org.apache.catalina.cluster.session.DeltaManager"
                 expireSessionsOnShutdown
="false"
                 useDirtyFlag
="true"
                 notifyListenersOnReplication
="true">

            
<Membership 
                
className="org.apache.catalina.cluster.mcast.McastService"
                mcastAddr
="228.0.0.4"
                mcastPort
="45564"
                mcastFrequency
="500"
                mcastDropTime
="3000"/>

            
<Receiver 
                
className="org.apache.catalina.cluster.tcp.ReplicationListener"
                tcpListenAddress
="auto"
                tcpListenPort
="4001"
                tcpSelectorTimeout
="100"
                tcpThreadCount
="6"/>

            
<Sender
                
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                replicationMode
="pooled"
                ackTimeout
="15000"
                waitForAck
="true"/>

            
<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
                   filter
=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
                   
            
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
                      tempDir
="/tmp/war-temp/"
                      deployDir
="/tmp/war-deploy/"
                      watchDir
="/tmp/war-listen/"
                      watchEnabled
="false"/>
                      
            
<ClusterListener className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
        
</Cluster>


3.鎺ヤ笅鏉ラ厤緗瓵pache\conf\httpd.conf
鍏朵腑榪欎笁涓幓鎺夋敞閲婏細
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so


鏈熬鍔犱笂錛?br>
ProxyRequests Off

ProxyPass /helloworld balancer://mycluster stickysession
=jsessionid nofailover=On

<Proxy balancer://mycluster>
BalancerMember http://
192.168.0.100:8080
BalancerMember http://
192.168.0.101:8080
</Proxy>

<Location /balancer-manager>
SetHandler balancer-manager
Order Deny
,Allow
Deny from all
Allow from all
</Location>

<Location /server-status>
SetHandler server-status
Order Deny
,Allow
Deny from all
Allow from all
</Location>


璇存槑錛?br>ProxyPass /helloworld balancer://mycluster stickysession=jsessionid nofailover=On
<Proxy balancer://mycluster>
BalancerMember http://192.168.0.100:8080
BalancerMember http://192.168.0.101:8080
</Proxy>
ProxyPass涓轟唬鐞嗚漿鍙戠殑Url,鍗沖皢鎵鏈夎闂?/span>/helloworld鐨勮姹傝漿鍙戝埌緹ら泦balancer://mycluster
BalancerMember涓虹兢闆嗙殑鎴愬憳錛屽嵆緹ら泦鏈嶅姟鍣?/span>A鎴?/span>B錛岃礋杞藉潎琛℃湇鍔″櫒浼氭牴鎹潎琛¤鍒欐潵灝嗚姹傝漿鍙戠粰BalancerMember銆?br>

4.嫻嬭瘯欏甸潰錛?br>TomcatA\webapps\Test\index.html鍐呭濡備笅錛?br>
<html>
<head><title>Tomcat 5.5.20 緹ら泦1</title></head>

<body>
<center>Tomcat 1鍙鋒満
</center>
</body>
</html>


TomcatB\webapps\Test\index.html鍐呭濡備笅錛?br>
<html>
<head><title>Tomcat 5.5.20 緹ら泦2</title></head>

<body>
<center>Tomcat 2鍙鋒満鍦═omcatB鏈轟笂
</center>
</body>
</html>


鍚姩TomcatA鍜孴omcatB錛屽啀鍚姩Apache
http://localhost/helloworld/Test/index.html
鍚庢湁鍑虹幇涓婇潰涓や釜欏甸潰鐨勪換涓涓鏄庨厤緗垚鍔熴?br>涓嶆柇鍒鋒柊錛岃繖涓〉闈笉鏂氦鏇褲?br>
錛氾級

]]>
鐢ㄥ厤瀹夎鐨凾omcathttp://www.aygfsteel.com/chenlb/archive/2007/03/12/103382.html嫻佹氮姹?/dc:creator>嫻佹氮姹?/author>Mon, 12 Mar 2007 11:44:00 GMThttp://www.aygfsteel.com/chenlb/archive/2007/03/12/103382.htmlhttp://www.aygfsteel.com/chenlb/comments/103382.htmlhttp://www.aygfsteel.com/chenlb/archive/2007/03/12/103382.html#Feedback0http://www.aygfsteel.com/chenlb/comments/commentRss/103382.htmlhttp://www.aygfsteel.com/chenlb/services/trackbacks/103382.html
瑙e帇鍒扮洰褰曚腑錛屽錛欳:\apache-tomcat-5.5.20

鐩存帴榪愯bin/startup.bat涓嶈兘鍚姩錛?br>
閮侀椃錛岃CATALINA_HOME鐜鍙橀噺娌℃湁璁懼ソ銆?br>
鐒跺悗璁句笅
CATALINA_HOME=C:\apache-tomcat-5.5.20

灝卞彲浠ヤ簡銆?br>
:)


]]>
Tomcat 5.5.X JNDI 榪炴帴姹?/title><link>http://www.aygfsteel.com/chenlb/archive/2007/03/12/103378.html</link><dc:creator>嫻佹氮姹?/dc:creator><author>嫻佹氮姹?/author><pubDate>Mon, 12 Mar 2007 11:26:00 GMT</pubDate><guid>http://www.aygfsteel.com/chenlb/archive/2007/03/12/103378.html</guid><wfw:comment>http://www.aygfsteel.com/chenlb/comments/103378.html</wfw:comment><comments>http://www.aygfsteel.com/chenlb/archive/2007/03/12/103378.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/chenlb/comments/commentRss/103378.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/chenlb/services/trackbacks/103378.html</trackback:ping><description><![CDATA[<p>浠婂ぉ絎簩嬈¢厤緗繛鎺ユ睜錛屽啓涓嬫潵浠ヤ究浠ュ悗鍙互鍙傝冦?br><br>鍦═omcat/webapps/鐩綍涓嬪緩绔婦BTest鐩綍錛堝嵆涓烘湇鍔$洰褰曪級<br>DBTest寤虹珛WEB-INF鐩綍銆?br><br>1.WEB-INF鐩綍涓嬪垱寤簑eb.xml鏂囦歡錛屽涓嬶細</p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">web-app </span> <span style="COLOR: #ff0000">xmlns</span> <span style="COLOR: #0000ff">="http://java.sun.com/xml/ns/j2ee"</span> <span style="COLOR: #ff0000"><br>    xmlns:xsi</span> <span style="COLOR: #0000ff">="http://www.w3.org/2001/XMLSchema-instance"</span> <span style="COLOR: #ff0000"><br>    xsi:schemaLocation</span> <span style="COLOR: #0000ff">="http://java.sun.com/xml/ns/j2ee<br>http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"</span> <span style="COLOR: #ff0000"><br>    version</span> <span style="COLOR: #0000ff">="2.4"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"><br>  </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">description</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">MySQL Test App</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">description</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"><br>  </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">resource-ref</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"><br>      </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">description</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">DB Connection</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">description</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"><br>      </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">res-ref-name</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">jdbc/TestDB</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">res-ref-name</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"><br>      </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">res-type</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">javax.sql.DataSource</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">res-type</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"><br>      </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">res-auth</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">Container</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">res-auth</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"><br>  </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">resource-ref</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">web-app</span> <span style="COLOR: #0000ff">></span> </div> <br><br><br>2.鍐峊omcat/conf/鐩綍鐨剆erver.xml鏂囦歡閲?lt;/Host>涔嬪墠鍔狅細<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">Context </span><span style="COLOR: #ff0000">path</span><span style="COLOR: #0000ff">="/DBTest"</span><span style="COLOR: #ff0000"> docBase</span><span style="COLOR: #0000ff">="DBTest"</span><span style="COLOR: #ff0000"><br>        debug</span><span style="COLOR: #0000ff">="5"</span><span style="COLOR: #ff0000"> reloadable</span><span style="COLOR: #0000ff">="true"</span><span style="COLOR: #ff0000"> crossContext</span><span style="COLOR: #0000ff">="true"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br><br>  </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">Resource </span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="jdbc/TestDB"</span><span style="COLOR: #ff0000"> auth</span><span style="COLOR: #0000ff">="Container"</span><span style="COLOR: #ff0000"> type</span><span style="COLOR: #0000ff">="javax.sql.DataSource"</span><span style="COLOR: #ff0000"><br>               maxActive</span><span style="COLOR: #0000ff">="100"</span><span style="COLOR: #ff0000"> maxIdle</span><span style="COLOR: #0000ff">="30"</span><span style="COLOR: #ff0000"> maxWait</span><span style="COLOR: #0000ff">="10000"</span><span style="COLOR: #ff0000"><br>               username</span><span style="COLOR: #0000ff">="root"</span><span style="COLOR: #ff0000"> password</span><span style="COLOR: #0000ff">=""</span><span style="COLOR: #ff0000"> driverClassName</span><span style="COLOR: #0000ff">="com.mysql.jdbc.Driver"</span><span style="COLOR: #ff0000"><br>               url</span><span style="COLOR: #0000ff">="jdbc:mysql://localhost:3306/test?autoReconnect=true"</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br><br></span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">Context</span><span style="COLOR: #0000ff">></span></div> <br><br>3.鎶奙ySQL鐨凧DBC椹卞姩紼嬪簭鏀懼埌Tomcat/commons/lib/鐩綍涓嬶紝jstl.jar鍜宻tandard.jar鏀懼埌webapps/DBTest/WEB-INF/lib/鐩綍涓嬨?br><br><br>4.鍒涘緩鏁版嵁搴撹〃錛?br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #0000ff">CREATE</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">TABLE</span><span style="COLOR: #000000"> testdata (<br>  id </span><span style="FONT-WEIGHT: bold; COLOR: #000000">int</span><span style="COLOR: #000000"> </span><span style="COLOR: #808080">NOT</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">NULL</span><span style="COLOR: #000000"> auto_increment </span><span style="COLOR: #0000ff">PRIMARY</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">KEY</span><span style="COLOR: #000000">,<br>  name </span><span style="FONT-WEIGHT: bold; COLOR: #000000">varchar</span><span style="COLOR: #000000">(</span><span style="FONT-WEIGHT: bold; COLOR: #800000">50</span><span style="COLOR: #000000">),<br>  email </span><span style="FONT-WEIGHT: bold; COLOR: #000000">varchar</span><span style="COLOR: #000000">(</span><span style="FONT-WEIGHT: bold; COLOR: #800000">50</span><span style="COLOR: #000000">)<br>) ENGINE</span><span style="COLOR: #808080">=</span><span style="COLOR: #000000">MyISAM;<br></span></div> <br><br>5.嫻嬭瘯欏甸潰test.jsp錛?br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00"><%</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@ taglib uri</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">http://java.sun.com/jsp/jstl/sql</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> prefix</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">sql</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span><span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%></span><span style="COLOR: #000000"><br></span><span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00"><%</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@ taglib uri</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">http://java.sun.com/jsp/jstl/core</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> prefix</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">c</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span><span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%></span><span style="COLOR: #000000"><br><br></span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">sql:query </span><span style="COLOR: #ff0000">var</span><span style="COLOR: #0000ff">="rs"</span><span style="COLOR: #ff0000"> dataSource</span><span style="COLOR: #0000ff">="jdbc/TestDB"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br>select id, name, email from testdata<br></span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">sql:query</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br><br></span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">html</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br>  </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">head</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br>    </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">title</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">DB Test</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">title</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br>  </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">head</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br>  </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">body</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br><br>  </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">h2</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">Results</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">h2</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br>  <br></span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">c:forEach </span><span style="COLOR: #ff0000">var</span><span style="COLOR: #0000ff">="row"</span><span style="COLOR: #ff0000"> items</span><span style="COLOR: #0000ff">="${rs.rows}"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br>    濮撳悕錛?{row.name}</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">br</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br>    閭錛?nbsp;${row.email}</span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">br</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">c:forEach</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br><br>  </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">body</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">html</span><span style="COLOR: #0000ff">></span></div> <img src ="http://www.aygfsteel.com/chenlb/aggbug/103378.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/chenlb/" target="_blank">嫻佹氮姹?/a> 2007-03-12 19:26 <a href="http://www.aygfsteel.com/chenlb/archive/2007/03/12/103378.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">女性</a>| <a href="http://" target="_blank">井陉县</a>| <a href="http://" target="_blank">六安市</a>| <a href="http://" target="_blank">招远市</a>| <a href="http://" target="_blank">桐梓县</a>| <a href="http://" target="_blank">抚州市</a>| <a href="http://" target="_blank">奇台县</a>| <a href="http://" target="_blank">沙雅县</a>| <a href="http://" target="_blank">巫山县</a>| <a href="http://" target="_blank">福建省</a>| <a href="http://" target="_blank">左云县</a>| <a href="http://" target="_blank">陆河县</a>| <a href="http://" target="_blank">屏东县</a>| <a href="http://" target="_blank">耿马</a>| <a href="http://" target="_blank">玛沁县</a>| <a href="http://" target="_blank">绥棱县</a>| <a href="http://" target="_blank">丰都县</a>| <a href="http://" target="_blank">江口县</a>| <a href="http://" target="_blank">靖西县</a>| <a href="http://" target="_blank">龙州县</a>| <a href="http://" target="_blank">方正县</a>| <a href="http://" target="_blank">兰西县</a>| <a href="http://" target="_blank">抚松县</a>| <a href="http://" target="_blank">西平县</a>| <a href="http://" target="_blank">卫辉市</a>| <a href="http://" target="_blank">仁布县</a>| <a href="http://" target="_blank">平定县</a>| <a href="http://" target="_blank">文昌市</a>| <a href="http://" target="_blank">北宁市</a>| <a href="http://" target="_blank">大兴区</a>| <a href="http://" target="_blank">望谟县</a>| <a href="http://" target="_blank">白城市</a>| <a href="http://" target="_blank">璧山县</a>| <a href="http://" target="_blank">金秀</a>| <a href="http://" target="_blank">信阳市</a>| <a href="http://" target="_blank">台东市</a>| <a href="http://" target="_blank">明星</a>| <a href="http://" target="_blank">深圳市</a>| <a href="http://" target="_blank">临漳县</a>| <a href="http://" target="_blank">瑞安市</a>| <a href="http://" target="_blank">廉江市</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>