RE: apache virtual hosting + server.xml + context

2005-10-12 Thread Caldarale, Charles R
> From: sudip shrestha [mailto:[EMAIL PROTECTED] 
> Subject: Re: apache virtual hosting + server.xml + context
> 
> We are having the similar problem,
> but if we place context in server.xml, ( I also have a 
> META-INF/context.xml
> ) and as we are using dbcp connection pool, and it seems that tomcat
> initializes those pool twice

Which is exactly as it's defined to work.  You should only have one
instance for each unique  element, otherwise you will get
multiple deployments and corresponding initializations.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: apache virtual hosting + server.xml + context

2005-10-12 Thread sudip shrestha
We are having the similar problem,
but if we place context in server.xml, ( I also have a META-INF/context.xml
) and as we are using dbcp connection pool, and it seems that tomcat
initializes those pool twice

On 10/7/05, gianni dalmasso <[EMAIL PROTECTED]> wrote:
>
> hi list, i have a problem. i have apache 2.0 + tomcat 5.5.
> i have N name based virtual hosts on the same machine managed by apache;
> some of them need to use tomcat (have jsp pages and servlets...)
> if i set a server.xml of tomcat with several hosts, and every host has ist
> context --> it's ok ( but tomcat documentation says "Please note that for
> tomcat 5, unlike tomcat 4.x, it is NOT recommended to place 
> elements directly in the server.xml file")
> if i try to move the context informations in a .xml file in a
> $CATALINA_HOME/conf/[enginename]/[hostname]/ directory, tomcat cannot serve
> anything (it acts as he cannot find files in docBase);
> - which is the right configuration ?
> - is it necessary to define different host in server.xml ?(--> so, when i
> add a new host i need to restart apache and tomcat...)
> thanks in advance
>
> here is the configuration that works..
>
> HTTPD.CONF
> 
> Include /var/jakarta-tomcat-5.5.9/conf/mod_jk.conf
>
> MOD_JK.CONF
> .
>
> NameVirtualHost xx.yy.zz.kk:80
>
> 
>
> DocumentRoot /var/www/html
>
> ServerName web.ccc.com <http://web.ccc.com>
>
> 
>
>
>
> 
>
> 
>
> DirectoryIndex index.htm index.html index.jsp
>
> 
>
> ServerName www.aaa.com <http://www.aaa.com>
>
> DocumentRoot /var/www/html/aaa
>
> JkMount /*.jsp ajp13
>
> JkMount /servlet/* ajp13
>
> 
>
>
>
> 
>
> 
>
> DirectoryIndex index.htm index.html
>
> 
>
> ServerName www.bbb.com <http://www.bbb.com>
>
> DocumentRoot /var/jakarta-tomcat-5.5.9/webapps/bbb
>
> JkMount /*.jsp ajp13
>
> JkMount /servlet/* ajp13
>
> 
>
>
>
> SERVER.XML
>
> 
>
> http://www.aaa.com>">
>
> 
> docBase="/var/www/html/aaa"
>
> debug="0"
>
> reloadable="true" >
>
> 
>
> 
>
>
>
> http://www.bbb.com>">
>
> 
> docBase="/var/jakarta-tomcat-5.5.9/webapps/bbb"
>
> debug="0"
>
> reloadable="true" >
>
> 
>
> 
>
>
>
>
> 
>
>
>
> This for example, don't work
>
>
>
> setting :
>
> SERVER.XML
>
>
>
> 
>
> http://www.aaa.com>">
>
> appBase = /var/www/html/aaa (or similar... )
>
> 
>
>
>
> http://www.bbb.com>">
>
> 
>
>
> the file : $CATALINA_HOME/conf/Catalina/www.aaa.com/aaa.xml
>
> 
> docBase="/var/www/html/aaa"
>
> debug="0"
>
> reloadable="true" >
>
> 
>
>
>
>
>
>
>
> -
> Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
>


RE: apache virtual hosting + server.xml + context [255643:132138]

2005-10-07 Thread RTE - Meridian Club
Many thanks for your email. This is an automated response acknowledging receipt.

Please be advised that Badge mailing commences beginning of October 2005.

Should your message require a response we will respond shortly.

Regards
Meridian Club


> -Original Message-
> From: "gianni dalmasso" <[EMAIL PROTECTED]>
> Received: 10/7/2005 10:51 AM
> To: 
> Subject: apache virtual hosting + server.xml + context
>
> hi list, i have a problem. i have apache 2.0 + tomcat 5.5.
> i have N name based virtual hosts on the same machine managed by apache; some 
> of them need to use tomcat (have jsp pages and servlets...)
> if i set a server.xml of tomcat with several hosts, and every host has ist 
> context --> it's ok ( but tomcat documentation says "Please note that for 
> tomcat 5, unlike tomcat 4.x, it is NOT recommended to place  
> elements directly in the server.xml file")
> if i try to move the context informations in a .xml file in a 
> $CATALINA_HOME/conf/[enginename]/[hostname]/ directory, tomcat cannot serve 
> anything (it acts as he cannot find files in docBase);
> - which is the right configuration ?
> - is it necessary to define different host in server.xml ?(--> so, when i add 
> a new host i need to restart apache and tomcat...)
> thanks in advance
>  
> here is the configuration that works..
>  
> HTTPD.CONF
> 
> Include /var/jakarta-tomcat-5.5.9/conf/mod_jk.conf
>  
> MOD_JK.CONF
> .
> 
> NameVirtualHost xx.yy.zz.kk:80
> 
> 
> 
> DocumentRoot /var/www/html
> 
> ServerName web.ccc.com
> 
> 
> 
>  
> 
> 
> 
> 
> 
> DirectoryIndex index.htm index.html index.jsp
> 
> 
> 
> ServerName www.aaa.com
> 
> DocumentRoot /var/www/html/aaa
> 
> JkMount /*.jsp ajp13
> 
> JkMount /servlet/* ajp13
> 
> 
> 
>  
> 
> 
> 
> 
> 
> DirectoryIndex index.htm index.html
> 
> 
> 
> ServerName www.bbb.com
> 
> DocumentRoot /var/jakarta-tomcat-5.5.9/webapps/bbb
> 
> JkMount /*.jsp ajp13
> 
> JkMount /servlet/* ajp13
> 
> 
> 
>  
> 
> SERVER.XML
> 
> 
> 
> 
> 
>  
> docBase="/var/www/html/aaa"
> 
> debug="0"
> 
> reloadable="true" >
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
> docBase="/var/jakarta-tomcat-5.5.9/webapps/bbb" 
> 
> debug="0"
> 
> reloadable="true" >
> 
> 
> 
> 
> 
>  
> 
> 
> 
>  
> 
> This for example, don't work
> 
>  
> 
> setting : 
> 
> SERVER.XML
> 
>  
> 
> 
> 
> 
> 
> appBase = /var/www/html/aaa (or similar... )
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
> the file : $CATALINA_HOME/conf/Catalina/www.aaa.com/aaa.xml
> 
>  
> docBase="/var/www/html/aaa"
> 
> debug="0"
> 
> reloadable="true" >
> 
> 
> 
>  
> 
> 
> 
> 
>   
> -
> Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3

--
Meridian Club
Unit 5, Caxton Centre
Porters Wood
St Albans
Herts
UNITED KINGDOM
AL3 6XT

Tel: +44 1727 738855
Fax: +44 1700 578955
email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



apache virtual hosting + server.xml + context

2005-10-07 Thread gianni dalmasso
hi list, i have a problem. i have apache 2.0 + tomcat 5.5.
i have N name based virtual hosts on the same machine managed by apache; some 
of them need to use tomcat (have jsp pages and servlets...)
if i set a server.xml of tomcat with several hosts, and every host has ist 
context --> it's ok ( but tomcat documentation says "Please note that for 
tomcat 5, unlike tomcat 4.x, it is NOT recommended to place  elements 
directly in the server.xml file")
if i try to move the context informations in a .xml file in a 
$CATALINA_HOME/conf/[enginename]/[hostname]/ directory, tomcat cannot serve 
anything (it acts as he cannot find files in docBase);
- which is the right configuration ?
- is it necessary to define different host in server.xml ?(--> so, when i add a 
new host i need to restart apache and tomcat...)
thanks in advance
 
here is the configuration that works..
 
HTTPD.CONF

Include /var/jakarta-tomcat-5.5.9/conf/mod_jk.conf
 
MOD_JK.CONF
.

NameVirtualHost xx.yy.zz.kk:80



DocumentRoot /var/www/html

ServerName web.ccc.com



 





DirectoryIndex index.htm index.html index.jsp



ServerName www.aaa.com

DocumentRoot /var/www/html/aaa

JkMount /*.jsp ajp13

JkMount /servlet/* ajp13



 





DirectoryIndex index.htm index.html



ServerName www.bbb.com

DocumentRoot /var/jakarta-tomcat-5.5.9/webapps/bbb

JkMount /*.jsp ajp13

JkMount /servlet/* ajp13



 

SERVER.XML





















 



 

This for example, don't work

 

setting : 

SERVER.XML

 





appBase = /var/www/html/aaa (or similar... )









 
the file : $CATALINA_HOME/conf/Catalina/www.aaa.com/aaa.xml





 





-
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3

Re: Setting environment variables in server.xml.

2005-10-04 Thread andy gordon
if you are using 5.5x you can look at the mbean with jmxproxy which is part of 
the manager app.

David Kerber <[EMAIL PROTECTED]> wrote:Nope, never heard of that one. I'll see 
if I can figure out how to get 
at that type.


andy gordon wrote:

>David, 
> 
>Just in case you haven't done this yet, have you checked to see if the 
>environment variable shows up as a catalina:type=Environment MBean? if so you 
>should be able to access it. Hope this helps. 
> 
>- andy gordon
>
>David Kerber wrote:
>If I'm reading it correctly, according to the docs, I should be able to 
>set an environment variable in server.xml, like the built-in example:
>
>
>
>
>Unfortunately, I can't get this to work; I can't read in simpleValue, or 
>the ones I really want to do when they are defined in server.xml. But I 
>have no problems when I put them into the application's web.xml; they 
>come in just fine using the InitialContext stuff from the docs. Is 
>there something extra I need to do to make them visible from server.xml?
>
>Thanks,
>Dave
> 
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: Setting environment variables in server.xml.

2005-10-04 Thread David Kerber
Nope, never heard of that one.  I'll see if I can figure out how to get 
at that type.



andy gordon wrote:

David, 

Just in case you haven't done this yet, have you checked to see if the environment variable shows up as a catalina:type=Environment MBean? if so you should be able to access it. Hope this helps. 


- andy gordon

David Kerber <[EMAIL PROTECTED]> wrote:
If I'm reading it correctly, according to the docs, I should be able to 
set an environment variable in server.xml, like the built-in example:





Unfortunately, I can't get this to work; I can't read in simpleValue, or 
the ones I really want to do when they are defined in server.xml. But I 
have no problems when I put them into the application's web.xml; they 
come in just fine using the InitialContext stuff from the docs. Is 
there something extra I need to do to make them visible from server.xml?


Thanks,
Dave
 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setting environment variables in server.xml.

2005-10-04 Thread andy gordon
David, 
 
Just in case you haven't done this yet, have you checked to see if the 
environment variable shows up as a catalina:type=Environment MBean? if so you 
should be able to access it. Hope this helps. 
 
- andy gordon

David Kerber <[EMAIL PROTECTED]> wrote:
If I'm reading it correctly, according to the docs, I should be able to 
set an environment variable in server.xml, like the built-in example:




Unfortunately, I can't get this to work; I can't read in simpleValue, or 
the ones I really want to do when they are defined in server.xml. But I 
have no problems when I put them into the application's web.xml; they 
come in just fine using the InitialContext stuff from the docs. Is 
there something extra I need to do to make them visible from server.xml?

Thanks,
Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Setting environment variables in server.xml.

2005-10-04 Thread David Kerber
If I'm reading it correctly, according to the docs, I should be able to 
set an environment variable in server.xml, like the built-in example:





Unfortunately, I can't get this to work; I can't read in simpleValue, or 
the ones I really want to do when they are defined in server.xml.  But I 
have no problems when I put them into the application's web.xml; they 
come in just fine using the InitialContext stuff from the docs.  Is 
there something extra I need to do to make them visible from server.xml?


Thanks,
Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Where can I find specs for ALL the xml tags that can be used in server.xml.

2005-08-29 Thread Caldarale, Charles R
> From: Alan Chandler [mailto:[EMAIL PROTECTED] 
> Subject: Re: Where can I find specs for ALL the xml tags that 
> can be used in server.xml.
> 
> Unfortunately, it still doesn't specify what the 
> auth="Container" attribute means.

This is pretty clear to me:

"Specify whether the web Application code signs on to the corresponding
resource manager programatically, or whether the Container will sign on
to the resource manager on behalf of the application."

It's a two-state flag indicating whether the application or Tomcat (the
Container) is responsible for establishing a connection to the resource.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where can I find specs for ALL the xml tags that can be used in server.xml.

2005-08-29 Thread Alan Chandler
On Monday 29 Aug 2005 14:55, Caldarale, Charles R wrote:
> > From: Alan Chandler [mailto:[EMAIL PROTECTED]
> > Subject: Re: Where can I find specs for ALL the xml tags that
> > can be used in server.xml.

> Then you certainly should be looking at the 4.1 docs, since 5.5
> configuration is noticeably different.  The pages of interest for 4.1
> include;
>
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.htm

Thank you - I had scanned that document, but missed the reference to the 
resource tag.

Unfortunately, it still doesn't specify what the auth="Container" attribute 
means.



-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Where can I find specs for ALL the xml tags that can be used in server.xml.

2005-08-29 Thread Caldarale, Charles R
> From: Alan Chandler [mailto:[EMAIL PROTECTED] 
> Subject: Re: Where can I find specs for ALL the xml tags that 
> can be used in server.xml.
> 
> I must admin not really searching 5.5 docs, because I am 
> using 4.1, but I can't find the  tag described
> aywhere.

Then you certainly should be looking at the 4.1 docs, since 5.5
configuration is noticeably different.  The pages of interest for 4.1
include;

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.htm
l
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html

The  tag is fully described in the first link above.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where can I find specs for ALL the xml tags that can be used in server.xml.

2005-08-29 Thread Alan Chandler
On Monday 29 Aug 2005 06:03, Anto Paul wrote:
> On 8/29/05, Alan Chandler <[EMAIL PROTECTED]> wrote:
> > Where can I find specs for all the tags in server.xml
>
> I use these pages. it explains the elements used in the server.xml.
> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/index.html

No it doesn't it only describes SOME of them.



I must admin not really searching 5.5 docs, because I am using 4.1, but I 
can't find the  tag described aywhere.  It is important to get it 
right (basically because blindly following someone's recipe has not worked - 
so I need to understand the reasoning behind their recipe and correct it for 
my situation).  In particular what do the attributes mean


I have a similar issue with web.xml although at least there is a dtd for that 
which is reasonably well commented.  Its just that some of the elements (like 
 are not well documented.








-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where can I find specs for ALL the xml tags that can be used in server.xml.

2005-08-28 Thread Anto Paul
On 8/29/05, Alan Chandler <[EMAIL PROTECTED]> wrote:
> Where can I find specs for all the tags in server.xml

I use these pages. it explains the elements used in the server.xml.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/index.html

-- 
rgds
Anto Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where can I find specs for ALL the xml tags that can be used in server.xml.

2005-08-28 Thread Alan Chandler
Where can I find specs for all the tags in server.xml

In particular, trying to find out why I used to be able to access a JNDI 
datasource and now can't.  All I did was move the  tag from the 
local  to the .  Move it back and it 
starts working again.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Placing a LifecycleListener in my server.xml

2005-07-27 Thread Darryl L. Miles

Mark Benussi wrote:


Thanks Darryl

I have followed this guide but don't know how to add the modify the
server.xml I attached to reflect this. Also are you saying I should put the
class that implements the listener in the server/classes?

I am fine with this but wasn't sure if it would all get loaded together as
the class is a Singleton that the rest of my code talks to and need to be
sure it will have access to the same class instance in the JVM.

 


From the example you quoted right at the top there is:

[...SNIP...]




[...SNIP...]

So you just add your:
  


To confirm location grep "jar -tvf tomcat-foobar.jar" from 
$CATALINA_HOME/servers/lib for mbeans/ServerLifecycleListener.class.


As for ensuring the SAME instance of the Singleton is found, maybe you 
must put it into $CATALINA_HOME/common/lib not server/lib!  Please read 
up on the differencies for clarification.


It is my understanding that only the Tomcat Application Server itself 
loads classes from $CATALINA_HOME/servers/* and that all librarys in 
$CATALINA_HOME/common/* are available to both the AS and the WEBAPP 
contexts.  Just make sure you dont override the class by also installing 
it into the WEB-INF/* area.


If this does not work maybe JNDI is the only way, that is bind the 
instance to a JNDI path at the first lifecycle event then all the 
webapps can lookup and use it  (if simplistic class loading does not work).


I have not used this method before as I found other ways to do what I 
needed, I wanted to deploy the listener within my webapp.




-Original Message-
From: Darryl L. Miles [mailto:[EMAIL PROTECTED] 
Sent: 27 July 2005 12:10

To: Tomcat Users List
Subject: Re: Placing a LifecycleListener in my server.xml


Sorry did not read properly..

Have you tried:

for JARs:  $CATALINA_HOME/server/lib or $CATALINA_HOME/common/lib
for .class: $CATALINA_HOME/server/classes or $CATALINA_HOME/common/classes


From: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

*Lifecycle Listeners*

   If you have implemented a Java object that needs to know when this
   *Context* is started or stopped, you can declare it by nesting a
   *Listener* element inside this element. The class name you specify
   must implement the |org.apache.catalina.LifecycleListener|
   interface, and it will be notified about the occurrence of the
   coresponding lifecycle events. Configuration of such a listener
   looks like this:


 ...
 
 ...


   Note that a Listener can have any number of additional properties
   that may be configured from this element. Attribute names are
   matched to corresponding JavaBean property names using the standard
   property method naming patterns.

 



--
Darryl L. Miles



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Placing a LifecycleListener in my server.xml

2005-07-27 Thread Mark Benussi
Thanks Darryl

I have followed this guide but don't know how to add the modify the
server.xml I attached to reflect this. Also are you saying I should put the
class that implements the listener in the server/classes?

I am fine with this but wasn't sure if it would all get loaded together as
the class is a Singleton that the rest of my code talks to and need to be
sure it will have access to the same class instance in the JVM.

-Original Message-
From: Darryl L. Miles [mailto:[EMAIL PROTECTED] 
Sent: 27 July 2005 12:10
To: Tomcat Users List
Subject: Re: Placing a LifecycleListener in my server.xml


Sorry did not read properly..

Have you tried:

for JARs:  $CATALINA_HOME/server/lib or $CATALINA_HOME/common/lib
for .class: $CATALINA_HOME/server/classes or $CATALINA_HOME/common/classes


From: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

*Lifecycle Listeners*

If you have implemented a Java object that needs to know when this
*Context* is started or stopped, you can declare it by nesting a
*Listener* element inside this element. The class name you specify
must implement the |org.apache.catalina.LifecycleListener|
interface, and it will be notified about the occurrence of the
coresponding lifecycle events. Configuration of such a listener
looks like this:





  ...
  
  ...






Note that a Listener can have any number of additional properties
that may be configured from this element. Attribute names are
matched to corresponding JavaBean property names using the standard
property method naming patterns.






Mark Benussi wrote:

> Thanks Darryl but I need to implement a LifecycleListener. You have 
> implemented a ServletContextListener which only gets called when the 
> Content is started. I need to know when its finished, which is why I 
> am using a LifecycleListener which should be placed in the server.xml
>
> Original Message Follows
> From: "Darryl L. Miles" <[EMAIL PROTECTED]>
> Reply-To: "Tomcat Users List" 
> To: Tomcat Users List 
> Subject: Re: Placing a LifecycleListener in my server.xml
> Date: Wed, 27 Jul 2005 11:47:17 +0100
>
> Mark Benussi wrote:
>
>> Anyone have any ideas where on earth I put my class that implements the
>> LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a
>> context in my server.xml.
>>
>>
> The context is in WEB-INF/web.xml
>
> as its a webapp specific listener, NOT a global server thing.
>
> See my article http://www.hibernate.org/301.html as an example (when 
> used with hibernate)
>
> -- 
> Darryl L. Miles
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> .
>


-- 
Darryl L. Miles
M: 07968 320 114


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Placing a LifecycleListener in my server.xml

2005-07-27 Thread Darryl L. Miles


Sorry did not read properly..

Have you tried:

for JARs:  $CATALINA_HOME/server/lib or $CATALINA_HOME/common/lib
for .class: $CATALINA_HOME/server/classes or $CATALINA_HOME/common/classes


From: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

*Lifecycle Listeners*

   If you have implemented a Java object that needs to know when this
   *Context* is started or stopped, you can declare it by nesting a
   *Listener* element inside this element. The class name you specify
   must implement the |org.apache.catalina.LifecycleListener|
   interface, and it will be notified about the occurrence of the
   coresponding lifecycle events. Configuration of such a listener
   looks like this:





 ...
 
 ...

   





   Note that a Listener can have any number of additional properties
   that may be configured from this element. Attribute names are
   matched to corresponding JavaBean property names using the standard
   property method naming patterns.






Mark Benussi wrote:

Thanks Darryl but I need to implement a LifecycleListener. You have 
implemented a ServletContextListener which only gets called when the 
Content is started. I need to know when its finished, which is why I 
am using a LifecycleListener which should be placed in the server.xml


Original Message Follows
From: "Darryl L. Miles" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" 
To: Tomcat Users List 
Subject: Re: Placing a LifecycleListener in my server.xml
Date: Wed, 27 Jul 2005 11:47:17 +0100

Mark Benussi wrote:


Anyone have any ideas where on earth I put my class that implements the
LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a
context in my server.xml.



The context is in WEB-INF/web.xml

as its a webapp specific listener, NOT a global server thing.

See my article http://www.hibernate.org/301.html as an example (when 
used with hibernate)


--
Darryl L. Miles



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.




--
Darryl L. Miles



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Placing a LifecycleListener in my server.xml

2005-07-27 Thread Darryl L. Miles


Sorry did not read properly..

Have you tried:

for JARs:  $CATALINA_HOME/server/lib or $CATALINA_HOME/common/lib
for .class: $CATALINA_HOME/server/classes or $CATALINA_HOME/common/classes


From: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

*Lifecycle Listeners*

   If you have implemented a Java object that needs to know when this
   *Context* is started or stopped, you can declare it by nesting a
   *Listener* element inside this element. The class name you specify
   must implement the |org.apache.catalina.LifecycleListener|
   interface, and it will be notified about the occurrence of the
   coresponding lifecycle events. Configuration of such a listener
   looks like this:





 ...
 
 ...

   





   Note that a Listener can have any number of additional properties
   that may be configured from this element. Attribute names are
   matched to corresponding JavaBean property names using the standard
   property method naming patterns.






Mark Benussi wrote:

Thanks Darryl but I need to implement a LifecycleListener. You have 
implemented a ServletContextListener which only gets called when the 
Content is started. I need to know when its finished, which is why I 
am using a LifecycleListener which should be placed in the server.xml


Original Message Follows
From: "Darryl L. Miles" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" 
To: Tomcat Users List 
Subject: Re: Placing a LifecycleListener in my server.xml
Date: Wed, 27 Jul 2005 11:47:17 +0100

Mark Benussi wrote:


Anyone have any ideas where on earth I put my class that implements the
LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a
context in my server.xml.



The context is in WEB-INF/web.xml

as its a webapp specific listener, NOT a global server thing.

See my article http://www.hibernate.org/301.html as an example (when 
used with hibernate)


--
Darryl L. Miles



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

.




--
Darryl L. Miles
M: 07968 320 114


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Placing a LifecycleListener in my server.xml

2005-07-27 Thread Mark Benussi
Thanks Darryl but I need to implement a LifecycleListener. You have 
implemented a ServletContextListener which only gets called when the Content 
is started. I need to know when its finished, which is why I am using a 
LifecycleListener which should be placed in the server.xml


Original Message Follows
From: "Darryl L. Miles" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" 
To: Tomcat Users List 
Subject: Re: Placing a LifecycleListener in my server.xml
Date: Wed, 27 Jul 2005 11:47:17 +0100

Mark Benussi wrote:


Anyone have any ideas where on earth I put my class that implements the
LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a
context in my server.xml.



The context is in WEB-INF/web.xml

as its a webapp specific listener, NOT a global server thing.

See my article http://www.hibernate.org/301.html as an example (when used 
with hibernate)


--
Darryl L. Miles



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Placing a LifecycleListener in my server.xml

2005-07-27 Thread Darryl L. Miles

Mark Benussi wrote:


Anyone have any ideas where on earth I put my class that implements the
LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a
context in my server.xml.
 


The context is in WEB-INF/web.xml

as its a webapp specific listener, NOT a global server thing.

See my article http://www.hibernate.org/301.html as an example (when 
used with hibernate)


--
Darryl L. Miles



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Placing a LifecycleListener in my server.xml

2005-07-27 Thread Mark Benussi
Anyone have any ideas where on earth I put my class that implements the
LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a
context in my server.xml.










factory

org.apache.catalina.users.MemoryUserDatabaseFactory


pathname
conf/tomcat-users.xml



















-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



getServletContext() returns "/" for default context defined outside of server.xml

2005-07-22 Thread Martin Bromley

Hi, I'm trying to setup the default Context for a Host, without defining it in 
server.xml.

In conf/Catalina/localhost I've created a file named .xml, and defined the Context within 
it, without defining the path - I understand from the Tomcat docs that it should be 
inferred as "".

This is all working fine, apart from one issue:  a call to HttpServletRequest.getServletContext() returns "/" 
rather than "" - the servlet API says "" is correct .  If the default context is defined in 
server.xml, getServletContext() returns "" as it should.

I'm guessing that this might be a bug, but I'm reluctant to say so because I suspect I might be 
doing something wrong - the Tomcat docs do say "it is not recommended to place 
 elements directly in the server.xml file", but then creating a .xml file 
seems a little odd to me...  Is that really the right way to do it?

I've tested this on Tomcat 5.5.4 and 5.5.7.

Cheers
Martin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Automated Server Configuration (was api for server.xml maintenance)

2005-07-21 Thread Rob Hills
Hi All,

I received no reply to my earlier email in this thread so I thought I'd try and 
come up with a less verbose description of my problem.

I'm looking to automate the management of hosts on my server.

Our tomcat servers operate multiple applications, each of which has its own 
host entry and root context.  We do this because each application has its 
own domain name and the domain name and root context is an important 
feature for our clients.

I've read the documentation on the Tomcat Manger and the Tomcat 
Deployer in great detail, but as far as I can tell, both only support the 
management of contexts under a previously established host.

I'm also aware of the ability to "auto-deploy" applications by depositing their 
WAR files into the %CATALINA_HOME%/webapps directory.  However, 
these are then associated with a context under the default host, which is not 
what I want to achieve.

I'd thought maybe there I could write a request filter that redirects requests 
for a specified url (domain name + url) to a context in the default host, but 
I'm not even sure that would do what I need, let alone how it would 
perform/scale.

Any thoughts, suggestions, comments welcome.

Rob Hills
www.netpaver.com.au
Western Australia

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



auto redeploy with context in server.xml

2005-07-18 Thread Alex Burgel
hi,

in tomcat 5.5.9, is it possible to have a webapp, whose context is defined in
server.xml, to be redeployed using the auto-deploy system?

i have my ROOT webapp defined in server.xml:





when i replace the .war file, i expect that tomcat should reload it, but nothing
happens. i read a post that suggests this isn't possible because the context is
staticly defined therefore it is not using the auto-deploy system.

http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg152247.html

if this is not possible, then how can i have a ROOT webapp that is auto
redeployable? in tomcat 5.5.9, you can't specify a context with an empty path
outside of server.xml, so this seems a bit like a catch-22.

thanks.
--alex


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



api for server.xml maintenance

2005-07-11 Thread Rob Hills
Hi All,

We typically use one Tomcat instance to serve multiple applications, each 
with its own domain name.

I have always managed this by creating a host entry for each application, 
primarily so that we can have the application rooted at the default (empty-
path) context.

However, this has meant I've always had to manually create a host entry 
each time I deploy a new application, either by editing server.xml in the old 
days, or via the admin application in TC 5.5.

We're now automating the process of deployment and I've been hunting 
around for some kind of API to enable me to create new host entries.  After 
much time hunting documentation and Google, time pressure led me to 
write some code that stops tomcat and directly modifies server.xml, but the 
whole process is very flakey and I feel this is the wrong way to do things, 
leaving aside the fact that one needs direct access to the file system to do 
it.

I'm tantalised by the "Monitoring and Management" (section 21) part of the 
User Guide, but unfortunately it only tells me how to enable JMX, not how I 
could use that to manage Tomcat.

I've read and re-read the Manager documentation, and the Deployer 
documentation, but I can't see any way of using those processes to deploy 
multiple applications on one server such that each has its own root context.

So, I have two questions:

1.  Is there some sort of API I can use to programmatically 
create/modify host entries in server.xml.  If so, how can I find out how to use 
that.

2.  Alternatively, is there any way to deploy multiple "root context" 
applications using the built in manager?

TIA,

Rob Hills
Perth, Western Australia

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Server.xml query

2005-06-22 Thread sai krishna
Hi again
What is this service name in server.xml
I have seen two ways of writing it.
1)Tomcat Standalone
2)Tomcat-Apache
what is the difference between two? 

--- Randall Svancara <[EMAIL PROTECTED]> wrote:

>  
> This might be something to look at, but I know in
> Fedora Core 3, the
> last SE Linux Policy broke mod_jk.  You had to
> either turn of SELinux or
> modify targeted policy.  If you think you may have
> this problem, look at
> /var/log/messages to see if the security policy is
> logging any errors.
> 
> You can also run:
> 
> audit2allow -d 
> 
> to see if any policy changes needed to be added.   
> 
> 
> Randall
> 
> 
> -Original Message-
> From: Raghupathy,Gurumoorthy
> [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 21, 2005 7:10 AM
> To: 'Tomcat Users List'
> Subject: RE: How to make tomcat work on a remote
> server?
> 
> Hey just got it 
> 
>   Look at : http://www.junlu.com/msg/170819.html 
> 
> -Original Message-
> From: Raghupathy,Gurumoorthy
> [mailto:[EMAIL PROTECTED]
> 
> Sent: 21 June 2005 14:04
> To: 'Tomcat Users List'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: How to make tomcat work on a remote
> server?
> 
> 
> From my experience 
>   Your DocumentRoot should be different to the
> appBase of your
> virtual host ... 
>   Set the document root to something else and try 
> 
>   
> Regards
> Guru
> 
> 
> -Original Message-
> From: Raghupathy,Gurumoorthy
> [mailto:[EMAIL PROTECTED]
> 
> Sent: 21 June 2005 13:45
> To: 'Tomcat Users List'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: How to make tomcat work on a remote
> server?
> 
> 
> Sorry could not get back to you earlier ... 
> 
> I think you are worker2.properties ... 
> 
> Remove 
>   LoadModule jk2_module modules/mod_jk2.so
>   Include /usr/local/tomcat/conf/auto/mod_jk2.conf
> 
> 
> Your workers.
> Should be somehting like this .. ..   
> 
>
http://jakarta.apache.org/tomcat/connectors-doc/howto/workers.html
> 
> I will look into your problem from home ..  Have
> emailed my home address
> ...
> 
> 
> Regards
> Guru 
> 
> -Original Message-
> From: sai krishna [mailto:[EMAIL PROTECTED]
> Sent: 21 June 2005 13:06
> To: Tomcat Users List
> Subject: RE: How to make tomcat work on a remote
> server?
> 
> 
>  Can anyone help me out  here??
>  Im unable to access my jsp page on the net. I get
> internal server error. Im using included both mod_jk
> and mod_jk2 module, /var/logs/httpd/log shows that
> mod_jk2 starts but down below this module I loaded
> mod_jk module so it will support JkMount command in
> httpd.conf file. Can any one suggest m e the best
> method to access jsp pages on tomcat 4.1.17 either
> mod_jk/mod_jk2 connector and 2.0.52 apache on Fedora
> box 2.
> Today I added JkMount line in httpd.conf and rest
> everything is same as my down files 
>  
>   server.xml is as following
>   
> 
>  
>
>
>
className="org.apache.coyote.tomcat4.CoyoteConnector"
>   port="8009" minProcessors="5" maxProcessors="75"
>   enableLookups="true" redirectPort="8443"
>   acceptCount="10" debug="0"
>   connectionTimeout="2"
>   useURIValidationHack="false"
>
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
>defaultHost="www.oursitename.com" debug="0">
>  className="org.apache.catalina.logger.FileLogger"
>   prefix="apache_log." suffix=".txt"
>   timestamp="true"/>
>   
> 
>
className="org.apache.catalina.valves.AccessLogValve"
>   directory="logs"  prefix="localhost_access_log."
>   suffix=".txt"
>   pattern="common" resolveHosts="false"/>
> 
>
appBase="/home/httpd/vhosts/oursitename.com/httpdocs/"
>unpackWARs="true" autoDeploy="true">
>   localhost
>   www
>   Our IP
>   
>
>
>   
>   --
>   httpd.conf file
> LoadModule jk2_module modules/mod_jk2.so
> LoadModule jk_module modules/mod_jk.so
> Include /usr/local/tomcat/conf/auto/mod_jk2.conf
> Include /usr/local/tomcat/conf/auto/mod_jk.conf
> 
>   ServerName   oursite.com:80
>   ServerAlias  www.oursite.com
>   UseCanonicalName On
>   DocumentRoot
>/home/httpd/vhosts/oursite.com/httpdocs
>   CustomLog 
>
/home/httpd/vhosts/oursite.c

Re: Jspinterceptor in server.xml

2005-06-06 Thread Mark Thomas

bouml wrote:

I need some more information about JSPInterceptor in server.xml. Is there a
detailed docu ?


Have you looked at
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html#JspInterceptor 


?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Jspinterceptor in server.xml

2005-06-06 Thread bouml
Hi !
 
I need some more information about JSPInterceptor in server.xml. Is there a
detailed docu ?
 
Is JSPInterceptor for compiling .jsp to .java or for .java to .class ?
 
thanks a lot.
 
Thomas


Jspinterceptor in server.xml

2005-06-06 Thread bouml
Hi !
 
I need some more information about JSPInterceptor in server.xml. Is there a
detailed docu ?
 
Is JSPInterceptor for compiling .jsp to .java or for .java to .class ?
 
thanks a lot.
 
Thomas


Custom server.xml location with tomcat windows service (5.0.28)

2005-05-27 Thread Iannis Hanen
Hi,

 

I have been trying to setup the tomcat windows service to use an
alternate configuration file location, instead of the default server.xml
under conf.

 

The tomcat service pulls all the information from the registry, but I
could not find a good spot there to specify a different server.xml file
location. The "Start" registry key has a "params" String value that is
set to "start". I tried to add a "-config" parameter there with the
appropriate location, but the service failed to start after that. I
assume that tomcat5.exe does not expect other values besides "start" or
"stop". Has anybody tried such thing before? What should I do?

 

Regards,

Iannis



RE: in Tomcat 5.0.28 not working with multiple tomcat services in server.xml

2005-05-27 Thread Iannis Hanen
Hi Doug,

Thanks for your answer. I did specify a different IP / port for the
connectors. 

I finally changed my code to use  in server.xml instead of
. This workaround worked properly, but I have not been able
to do the same thing with . Anyway, this is fine for now.

Thanks,
Iannis

-Original Message-
From: Parsons Technical Services [mailto:[EMAIL PROTECTED]

Sent: Friday, May 20, 2005 4:22 AM
To: Tomcat Users List
Subject: Re:  in Tomcat 5.0.28 not working with multiple
tomcat services in server.xml

You did specify a different IP for each connector? Else the 2nd one will

fail because the port is in use. Unless the ports on all connectors are 
different.

Doug


- Original Message - 
From: "Iannis Hanen" <[EMAIL PROTECTED]>
To: 
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 19, 2005 8:11 PM
Subject:  in Tomcat 5.0.28 not working with multiple tomcat

services in server.xml


Hi,



I am back with some more questions. I have configured Tomcat to operate
with multiple services and engines (I have different services since I
need separate connector for different set of web applications). For some
web applications inside the host, I have specified some environment
entries. In the first service, everything works great. But in the second
service, I cannot access any of them. Is it a problem in Tomcat, or a
misconfiguration? Here is an outline of my server.xml file below.
Basically, "AttrName2" in the "foo2" context cannot be found. If I swap
the order of the services in server.xml, only the first service (on the
top) behaves properly.



Thanks,

Iannis







  

  















   



  



  

 

 









  



  



  









   



  







  



  






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: in Tomcat 5.0.28 not working with multiple tomcat services in server.xml

2005-05-20 Thread Parsons Technical Services
You did specify a different IP for each connector? Else the 2nd one will 
fail because the port is in use. Unless the ports on all connectors are 
different.

Doug
- Original Message - 
From: "Iannis Hanen" <[EMAIL PROTECTED]>
To: 
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 19, 2005 8:11 PM
Subject:  in Tomcat 5.0.28 not working with multiple tomcat 
services in server.xml

Hi,

I am back with some more questions. I have configured Tomcat to operate
with multiple services and engines (I have different services since I
need separate connector for different set of web applications). For some
web applications inside the host, I have specified some environment
entries. In the first service, everything works great. But in the second
service, I cannot access any of them. Is it a problem in Tomcat, or a
misconfiguration? Here is an outline of my server.xml file below.
Basically, "AttrName2" in the "foo2" context cannot be found. If I swap
the order of the services in server.xml, only the first service (on the
top) behaves properly.

Thanks,
Iannis



 
 



   

   

  

 

 



   
   
   
 
   
 

 
   

   

  

 
   
   
   
 
   
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


in Tomcat 5.0.28 not working with multiple tomcat services in server.xml

2005-05-19 Thread Iannis Hanen
Hi,

 

I am back with some more questions. I have configured Tomcat to operate
with multiple services and engines (I have different services since I
need separate connector for different set of web applications). For some
web applications inside the host, I have specified some environment
entries. In the first service, everything works great. But in the second
service, I cannot access any of them. Is it a problem in Tomcat, or a
misconfiguration? Here is an outline of my server.xml file below.
Basically, "AttrName2" in the "foo2" context cannot be found. If I swap
the order of the services in server.xml, only the first service (on the
top) behaves properly.

 

Thanks,

Iannis

 

 



  

  

 



 



 



 

   

 

  

 

  

 

 







 

  



  

 

  



 



 

   

 

  





 

  



  





how to override servlet context defined in server.xml with the context in web.xml

2005-05-17 Thread fengmin zhang
Hi all,
 
Does anybody know how to override a servlet context defined in
server.xml with the one defined in web.xml?  Please help
 
According to Tomcat 5.x document, the context for a servlet, say
myservlet, can be specified in both TOMCAT_HOME/conf/server.xml and in
TOMCAT_HOME/wenapps/myservlet/WEB_INF/web.xml. 
 
The following Context in server.xml
 

 

 
is equivalent to the following in web.xml
 

  somename
  888
  java.lang.String

 
The document says that if override="true",  in web.xml
will override Environment value in server.xml.
 
I tried in my project and it does not work.
 
The code I Use to retrieve the context is something like
 
InitialContext lContext = new InitialContext();
String lValue = (String) lContext.lookup("java:comp/env/somename");
 
The problem is: lValue is always 666 while it should be 888 according to
the spec 
 
Can anybody help?
 
 
Thank you in advance.
 
Fengmin
 


Re: Admin Application messes up HTTPS Connectors in server.xml

2005-05-16 Thread Peter Rossbach
Hey Ankit,
I found the bug and hope you can test my fix at cvs head.
Thanks
Peter
Ankit Shah schrieb:
Hi Peter,
Thanks for your response. I double-checked to make sure that secure="true" 
is present. Also, the admin app does write out that attribute. It is 
indeed the missing sslProtocol attribute that's the root of all problems.

Here are the 2 connector elements from configs:
Configured Manually. Works fine:
   
  maxThreads="15" minSpareThreads="5" maxSpareThreads="10"
  enableLookups="false" disableUploadTimeout="true" 
maxKeepAliveRequests="1"
  acceptCount="10" debug="0" scheme="https" secure="true"
  keystorePass="mypassword"
  keystoreFile="c:\path\to\certificate\file"
  clientAuth="false" sslProtocol="TLS" />

Saved by Admin App: Breaks
 
   maxSpareThreads="10" debug="0" maxThreads="15" 
maxKeepAliveRequests="1" minSpareThreads="5
   clientAuth="false" acceptCount="10" /> 

To fix the above so that it works:
 
   maxSpareThreads="10" debug="0" maxThreads="15" 
maxKeepAliveRequests="1" minSpareThreads="5
   clientAuth="false" acceptCount="10" sslProtocol="TLS" /> 

Note that secure="true" is printed out by the admin app
I have been investigating the source code to track the file that is doing 
the job of saving the connector configuration to disk. It should be one of 
the files belonging to the storeconfig.jar classes. As a stop-gap 
arrangement i might tweak the code to force printing that attribute and 
over-ride all checks for just that attribute. (Messy ... but it will work 
until a more thorough investigation is done. Everyone knows how deadlines 
go ... ;) )

Thanks again,
Ankit




[EMAIL PROTECTED] 
05/15/2005 06:55 PM
Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>

To
tomcat-user@jakarta.apache.org
cc
Subject
tomcat-user Digest 15 May 2005 22:55:08 - Issue 5626
  Message from Peter Rossbach <[EMAIL PROTECTED]> on Sun, 15 May 2005 
20:16:01 +0200 -
To:
Tomcat Users List 
Subject:
Re: Admin Application messes up HTTPS Connectors in server.xml

Hey Ankit,
can it be that you forget the secure="true" attribute at your https 
connector?

I have look inside Http11Protocol code and find this:
  public void setProtocol( String k ) {
   setSecure(true);
   setAttribute("protocol", k);
   }
The sslProtocol="TLS" is the default and the StoreConfig
handler delete all defaults before saving.
This is really a bad side effect, but with correct secure attribute 
setting it works for me!

This https config is also documented at:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html
When problem still exists, please send your working and breaking 
Connector element config from server.xml

Thanks
Peter
Ankit Shah schrieb:
 

Hi,
The Tomcat admin utility doesn't save the HTTPS connectors properly. It 
misses out the 'sslProtocol' attribute and this results in the failed 
connector. Does anyone have a fix around this?

The following is the current state of our server:
Tomcat 5.5.9 with 1.4.2 compatibility add-on.
JRE version 1.4.2_05
My Tests and results:
About certificates:
  We are using our own keytool generated unsigned certificates. 
Everytime i point firefox to the admin app, it will present the 
certificate for my approval. I temporarily accept the certificate for my 
session.

1. Install tomcat, configure an HTTPS connector
  Run the admin app and change a parameter (acceptCount in my case: 
   

 

raised it from 8 to 10) and click Save and then Commit Changes
  Restart tomcat. Restart Firefox. Pointing the browser to the 
   

admin 
 

app homepage will not load anything.
  No Certificate presented!!
2. Manually did a diff on server.xml and server.xml. . The 
difference is the missing 'sslProtocol' attribute. The docs say this 
attribute is optional, but that doesn't seem like the case. Added the 
attribute manually
  sslProtocol="TLS"

  Restart Tomcat. Restart Firefox. Certificate presented. Admin App 
   

 

Homepage Loaded.
3. By seeing the server.xml written out by Admin app, it is clear that 
only attributes with non-default values are written out.
  From the admin app, set SSL Protocol field's value to SSL. Save. 
Commit Changes

  Restart Tomcat. Restart Firefox. NO Certificate Presented. Admin 
App homepage NOT loaded.

  In server.xml - sslProtocol attribute is NOT written out.
I also inspected the logs (Generated by Log4J and logging level set to 
debug)

Upon save:
  bean is updated with sslProtocol's n

Re: Admin Application messes up HTTPS Connectors in server.xml

2005-05-16 Thread Ankit Shah
Hi Peter,
Thanks for your response. I double-checked to make sure that secure="true" 
is present. Also, the admin app does write out that attribute. It is 
indeed the missing sslProtocol attribute that's the root of all problems.

Here are the 2 connector elements from configs:

Configured Manually. Works fine:



Saved by Admin App: Breaks
   

To fix the above so that it works:
   

Note that secure="true" is printed out by the admin app

I have been investigating the source code to track the file that is doing 
the job of saving the connector configuration to disk. It should be one of 
the files belonging to the storeconfig.jar classes. As a stop-gap 
arrangement i might tweak the code to force printing that attribute and 
over-ride all checks for just that attribute. (Messy ... but it will work 
until a more thorough investigation is done. Everyone knows how deadlines 
go ... ;) )

Thanks again,
Ankit









[EMAIL PROTECTED] 
05/15/2005 06:55 PM
Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>


To
tomcat-user@jakarta.apache.org
cc

Subject
tomcat-user Digest 15 May 2005 22:55:08 - Issue 5626

  Message from Peter Rossbach <[EMAIL PROTECTED]> on Sun, 15 May 2005 
20:16:01 +0200 -
To:
Tomcat Users List 
Subject:
Re: Admin Application messes up HTTPS Connectors in server.xml

Hey Ankit,

can it be that you forget the secure="true" attribute at your https 
connector?

I have look inside Http11Protocol code and find this:

   public void setProtocol( String k ) {
setSecure(true);
setAttribute("protocol", k);
}

The sslProtocol="TLS" is the default and the StoreConfig
handler delete all defaults before saving.
This is really a bad side effect, but with correct secure attribute 
setting it works for me!

This https config is also documented at:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html

When problem still exists, please send your working and breaking 
Connector element config from server.xml

Thanks
Peter
 
Ankit Shah schrieb:

>Hi,
>The Tomcat admin utility doesn't save the HTTPS connectors properly. It 
>misses out the 'sslProtocol' attribute and this results in the failed 
>connector. Does anyone have a fix around this?
>
>The following is the current state of our server:
>Tomcat 5.5.9 with 1.4.2 compatibility add-on.
>JRE version 1.4.2_05
>
>My Tests and results:
>About certificates:
>We are using our own keytool generated unsigned certificates. 
>Everytime i point firefox to the admin app, it will present the 
>certificate for my approval. I temporarily accept the certificate for my 
>session.
>
>1. Install tomcat, configure an HTTPS connector
>Run the admin app and change a parameter (acceptCount in my case: 

>raised it from 8 to 10) and click Save and then Commit Changes
>
>Restart tomcat. Restart Firefox. Pointing the browser to the 
admin 
>app homepage will not load anything.
>No Certificate presented!!
>
>2. Manually did a diff on server.xml and server.xml. . The 
>difference is the missing 'sslProtocol' attribute. The docs say this 
>attribute is optional, but that doesn't seem like the case. Added the 
>attribute manually
>sslProtocol="TLS"
>
>Restart Tomcat. Restart Firefox. Certificate presented. Admin App 

>Homepage Loaded.
>
>3. By seeing the server.xml written out by Admin app, it is clear that 
>only attributes with non-default values are written out.
>From the admin app, set SSL Protocol field's value to SSL. Save. 
>Commit Changes
>
>Restart Tomcat. Restart Firefox. NO Certificate Presented. Admin 
>App homepage NOT loaded.
>
>In server.xml - sslProtocol attribute is NOT written out.
>
>I also inspected the logs (Generated by Log4J and logging level set to 
>debug)
>
>Upon save:
>bean is updated with sslProtocol's new value
>Upon Commit:
>the list of attributes for the connector doesn't have sslProtocol 

>as one of the attributes that will be written out
>
>Can you help me how i can make admin application available for Tomcat 
>administration by the assigned administrators? What fixes will be needed. 

>If there are any known get-arounds for this.
>
>Thanks in advance for all your help and appreciate your patience in 
>reading through my email.
>
>Ankit
>PS: I can mail you the log files if you want (I have about 11 of them, 
>each is 10M). Thanks once again
>
>
> 



Re: Admin Application messes up HTTPS Connectors in server.xml

2005-05-16 Thread Ankit Shah
Hi Peter,
Thanks for your response. I double-checked to make sure that secure="true" 
is present. Also, the admin app does write out that attribute. It is 
indeed the missing sslProtocol attribute that's the root of all problems.

Here are the 2 connector elements from configs:

Configured Manually. Works fine:



Saved by Admin App: Breaks
   

To fix the above so that it works:
   

Note that secure="true" is printed out by the admin app

I have been investigating the source code to track the file that is doing 
the job of saving the connector configuration to disk. It should be one of 
the files belonging to the storeconfig.jar classes. As a stop-gap 
arrangement i might tweak the code to force printing that attribute and 
over-ride all checks for just that attribute. (Messy ... but it will work 
until a more thorough investigation is done. Everyone knows how deadlines 
go ... ;) )

Thanks again,
Ankit









[EMAIL PROTECTED] 
05/15/2005 06:55 PM
Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>


To
tomcat-user@jakarta.apache.org
cc

Subject
tomcat-user Digest 15 May 2005 22:55:08 - Issue 5626

  Message from Peter Rossbach <[EMAIL PROTECTED]> on Sun, 15 May 2005 
20:16:01 +0200 -
To:
Tomcat Users List 
Subject:
Re: Admin Application messes up HTTPS Connectors in server.xml

Hey Ankit,

can it be that you forget the secure="true" attribute at your https 
connector?

I have look inside Http11Protocol code and find this:

   public void setProtocol( String k ) {
setSecure(true);
setAttribute("protocol", k);
}

The sslProtocol="TLS" is the default and the StoreConfig
handler delete all defaults before saving.
This is really a bad side effect, but with correct secure attribute 
setting it works for me!

This https config is also documented at:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html

When problem still exists, please send your working and breaking 
Connector element config from server.xml

Thanks
Peter
 
Ankit Shah schrieb:

>Hi,
>The Tomcat admin utility doesn't save the HTTPS connectors properly. It 
>misses out the 'sslProtocol' attribute and this results in the failed 
>connector. Does anyone have a fix around this?
>
>The following is the current state of our server:
>Tomcat 5.5.9 with 1.4.2 compatibility add-on.
>JRE version 1.4.2_05
>
>My Tests and results:
>About certificates:
>We are using our own keytool generated unsigned certificates. 
>Everytime i point firefox to the admin app, it will present the 
>certificate for my approval. I temporarily accept the certificate for my 
>session.
>
>1. Install tomcat, configure an HTTPS connector
>Run the admin app and change a parameter (acceptCount in my case: 

>raised it from 8 to 10) and click Save and then Commit Changes
>
>Restart tomcat. Restart Firefox. Pointing the browser to the 
admin 
>app homepage will not load anything.
>No Certificate presented!!
>
>2. Manually did a diff on server.xml and server.xml. . The 
>difference is the missing 'sslProtocol' attribute. The docs say this 
>attribute is optional, but that doesn't seem like the case. Added the 
>attribute manually
>sslProtocol="TLS"
>
>Restart Tomcat. Restart Firefox. Certificate presented. Admin App 

>Homepage Loaded.
>
>3. By seeing the server.xml written out by Admin app, it is clear that 
>only attributes with non-default values are written out.
>From the admin app, set SSL Protocol field's value to SSL. Save. 
>Commit Changes
>
>Restart Tomcat. Restart Firefox. NO Certificate Presented. Admin 
>App homepage NOT loaded.
>
>In server.xml - sslProtocol attribute is NOT written out.
>
>I also inspected the logs (Generated by Log4J and logging level set to 
>debug)
>
>Upon save:
>bean is updated with sslProtocol's new value
>Upon Commit:
>the list of attributes for the connector doesn't have sslProtocol 

>as one of the attributes that will be written out
>
>Can you help me how i can make admin application available for Tomcat 
>administration by the assigned administrators? What fixes will be needed. 

>If there are any known get-arounds for this.
>
>Thanks in advance for all your help and appreciate your patience in 
>reading through my email.
>
>Ankit
>PS: I can mail you the log files if you want (I have about 11 of them, 
>each is 10M). Thanks once again
>
>
> 



Re: Admin Application messes up HTTPS Connectors in server.xml

2005-05-15 Thread Peter Rossbach
Hey Ankit,
can it be that you forget the secure="true" attribute at your https 
connector?

I have look inside Http11Protocol code and find this:
  public void setProtocol( String k ) {
   setSecure(true);
   setAttribute("protocol", k);
   }
The sslProtocol="TLS" is the default and the StoreConfig
handler delete all defaults before saving.
This is really a bad side effect, but with correct secure attribute 
setting it works for me!

This https config is also documented at:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html
When problem still exists, please send your working and breaking 
Connector element config from server.xml

Thanks
Peter
Ankit Shah schrieb:
Hi,
The Tomcat admin utility doesn't save the HTTPS connectors properly. It 
misses out the 'sslProtocol' attribute and this results in the failed 
connector. Does anyone have a fix around this?

The following is the current state of our server:
Tomcat 5.5.9 with 1.4.2 compatibility add-on.
JRE version 1.4.2_05
My Tests and results:
About certificates:
   We are using our own keytool generated unsigned certificates. 
Everytime i point firefox to the admin app, it will present the 
certificate for my approval. I temporarily accept the certificate for my 
session.

1. Install tomcat, configure an HTTPS connector
   Run the admin app and change a parameter (acceptCount in my case: 
raised it from 8 to 10) and click Save and then Commit Changes

   Restart tomcat. Restart Firefox. Pointing the browser to the admin 
app homepage will not load anything.
   No Certificate presented!!

2. Manually did a diff on server.xml and server.xml. . The 
difference is the missing 'sslProtocol' attribute. The docs say this 
attribute is optional, but that doesn't seem like the case. Added the 
attribute manually
   sslProtocol="TLS"

   Restart Tomcat. Restart Firefox. Certificate presented. Admin App 
Homepage Loaded.

3. By seeing the server.xml written out by Admin app, it is clear that 
only attributes with non-default values are written out.
   From the admin app, set SSL Protocol field's value to SSL. Save. 
Commit Changes

   Restart Tomcat. Restart Firefox. NO Certificate Presented. Admin 
App homepage NOT loaded.

   In server.xml - sslProtocol attribute is NOT written out.
I also inspected the logs (Generated by Log4J and logging level set to 
debug)

Upon save:
   bean is updated with sslProtocol's new value
Upon Commit:
   the list of attributes for the connector doesn't have sslProtocol 
as one of the attributes that will be written out

Can you help me how i can make admin application available for Tomcat 
administration by the assigned administrators? What fixes will be needed. 
If there are any known get-arounds for this.

Thanks in advance for all your help and appreciate your patience in 
reading through my email.

Ankit
PS: I can mail you the log files if you want (I have about 11 of them, 
each is 10M). Thanks once again

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Admin Application messes up HTTPS Connectors in server.xml

2005-05-12 Thread Ankit Shah
Hi,
The Tomcat admin utility doesn't save the HTTPS connectors properly. It 
misses out the 'sslProtocol' attribute and this results in the failed 
connector. Does anyone have a fix around this?

The following is the current state of our server:
Tomcat 5.5.9 with 1.4.2 compatibility add-on.
JRE version 1.4.2_05

My Tests and results:
About certificates:
We are using our own keytool generated unsigned certificates. 
Everytime i point firefox to the admin app, it will present the 
certificate for my approval. I temporarily accept the certificate for my 
session.

1. Install tomcat, configure an HTTPS connector
Run the admin app and change a parameter (acceptCount in my case: 
raised it from 8 to 10) and click Save and then Commit Changes

Restart tomcat. Restart Firefox. Pointing the browser to the admin 
app homepage will not load anything.
No Certificate presented!!

2. Manually did a diff on server.xml and server.xml. . The 
difference is the missing 'sslProtocol' attribute. The docs say this 
attribute is optional, but that doesn't seem like the case. Added the 
attribute manually
sslProtocol="TLS"

Restart Tomcat. Restart Firefox. Certificate presented. Admin App 
Homepage Loaded.

3. By seeing the server.xml written out by Admin app, it is clear that 
only attributes with non-default values are written out.
From the admin app, set SSL Protocol field's value to SSL. Save. 
Commit Changes

Restart Tomcat. Restart Firefox. NO Certificate Presented. Admin 
App homepage NOT loaded.

In server.xml - sslProtocol attribute is NOT written out.

I also inspected the logs (Generated by Log4J and logging level set to 
debug)

Upon save:
bean is updated with sslProtocol's new value
Upon Commit:
the list of attributes for the connector doesn't have sslProtocol 
as one of the attributes that will be written out

Can you help me how i can make admin application available for Tomcat 
administration by the assigned administrators? What fixes will be needed. 
If there are any known get-arounds for this.

Thanks in advance for all your help and appreciate your patience in 
reading through my email.

Ankit
PS: I can mail you the log files if you want (I have about 11 of them, 
each is 10M). Thanks once again



Re: can't load server.xml

2005-05-11 Thread =?iso-8859-1?Q?Andr=E9s_Glez.?=
I found. I forgot the
 chown -R tomcat.tomcat /usr/local/tomcat/
- Original Message - 
From: "Andrés Glez." <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Wednesday, May 11, 2005 5:29 PM
Subject: jsvc: can't load server.xml


I've installed tomcat5.0.28 on a Fedora Core 3, with java 1.4.2.
When i try to execute tomcat with jsvc i get the following:
./jsvc -user tomcat -home 
/usr/local/java -Dcatalina.home=/usr/local/tomcat -cp 
/usr/local/java/lib/tools.jar:/usr/local/tomcat/bin/commons-daemon.jar:/usr/local/tomcat/bin/bootstrap.jar 
 -debug org.apache.catalina.startup.Bootstrap

...
...
...
jsvc.exec debug: Class org/apache/commons/daemon/support/DaemonLoader 
found
jsvc.exec debug: Native methods registered
jsvc.exec debug: Checking daemon
jsvc.exec debug: Daemon checked successfully
Can't load server.xml
jsvc.exec debug: Daemon loaded successfully
Can't load server.xml
11-may-2005 19:26:08 org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
jsvc.exec debug: Daemon started successfully
jsvc.exec debug: Waiting for a signal to be delivered

I have CATALINA_HOME and JAVA_HOME defined also, but it does not work
Any help?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


jsvc: can't load server.xml

2005-05-11 Thread =?iso-8859-1?Q?Andr=E9s_Glez.?=
I've installed tomcat5.0.28 on a Fedora Core 3, with java 1.4.2.
When i try to execute tomcat with jsvc i get the following:
./jsvc -user tomcat -home 
/usr/local/java -Dcatalina.home=/usr/local/tomcat -cp 
/usr/local/java/lib/tools.jar:/usr/local/tomcat/bin/commons-daemon.jar:/usr/local/tomcat/bin/bootstrap.jar 
-debug org.apache.catalina.startup.Bootstrap

...
...
...
jsvc.exec debug: Class org/apache/commons/daemon/support/DaemonLoader found
jsvc.exec debug: Native methods registered
jsvc.exec debug: Checking daemon
jsvc.exec debug: Daemon checked successfully
Can't load server.xml
jsvc.exec debug: Daemon loaded successfully
Can't load server.xml
11-may-2005 19:26:08 org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
jsvc.exec debug: Daemon started successfully
jsvc.exec debug: Waiting for a signal to be delivered
I have CATALINA_HOME and JAVA_HOME defined also, but it does not work
Any help? 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: change to server.xml requires restart 5.5.4

2005-04-11 Thread Parsons Technical Services
I don't think that has changed, but I could be wrong. One thought is that 
unless you have a lot of apps using the DB you could move the resource to 
the context for the app. Then only the app would have to be restarted.

But that begs the question, if you are changing the global db resource what 
are the apps doing? If you are making a change such as this why is 
restarting Tomcat an issue?

Just trying to understand to better help.
Doug
- Original Message - 
From: "quentin.compson" <[EMAIL PROTECTED]>
To: 
Sent: Monday, April 11, 2005 11:08 PM
Subject: change to server.xml requires restart 5.5.4


tomcat 5.5.4 on win2k server, jvm 1.4.x
it seems that every time i make a change to the server.xml (db connection
pools), i have to restart tomcat.  i assume thats normal, but i was hoping 
maybe
not to have to do it. or maybe 5.5.9 supports something like this?

thx
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


change to server.xml requires restart 5.5.4

2005-04-11 Thread quentin . compson
tomcat 5.5.4 on win2k server, jvm 1.4.x

it seems that every time i make a change to the server.xml (db connection
pools), i have to restart tomcat.  i assume thats normal, but i was hoping maybe
not to have to do it. or maybe 5.5.9 supports something like this?  

thx


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Commenting out the WarpConnector part in server.xml

2005-04-08 Thread Anoop kumar V
Well - Tomcat does not complain at all - it starts up fine.

Actually it complained when I tried to do a block comment for the
entire section. It said that --  is not allowed within comments.

Anoop

On Apr 8, 2005 12:29 PM, Jason Bainbridge <[EMAIL PROTECTED]> wrote:
> On Apr 8, 2005 11:21 AM, Anoop kumar V <[EMAIL PROTECTED]> wrote:
> > When i comment out this block in server.xml
> >
> > 
> >   
> 
> Probably due to the nested comment tags, which is a no no, try just
> temporarily cutting that whole block out instead or remove the nested
> comments.
> 
> Regards,
> --
> Jason Bainbridge
> http://kde.org - [EMAIL PROTECTED]
> Personal Site - http://jasonbainbridge.com
> 


-- 
Thanks and best regards,
Anoop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Commenting out the WarpConnector part in server.xml

2005-04-08 Thread Jason Bainbridge
On Apr 8, 2005 11:21 AM, Anoop kumar V <[EMAIL PROTECTED]> wrote:
> When i comment out this block in server.xml
> 
> 
>   

Probably due to the nested comment tags, which is a no no, try just
temporarily cutting that whole block out instead or remove the nested
comments.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Commenting out the WarpConnector part in server.xml

2005-04-08 Thread Anoop kumar V
When i comment out this block in server.xml


  
   
 
 
   
   
   
   
   
  

why do my applications (under webapp) not come up? I am running tomcat
as a standalone - i do not have Apache installed much less configured
to work with tomcat. Although tomcat startup shows no errors at all
during and after startup, the browser displays some very nasty errors
like:


javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:871)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:534)

root cause

java.lang.ClassCastException
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
at 
org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:183)
at 
org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCache.java:165)
at 
org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:138)
at 
org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:345)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext

Re: transport guarantee in server.xml?

2005-04-05 Thread Robert r. Sanders
I'm not am expert, but I don't know of any way other than creating a 
stub web.xml file - it shouldn't have to be much, but I think you're 
going to need it.  Although an alternative would be to have a  element in the server.xml file that has ONLY the SSL 
, but that seems like even more overkill to me.

Ossie Guy wrote:
In our server.xml (Tomcat 4.1), we have a context that is used to 
serve up static content (PDFs) that are collected in a directory on 
our server:



There is no war or other webapp involved here, just the folder with 
the static files, and thus no web.xml either... (Don't worry, we are 
making much use of the servlet API elsewhere on the same server ;)

Now, we want to serve these files up through SSL - we have the SSL 
Connector configured correctly, everything's just great, BUT a savvy 
user can still get the files through non-SSL by changing the URL. So - 
is there any way to *enforce* that this context is accessed only 
through SSL?

I have seen documentation suggesting something like the following:

But this goes in web.xml, and again, we have none here - do we need to 
make one just to enforce this constraint? Or is there some way to 
enforce this from within the server.xml file itself, perhaps within 
the above  section?

Any help would be appreciated.
Cheers,
Ossie
_
Express yourself instantly with MSN Messenger! Download today - it's 
FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
   Robert r. Sanders
   Chief Technologist
   iPOV
   (334) 821-5412
   www.ipov.net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


transport guarantee in server.xml?

2005-04-04 Thread Ossie Guy
In our server.xml (Tomcat 4.1), we have a context that is used to serve up 
static content (PDFs) that are collected in a directory on our server:



There is no war or other webapp involved here, just the folder with the 
static files, and thus no web.xml either... (Don't worry, we are making much 
use of the servlet API elsewhere on the same server ;)

Now, we want to serve these files up through SSL - we have the SSL Connector 
configured correctly, everything's just great, BUT a savvy user can still 
get the files through non-SSL by changing the URL. So - is there any way to 
*enforce* that this context is accessed only through SSL?

I have seen documentation suggesting something like the following:

But this goes in web.xml, and again, we have none here - do we need to make 
one just to enforce this constraint? Or is there some way to enforce this 
from within the server.xml file itself, perhaps within the above  
section?

Any help would be appreciated.
Cheers,
Ossie
_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Admin application creates duplicate "secure" attribute in server.xml

2005-03-29 Thread Peter Rossbach
Hello Jeffrey,
I have no time to made a storeconfig backport to the Tomcat 5.0 tree. 
Sorry, the 5.0.x is in some places very
unfriendly. When you want a local workaround look inside 
StandardServer#storeConnector.
The probleme is the storeAttributes method calls for real Connector and 
also for ProtocolHandler
L_1107
---
   writer.print("
   storeAttributes(writer, connector);
  
   if (connector instanceof CoyoteConnector) {
   ProtocolHandler protocolHandler =
   ((CoyoteConnector)connector).getProtocolHandler();
   storeAttributes(writer, protocolHandler);
   }
  
   writer.println(">");

-
What you need is a frontup merge, defaulthandling and renaming of some 
attributes (protocol at ProtocolHandler means sslProtocol at Connector 
Element) ?Arggh, ... very bad, but the 5.5.x Connector is complete 
rewritten and has a nice storeconfig module to handle some bad cases :-)
Implement a better Connector attribute saving algo, send me the code for 
testing

Why you want to wait, Tomat 5.5.9 is really stabler as 5.0.28.
Peter
Jeffrey Barnett schrieb:
Peter,
Many thanks for finding and fixing the bug, however we are currently 
running 5.0.28, and not likely to upgrade until summer.  Can you 
describe enough about the problem that I could track it down and 
create a local fix / work around until then?

Peter Rossbach wrote:
Yes the wrong saving SSL Connector is a bug and I fix it for Tomcat 
5.5.x.

The old StandardServer saving code was strange. The new StoreConfig 
module has
a flexible customizable API to store server.xml and context.xml.

You can activate the new saving module with

  



This listener register a new MBean with more options to save the 
tomcat configurations.

Give 5.5.9 a try ... :-)
Peter
Jeffrey Barnett schrieb:
Mike, unfortunately I'm only gotten better at restoring server.xml 
after it has been corrupted.  You are the first person from the 
tomcat-user list to even confirm that the problem exits on other 
sites.. One consultant I consulted said that they had never heard of 
the problem, but that we were also the first site he had worked with 
that actually used the admin function actively,  By the way, just 
for the record, not only the secure attribute, but also the protocol 
attribute is duplicated, right?  And only on the SSL connector.

Mike Dippold wrote:
I just wanted to check to see if you have figured anything out with 
the tomcat admin ssl duplicate problem.  I have tried it on 5.0.28 
and also 5.5.7 and every time I change a datasource or anything 
else, it corrupts the xml.

Thanks,
Mike Dippold  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Admin application creates duplicate "secure" attribute in server.xml

2005-03-29 Thread Jeffrey Barnett
Peter,
Many thanks for finding and fixing the bug, however we are currently 
running 5.0.28, and not likely to upgrade until summer.  Can you 
describe enough about the problem that I could track it down and create 
a local fix / work around until then?

Peter Rossbach wrote:
Yes the wrong saving SSL Connector is a bug and I fix it for Tomcat 
5.5.x.

The old StandardServer saving code was strange. The new StoreConfig 
module has
a flexible customizable API to store server.xml and context.xml.

You can activate the new saving module with

  



This listener register a new MBean with more options to save the 
tomcat configurations.

Give 5.5.9 a try ... :-)
Peter
Jeffrey Barnett schrieb:
Mike, unfortunately I'm only gotten better at restoring server.xml 
after it has been corrupted.  You are the first person from the 
tomcat-user list to even confirm that the problem exits on other 
sites.. One consultant I consulted said that they had never heard of 
the problem, but that we were also the first site he had worked with 
that actually used the admin function actively,  By the way, just for 
the record, not only the secure attribute, but also the protocol 
attribute is duplicated, right?  And only on the SSL connector.

Mike Dippold wrote:
I just wanted to check to see if you have figured anything out with 
the tomcat admin ssl duplicate problem.  I have tried it on 5.0.28 
and also 5.5.7 and every time I change a datasource or anything 
else, it corrupts the xml.

Thanks,
Mike Dippold  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Admin application creates duplicate "secure" attribute in server.xml

2005-03-28 Thread Peter Rossbach
Yes the wrong saving SSL Connector is a bug and I fix it for Tomcat 5.5.x.
The old StandardServer saving code was strange. The new StoreConfig 
module has
a flexible customizable API to store server.xml and context.xml.

You can activate the new saving module with

 



This listener register a new MBean with more options to save the tomcat 
configurations.

Give 5.5.9 a try ... :-)
Peter
Jeffrey Barnett schrieb:
Mike, unfortunately I'm only gotten better at restoring server.xml 
after it has been corrupted.  You are the first person from the 
tomcat-user list to even confirm that the problem exits on other 
sites.. One consultant I consulted said that they had never heard of 
the problem, but that we were also the first site he had worked with 
that actually used the admin function actively,  By the way, just for 
the record, not only the secure attribute, but also the protocol 
attribute is duplicated, right?  And only on the SSL connector.

Mike Dippold wrote:
I just wanted to check to see if you have figured anything out with 
the tomcat admin ssl duplicate problem.  I have tried it on 5.0.28 
and also 5.5.7 and every time I change a datasource or anything else, 
it corrupts the xml.

Thanks,
Mike Dippold   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AutoReply: Re: Admin application creates duplicate "secure" attribute in server.xml

2005-03-28 Thread j2ee

Hello tomcat-user@jakarta.apache.org,
 
This refers to your mail with subject as "Re: Admin application creates 
duplicate "secure" attribute in server.xml".
Thank you for sending your CV and registering with A.S. Consultancy Services.
 
Our team will review your CV and match it against current requirements. If your 
profile matches with any ongoing opening, we will contact you by telephone / 
email.
 
We recommend that you update your profile and send us an updated CV whenever 
your contact details or your career path changes, so that your record is 
up-to-date with us.
 
Please be assured that your CV will remain confidential with us and we will 
submit your profile to our clients only after due consultation with you.
 
In case you require any further information please do contact us.
with warm regards,
 
Staffing Team
A.S. Consultancy Services 
#1205, 2nd Main, 2nd Cross, Vijayanagar, Bangalore - 560040, India
Tele - 91 80 2310 9012, Telefax - 91 80 2330 5364, Email - [EMAIL PROTECTED] 
URL: www.asconsultancy.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Admin application creates duplicate "secure" attribute in server.xml

2005-03-28 Thread Jeffrey Barnett
Mike, unfortunately I'm only gotten better at restoring server.xml after 
it has been corrupted.  You are the first person from the tomcat-user 
list to even confirm that the problem exits on other sites.. One 
consultant I consulted said that they had never heard of the problem, 
but that we were also the first site he had worked with that actually 
used the admin function actively,  By the way, just for the record, not 
only the secure attribute, but also the protocol attribute is 
duplicated, right?  And only on the SSL connector.

Mike Dippold wrote:
I just wanted to check to see if you have figured anything out with the tomcat 
admin ssl duplicate problem.  I have tried it on 5.0.28 and also 5.5.7 and 
every time I change a datasource or anything else, it corrupts the xml.
Thanks,
Mike Dippold 
   
  
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: new to tomcat 5.0.28-how i can add context in the server.xml

2005-03-15 Thread David Causse
Ashutosh Sharma wrote:
Hi David,
Thanks for the reply.
But if i see the manager.xml under this location it's contents are like this:

 
 

So for my webApp viz. reports if i put this kind of contents:

   debug="0" privileged="true">

and then i restart the tomcat i see the directory listing.
Shud i giv refrence of build dir or src directory. Actually my
build.xml compiles everythign from my src to corresponding build Dir.
 

You have to give a docBase that points to your webapps, in your 
example you must have this directory :

C:\talkBack src\talkback\java\build\reports\WEB-INF
and I hope a web.xml inside.
and for java classes (your build dest must be something like this)
C:\talkBack src\talkback\java\build\reports\WEB-INF\classes\
Your JSPs can be everywhere inside (depends on you web.xml):
C:\talkBack src\talkback\java\build\reports\
Don't forget to specify welcome-file in your web.xml.
You removed the RessourceLink to user databases so why do you continue to
use privileged="true" ? I don't know if it's correct...
You can add log info to your context that might help you later:
 
Good luck,
David.
PS. I don't know if the '\' is OK for file separator inside this file: 
you'd better use '/'
like this: "c:/webapps/reports".

[...]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: new to tomcat 5.0.28-how i can add context in the server.xml

2005-03-15 Thread Ashutosh Sharma
Hi David,
Thanks for the reply.
But if i see the manager.xml under this location it's contents are like this:



  
  



So for my webApp viz. reports if i put this kind of contents:



and then i restart the tomcat i see the directory listing.
Shud i giv refrence of build dir or src directory. Actually my
build.xml compiles everythign from my src to corresponding build Dir.


On Tue, 15 Mar 2005 14:34:22 +0100, David Causse <[EMAIL PROTECTED]> wrote:
> Ashutosh Sharma wrote:
> 
> >Hi,
> >I m new to tomcat 5.0.28. Previously i worked with tomcat 4.1.x-where
> >i will create a context with a docBase and this way i will work with
> >my webApp.
> >Now the world has changed a lot-everyone just deploying a WAR file
> >under webapps.
> >But i still want to work in the old manner-i want my
> >C:\Dir\\java\src\a\b\c\
> >to be compiled using ant which goes under 
> >C:\Dir\ >so that as and when i make any changes in any jsp file, struts-action,
> >formbean it gets direclty reflected rather than creating an out of box
> >WAR file again and again and putting it all under the webApps dir of
> >tomcat.
> >Can someone help me out?
> >Even ur help to deploy using manager will do?but i want manual editing
> >server.xml and then adding the context for my webApp.
> >Please help me.
> >
> >
> Edit the file $CATALINA_HOME/conf/Catalina/localhost/your_webapp.xml.
> 
> Regards.
> 
> David.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
With best regards:
Ashutosh Sharma

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: new to tomcat 5.0.28-how i can add context in the server.xml

2005-03-15 Thread David Causse
Ashutosh Sharma wrote:
Hi,
I m new to tomcat 5.0.28. Previously i worked with tomcat 4.1.x-where
i will create a context with a docBase and this way i will work with
my webApp.
Now the world has changed a lot-everyone just deploying a WAR file
under webapps.
But i still want to work in the old manner-i want my
C:\Dir\\java\src\a\b\c\
to be compiled using ant which goes under C:\Dir\
so that as and when i make any changes in any jsp file, struts-action,
formbean it gets direclty reflected rather than creating an out of box
WAR file again and again and putting it all under the webApps dir of
tomcat.
Can someone help me out?
Even ur help to deploy using manager will do?but i want manual editing
server.xml and then adding the context for my webApp.
Please help me.
 

Edit the file $CATALINA_HOME/conf/Catalina/localhost/your_webapp.xml.
Regards.
David.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


new to tomcat 5.0.28-how i can add context in the server.xml

2005-03-15 Thread Ashutosh Sharma
Hi,
I m new to tomcat 5.0.28. Previously i worked with tomcat 4.1.x-where
i will create a context with a docBase and this way i will work with
my webApp.
Now the world has changed a lot-everyone just deploying a WAR file
under webapps.
But i still want to work in the old manner-i want my
C:\Dir\\java\src\a\b\c\
to be compiled using ant which goes under C:\Dir\

Re: host tag in server.xml

2005-03-11 Thread Drew Jorgenson
Hey Michael,

The way I do it is first of all set the wildcard in the DNS config for
the domain and point it to a certain IP address, e.g.  * IN A 1.2.3.4

then I set up the virtual host in server.xml to contain the IP address
as an alias

  

mydomain.com
1.2.3.4  
   
   
   
 
 
  


Now, everytime that the IP 1.2.3.4 is invoked through the browser it
points to the mydomain.com container, so all subdomains that resolve
through the wildcard to this IP address will also point to that
container.

Of course the drawback to that is that you need a dedicated IP address
to your domain.


Drew.



On Fri, 2005-03-11 at 13:45, Michael Sharkey wrote:
> Hi - I am running tomcat 5.5 as a standalone web
> server. I want to know how to use wildcards in the
> host tag (or alias tag) so that when someone types
> xxx.mydomain.com, the xxx can be anything at all and
> they go to the same place. In apache, I know you could
> say something like: 
> 
> *.mydomain.com 
> 
> This doesn't seem to work in tomcat. Any help would be
> great! Thanks. 
> 
> 
> -mjs
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



host tag in server.xml

2005-03-11 Thread Michael Sharkey
Hi - I am running tomcat 5.5 as a standalone web
server. I want to know how to use wildcards in the
host tag (or alias tag) so that when someone types
xxx.mydomain.com, the xxx can be anything at all and
they go to the same place. In apache, I know you could
say something like: 

*.mydomain.com 

This doesn't seem to work in tomcat. Any help would be
great! Thanks. 


-mjs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5.7. server.xml doc may be buggy...is it bugzilla time?

2005-03-10 Thread Erkkila, Matthew
Here is my config to get a JNDI datasource.  It works for me but I am
not sure if all of it is actually required.

***context.xml***


 

***web.xml snippet from inside ***

   Connection Pool
   jdbc/ssdb
   javax.sql.DataSource
   Container


***server.xml snippetr from inside ***



Matt

-Original Message-
From: David Tonhofer, m-plify S.A. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 6:21 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.5.7. server.xml doc may be buggy...is it bugzilla
time?

Hello,

Question regarding Tomcat 5.5.7 and the JNDI Datasource:

It seems like either the web documentation for Tomcat 5.5 or the
implementation is incorrect regarding the use of JNDI Datasources.

In this page:

<http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-example
s-howto.html>

the "Resource" element configuring the DataSource is put inside the
"Context" element.

However, I have tried to set up a DataSourceRealm that is configured
using said "Resource"

00>Exception performing authentication
01>  javax.naming.NameNotFoundException: Name jdbc is not bound in 
01> this Context
02>  at
org.apache.naming.NamingContext.lookup(NamingContext.java:769)
03>  at
org.apache.naming.NamingContext.lookup(NamingContext.java:152)
04>  at
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:406)
05>  at
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.j
ava:277)
06>  at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicA
uthenticator.java:181)
07>  at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:446)
08>  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
09>  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
10>  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
11>  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
12>  at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306)
13>  at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
14>  at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745)
15>  at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
675)
16>  at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:868)
17>  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
java:684)
18>  at java.lang.Thread.run(Thread.java:595)

Out of luck? Bugs related to other Tomcat versions helped out:

<http://issues.apache.org/bugzilla/show_bug.cgi?id=24723>
<http://issues.apache.org/bugzilla/show_bug.cgi?id=24836>

I put the "Resource" element inside the "GlobalNamingResources" element,
described here:
<http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/globalresources.
html>
..and it worked!

Maybe the documentation should tell people to set up the "Resources" in
the "GlobalNamingResources"? Probably not though -- there might be some
other reason why it didn't work. I tried "useNaming=true" for the
"Context" according to
<http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html>
but no go :-((

Additionally:

The 'factory' attribute of the 'Resource' element is mentioned
nowhere... o_O which is **BAD** because w/o the factory value the Realm
Authentication seems to reduce to 'Access All Areas' - you don't get no
error in the catalina log either.


factory="org.apache.commons.dbcp.BasicDataSourceFactory"
  driverClassName="com.mysql.jdbc.Driver"
  validationQuery="SELECT 1"
  loginTimeout="10"
  username="waateenbordel"
  password="tudjeu!!"
  testOnBorrow="true"
 
url="jdbc:mysql://127.0.0.1/lousy?autoReconnect=true&connectTimeout=
5000&socketTimeout=3&useUsageAdvisor=true"
/>

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.7. server.xml doc may be buggy...is it bugzilla time?

2005-03-10 Thread David Tonhofer, m-plify S.A.
Ah, cool, so you did not read the docs for the datasource realm, then ...
WRONG!
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html#DataSourceRealm
-> localDataSource
Easy when you know it, then. Tested ok. One problem down.
Additionally:
The 'factory' attribute of the 'Resource' element is mentioned nowhere... o_O
which is **BAD** because w/o the factory value the Realm Authentication seems to
reduce to 'Access All Areas' - you don't get no error in the catalina log 
either.
You indeed should not be specifying the factory, and it works fine.
Damn...you are right, too. Well, I tested this twice and I was sure that 
there was
a problem. Ah, well.
A look at the source reveals the default factory is indeed
"org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" but you can specify it
through the system property "javax.sql.DataSource.Factory" or through the
"factory" attribute. Which is nice.
Please stop whining.
Should I take this as an offense? I don't whine. I either discuss bugs or 
use
harsh language.
But thanks anyway.
-- David Tonhofer
  M-PLIFY S.A.
  Resp. Informatique
  47, av. de la Liberté
  L-1931 Luxembourg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 5.5.7. server.xml doc may be buggy...is it bugzilla time?

2005-03-10 Thread Remy Maucherat
On Thu, 10 Mar 2005 12:21:29 +0100, David Tonhofer, m-plify S.A.
<[EMAIL PROTECTED]> wrote:
> 00>Exception performing authentication
> 01>  javax.naming.NameNotFoundException: Name jdbc is not bound in this 
> Context
> 02>  at org.apache.naming.NamingContext.lookup(NamingContext.java:769)

Ah, cool, so you did not read the docs for the datasource realm, then ...
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html#DataSourceRealm
-> localDataSource

> Out of luck? Bugs related to other Tomcat versions helped out:
> 
> 
> 
> 
> I put the "Resource" element inside the "GlobalNamingResources" element, 
> described here:
> 
> ...and it worked!

Makes sense.

> Additionally:
> 
> The 'factory' attribute of the 'Resource' element is mentioned nowhere... o_O
> which is **BAD** because w/o the factory value the Realm Authentication seems 
> to
> reduce to 'Access All Areas' - you don't get no error in the catalina log 
> either.

You indeed should not be specifying the factory, and it works fine.
Please stop whining.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5.7. server.xml doc may be buggy...is it bugzilla time?

2005-03-10 Thread David Tonhofer, m-plify S.A.
Hello,
Question regarding Tomcat 5.5.7 and the JNDI Datasource:
It seems like either the web documentation for Tomcat 5.5 or the
implementation is incorrect regarding the use of JNDI Datasources.
In this page:

the "Resource" element configuring the DataSource is put inside the "Context" 
element.
However, I have tried to set up a DataSourceRealm that is configured
using said "Resource"
00>Exception performing authentication
01>  javax.naming.NameNotFoundException: Name jdbc is not bound in this 
Context
02>  at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
03>  at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
04>  at 
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:406)
05>  at 
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:277)
06>  at 
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
07>  at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
08>  at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
09>  at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
10>  at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
11>  at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
12>  at 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306)
13>  at 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
14>  at 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745)
15>  at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
16>  at 
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:868)
17>  at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
18>  at java.lang.Thread.run(Thread.java:595)
Out of luck? Bugs related to other Tomcat versions helped out:


I put the "Resource" element inside the "GlobalNamingResources" element, 
described here:

...and it worked!
Maybe the documentation should tell people to set up the "Resources" in the
"GlobalNamingResources"? Probably not though -- there might be some other 
reason why
it didn't work. I tried "useNaming=true" for the "Context" according to
 but
no go :-((
Additionally:
The 'factory' attribute of the 'Resource' element is mentioned nowhere... o_O
which is **BAD** because w/o the factory value the Realm Authentication seems to
reduce to 'Access All Areas' - you don't get no error in the catalina log 
either.
   factory="org.apache.commons.dbcp.BasicDataSourceFactory"
 driverClassName="com.mysql.jdbc.Driver"
 validationQuery="SELECT 1"
 loginTimeout="10"
 username="waateenbordel"
 password="tudjeu!!"
 testOnBorrow="true"
 
url="jdbc:mysql://127.0.0.1/lousy?autoReconnect=true&connectTimeout=5000&socketTimeout=3&useUsageAdvisor=true"
   />

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


configure server.xml to use Realm

2005-02-24 Thread SRiopel
Hi, 

I try to set up a single sign on using a form for a web application. I use 
Apache Tomcat 5.0.28 Server. When I put this line in my server.xml config 
file and restart the server. I get no error message and everything seems 
to be started OK but when I try to access the server from a web browser, 
it doesn't answer my request. The admin consol is not responding, my 
applications neither... event the welcome page at the root. Remove the 
line and it works fine. But I need it for my single sign on. I try to 
connect to an iSeries server from a Windows 2000 server. They are in the 
same domain.

 

Does anyone knows what could prevent the server from answering my requests 
because what I get is "loading" with the hour glass followed (later) by 
the page cannot be displayed.

Thank you very much for any help you can provide.

Simon Riopel
Nashen + Nashen Consultants Inc.
Phone: 514.345.8826 ext 121
Fax: 514.342.4820
http://www.nashen.com

Server.xml parameters unavailable after reload

2005-02-17 Thread Tony Tomcat
I am unable to read init parameters in my server.xml file when my
webapp is reloaded.   This issue was documented in the following bug

http://issues.apache.org/bugzilla/show_bug.cgi?id=19852

It said the bug was fixed but I am using Tomcat 5.0.28 and I have this issue.

Was this bug re-introduced in tomcat 5 or are there new rules about
reading these parameters more than once?

Tony

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



dynamic server.xml

2005-02-16 Thread Oleg
I know question was asked many times and I have read a lot of posts
people asking how to add a virtual host without restarting tomcat and
the answer, not possible.

So I am wondering, is it because its time expencive that tomcat doesnt
check virtual hosts names real time, or atleast refreshes the list
stored in memory. I am sure this is an ignorant question because I
dont know the first thing about Tomcat architecture, just thought you
folks can shed some light on this for me.

Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Server.xml configuration in Tomcat 4.1

2005-02-10 Thread Shilpa Nalgonda
Hi All,
i am using Tomcat4.1, and whenever i create new application i am adding the
context details in server.xml
Is it possible to create a new myapp.xml file and put the context info in
that.
I tried to create a myapp.xml and place it under webapps directory, but the
application is not finding it.
if i place the same context configuration in Server.xml everything works
fine.
Can anyone suggest me how to avoid editing the same server.xmk for each new
application.
can i do this in Tomcat4.1??

below is the context i want to add in server.xml




   


   

blah()




-Original Message-
From: Dennis Payne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 28, 2004 11:13 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


If you are running Linux or Unix check the syntax for the 'nice'
command.

>>> [EMAIL PROTECTED] 12-27-2004 18:55 >>>
Frank W. Zammetti wrote:

> It's interesting, Craig and I had an exchange about threads in
servlet
> containers last week... I can't find a link to the thread
unfortunately.
>
> Anyway, the basic idea behind that "don't spawn your own threads
> inside a servlet container" admonishment is based more on the fact
> that it's quite easy to screw up doing so, more than it has to do
with
> virtually anything else.
>
> You want the servlet container to manager resources for you, and you

> lose that by spawning your own threads.  The container isn't aware of

> the threads, so it can't control them for things like graceful
> shutdowns or simply trying to control resource utilization.  Many
> people, including me, tend to ignore that warning when the situation

> warrants it, but you have to be extra-careful.
>
> For instance, you don't under any circumstances want to hold on to
> references to response, request or session objects because you don't

> manage them.  You also, unless you really have a need and know what
> your doing, want to spawn threads to handle requests at all.  Any
> threads you do spawn in a container should tend to be independent
> units of execution.  If your use case fits that description, you can

> get away with it relatively safely.
>
> That being said, spawning things like daemon threads for low-level
> behind-the-scenes type processing is generally OK, so long as you are

> careful (i.e., be sure no runaway processing can occur, make sure it

> will shut down gracefully, etc).  You might be able to use something

> like that in this case, you'll have to decide.  If your using Struts,

> you can spawn the thread from a plug-in, as I've done in the past,
but
> there are non-Struts equivalents (worse comes to worse, just do it in

> a servlet.init()).  Do yourself a favor and make the thread
processing
> functional independent of your app essentially, and even make it so
> it's not aware it's running in a servlet container.  But again,
> caution is the key.  If you make it a demon thread and set it's
> priority as low as you can and be sure to not hold on to a reference

> to it, I've found that works just fine under a number of app servers

> on a numeber of OSs.
>
> The bottom-line is that really that psuedo-rule is around because
> people tend to shoot themselves in the foot when using threads a bit

> too often, so better to advise against getting into a situation where

> you might do that.  But, if your confident in your ability, and
> believe the use case really warrants it, you CAN do it, and
relatively
> safely.
>
Frank,
I'm using threads and didn't know I was vulnerable.  Here's how I've
done it.  I created a class that implements runnable and call its
initialize method from a servlet init method at application startup.
 The initialize method creates a thread and sets a low priority for it.

 The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database
(postgres).

1. Is this what you call a daemon thread?
2. Is this better done using cron?  if so how do I ensure that it runs

with a lower priority than my application code?
Phil



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Server.xml help

2005-02-10 Thread Charles P. Killmer
Does anyone see anything wrong with this server.xml?  I am still trying
to pin down my database connectivity issues and would like some
validation that I have Tomcat setup appropriately.
 

  
  
  
  


  
 
  
  

 



  
 
  site1.com
  
  
 

  


 
 
Thanks
 
Charles Killmer
Netgain Technology
[EMAIL PROTECTED]
Office: (320) 251-4700 ext 107
 


Re: [OT] Re: Compression in the server.xml

2005-02-09 Thread Remy Maucherat
On Wed, 09 Feb 2005 06:31:07 -0500, Tim Funk <[EMAIL PROTECTED]> wrote:
> No. They are written in 2 different languages and have 2 different purposes.

Indeed. Integration will improve, though (the Apache/Tomcat connector
will be bundled in Apache and will be compatible with all the other
module combination (such as cache + ssl + gzip).

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: Compression in the server.xml

2005-02-09 Thread Tim Funk
No. They are written in 2 different languages and have 2 different purposes.
-Tim
Graham Reeds wrote:
Tim Funk wrote:
Compression is useless if you use apache in front of tomcat.

Do you think that there will be a merging of Tomcat and Apache in the 
future?

Random speculation appreciated.
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JNDI without edit server.xml

2005-02-09 Thread Harry Mantheakis
> Any idea?

No idea I'm afraid :-/

All I can tell you for sure is that this stuff *does* work, pretty much
out-of-the-box, as described in the Tomcat docs - but everything has to be
spot on.

So don't lose faith, even if that means starting from scratch again - which
might be worth considering, if there's any chance your configuration files
have got messed up.

Good luck!

Harry Mantheakis

> I try it and now the error is changed:
> 
> java.lang.NoSuchMethodError:
> org.apache.naming.resources.ProxyDirContext.lookupCache(Ljava/lang/String;)Lor
> g/apache/nami
> ng/resources/CacheEntry;
>at 
> org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:
> 663)
> 
> Any idea?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Re: Compression in the server.xml

2005-02-08 Thread Graham Reeds
Tim Funk wrote:
Compression is useless if you use apache in front of tomcat.
Do you think that there will be a merging of Tomcat and Apache in the 
future?

Random speculation appreciated.
G.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Compression in the server.xml

2005-02-08 Thread Tim Funk
Compression is useless if you use apache in front of tomcat.
Look into mod_gzip and make sure the option for zipping chunked data in 
mod_gzip is turned on.

-Tim
Randy Paries wrote:
Could some one explain the downsides of setting compression="on" in the
server.xml
I have a web app that averages 2 million hits aday.
The static and images are handled using apache.
I am trying to understand what the compression setting is used for in the
server.xml and what are the ramifications.
I found out about the setting reading "
http://brandlay.com/wojtek/publ/tomcat.jsp " that was on the list earlier
today.
any bandwidth I can save would be great
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Compression in the server.xml

2005-02-08 Thread Randy Paries
Could some one explain the downsides of setting compression="on" in the
server.xml

I have a web app that averages 2 million hits aday.

The static and images are handled using apache.

I am trying to understand what the compression setting is used for in the
server.xml and what are the ramifications.

I found out about the setting reading "
http://brandlay.com/wojtek/publ/tomcat.jsp " that was on the list earlier
today.

any bandwidth I can save would be great

Thanks for the patience

Randy



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JNDI without edit server.xml

2005-02-08 Thread Davide Gurgone
Harry Mantheakis wrote:
I think your  element is missing the 'factory' parameter.
[CUT]
Thank you 4 the response...
I try it and now the error is changed:
java.lang.NoSuchMethodError: 
org.apache.naming.resources.ProxyDirContext.lookupCache(Ljava/lang/String;)Lorg/apache/nami
ng/resources/CacheEntry;
at 
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:663)

Any idea?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JNDI without edit server.xml

2005-02-08 Thread Harry Mantheakis
I think your  element is missing the 'factory' parameter.

Mine looks like this:





factory

org.apache.commons.dbcp.BasicDataSourceFactory




driverClassName

org.postgresql.Driver




url

jdbc:postgresql://localhost:5432/myDatabaseUsername



...




The first parameter ('factory') is missing from the example you posted.

HTH

Harry Mantheakis


> Hi all,
> I've got a problem.
> I'm using tomcat 5.0 with Oracle 9.2i. Now I want to upgrade tomcat to
> the newest version, but the same configuration doesn't work again.
> 
> I used this solution for tomcat 5.0, because I don't whant to write
> anithing on tomcat server.xml file.
> 
> To configure and use it I created ONLY this xml and put it on
> $TOMCAT_HOME/conf/catalina/localhost/strutsProva.xml file.
> 
> docBase="D:\dev\strutsProva" path="/strutsProva" reloadable="true">
>type="javax.sql.DataSource" />
>
>  
> driverClassName
> oracle.jdbc.OracleDriver
>  
>  
> url
> jdbc:oracle:thin:@localhost:1521:sweet
>  
>  
> username
> dasit
>  
>  
> password
> dasilab
>  
>  
> maxActive
> 1
>  
>  
> maxWait
> 5000
>  
>  
> maxIdle
> 2
>  
>
> 
> 
> Anybody knows how to configure a jndi service on tomcat, without write
> anithing on server.xml file? I have to leave it clean 'cause I don't
> know who will install my application.
> 
> Thanks all,
> 
> Davide


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JNDI without edit server.xml

2005-02-07 Thread Davide Gurgone
fstmncn wrote:
It looks like it can't find the db driver.
Try putting it under WeB-INF\lib if you haven't done
it yet.
Moreover be sure to have the references in the web.xml
of your application. These are mine, for example:
[CUT]
I'm sorry for the late, unfortunately today I was away from the office.
Well... I try both of your solution, but the resource doesn't work again..
I put
  classes12.jar
  jndi.jar
  jdbc2_0-stdext.jar
  commons-pool-1.2.jar
  commons-dbcp-1.2.1.jar
in WEB-INF/lib dir (but they are also leave there in 
$TOMCAT_HOME/common/lib dir).
I write the context.xml file and I put it into $PROJECT_HOME/META-INF 
dir, like described in my first thread and finally I add this rows in 
WEB-INF/web.xml:

  
  
  
jdbc/strutsProva
javax.sql.DataSource
Container
  
I don't add anything in server.xml or in another file...
What can I do to deploy it correctly?
,-O
I whanna cry!!!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JNDI without edit server.xml

2005-02-07 Thread fstmncn
It looks like it can't find the db driver.
Try putting it under WeB-INF\lib if you haven't done
it yet.
Moreover be sure to have the references in the web.xml
of your application. These are mine, for example:

  
  
  
jdbc/ddb
javax.sql.DataSource
Container
  
  
  
mail/dmail
javax.mail.Session
Container
  

F.

--- Davide Gurgone <[EMAIL PROTECTED]> wrote:

> fstmncn wrote:
> > you should edit context.xml under META-INF in your
> > web-application.
> > HTH,
> > Fausto.
> 
> Hi Fausto,
> Thank you for the response,
> 
> I try your solution, but I think I wrong something,
> 'cause the problem 
> is the same:
> INFO: HTMLManager: list: Listing contexts for
> virtual host 'localhost'
> org.apache.tomcat.dbcp.dbcp.SQLNestedException:
> Cannot create JDBC 
> driver of class '' for connect URL 'null'
>  at 
>
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
> .
> 
> In order I delete the strutsProva.xml from
>$TOMCAT_HOME/conf/Catalina/localhost
> and I put the same content in a new
> $WEB_APP/META-INF/context.xml file.
> Finally I deployed the application from the tomcat
> manager, adding the 
> Directory URL and the Context Path.
> 
> I think Tomcat doesn't read the file!
> How can I say to Tomcat the file location?
> 
> Have you got any other suggests?
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


=
[--°--]



__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JNDI without edit server.xml

2005-02-07 Thread Davide Gurgone
fstmncn wrote:
you should edit context.xml under META-INF in your
web-application.
HTH,
Fausto.
Hi Fausto,
Thank you for the response,
I try your solution, but I think I wrong something, 'cause the problem 
is the same:
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
.

In order I delete the strutsProva.xml from
  $TOMCAT_HOME/conf/Catalina/localhost
and I put the same content in a new $WEB_APP/META-INF/context.xml file.
Finally I deployed the application from the tomcat manager, adding the 
Directory URL and the Context Path.

I think Tomcat doesn't read the file!
How can I say to Tomcat the file location?
Have you got any other suggests?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JNDI without edit server.xml

2005-02-07 Thread fstmncn
you should edit context.xml under META-INF in your
web-application.
HTH,
Fausto.

--- Davide Gurgone <[EMAIL PROTECTED]> wrote:

> Hi all,
> I've got a problem.
> I'm using tomcat 5.0 with Oracle 9.2i. Now I want to
> upgrade tomcat to 
> the newest version, but the same configuration
> doesn't work again.
> 
> I used this solution for tomcat 5.0, because I don't
> whant to write 
> anithing on tomcat server.xml file.
> 
> To configure and use it I created ONLY this xml and
> put it on 
> $TOMCAT_HOME/conf/catalina/localhost/strutsProva.xml
> file.
> 
>   docBase="D:\dev\strutsProva"
> path="/strutsProva" reloadable="true">
> auth="Container"
>type="javax.sql.DataSource" />
>  
>
>   driverClassName
>   oracle.jdbc.OracleDriver
>
>
>   url
> 
>
jdbc:oracle:thin:@localhost:1521:sweet
>
>
>   username
>   dasit
>
>
>   password
>   dasilab
>
>
>   maxActive
>   1
>
>
>   maxWait
>   5000
>
>
>   maxIdle
>   2
>
>  
> 
> 
> Anybody knows how to configure a jndi service on
> tomcat, without write 
> anithing on server.xml file? I have to leave it
> clean 'cause I don't 
> know who will install my application.
> 
> Thanks all,
> 
> Davide
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


=
[--°--]



__ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JNDI without edit server.xml

2005-02-07 Thread Davide Gurgone
Hi all,
I've got a problem.
I'm using tomcat 5.0 with Oracle 9.2i. Now I want to upgrade tomcat to 
the newest version, but the same configuration doesn't work again.

I used this solution for tomcat 5.0, because I don't whant to write 
anithing on tomcat server.xml file.

To configure and use it I created ONLY this xml and put it on 
$TOMCAT_HOME/conf/catalina/localhost/strutsProva.xml file.


  

  
driverClassName
oracle.jdbc.OracleDriver
  
  
url
jdbc:oracle:thin:@localhost:1521:sweet
  
  
username
dasit
  
  
password
dasilab
  
  
maxActive
1
  
  
maxWait
5000
  
  
maxIdle
2
  


Anybody knows how to configure a jndi service on tomcat, without write 
anithing on server.xml file? I have to leave it clean 'cause I don't 
know who will install my application.

Thanks all,
Davide
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Admin application creates duplicate "secure" attribute in server.xml

2005-02-02 Thread Jeffrey Barnett
More info:
Apparently the manual change didn't fix things after all.  The server 
starts, and some webapps run, but those using ssl get the following 
error message:

Connection refused when attempting to contact :8443
The full service definition follows:

   
   
   
   
   
   
   
 
   
 
 
 
   
 

Jeffrey Barnett wrote:
We have recently upgraded from Tomcat 4 to Tomcat 5.0.27.  Now 
whenever we use the Admin application to alter webapp context 
parameters the new server.xml that gets written out contains an extra 
'secure="true"' attribute at the end of the ssl , which 
causes the server to fail with a SEVERE: Parse Fatal Error on 
restart.  Removing the extra attribute manually allows the server to 
be started, but is operationally unacceptable.

Where is the extra attribute coming from (is there a template 
somewhere)?  How can we stop this from happening?  Why is a new 
server.xml created at all? (Nothing is changed but the addition of the 
incorrect attribute)

Here is the exception:
Jan 29, 2005 7:30:54 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 22 column 221: Attribute "secure" 
was already specified for element "Connector".
org.xml.sax.SAXParseException: Attribute "secure" was already 
specified for element "Connector".

And here is the offending element (second attribute highlighted):
   
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Use of Admin application creates duplicate "secure" attribute in server.xml

2005-01-31 Thread Jeffrey Barnett
We have recently upgraded from Tomcat 4 to Tomcat 5.0.27.  Now whenever 
we use the Admin application to alter webapp context parameters the new 
server.xml that gets written out contains an extra 'secure="true"' 
attribute at the end of the ssl , which causes the server to 
fail with a SEVERE: Parse Fatal Error on restart.  Removing the extra 
attribute manually allows the server to be started, but is operationally 
unacceptable.

Where is the extra attribute coming from (is there a template 
somewhere)?  How can we stop this from happening?  Why is a new 
server.xml created at all? (Nothing is changed but the addition of the 
incorrect attribute)

Here is the exception:
Jan 29, 2005 7:30:54 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 22 column 221: Attribute "secure" was 
already specified for element "Connector".
org.xml.sax.SAXParseException: Attribute "secure" was already specified 
for element "Connector".

And here is the offending element (second attribute highlighted):
   
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Context parameters in server.xml

2005-01-18 Thread Gert-Jan Kreeft
I have a web-application configured in the server.xml of a Tomcat 4.1.30 
server. In the  element I have a nested  that can be 
accessed in my application code with:

ctx.getInitParameter("...")
This works fine, as long as I do not redeploy the web-application. When the 
webapp is redeployed the configured parameter is lost. Reloading the webapp 
with the Tomcat manager does not cause this problem.

Is this normal behaviour or is it a Tomcat bug?
_
MSN Webmessenger overal en altijd beschikbaar http://webmessenger.msn.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Variable in server.xml

2005-01-13 Thread Tim Funk
Make it
gipe.home=D:\\Projets\\GIPENV\\dist
   or
gipe.home=D:/Projets/GIPENV/dist
-Tim
Zakaria kHABOT wrote:
I use Tomcat 5.0.25.
in catalina.properties I put : gipe.home=D:\Projets\GIPENV\dist
in server.xml :

But I doesn't work
- Original Message -
From: "Tim Funk" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Thursday, January 13, 2005 3:16 PM
Subject: Re: Variable in server.xml

You can only do this with tomcat 5.
But the variable would be a system property. (Or a property defined in
catalina.properties)
See the FAQ for how to set system properties on startup.
-Tim
Zakaria kHABOT wrote:

Hi all,
How can I declare a variable in server.xml.
Insitide of having path="C:\folder", I want to put this value in a
variable (var) and path=${var}.
 il: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Variable in server.xml

2005-01-13 Thread Zakaria kHABOT
* * * * * * * * * * * * * * * Vexira NOTICE * * * * * * * * * * * * * * *
This version of Vexira MailArmor is a DEMO version and not full featured.

Vexira has processed a mail addressed to you, which contained no known
potential malicious software.

In case you notice abnormal behavior of your software after opening the
mail or one of its attachments, please forward the complete mail to
CentralCommand <mailto:[EMAIL PROTECTED]> so it can be
checked for unknown new potential malicious software.

-- 
Vexira MailArmor for Linux, OpenBSD, FreeBSD
Virus Protection for the Real World (TM).
Central Command http://www.centralcommand.com

--- Begin Message ---
I use Tomcat 5.0.25.
in catalina.properties I put : gipe.home=D:\Projets\GIPENV\dist

in server.xml :


But I doesn't work

- Original Message -
From: "Tim Funk" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Thursday, January 13, 2005 3:16 PM
Subject: Re: Variable in server.xml


> You can only do this with tomcat 5.
>
> But the variable would be a system property. (Or a property defined in
> catalina.properties)
>
> See the FAQ for how to set system properties on startup.
>
>
> -Tim
>
> Zakaria kHABOT wrote:
>
> >
> > Hi all,
> > How can I declare a variable in server.xml.
> > Insitide of having path="C:\folder", I want to put this value in a
variable (var) and path=${var}.
> > How to do this.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--- End Message ---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Variable in server.xml

2005-01-13 Thread Tim Funk
You can only do this with tomcat 5.
But the variable would be a system property. (Or a property defined in 
catalina.properties)

See the FAQ for how to set system properties on startup.
-Tim
Zakaria kHABOT wrote:
Hi all,
How can I declare a variable in server.xml.
Insitide of having path="C:\folder", I want to put this value in a variable (var) and path=${var}.
How to do this. 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Variable in server.xml

2005-01-13 Thread Zakaria kHABOT
* * * * * * * * * * * * * * * Vexira NOTICE * * * * * * * * * * * * * * *
This version of Vexira MailArmor is a DEMO version and not full featured.

Vexira has processed a mail addressed to you, which contained no known
potential malicious software.

In case you notice abnormal behavior of your software after opening the
mail or one of its attachments, please forward the complete mail to
CentralCommand <mailto:[EMAIL PROTECTED]> so it can be
checked for unknown new potential malicious software.

-- 
Vexira MailArmor for Linux, OpenBSD, FreeBSD
Virus Protection for the Real World (TM).
Central Command http://www.centralcommand.com

--- Begin Message ---



Hi all,
How can I declare a variable in 
server.xml.
Insitide of having path="C:\folder", I want to put 
this value in a variable (var) and path=${var}.
How to do this.
Thanks
--- End Message ---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Can't load server.xml message

2005-01-02 Thread Sean Schofield
Thanks for all the help.  I tried the server-minimal.xml file a second
time and it worked.  I'm not sure what was happening.  I also
installed JavaWebServicesDeveloperPack and some other stuff that might
have been causing an issue.

It was very bizarre because at one point, I had the minimal server.xml
in conf but got the same message.  I agree that the NPE was because it
couldn't open the file for some ereason.  I don't think it was
permissions because I'm using XP.

Anyways, it seems to be working for now.  Thanks for the suggestions!

sean

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't load server.xml message

2005-01-01 Thread Phil Steitz
If you look at the 5.0.28 src distro, you can see that line 519 of 
Catalina.java includes a reference to the server object. Most likely the 
npe is happening because the server initialization is failing.

The first error ("Can't load server.xml") looks like it is generated by 
the load method when it can't open the file.

Phil
sven morales wrote:
  I looked in the wrong source codes.  I should have
looked at Catalina.java.  Here is the link:
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java?rev=1.35&view=log
Anyhow, the await() call is at line 578 but thats
after the server has started.  It is after these lines
562 long t2 = System.currentTimeMillis();
563 log.info("Server startup in " + (t2 -
t1) + " ms");
  some test if useShutdownHook...
578 if (await) {..
Check your log file if it has made it this far.
aka_sergio
--- sven morales <[EMAIL PROTECTED]> wrote:

Hi,
   You seem to have added quite a few lines into
your
catalina.sh.  The stock script ends at line 287 for
me.  Can you tell us what modifications you have
made?
   Funny that I can not find how the server.xml is
loaded by the DigesterFactory.java nor by
Bootstrap.java when I browsed their source code.
aka_sergio
--- Sean Schofield <[EMAIL PROTECTED]> wrote:

I am an experienced Tomcat user who is all of a
sudden having trouble
running Tomcat on my home machine.  I am running
Tomcat 5.0.28 and I
get a Null Pointer when trying to start Tomcat.
I have JAVA_HOME and CATALINA_HOME configured.
The very first line in the output says "Can't load
server.xml"
(actually the second line says the same thing as
well.)  I tried
chaning to the minimal server.xml as well but no
luck.
The stack trace seems to indicate a NullPointer
exception at
Catalina.await line 619.  I have tried looking
this
up on the mailing
lists, but incredibly, nobody seems to have
experienced this problem!
Anyways, any insight that could be provided would
be
greatly
appreciated.  I've never had this problem before
...
TIA,
sean


-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


		
__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced
search.
http://info.mail.yahoo.com/mail_250


-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Can't load server.xml message

2005-01-01 Thread sven morales
  I looked in the wrong source codes.  I should have
looked at Catalina.java.  Here is the link:

http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java?rev=1.35&view=log

Anyhow, the await() call is at line 578 but thats
after the server has started.  It is after these lines
562 long t2 = System.currentTimeMillis();
563 log.info("Server startup in " + (t2 -
t1) + " ms");
  some test if useShutdownHook...
578 if (await) {..
Check your log file if it has made it this far.

aka_sergio

--- sven morales <[EMAIL PROTECTED]> wrote:

> Hi,
> You seem to have added quite a few lines into
> your
> catalina.sh.  The stock script ends at line 287 for
> me.  Can you tell us what modifications you have
> made?
> Funny that I can not find how the server.xml is
> loaded by the DigesterFactory.java nor by
> Bootstrap.java when I browsed their source code.
> 
> aka_sergio
> 
> 
> --- Sean Schofield <[EMAIL PROTECTED]> wrote:
> 
> > I am an experienced Tomcat user who is all of a
> > sudden having trouble
> > running Tomcat on my home machine.  I am running
> > Tomcat 5.0.28 and I
> > get a Null Pointer when trying to start Tomcat.
> > 
> > I have JAVA_HOME and CATALINA_HOME configured.
> > 
> > The very first line in the output says "Can't load
> > server.xml"
> > (actually the second line says the same thing as
> > well.)  I tried
> > chaning to the minimal server.xml as well but no
> > luck.
> > 
> > The stack trace seems to indicate a NullPointer
> > exception at
> > Catalina.await line 619.  I have tried looking
> this
> > up on the mailing
> > lists, but incredibly, nobody seems to have
> > experienced this problem!
> > 
> > Anyways, any insight that could be provided would
> be
> > greatly
> > appreciated.  I've never had this problem before
> ...
> > 
> > TIA,
> > 
> > sean
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
>   
> __ 
> Do you Yahoo!? 
> Yahoo! Mail - Find what you need with new enhanced
> search.
> http://info.mail.yahoo.com/mail_250
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't load server.xml message

2005-01-01 Thread Phil Steitz
Sean Schofield wrote:
I am an experienced Tomcat user who is all of a sudden having trouble
running Tomcat on my home machine.  I am running Tomcat 5.0.28 and I
get a Null Pointer when trying to start Tomcat.
I have JAVA_HOME and CATALINA_HOME configured.
The very first line in the output says "Can't load server.xml"
(actually the second line says the same thing as well.)  I tried
chaning to the minimal server.xml as well but no luck.
The stack trace seems to indicate a NullPointer exception at
Catalina.await line 619.  I have tried looking this up on the mailing
lists, but incredibly, nobody seems to have experienced this problem!
Anyways, any insight that could be provided would be greatly
appreciated.  I've never had this problem before ...
I had this problem once when I inadvertently moved server.xml from 
/conf.  I think the error message means what it says -- it cant't read 
the file.  Are you sure it is in the right place and the user running tc 
has permission to read the file?

Phil
TIA,
sean
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Can't load server.xml message

2005-01-01 Thread sven morales
Hi,
You seem to have added quite a few lines into your
catalina.sh.  The stock script ends at line 287 for
me.  Can you tell us what modifications you have made?
Funny that I can not find how the server.xml is
loaded by the DigesterFactory.java nor by
Bootstrap.java when I browsed their source code.

aka_sergio


--- Sean Schofield <[EMAIL PROTECTED]> wrote:

> I am an experienced Tomcat user who is all of a
> sudden having trouble
> running Tomcat on my home machine.  I am running
> Tomcat 5.0.28 and I
> get a Null Pointer when trying to start Tomcat.
> 
> I have JAVA_HOME and CATALINA_HOME configured.
> 
> The very first line in the output says "Can't load
> server.xml"
> (actually the second line says the same thing as
> well.)  I tried
> chaning to the minimal server.xml as well but no
> luck.
> 
> The stack trace seems to indicate a NullPointer
> exception at
> Catalina.await line 619.  I have tried looking this
> up on the mailing
> lists, but incredibly, nobody seems to have
> experienced this problem!
> 
> Anyways, any insight that could be provided would be
> greatly
> appreciated.  I've never had this problem before ...
> 
> TIA,
> 
> sean
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can't load server.xml message

2005-01-01 Thread Sean Schofield
I am an experienced Tomcat user who is all of a sudden having trouble
running Tomcat on my home machine.  I am running Tomcat 5.0.28 and I
get a Null Pointer when trying to start Tomcat.

I have JAVA_HOME and CATALINA_HOME configured.

The very first line in the output says "Can't load server.xml"
(actually the second line says the same thing as well.)  I tried
chaning to the minimal server.xml as well but no luck.

The stack trace seems to indicate a NullPointer exception at
Catalina.await line 619.  I have tried looking this up on the mailing
lists, but incredibly, nobody seems to have experienced this problem!

Anyways, any insight that could be provided would be greatly
appreciated.  I've never had this problem before ...

TIA,

sean

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: trustStore details in server.xml

2004-12-09 Thread Bill Barker
You mean something like:
  

"Sunitha Kumar" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi ,
> Is there a way we could mention this in server.xml?
> Similar to the keyStore.
> thanks,
> -sunitha 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



trustStore details in server.xml

2004-12-09 Thread Sunitha Kumar
Hi ,
Is there a way we could mention this in server.xml?
Similar to the keyStore.
thanks,
-sunitha
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 4.1: Setting Up Connection Pooling, Adding Resource to server.xml,

2004-11-26 Thread David Stevenson
I missed the following important information that was in the Tomcat
documentation, that wasn't in the book I was reading. I am currently
getting the following exception in my log file when executing a servlet
that obtains a DataSource using the JNDI InitialContext. I previously
thought it might be a class not defined exception because I didn't
supply the connection pooling .jar files as required by the
instructions.

2004-11-26 20:15:24 org.apache.catalina.INVOKER.ClientListPooledServlet:
ClientListPooledServlet.init:
javax.naming.NameNotFoundException: Name java:comp is not bound in this
Context
at
org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at ClientListPooledServlet.init(ClientListPooledServlet.java:25)

>From ClientListPooledServlet.java. Line 25 is the one with the new
InitialContext () constructor call.

public void init ( ServletConfig config )
throws ServletException
{
super.init ( config ) ;
log ( "ClientListPooledServlet.init entered" ) ;
try
{
// Context initCtx = new InitialContext () ;
// Context envCtx = (Context) initCtx.lookup (
"java:comp/env" ) ;
// ds = (DataSource) envCtx.lookup (
"jdbc/tomcatbook" ) ;
ds = (DataSource) new InitialContext ().lookup (
"java:comp/env/jdbc/tomcatbook" ) ;
}
catch ( Exception e )
{
log ( "ClientListPooledServlet.init: " +
e.getMessage () ) ;
log ( "ClientListPooledServlet.init: ", e ) ;
throw new UnavailableException ( e.getMessage ()
) ;
}
log ( "ClientListPooledServlet.init exiting" ) ;
}



DBCP uses the Jakarta-Commons Database Connection Pool. It relies on
number of Jakarta-Commons componenets:

* Jakarta-Commons DBCP 1.0
* Jakarta-Commons Collections 2.0
* Jakarta-Commons Pool 1.0

These jar files along with your the jar file for your JDBC driver should
be installed in $CATALINA_HOME/common/lib.

I don't know if these versions are close enough, or not.
If not, I can go through the Jakarta Archives looking for
closer versions.

[EMAIL PROTECTED] logs]$ ll -rt $CATALINA_HOME/common/lib
...
-rw-r--r--1 davidstevenson   175426 Nov 26 20:06
commons-collections-2.1.1.jar
-rw-r--r--1 davidstevenson42492 Nov 26 20:06
commons-pool-1.2.jar
-rw-r--r--1 davidstevenson   107631 Nov 26 20:08
commons-dbcp-1.2.1.jar

Based on the Tomcat Documentation, I revamped the server.xml
configuration (I haven't modified this yet to include the
instructions under Preventing dB connection pool leaks in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html).

  


  

  factory
  org.apache.commons.dbcp.BasicDataSourceFactory


  maxActive
  100


  maxIdle
  30


  maxWait
  1


   username
  tomcat


   password
  RealPasswordOmitted


  driverClassName
  com.mysql.jdbc.Driver


  url
 
jdbc:mysql://localhost/tomcatbook?autoReconnect=true

  

  




$ more $CATALINA_HOME/webapps/tomcatbook/WEB-INF/web.xml
...


This is a reference to the data source we use
to talk to the database configured in the
server.xml file.

jdbc/tomcatbook
javax.sql.DataSource
Container

...

=
Server Information
Tomcat Version  Apache Tomcat/4.1.24-LE-jdk14
JVM Version 1.4.2-b28
JVM Vendor  Sun Microsystems Inc.
OS Name Linux   
OS Version  2.4.20-31.9
OS Architecture i386
MySQL   mysql-standard-4.0.18-pc-linux-i686
mysql-connector-java-3.0.11-stable
=


David Stevenson


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 4.1: Setting Up Connection Pooling, Adding Resource to server.xml

2004-11-26 Thread David Stevenson
The question relates to my home study of the Tomcat Server via the book
referenced below.

Added Context via Tomcat Administration page.
Added Resource, ResourceParams, and parameter tags by hand-editing
the server.xml file, and re-starting.

Reference: Ian McFarland, Peter Harrison, Mastering Tomcat Development,
Wiley Publishing, Inc., p. 283-284.

=

In Tomcat Administration Page:
Clicking on Data Sources, under Resources, under Context /tomcatbook,
under Host, gives the
following exception, perhaps indicating Tomcat 4.1 is not compatible
with this XML setup. Exception truncated for brevity's sake.

exception

org.apache.jasper.JasperException: Exception retrieving attribute
'driverClassName'
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

=

Changes to $CATALINA/HOME/server.xml (Context tag added by Tomcat
Administration page, 
inside Context tag manually added via text editor, as recommended by
referenced book):

  

  

  user
  tomcatbook


  password
 
PasswordIntentionallyChangedToProtectMeFromTheGuilty


  driverClassName
  com.mysql.jdbc.Driver


  url
  jdbc:mysql://localhost.localdomain/tomcatbook

  

  
=
Should I create a New Data Source in the Tomcat Administration Tool?
Would the following values be correct?

PropertyValue
JNDI Name:  jdbc/tomcatbook

Data Source URL:jdbc:mysql://localhost.localdomain/tomcatbook

JDBC Driver Class:  com.mysql.jdbc.Driver

User Name:  tomcat  

Password:   PasswordIntentionallyChangedToProtectMeFromTheGuilty

Max. Active Connections:4

Max. Idle Connections:  2

Max. Wait for Connection:   5000

Validation Query:   ??? select login, password from user 



=
Server Information
Tomcat Version  Apache Tomcat/4.1.24-LE-jdk14
JVM Version 1.4.2-b28
JVM Vendor  Sun Microsystems Inc.
OS Name Linux   
OS Version  2.4.20-31.9
OS Architecture i386
=

Working Java code:

import java.sql.* ;

public class TestMySQL3
{
public static void main ( String [] args )
throws Exception
{
Class.forName("com.mysql.jdbc.Driver").newInstance();

Connection connection   = null ;
Statement statement = null ;
ResultSet resultSet = null ;
String query = "select login, password from user" ;

try
{

connection = DriverManager.getConnection (
"jdbc:mysql://localhost/tomcatbook",
"tomcat", 

"PasswordIntentionallyChangedToProtectMeFromTheGuilty" ) ;
statement = connection.createStatement () ;
resultSet = statement.executeQuery ( query ) ;
while ( resultSet.next () )
{
String login=
resultSet.getString ( 1 ) ;
String password =
resultSet.getString ( 2 ) ;
System.out.println ( "login: " + login +
" password: " + password ) ;
}
}
finally
{
if ( resultSet != null )
resultSet.close () ;
if ( statement != null )
statement.close () ;
if ( connection != null )
connection.close () ;
}
}
}


David Stevenson


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Server.xml problem..

2004-11-22 Thread sven morales
  I do not remember on top of my head at which version
Tomcat has separated the  element from
server.xml but assuming it applies to your situation. 
On your Ant task you need to separate out from the
server.xml the element and its contents ( ..
 to another file, call it rpcoemapi.xml. 
You can have another task to put this rpcoemapi.xml
file into tomcatXX/conf/// directory, or
 the other alternative was to have this rpcoemapi.xml
become part of your war file. Please search back in
the list for the last weeks where this same subject
"where to put context.xml file". 
  An example of my context xml file thats been pulled
out of server.xml:



 
 
 

factory
   
org.apache.commons.dbcp.BasicDataSourceFactory


maxActive
100


maxIdle
3


maxWait
100

   
usernamemysql69
   
passwordyejlaitr
driverClassName
 
org.gjt.mm.mysql.Driver
url
 
jdbc:mysql://localhost:3306/dbxforum
  


Hope this helps.


--- Shilpa Nalgonda <[EMAIL PROTECTED]> wrote:

> under TOMCAT_HOME/conf i only have" server.xml,
> tomcat-users.xml , web.xml,
> catalina.policy and jk2.properties."
> i can't find rpcoemapi.xml anywhere under
> Tomcat_home.
> 
> Before i had all the datasource configuration for my
> Web apps in server.xml.
> And i used tomcat manager GUI to deploy the
> applications.  But now we have
> to use ant script to deploy apps.
> With this change my server.xml is loosing all the
> datasource configuration.
> 
> Please suggest how to tackle this.
> 
> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 22, 2004 12:20 PM
> To: Tomcat Users List
> Subject: RE: Server.xml problem..
> 
> 
> 
> Hi,
> Are you sure the information for your context isn't
> written to
> conf/[engine]/[host]/rpcoemapi.xml instead of
> server.xml?
> 
> Yoav Shapira http://www.yoavshapira.com
> 
> 
> >-Original Message-
> >From: Shilpa Nalgonda
> [mailto:[EMAIL PROTECTED]
> >Sent: Monday, November 22, 2004 12:11 PM
> >To: Tomcat Users List
> >Subject: RE:Server.xml problem..
> >
> >Hi ,
> >I am usinh ant deploy target to deploy my web
> application  on  Tomcat
> >4.1.30.
> >I have configured datasource to get the connection
> pooling  for my
> webapp
> >in server.xml.
> >
> >But whenever i do a ant deploy, the server.xml ia
> being backed up and a
> new
> >server.xml is created.
> >This new server.xml does not have any of my
> datasouce configuration for
> my
> >webapp.  So my application cannot connect to the
> database thereby.
> >
> >How can i resolve this, do i have to write xml file
> for my webapp, if
> so
> >what entries go in that new xml file.  Below is
> >my ant deploy target and server.xml
> >
> > >   description="Deploying application to servlet
> container">
> >
> > >username="${manager.username}"
> >password="${manager.password}"
> >path="${app.path}"
> >
> war="file:/${dist.home}/rpcoemapi.war"/>
> >
> >  
> >
> >sErver.xml
> >--
> >
> >  docBase="rpcoemapi"
> > debug="5" reloadable="true"
> crossContext="true"
> >useNaming="true">
> >
> >  className="org.apache.catalina.logger.FileLogger"
> > prefix="localhost_rpcoemapi_log."
> suffix=".txt"
> > timestamp="true"/>
> >>   auth="Container"
> >   type="javax.sql.DataSource"/>
> >
> > 
> > 
> >   factory
> >  
>
org.apache.commons.dbcp.BasicDataSourceFactory
> > 
> >
> > 
> >  maxActive
> >  30
> >
> >
> > 
> >
> > maxIdle
> > 20
> >
> >
> >
> >  
> > 
> > maxWait
> > 1
> >
> >
> > 
> > 
> >   username
> >   xx
> > 
> > 
> >   password
> >   xx
> > 
> >
> > 
> > 
> >   driverClassName
> >  
> oracle.jdbc.driver.OracleDriver
> > 
> >
> > 
> >

RE: Server.xml problem..

2004-11-22 Thread Shapira, Yoav

Hi,
Ahh, my mistake, I thought you were using Tomcat 5.x - sorry about that
confusion.  For 4.x, maybe someone else can help you.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
>Sent: Monday, November 22, 2004 12:35 PM
>To: Tomcat Users List
>Subject: RE: Server.xml problem..
>
>under TOMCAT_HOME/conf i only have" server.xml, tomcat-users.xml ,
web.xml,
>catalina.policy and jk2.properties."
>i can't find rpcoemapi.xml anywhere under Tomcat_home.
>
>Before i had all the datasource configuration for my Web apps in
>server.xml.
>And i used tomcat manager GUI to deploy the applications.  But now we
have
>to use ant script to deploy apps.
>With this change my server.xml is loosing all the datasource
configuration.
>
>Please suggest how to tackle this.
>
>-Original Message-
>From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
>Sent: Monday, November 22, 2004 12:20 PM
>To: Tomcat Users List
>Subject: RE: Server.xml problem..
>
>
>
>Hi,
>Are you sure the information for your context isn't written to
>conf/[engine]/[host]/rpcoemapi.xml instead of server.xml?
>
>Yoav Shapira http://www.yoavshapira.com
>
>
>>-Original Message-
>>From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
>>Sent: Monday, November 22, 2004 12:11 PM
>>To: Tomcat Users List
>>Subject: RE:Server.xml problem..
>>
>>Hi ,
>>I am usinh ant deploy target to deploy my web application  on  Tomcat
>>4.1.30.
>>I have configured datasource to get the connection pooling  for my
>webapp
>>in server.xml.
>>
>>But whenever i do a ant deploy, the server.xml ia being backed up and
a
>new
>>server.xml is created.
>>This new server.xml does not have any of my datasouce configuration
for
>my
>>webapp.  So my application cannot connect to the database thereby.
>>
>>How can i resolve this, do i have to write xml file for my webapp, if
>so
>>what entries go in that new xml file.  Below is
>>my ant deploy target and server.xml
>>
>>>   description="Deploying application to servlet container">
>>
>>>username="${manager.username}"
>>password="${manager.password}"
>>path="${app.path}"
>> war="file:/${dist.home}/rpcoemapi.war"/>
>>
>>  
>>
>>sErver.xml
>>--
>>
>>  >  debug="5" reloadable="true" crossContext="true"
>>useNaming="true">
>>
>>  > prefix="localhost_rpcoemapi_log." suffix=".txt"
>> timestamp="true"/>
>>   >   auth="Container"
>>   type="javax.sql.DataSource"/>
>>
>>  
>>  
>>factory
>>
org.apache.commons.dbcp.BasicDataSourceFactory
>>  
>>
>>  
>>  maxActive
>>  30
>>
>>
>>  
>>
>> maxIdle
>> 20
>>
>>
>>
>>   
>>  
>> maxWait
>> 1
>>
>>
>>  
>>  
>>username
>>xx
>>  
>>  
>>password
>>xx
>>  
>>
>>  
>>  
>>driverClassName
>>oracle.jdbc.driver.OracleDriver
>>  
>>
>>  
>>  
>>  url
>>  jdbc:oracle:thin:@ipaddress:1521:DB
>>  
>>
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary
>and/or privileged.  This e-mail is intended only for the individual(s)
to
>whom it is addressed, and may not be saved, copied, printed, disclosed
or
>used by anyone else.  If you are not the(an) intended recipient, please
>immediately delete this e-mail from your computer system and notify the
>sender.  Thank you.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   3   4   5   6   7   8   9   10   >