List Info

Thread: Re: DB Connection prob (next step)




Re: DB Connection prob (next step)
country flaguser name
United Kingdom
2007-03-21 09:09:02
Hi John,

>Please, do not edit the server.xml. You have to place
all that stuff in
>the context.xml inside the META-INF folder of your
project.

I'm using Tomcat 5.0 and I can't see any META-INF folder,
only a WEB-INF
folder, where should META-INF be?

I take it all I need to do is copy what I put in to
server.xml to a
myapp.xml file under /conf/Catalina/localhost/ ?


Thanks for letting me know about this.

Graeme 

>From: John Cherouvim <jcEWORX.GR>
>Reply-To: A mailing list about Java Server Pages
specification and
>reference <JSP-INTERESTJAVA.SUN.COM>
>To: JSP-INTERESTJAVA.SUN.COM
>Subject: Re: DB Connection prob (next step)
>Date: Wed, 21 Mar 2007 09:40:25 +0200
>MIME-Version: 1.0
>Received: from swjscmail2.java.sun.com ([192.18.99.108])
by
>bay0-mc11-f3.bay0.hotmail.com with Microsoft
SMTPSVC(6.0.3790.2668); Wed,
>21 Mar 2007 00:50:49 -0700
>Received: from swjscmail1 (swjscmail1.Sun.COM
[192.18.99.107])by
>swjscmail2.java.sun.com (Postfix) with ESMTPid
66A3421F9D; Wed, 21 Mar 2007
>01:47:24 -0600 (MDT)
>Received: from JAVA.SUN.COM by JAVA.SUN.COM
(LISTSERV-TCP/IP release 1.8e)
>with          spool id 14194858 for JSP-INTERESTJAVA.SUN.COM; Wed, 21 Mar
>2007          01:44:38 -0600
>Received: from deliver.hol.gr (unknown [62.38.3.162])
by
>swjscmail1.java.sun.com (Postfix) with ESMTP id
766635030 for
><JSP-INTERESTJAVA.SUN.COM>; Wed, 21 Mar 2007
01:34:33 -0600 (MDT)
>Received: from auth-smtp.hol.gr
(takeit01.mail.dc.hol.net [192.168.20.71])
>by          deliver.hol.gr (8.12.11/8.11.6) with ESMTP
id l2L7eOXj028163
>(using          TLSv1/SSLv3 with cipher
DHE-RSA-AES256-SHA (256 bits)
>verified OK)          for <JSP-INTERESTJAVA.SUN.COM>; Wed, 21 Mar 2007
>09:40:24 +0200
>Received: from [192.168.0.35] (static216015.dsl.hol.gr
[62.38.216.16]) by
>        auth-smtp.hol.gr (8.13.1/8.12.11) with ESMTP id
l2L7eQg8013149 for
>         <JSP-INTERESTJAVA.SUN.COM>; Wed, 21
Mar 2007 09:40:26 +0200
>X-Message-Info:
>txF49lGdW42p6AeET3jeIzQl1RfOcDqrZwaY4xWXPyUcjtUlMF6K099s
cHMKW7x1
>X-Original-To: JSP-INTERESTJAVA.SUN.COM
>Delivered-To: JSP-INTERESTJAVA.SUN.COM
>User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
>References: <BAY138-F25E72B0BFA8D4AF9C7CB26D7750phx.gbl>
>X-Virus-Scanned: ClamAV 0.90/2889/Wed Mar 21 07:20:03
2007 on
>   takeit01.mail.dc.hol.net
>X-Virus-Status: Clean
>Precedence: list
>Return-Path: owner-jsp-interestJAVA.SUN.COM
>X-OriginalArrivalTime: 21 Mar 2007 07:50:50.0228 (UTC)
>FILETIME=[A4C4F340:01C76B8D]
>
>Please, do not edit the server.xml. You have to place
all that stuff in
>the context.xml inside the META-INF folder of your
project. When the
>application is deployed this will be copied under
>conf/Catalina/localhost/myapp.xml, or under
>conf/Catalina/myapp.org/ROOT.xml. Note that these
locations are tomcat
>specific, but all containers would do something
similar.
>
>The only reason I can think of that would justify
connection pooling
>descriptors on the server.xml would be if you wanted two
or more
>applications (contexes) to be able to share the same
connection pool.
>
>john
>
>Graeme McLaren wrote:
>>Hi all, I'm trying to get connection pooling
working, I've altered the
>>server.xml and web.xml files, written a class and it
compiled with a few
>>errors.  What am I doing wrong here?
>>
>>Cheers,
>>
>>Graeme 
>>
>>in server.xml:
>>
>>        <Context path="/dbcp"
docBase="dbcp" debug="5"
>>  reloadable="true"
crossContext="true">
>>
>>  <Resource name="jdbc/TestDB"
auth="Container"
>>     type="javax.sql.DataSource"
removeAbandoned="true"
>>     removeAbandonedTimeout="30"
maxActive="100"
>>     maxIdle="30"
maxWait="10000" username="myUsername"
>>     password="myPassword"
>>    
driverClassName="oracle.jdbc.driver.OracleDriver"
>>     url="WorkingDBUrl"/>
>>    </Context>
>>
>>
>>      <!--  Configuring the request and response
endpoints -->
>>      <Connector port="80"
maxHttpHeaderSize="8192"
maxProcessors="150"
>>         maxThreads="150"
minSpareThreads="25"
maxSpareThreads="75"
>>         enableLookups="false"
redirectPort="8443" acceptCount="150"
>>   connectionTimeout="20000"
disableUploadTimeout="true" />
>>
>>
>
>========================================================
===================
>To unsubscribe: mailto listservjava.sun.com with body:
"signoff
>JSP-INTEREST".
>For digest: mailto listservjava.sun.com with body:
"set JSP-INTEREST
>DIGEST".
>
>Some relevant archives, FAQs and Forums on JSPs can be
found at:
>
>http://java.sun.com/
products/jsp
>http:/
/archives.java.sun.com/jsp-interest.html
>http://forums.java.sun.com

>http://www.jspinsider.com

============================================================
===============
To unsubscribe: mailto listservjava.sun.com with body:
"signoff JSP-INTEREST".
For digest: mailto listservjava.sun.com with body:
"set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found
at:

 http://java.sun.com/
products/jsp
 http:/
/archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com

 http://www.jspinsider.com

Re: DB Connection prob (next step)
country flaguser name
Greece
2007-03-21 09:44:14
Hello

META-INF is usually created from the IDE in your project
folder under
/web. It is not mandatory, but when it happens to be there
it will be
included in the .war file when you build your project. When
you deploy
war packaged webapps, the deployer will copy the context.xml
file from
META-INF to the location I mentioned previously.

Note that an already deployed webapp does not require
META-INF folder.
So you could do it manually.
good luck

john


Graeme McLaren wrote:
> Hi John,
>
>> Please, do not edit the server.xml. You have to
place all that stuff in
>> the context.xml inside the META-INF folder of your
project.
>
> I'm using Tomcat 5.0 and I can't see any META-INF
folder, only a WEB-INF
> folder, where should META-INF be?
>
> I take it all I need to do is copy what I put in to
server.xml to a
> myapp.xml file under /conf/Catalina/localhost/ ?
>
>
> Thanks for letting me know about this.
>
> Graeme 

============================================================
===============
To unsubscribe: mailto listservjava.sun.com with body:
"signoff JSP-INTEREST".
For digest: mailto listservjava.sun.com with body:
"set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found
at:

 http://java.sun.com/
products/jsp
 http:/
/archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com

 http://www.jspinsider.com

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )