Re: Lb_factor didn't work as expected

2003-03-31 Thread karthikeyan.balasubramanian
Just Wondering.  Can we do load balancing between tomcats on the same system.

Does it works out good or its should both be in a separate server.

Have a great day.

Karthikeyan B
  - Original Message - 
  From: LAGALISSE Eric 
  To: [EMAIL PROTECTED] 
  Sent: Friday, March 21, 2003 7:48 PM
  Subject: Lb_factor didn't work as expected


  After several test using mod_jk 2.0.43 on Linux with apache 2.0.43 we noticed that 
if we define workers.properties as follow the load balancing send to both tomcat 
server but not in the same ratio.

  For example if we stress with 100 users, 80 are routed to the first tomcat server 
declared in workers.properties and 20 are routed to the second.



  So if soemone on this small planet already configured and tested SUCCESSFULLY the 
load balancing we'll very interested in his experience on this subject.



  # Workers.properties

  ps=/



  worker.list=infonetworker



  # 

  # First tomcat server

  # 

  worker.tomcat1.port=8112

  worker.tomcat1.host=clos1030.casden.fr

  worker.tomcat1.type=ajp13

  worker.tomcat1.cachesize=10

  worker.tomcat1.cache_timeout=600

  worker.tomcat1.socket_keepalive=0

  worker.tomcat1.socket_timeout=300







  #

  # Specifies the load balance factor when used with

  # a load balancing worker.

  # Note:

  #   lbfactor must be  0

  #   Low lbfactor means less work done by the worker.

  worker.tomcat1.lbfactor=1



  # 

  # Second tomcat server

  # 

  worker.tomcat2.port=8112

  worker.tomcat2.host=clos1032.casden.fr

  worker.tomcat2.type=ajp13

  worker.tomcat2.cachesize=10

  worker.tomcat2.cache_timeout=600

  worker.tomcat2.socket_keepalive=0

  worker.tomcat2.socket_timeout=300



  #

  # Specifies the load balance factor when used with

  # a load balancing worker.

  # Note:

  #   lbfactor must be  0

  #   Low lbfactor means less work done by the worker.

  worker.tomcat2.lbfactor=1





  # 

  # Load Balancer worker

  # 

  #



  # The loadbalancer (type lb) worker performs weighted round-robin

  # load balancing with sticky sessions.

  # Note:

  #   If a worker dies, the load balancer will check its state

  #once in a while. Until then all work is redirected to peer

  #worker.

  worker.infonetworker.type=lb

  worker.infonetworker.balanced_workers=tomcat1, tomcat2





  #

  # END workers.properties

  #





  Eric LAGALISSE



--


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


Multiple jre's in single tomcat server

2003-03-31 Thread Surendra Kumar
Hi All
  We are using Tomcat version 3.3.1 in our application. We have 2 webapps. We want one 
of the web-app to run in
jre 1.3.1 and another web-app  in jre 1.4. 
  Is this possible  to do ? If yes please let me know how to do it.

Thanks
Surendra


Re: JNDI resources

2003-03-31 Thread Greg Speechley
I am trying to use tomcat's DBCP and access it by setting variables in
server.xml and web.xml as outlined in the documentation. However it is not
getting any of the values that are set in server.xml.

Here is my java code:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
// Look up our data source
DataSource ds = (DataSource) envCtx.lookup(jdbc/Pool);
if (ds != null)
{
Connection conn = ds.getConnection();
...
}

However I get the following error: java.sql.SQLException: Cannot load JDBC
driver class 'null'. ds is not null but all its variables are (I checked by
casting it to BasicDataSource and using the getter methods).

I have the mysql driver in a jar in common/lib and I think I have followed
all the steps correctly.

Thanks for your help
Greg

PS I am having the same sort of problems with getting the mail variables as
well

server.xml

---
Server port=8005 shutdown=SHUTDOWN debug=0
  !-- Uncomment these entries to enable JMX MBeans support --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams

  /GlobalNamingResources
  !-- Define the Tomcat Stand-Alone Service --
  Service name=Tomcat-Standalone

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=80   minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2
   useURIValidationHack=false disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
 to -1 --


!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
Connector 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/


!-- Define the top level container in our container hierarchy --
Engine name=Standalone defaultHost=localhost debug=0

  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_log. suffix=.txt
  timestamp=true/

Realm className=org.apache.catalina.realm.UserDatabaseRealm
 debug=0 resourceName=UserDatabase/

  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true

!-- Logger shared by all Contexts related to this virtual host.  By
 default (when using FileLogger), log files are created in the
logs
 directory relative to $CATALINA_HOME.  If you wish, you can
specify
 a different directory with the directory attribute.  Specify
either a
 relative (to $CATALINA_HOME) or absolute path to the desired
 directory.--
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/

!-- Define properties for each web application.  This is only
needed
 if you want to set non-default properties, or have web
application
 document roots in places other than the virtual host's appBase
 directory.  --

!-- Tomcat Root Context --
!--
  Context path= docBase=ROOT debug=0/
--

Context path=/myapp docBase=myapp debug=0 reloadable=true
crossContext=true
  Resource name=mail/Session auth=Container
type=javax.mail.Session/
  ResourceParams name=mail/Session
parameter
  namemail.smtp.host/name
  valuemail.learnedsolutions.com/value
/parameter
  /ResourceParams

  Resource name=jdbc/Pool auth=Container type=javax.sql.DataSource/
  ResourceParams name=jdbc/Pool
parameter
  namefactory/name
  

RE: Tomcat context ...: list

2003-03-31 Thread graghupathy
how do i make my application 'trusted' ??

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: 29 March 2003 05:10
To: [EMAIL PROTECTED]
Subject: Re: Tomcat context ...: list


Unless you mark you app as 'trusted', you can't (since it's a major security
hole).  For this, I would just use the manager webapp that ships with
Tomcat.

[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,
 Can anyone give me a way where I can have a list of all the context
 present in my tomcat 4.1.18 in my .jsp code ???

 Thanks
 Guru




-
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: JNDI resources

2003-03-31 Thread Roberts, Eric
Hi,

What is in your web.xml relating to the datasource?

If the datasource is correctly defined in server.xml, there is no need to define it in 
web.xml, but if you do, web.xml will supersede server.xml, and if web.xml does not 
have all the correct parameters, you will get this problem.

HTH

-Original Message-
From: Greg Speechley [mailto:[EMAIL PROTECTED]
Sent: 31 March 2003 10:40
To: Tomcat User
Subject: Re: JNDI resources


I am trying to use tomcat's DBCP and access it by setting variables in
server.xml and web.xml as outlined in the documentation. However it is not
getting any of the values that are set in server.xml.

Here is my java code:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
// Look up our data source
DataSource ds = (DataSource) envCtx.lookup(jdbc/Pool);
if (ds != null)
{
Connection conn = ds.getConnection();
...
}

However I get the following error: java.sql.SQLException: Cannot load JDBC
driver class 'null'. ds is not null but all its variables are (I checked by
casting it to BasicDataSource and using the getter methods).

I have the mysql driver in a jar in common/lib and I think I have followed
all the steps correctly.

Thanks for your help
Greg

PS I am having the same sort of problems with getting the mail variables as
well

server.xml

---
Server port=8005 shutdown=SHUTDOWN debug=0
  !-- Uncomment these entries to enable JMX MBeans support --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams

  /GlobalNamingResources
  !-- Define the Tomcat Stand-Alone Service --
  Service name=Tomcat-Standalone

!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=80   minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2
   useURIValidationHack=false disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
 to -1 --


!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
Connector 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/


!-- Define the top level container in our container hierarchy --
Engine name=Standalone defaultHost=localhost debug=0

  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_log. suffix=.txt
  timestamp=true/

Realm className=org.apache.catalina.realm.UserDatabaseRealm
 debug=0 resourceName=UserDatabase/

  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true

!-- Logger shared by all Contexts related to this virtual host.  By
 default (when using FileLogger), log files are created in the
logs
 directory relative to $CATALINA_HOME.  If you wish, you can
specify
 a different directory with the directory attribute.  Specify
either a
 relative (to $CATALINA_HOME) or absolute path to the desired
 directory.--
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/

!-- Define properties for each web application.  This is only
needed
 if you want to set non-default properties, or have web
application
 document roots in places other than the virtual host's appBase
 directory.  --

!-- Tomcat Root Context --
!--
  Context path= docBase=ROOT debug=0/
--

Context path=/myapp docBase=myapp debug=0 reloadable=true
crossContext=true
  Resource 

Deploying a HttpSessionListener

2003-03-31 Thread Balaji
Hi,

I'm trying to write a sample session listener for Tomcat 4.1.18 . The code 
is as follows.

package com.myCompany;
import javax.servlet.http.*;
public class SessionCounter implements HttpSessionListener
{
private static int activeSessions = 0;
public SessionCounter()
{
}
public void sessionCreated(HttpSessionEvent se)
{
System.out.println(A new Seeion is being created);
activeSessions++;
}
public void sessionDestroyed(HttpSessionEvent se)
{
if(activeSessions  0)
activeSessions--;
}
public static int getActiveSessions()
{
System.out.println(The activeSession number is 
+activeSessions);
return activeSessions;
}
}

Am I right in saying that I need to add this listener to the server.xml 
file ? If I do so, I get the following Exception. Can anyone help me 
getting it to work?

Thanks
Bala
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav
a:228)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java:1036)
at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXPar
ser.java:585)
at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Abst
ractXMLDocumentParser.java:222)
at 
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBi
nder.java:595)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(XMLDocumentFragmentScannerImpl.java:747)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:329)
at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:525)
at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
ava:1175)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Catalina.start: java.lang.IllegalArgumentException: argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
at 
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2312)
at 
org.apache.commons.digester.Digester.createSAXException(Digester.java
:2332)
at org.apache.commons.digester.Digester.endElement(Digester.java:1039)
at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXPar
ser.java:585)
at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Abst
ractXMLDocumentParser.java:222)
at 
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBi
nder.java:595)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(XMLDocumentFragmentScannerImpl.java:747)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:329)
at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:525)
at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
a:581)





















Re: Multiple jre's in single tomcat server

2003-03-31 Thread Bill Barker
It's easy enough to do in general (you set 'tomcat.home' to be the Tomcat
installation directory for both, and set 'tomcat.install' to point to the
individual directories that have the web-apps defined.).  The tricky part is
how you are accessing them.  If they are on seperate vhosts, then it is
pretty simple.  Otherwise the rest of the setup depends on whether you are
fronting Apache/IIS/iPlanet, or using Tomcat-Standalone.

Surendra Kumar [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi All
  We are using Tomcat version 3.3.1 in our application. We have 2 webapps.
We want one of the web-app to run in
jre 1.3.1 and another web-app  in jre 1.4.
  Is this possible  to do ? If yes please let me know how to do it.

Thanks
Surendra





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



Re: mutual SSL authentication

2003-03-31 Thread Janne Ruuttunen
Hi Mark,

you need to use a Coyote HTTP1.1 connector, configured to use a
org.apache.coyote.tomcat4.CoyoteServerSocketFactory with the clientAuth
property set to true. See the Coyote part in the config reference. I agree
that more should be said about this in the SSL howto.

Note that Java validates the client certs against the CA keystore in
$JAVA_HOME/jre/lib/security/cacerts.

Hope this helps,
Janne

- Original Message -
From: Mark W. Webb [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 11:04 PM
Subject: mutual SSL authentication


 How can I set up SSL on tomcat 4.1 that will allow the server and client
 to authenticate each other?  from what I can tell, it looks like the
 SSL-HOWTO only addresses server authentication.   I have this set up on
 apache, would I be better off just running tomcat on top of apache?

 thanks...


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



Session Destroyed Notification

2003-03-31 Thread Balaji
Hi,

Can anyone tell me the conditions when a session is deemed to be destroyed. 
If there is a maximumInactiveInterval to be specified, where do I say it 
and is this variable global or applied to each and every application?

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


Re: Multiple jre's in single tomcat server

2003-03-31 Thread Surendra Kumar
What should be the JAVA_HOME ? Is there anyway i can define this for each web-app.
Actually we have found a way to do it ie) by running Multiple Instances of Tomcat and 
each tomcat instance will have it's own
server.xml.But we are looking for a way with single instance of Tomcat.

Can you explain more about your approach ?

Thanks
Surendra

Bill Barker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 It's easy enough to do in general (you set 'tomcat.home' to be the Tomcat
 installation directory for both, and set 'tomcat.install' to point to the
 individual directories that have the web-apps defined.).  The tricky part is
 how you are accessing them.  If they are on seperate vhosts, then it is
 pretty simple.  Otherwise the rest of the setup depends on whether you are
 fronting Apache/IIS/iPlanet, or using Tomcat-Standalone.
 
 Surendra Kumar [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 Hi All
   We are using Tomcat version 3.3.1 in our application. We have 2 webapps.
 We want one of the web-app to run in
 jre 1.3.1 and another web-app  in jre 1.4.
   Is this possible  to do ? If yes please let me know how to do it.
 
 Thanks
 Surendra
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


RE: Multiple jre's in single tomcat server

2003-03-31 Thread Ralph Einfeldt
That is not possible.

One tomcat instance can only have one vm and java home.

 -Original Message-
 From: Surendra Kumar [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 1:16 PM
 To: Tomcat Users List
 Subject: Re: Multiple jre's in single tomcat server
 
 
 What should be the JAVA_HOME ? Is there anyway i can define 
 this for each web-app.
 Actually we have found a way to do it ie) by running Multiple 
 Instances of Tomcat and each tomcat instance will have it's own
 server.xml.But we are looking for a way with single instance 
 of Tomcat.
 

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



Re: ?? Simple Newbie Question about Root Context ??

2003-03-31 Thread Tony LaPaso
Well, it sounds like a guess...


- Original Message -
From: Micael [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 31, 2003 12:33 AM
Subject: Re: ?? Simple Newbie Question about Root Context ??


 The reason has to be, then, that the startup of the webapp creates a
 default context on its own, because it cannot happen magically.  I hope
 that does not sound smart-alexey but, rather, clear.



 At 08:14 PM 3/30/03 -0600, you wrote:
 But my point is that everything works fine even *with* the comment. THAT
is
 what's confusing.
 
 
 - Original Message -
 From: Carol Carrick [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Sunday, March 30, 2003 4:20 PM
 Subject: Re: ?? Simple Newbie Question about Root Context ??
 
 
   The website I sent tells you to take the comments out.
   - Original Message -
   From: Tony LaPaso [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Sunday, March 30, 2003 5:01 PM
   Subject: Re: ?? Simple Newbie Question about Root Context ??
  
  
Well, I don't have to create pages under ROOT as you did, but that's
a
separate issue from what I'm asking.
   
   
   
- Original Message -
From: Carol Carrick [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 3:50 PM
Subject: Re: ?? Simple Newbie Question about Root Context ??
   
   
 Although I am really a newbie, I have the same o/s system.  I have
   trouble
 loading my pages until I created them under the ROOT path and
   uncommented
 the section you are referring to.  Here is a good web reference.
 http://www.moreservlets.com/Using-Tomcat-4.html




 - Original Message -
 From: Tony LaPaso [EMAIL PROTECTED]
 To: Tomcat User [EMAIL PROTECTED]
 Sent: Sunday, March 30, 2003 4:00 PM
 Subject: ?? Simple Newbie Question about Root Context ??


  My Tomcat skills are rusty -- I must be missing something easy
here.
 
  I just installed TC v4.1.24 on Win 2k. The installation worked
right
   out
 of
  the box. I didn't have to make any changes to the server.xml. TC
is
 up
and
  running but I'm seeing something strange I was hoping someone
could
 explain:
 
 
  Here's a quote from the TC documentation: ...you MUST define a
   Context
 with
  a context path equal to a zero-length string. This Context
becomes
 the
  default web application for this virtual host, and is used to
 process
all
  requests that do not match any other Context's context path.
 
  Okay, that's fine, but when I look at conf/server.xml I see
this:
 
  !-- Tomcat Root Context --
  !--
  Context path= docBase=ROOT debug=0/
  --
 
 
  Why is this commented out? According to the documentation there
must
   be
a
  context path equal to a zero-length string. The quote I cited
 seems
   to
  contradict what I'm seeing in server.xml.
 
  Even though this is commented out everything seems to work fine.
In
other
  words, if I browse to localhost:8080 I do indeed see
 webapps/ROOT/index.jsp.
  Is the docBase named ROOT the default? If so, then the
 documentation
  should mention that I think.
 
  Thanks very much,
 
  Tony
 
 
 
 
 
 
 

   -
  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]
   
  
  
   -
   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]



 LEGAL NOTICE

 This electronic mail  transmission and any accompanying documents contain
 information belonging to the sender which may be confidential and legally
 privileged.  This information is intended only for the use of the
 individual or entity to whom this electronic mail transmission was sent as
 indicated above. If you are not the intended recipient, any disclosure,
 copying, distribution, or action taken in reliance on the contents of the
 information contained in this transmission is strictly prohibited.  If you
 have received this transmission in error, please delete the message.
Thank
 you



 

modjk2 problems

2003-03-31 Thread Enrico Donelli
Hello everybody,
I'm triyng to use apache 2.0.44 with tomcat 4.1.24 on a linux box 
(RedHat 7.3)

I followed (I think!) the instructions reported on jakarta site 
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/installhowto.html), 
but in the apache error log I always get the followin error:

[Mon Mar 31 14:03:13 2003] [error] workerEnv.init() create slot epStat.0 
failed
[Mon Mar 31 14:03:13 2003] [error] lb.service() worker failed 
ajp13:localhost:8009
[Mon Mar 31 14:03:13 2003] [error] lb.service() unrecoverable error...
[Mon Mar 31 14:03:13 2003] [error] mod_jk.handler() Error connecting to 
tomcat 12

Any idea?

Thanks
Enrico Donelli


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


Non DBCP Solutions

2003-03-31 Thread Marco Rossi
Hi,
it's possible to configure Tomcat 4.1.24 to use a Oracle DataSource, and not DBCP?

Thanks in advance,
marco

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



how to print multi page report from jsp

2003-03-31 Thread anto paul
Hi,
I have developed an intranet application using jsp/servlets. I need to
print a multipage report which have common header and footer. Also I have to
specify the page size and font. For single page printing I was using
javascript function window.print(). But it is impossible to use in it in
this case. Also I want to avoid the print dialog of the browser. All client
machines are using IE 5 or above. Is there any open source java api which
can be run inside to generate the report and print it. Or is there any HTML
way for it.
Thanx in advance.
Anto


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



Starange Problem, TOmcat compiling each time

2003-03-31 Thread Rakesh Tiwari
Hi Folks,
I have a strange problem. I have a application working wit tomcat 4.1.12 
on windows 2000.
The problem is that for each request the JSP's are recompiled and that 
makes the application very slow.
Is there a way by which I can tell tomcat not to compile each time ??

Waiting for any healp ASAP.

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


Re: how to print multi page report from jsp

2003-03-31 Thread Marco Rossi
Try JasperReports (http://jasperreports.sourceforge.net/); it's an open source project 
to create reports server-side.

Marco

Hi,
I have developed an intranet application using jsp/servlets. I need to
print a multipage report which have common header and footer. Also I have to
specify the page size and font. For single page printing I was using
javascript function window.print(). But it is impossible to use in it in
this case. Also I want to avoid the print dialog of the browser. All client
machines are using IE 5 or above. Is there any open source java api which
can be run inside to generate the report and print it. Or is there any HTML
way for it.
Thanx in advance.
Anto


-
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: mutual SSL authentication

2003-03-31 Thread Mark W. Webb
Is there a way that I can have apache handle all of the SSL?  This would 
allow tomcat to only handle the servlet processing.  Also, if there is a 
way to do this, could tomcat still get the user certificate information?

I do not want to get into storing client certs in the cacerts file.  I 
am using tomcat in a PKI environment.  If there are thousands of users 
accessing tomcat, this would mean that I would need to import 1000's of 
certs into this file.

Thanks...

Janne Ruuttunen wrote:

Hi Mark,

you need to use a Coyote HTTP1.1 connector, configured to use a
org.apache.coyote.tomcat4.CoyoteServerSocketFactory with the clientAuth
property set to true. See the Coyote part in the config reference. I agree
that more should be said about this in the SSL howto.
Note that Java validates the client certs against the CA keystore in
$JAVA_HOME/jre/lib/security/cacerts.
Hope this helps,
Janne
- Original Message -
From: Mark W. Webb [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 11:04 PM
Subject: mutual SSL authentication
 

How can I set up SSL on tomcat 4.1 that will allow the server and client
to authenticate each other?  from what I can tell, it looks like the
SSL-HOWTO only addresses server authentication.   I have this set up on
apache, would I be better off just running tomcat on top of apache?
thanks...
   



-
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: Anygood Howto on Multiple Virtual Hosts Apache, mod_jk and Tomcat

2003-03-31 Thread John Turner
Archives.  Archives.

Originally posted by Glenn Nielsen in Aug 2002.  See attached.

John

On Fri, 28 Mar 2003 09:31:15 -0800, Richie Chauhan [EMAIL PROTECTED] 
wrote:

Hi All,
With the help of everyone here - I have managed to tie together all the
bits and pieces to get apache mod_jk tomcat to work together.
What I am now having problems with however is the following:
I have 1 box running Solaris 9 with 3 ip addresses 192.161.1.3 jupiter 
(actual hostname) 192.161.1.10 dev
192.161.1.11 stage

I want the sites to be on DEV and STAGE through the apache_mod_jk_tomcat
(Virtual Hosts).
I am however confused as to how to map apache virtual hosts
configurations to tomcat virtual host configurations.
OR

I might be making this whole thing too complicated and there may be a
simple way to achieve the above configuration.
Thanks
Richie
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/Web Hosting with Tomcat 4 and Apache

Originally posted to the tomcat-user list by Glenn Nielsen on
Aug 8, 2002.

Overview


There are a number of configuration issues and security concerns
which must be addressed when setting up Apache and Tomcat 4 for
virtual hosting of customer sites in a web hosting environment.

The major conerns are:

1.  Delegating to untrusted customers maintenance of their applications
without compromising server security.

2.  Configuring Apache and Tomcat for virtual hosting.

3.  Surviving poorly written web applications installed by
customers.  This includes fault tolerance and identifying
which customer's web application is causing problems.

4.  Mimimize the amount of hand holding or config changes the
apache and tomcat system administrators have to make.

This is written based on my experiences setting up this type
of hosting environment on Sun Solaris hardware.  Some of this
will be specific to Solaris, but in general should work for
almost any flavor of Unix.

Unix accounts and groups


The user tomcat was created for running tomcat, it should
be created similar to the nobody account used for running
Apache.  The tomcat user is assigned to the group tomcat.
The tomcat user is a member of group user.

The group tomcat was created as the group the user tomcat
is assigned to.

The group user was created, this is the group customer
ftp accounts are assigned to.  The tomcat account is a
member of this group so that both customers and tomcat
can write files in directories assigned to group user.

Each customer has their own ftp account which is in group
user.

There is a webmaster administrator shell account.  This
account is for your virtual host administrator. The
webmaster account is assigned to group user and is also
a member of group tomcat.

Directory layout


The layout of directories is designed to make it as easy as
possible for customers to maintain their own web space content
and applications.

Here is an example of how I do it:

The customer is assigned an FTP account which has permission
to read their virtual host directory and write to a subset of
that.

For example, a customer may be assigned the following directory:

/export/home/www.customer.com root:other 755


Within that directory are sub directories which the customer
can read and/or write. Listed are the directory names, 
ownership, and mode.

www webmaster:user 2775
--

Apache document root directory.  Customer and tomcat can
both read/write directories and files.

logs root:other 755
---

Directory where apache access_log and error_log are placed.
We also rotate these logs weekly and use bzip2 to compress
any log files older than 5 weeks.  Log files less than 5
weeks old are left uncompressed so that they can be used
by web statistic software like Analog. Customer can read
files in this directory but not write files.

tomcat tomcat:tomcat 755


Directory used for the tomcat work and tomcat virtual host logs.
Only tomcat can write in this directory. Customer can read
files in this directory.

tomcat/work tomcat:tomcat 755
-

Tomcat work directory for virtual host. Only tomcat can write
files.  Customer can read files. This allows customer to review
java source files generated during a JSP page compile.

tomcat/logs tomcat:tomcat 755 
--

Tomcat log directory for virtual host. Only tomcat can write
files.  Customer can read files. This allows the customer
to review their virtual host application logs.

reports webmaster:tomcat 2775
-

Directory I use for placing custom reports generated for customer.
This is aliased into the customers document space and can password
restricted using a 

RE: best practices on rotating tomcat logs

2003-03-31 Thread Shapira, Yoav

Howdy,
We use nightly rotated (at midnight) log4j logs, using log4j's
DailyRollingFileAppender class.  It's worked very well for us.  The
files are automatically renamed, e.g. from x.txt to x.txt.2003-03-31,
and we archive them that way.

We cat them all together periodically for traffic analysis etc, although
there are tools which remove the need for concatenating all the log4j
together.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: klute [mailto:[EMAIL PROTECTED]
Sent: Friday, March 28, 2003 3:20 PM
To: Tomcat Users List
Subject: best practices on rotating tomcat logs

Hi All,

i run tomcat behind apache via mod_jk. currently i
define a timestamped Logger for each Context in my
server.xml:

Logger
className=org.apache.catalina.logger.FileLogger
  prefix=mycontextA. suffix=.txt
  timestamp=true/

and a logger for my engine in which all the contexts
reside:

Logger
className=org.apache.catalina.logger.FileLogger
prefix=apache_log. suffix=.txt
timestamp=true/

All the tomcat's sdtout goes to catalina.out (default
setup).

I am wondering if this is pretty much what other
people do and if there is a better way of doing it.

i just found that apache can rotate its logs with its
bin/rotatelogs where you can specify the rotation
interval.

does tomcat have a similar functionality? i searched
for rotate in Tomcat's source and found the
AccessLogValve class which could be i want, but i need
help figuring it out.

thanks a lot!
james


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-
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]



RE: Deploying a HttpSessionListener

2003-03-31 Thread Shapira, Yoav

Howdy,

Am I right in saying that I need to add this listener to the server.xml
file ? If I do so, I get the following Exception. Can anyone help me
getting it to work?

No, you're wrong in saying that.  Put the listener in your web.xml, not
in tomcat's server.xml, as follows:

listener
  listener-classcom.yourcompany.yourlistener/listener-class
/listener

Yoav Shapira
Millennium ChemInformatics



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]



RE: how to print multi page report from jsp

2003-03-31 Thread Shapira, Yoav

Howdy,
It can get tricky and unfortunately support for these type features on
the client side vary dramatically from browser to browser.  There are
some server-side solutions, which typically let you export reports
rather than try to print the HTML.  This may be OK for your needs?

There are also a few client-side HTML/CSS tools to help with this.  Take
a look at the documentation for the CSS
page-break-before/page-break-after tags.

What you really want is a full implementation of CSS3-Paging.  The
standard and documentation is here: http://www.w3.org/TR/css3-page.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: anto paul [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 6:52 AM
To: [EMAIL PROTECTED]
Subject: how to print multi page report from jsp

Hi,
I have developed an intranet application using jsp/servlets. I need
to
print a multipage report which have common header and footer. Also I
have
to
specify the page size and font. For single page printing I was using
javascript function window.print(). But it is impossible to use in it
in
this case. Also I want to avoid the print dialog of the browser. All
client
machines are using IE 5 or above. Is there any open source java api
which
can be run inside to generate the report and print it. Or is there any
HTML
way for it.
Thanx in advance.
Anto


-
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]



RE: iPlanet and Tomcat 4.1.24

2003-03-31 Thread Shapira, Yoav

Howdy,

OK I will come clean:
I have to use Netegrity's Siteminder  (4.56) for SSO services.  My
organization is gun shy about useing Netegrity's J2EE AppServer agents
(I
don't know why, I think the reason is ignorance of ASA).  So I am stuck
with
frontending all my J2EE work with iWS (even when I have on static
content
for iWS to serve).Oh and Apache is not an option either.  So if you
have another angle on cracking this nut, I am all ears?

I read your whole message thinking why doesn't he just use the J2EE
AppServer agents, that's what they're for until I got to the bottom ;)

We have SiteMinder as well, and didn't want any front-end to tomcat as
we have very little static content.  So we ended up writing a single
sign on service (in Java, running standalone on tomcat) that talks to
SiteMinder, and all our applications talk to this SSO service instead of
SiteMinder directly.

Can't help you much with JK/JK2/other connectors ;(

Yoav hapira
Millennium ChemInformatics



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]



Re: Multiple databases for basic auth

2003-03-31 Thread Michael D. Kirkpatrick
Thanks for you help.  That worked out well enough to do the job.


Craig R. McClanahan wrote:

 On Fri, 28 Mar 2003, Michael D. Kirkpatrick wrote:

  Date: Fri, 28 Mar 2003 17:04:37 -0600
  From: Michael D. Kirkpatrick [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Multiple databases for basic auth
 
  I am running Tomcat 4.1.
  I have successfully configured the default basic auth to work with MSSQL
  2000.
 
  I have multiple clients.  Each one wants their own User database to
  administer for themselves.  That is fine, but I can't seem to configure
  Tomcat to respect a different User Database for each different app.  I
  have messed with web.xml till I am blue in the face.  No such luck with
  getting Tomcat to use any other database except for the server default.
 

 Messing with web.xml is not going to help you -- messing with server.xml
 is where you really need to do things.

 A couple of different general approaches become possible:

 * If you set up a Host element for each of your clients, and allow
   the clients to run multiple webapps, simply nest a Realm element
   inside the Host element -- this Realm will be the authentication
   database for all the webapps used by that client.

 * If you set up a single webapp for each client, simply nest a Realm
   element inside a Context element for that webapp.

 Which realm should I use?  If your underlying data is accessible via JDBC
 (as it sounds like is the case for you), using JDBCRealm is probably your
 best bet.  Configuration details can be found in:

   http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/realm.html

  I realize that Tomcat is different then Apache.  Since they both are
  made by the same people, and Apache can easly do something simular, I
  figure it can be achieved with Tomcat as well.  I can't control the
  authentication with Apache since I am using a Linux box to access MSSQL
  2000 with the Java drivers.
 

 Tomcat and the HTTPD server are not, in fact, made by the same people.
 Although they both come from Apache, that currently represents several
 hundred different folks that have commit access to at least one Apache CVS
 repository :-).

  Can anyone offer some guidance here?
 
  Any help in the matter would be greatly appreciated.
  Thanks in advance.
 
  Michael D. Kirkpatrick
 

 Craig

 -
 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: it's always the simplest things (redeploy)

2003-03-31 Thread Shapira, Yoav

Howdy,
Set unpackWARS=false and autodeploy=true in your Host element in
server.xml.  Make sure you app can run inside a packed WAR, i.e. it
doesn't try to read/write from Files using the FileReader/Writer-type
APIs.  Then you can use the Ant tasks that come with tomcat to redeploy
a WAR file to a running server.

If you don't mind me asking, where did you get the impression that the
solution just seems to be 'just use resin for development' ?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Dan Allen [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 12:33 AM
To: [EMAIL PROTECTED]
Subject: it's always the simplest things (redeploy)

I can't for the life of me understand why this has to be so
difficult.  It seems a major flaw of tomcat not to be able to simply
redeploy and activate an application from a war file.  I have read many
posts on the subject from the archives of this list and no one seems
to have a definitive solution.  The solution just seems to be just
use resin for development, it actually works right, then just deploy
on tomcat.  Since I have invested a great deal of time in tomcat, I
wish not to give up this easily.

In short, what does it take to drop a war into the webapps
directory, overwriting a previous war and get tomcat to recognize
the timestamp is newer and reissue the files so that you can see the
changes when you visit the application in the browser?  I am tempted
just to do my development directly inside the web container to avoid
this issue all together, but that just doesn't seem to be the right
way to go about things.

Since this question comes up so often, maybe we can work out a full
answer in this thread so that it doesn't have to be asked again.

Dan

--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Daniel Allen, [EMAIL PROTECTED]
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Microsoft's Law of Software Engineering:
Don't worry if it doesn't work right.
If everything did, we'd be out of a job.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-
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]



RE: Library management for Tomcat using ant

2003-03-31 Thread Shapira, Yoav

Howdy,
This question has both tomcat and ant facets, as you mentioned ;)

For the Ant part: you can define patternsets for your different apps in
one file, giving each patternset a different ID obviously.  You can then
include this file in your build file, and refer to the patternset using
the refid attribute.

The tomcat part of my response has more to do with good development
organization: don't use one central lib directory.  Obviously, this is
just a suggestion, but every single time I've been on a project/team
where this was used, we got burned.  More hassle than it's worth.  Disk
space is cheap.  Use as separate a directory tree as possible for each
webapp.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 6:18 AM
To: [EMAIL PROTECTED]
Subject: Library management for Tomcat using ant

Hi there,

I know this is more a question about ant, but maybe a tomcat user here
has
faced the same issue as I do when using a central lib directory for all
of
the JAR files in the various webapps:

In the prepare task I copy the JAR files I need for my webapp into the
WEB-INF/lib folder in the build path:
===
copy todir=${build.home}/WEB-INF/lib
  fileset dir=${lib.home}
include name=cos.jar /
include name=cos2.jar /

/fileset
/copy
=

However, this library listing is the only thing which distinguishes the
various build.xml files for my different webapps.
I'd prefer to have only ONE build.xml file for all of my webapps so
they
all have the same structure.

How can I import a fileset like above from a separate filename?
(so I can have
*) ONE build.xml for all of my webapps and
*) a specific lib.xml for each of my webapps?

thx alot
Johannes



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]



RE: URGENT: java.lang.OutOfMemoryError

2003-03-31 Thread Raible, Matt
I experienced lots of OutOfMemoryError's with 4.1.18.  I don't think I've
seen any since upgrading to 4.1.24.

HTH,

Matt

 -Original Message-
 From: Galbayar Dorjgotov [mailto:[EMAIL PROTECTED]
 Sent: Saturday, March 29, 2003 6:26 PM
 To: Tomcat Users List
 Subject: URGENT: java.lang.OutOfMemoryError
 
 
 I'm running Tomcat 4.1.18 on Linux 7.3+jdk 1.4 and installed 
 few webapps.
 I think one application leaks memory but i can't detect what one leaks
 memory?
 
 Tomcat reports(catalina.out)
 Mar 29, 2003 11:34:25 PM 
 org.apache.tomcat.util.log.CommonLogHandler log
 SEVERE: Exception in acceptSocket
 java.lang.OutOfMemoryError
 java.lang.OutOfMemoryError
 
 
 How do i detect which application leaks memory?
 
 
 
 -
 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: Multiple jre's in single tomcat server

2003-03-31 Thread Shapira, Yoav

Howdy,
The general rule is one tomcat instance, one JVM.  Hence one JVM version
for all webapps on one tomcat instance.  If you try to work around this,
you are probably just cruising for a bruising... ;)

How about using two separate tomcat instances?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Surendra Kumar [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:11 AM
To: Tomcat Users List
Subject: Multiple jre's in single tomcat server

Hi All
  We are using Tomcat version 3.3.1 in our application. We have 2
webapps.
We want one of the web-app to run in
jre 1.3.1 and another web-app  in jre 1.4.
  Is this possible  to do ? If yes please let me know how to do it.

Thanks
Surendra



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]



GUI for ant ...

2003-03-31 Thread graghupathy
Hi,
Being a newbie to ant ( have to use it ) ... can any one give me a
link to a s/w with GUI for ant ??? 


Gurumoorthy Raghupathy
Aegon Benefit Solution 
Email : [EMAIL PROTECTED]
Phone : 0044 20 72404801
Mobile : 07745988336



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



Redirecting to URL in virtual host declaration in server.xml

2003-03-31 Thread Minh Kama Yie
Hi all,

My apologies if this has been addressed but I've combed both the mailing list archives 
and the web for something similar without any luck.

My question concerns redirecting requests to a virtual host to a specified url soley 
using tomcat.

I am currently running Apache with Tomcat 4.1.18, and have the following declaration 
in my httpd.conf

VirtualHost _default_
ServerName www.mysite.com.au
Redirect / http://www.yoursite.com.au/yourpage.jsp
/VirtualHost

I'd like to remove Apache from the equation altogether, but can't seem to replicate 
the Redirect functionality in my virtual host declarations in my tomcat's server.xml.

I could almost swear I'm missing something obvious, anyone have any ideas? Should I be 
looking at the web.xml level instead?

Many thanks in advance 

Minh

RE: Session Destroyed Notification

2003-03-31 Thread Shapira, Yoav

Howdy,
The session timeout is specified in web.xml.  See the Servlet
Specification, v2.3.  An application can also invalidate a session using
the eponymous method in the HTTPSession class: see the javadocs for that
method.  Does invalidation equal destruction?  Write a listener and you
can see ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Balaji [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 6:18 AM
To: Tomcat Users List
Subject: Session Destroyed Notification

Hi,

Can anyone tell me the conditions when a session is deemed to be
destroyed.
If there is a maximumInactiveInterval to be specified, where do I say
it
and is this variable global or applied to each and every application?

TIA
Bala


-
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]



RE: iPlanet and Tomcat 4.1.24

2003-03-31 Thread Fred Welland
Wow, thanks for your comments.

I too have very little static content; so we are in the same boat on that part.  

I'd be curious to know about your Siteminder ASA solution.  Our SiteMinder people here 
say that ASA is too hard or tricky to get working and stuff like that.  I am not sure 
I buy this...

Any comments on ASA and tomcat would be great too...Also, I would mind knowing the 
details of your environment (os, Siteminder rev, is the ASA a servlet filter or 
something else, stuff like that).


Oh and if anybody else out there can help with iPlanet to Tomcat...that would be great 
too...


-Fred


-Original Message-
From:   Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent:   Mon 3/31/2003 9:36 AM
To: Tomcat Users List
Cc: 
Subject:RE: iPlanet and Tomcat  4.1.24

Howdy,

OK I will come clean:
I have to use Netegrity's Siteminder  (4.56) for SSO services.  My
organization is gun shy about useing Netegrity's J2EE AppServer agents
(I
don't know why, I think the reason is ignorance of ASA).  So I am stuck
with
frontending all my J2EE work with iWS (even when I have on static
content
for iWS to serve).Oh and Apache is not an option either.  So if you
have another angle on cracking this nut, I am all ears?

I read your whole message thinking why doesn't he just use the J2EE
AppServer agents, that's what they're for until I got to the bottom ;)

We have SiteMinder as well, and didn't want any front-end to tomcat as
we have very little static content.  So we ended up writing a single
sign on service (in Java, running standalone on tomcat) that talks to
SiteMinder, and all our applications talk to this SSO service instead of
SiteMinder directly.  

Can't help you much with JK/JK2/other connectors ;(

Yoav hapira
Millennium ChemInformatics



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]

Re: Multiple jre's in single tomcat server

2003-03-31 Thread Surendra Kumar
Yes , We have kept that option open. If we can't do that in single instance,
we will proceed with multiple instances.

Thanks
Surendra

- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 31, 2003 8:16 PM
Subject: RE: Multiple jre's in single tomcat server



 Howdy,
 The general rule is one tomcat instance, one JVM.  Hence one JVM version
 for all webapps on one tomcat instance.  If you try to work around this,
 you are probably just cruising for a bruising... ;)

 How about using two separate tomcat instances?

 Yoav Shapira
 Millennium ChemInformatics


 -Original Message-
 From: Surendra Kumar [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 3:11 AM
 To: Tomcat Users List
 Subject: Multiple jre's in single tomcat server
 
 Hi All
   We are using Tomcat version 3.3.1 in our application. We have 2
 webapps.
 We want one of the web-app to run in
 jre 1.3.1 and another web-app  in jre 1.4.
   Is this possible  to do ? If yes please let me know how to do it.
 
 Thanks
 Surendra



 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]



RE: Switching between releases during runtime

2003-03-31 Thread Shapira, Yoav

Howdy,
Several other approaches, all I think better than your context pointer
idea:

- Have the context XML definition file (tomcat 4.1 or later) name a
symlink as the docBase.  That symlink would point to myapp-1.0 and could
be changed to myapp-1.1 etc.

- Have the context entry itself in the webapps directory be a symlink to
somewhere outside the webapps directory, for example:
/local/build/myapp-1.0
/local/build/myapp-1.1
/local/tomcat/webapps/myapp - /local/build/myapp-1.0
so myapp under webapps is just a symlink.

- Just redeploy appropriately using the ant tasks supplied with tomcat
an save yourself headaches in the long run.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 12:33 PM
To: Tomcat Users List
Subject: Switching between releases during runtime

hi there,

Is it possible to have a virtual context, which just points to
another
context?
e.g.
myapp = current version, should point to myapp-1.0
myapp-1.0
myapp-1.1

Is it possible to change the context myapp is pointing to during
runtime?
This would make switching between releases much easier rather than
having
to redeploy for each release switch.

What do you think about this idea?

thx
Johannes



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]



RE: Deploying a HttpSessionListener

2003-03-31 Thread Balaji
Thanks for your response.I have it up and running.

:-)
Bala
At 09:29 AM 3/31/2003 -0500, you wrote:

Howdy,

Am I right in saying that I need to add this listener to the server.xml
file ? If I do so, I get the following Exception. Can anyone help me
getting it to work?
No, you're wrong in saying that.  Put the listener in your web.xml, not
in tomcat's server.xml, as follows:
listener
  listener-classcom.yourcompany.yourlistener/listener-class
/listener
Yoav Shapira
Millennium ChemInformatics


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]


question on storing application level config information

2003-03-31 Thread Mark W. Webb
I have some config information that I set up for my servlets.  This 
information is stored in serialized files.  I will need my servlets to 
access this information in their normal processing.  Is there some 
mechanism either in the servlet API or tomcat that will allow me to 
'cache' this information and dynamically update the information as the 
serialized files are changed?

Thank you.



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


Not wholly a Tomcat question but

2003-03-31 Thread Sandra Patricia Hunter
Now I did a search of the archives, and found someone else with this same
problem. It seemed to open a whole kettle of resentment, and I do not wish
to reopen an old wound. However the question never really got answered in a
way I can understand.

I have found the members of this group so helpful and do not wish to offend
at all. If I am out of line here please tell me (but gently as I have such
tender sensibilities).

I have my Servlets and JSP up and running. Thanks for all the help!

Then of course I had to mess with them, and added a bean to manage data
which I store in this folder with all my other class files.
C:\Tomcat\webapps\idcard\WEB-INF\classes\idcard.

Until I added the bean reference the JSP file ran nicely. The JSP file is
stored in this folder: 
C:\Tomcat\webapps\idcard 

However when I run the JSP and hit submit to allow the capture of the data
that the bean is used for I get this warning: 
org.apache.jasper.JasperException: Unable to compile class for JSPNote:
sun.tools.javac.Main has been deprecated.
Which I don't understand because I am not aware of calling this class but it
must somehow be referenced as part of something else I am using...but what? 

and this error: Generated servlet error (with some variations on the theme):

C:\Tomcat\work\Standalone\localhost\idcard\retrieveData$jsp.java:64: Class
org.apache.jsp.GetData not found. GetData getData = null;

I have tried moving my bean file around to several different places within
the structure and calling it by idcard.GetData but neither of those
solutions worked. Should the JSP and the bean be in the same folder? It
seems to me it would be adequate to use the path in calling the
bean...wouldn't it?

Can anyone explain what the issue is and how to resolve it? 

Sandra Patricia Hunter

 


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



RE: question on storing application level config information

2003-03-31 Thread Shapira, Yoav

Howdy,
It'd be very difficult for this mechanism to figure out what the object
type in your serialized files is, wouldn't it?  ;)

What you can do:

- Deserialize the files on startup, into some object (let's call it
MyServletConfig).

- Write or use (they are a dime a dozen out there) a FileWatchdog, which
checks a file every x seconds to see if it has been modified.  If so, it
sends an event to your MyServletConfig or somewhere else, which re-reads
the servlet config.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 9:55 AM
To: [EMAIL PROTECTED]
Subject: question on storing application level config information

I have some config information that I set up for my servlets.  This
information is stored in serialized files.  I will need my servlets to
access this information in their normal processing.  Is there some
mechanism either in the servlet API or tomcat that will allow me to
'cache' this information and dynamically update the information as the
serialized files are changed?

Thank you.



-
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]



RE: Tomcat context ...: list

2003-03-31 Thread Shapira, Yoav

Howdy,
You have to sign its jars with a certificate authority (CA) certificate,
like x.509, and have the appropriate .policy file installed on your
client accessing this webapp.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:41 AM
To: [EMAIL PROTECTED]
Subject: RE: Tomcat context ...: list

how do i make my application 'trusted' ??

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]
Sent: 29 March 2003 05:10
To: [EMAIL PROTECTED]
Subject: Re: Tomcat context ...: list


Unless you mark you app as 'trusted', you can't (since it's a major
security
hole).  For this, I would just use the manager webapp that ships with
Tomcat.

[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,
 Can anyone give me a way where I can have a list of all the context
 present in my tomcat 4.1.18 in my .jsp code ???

 Thanks
 Guru




-
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]



RE: Tomcat-users.xml getting erased

2003-03-31 Thread Shapira, Yoav

Howdy,
Several weeks ago, someone asked why the comments they were putting into
tomcat-users.xml get erased all the time.  This is because the
UserDatabase implementation reads the tomcat-users.xml file at startup
and writes it at shutdown.  This class doesn't maintain comments or
spacing.

Your issue is worse though, and gives me a bit of a concern.  Tomcat
should not corrupt its own configuration files even in the event of an
improper shutdown.  Can you please verify the circumstances under which
this file gets erased?  If you could come up with a reproducible process
for causing this, and submit it to Bugzilla, that'd be great.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 1:36 PM
To: [EMAIL PROTECTED]
Subject: Tomcat-users.xml getting erased

Every week or so, my tomcat-users.xml file is getting it's contents
deleted.  I'm assuming this probably happens when there is an abrupt
shutdown of the server or something.

Basically, when I can't login to my manager application, I look at
tomcat-users.xml and all it has is:

tomcat-users
/tomcat-users

Any ideas?

Thanks,

Matt



-
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]



RE: Not wholly a Tomcat question but

2003-03-31 Thread Shapira, Yoav

Howdy,
Does the bean (or GetData) have a package?  It should.  If it doesn't
have a package, Jasper will put in the org.apache.jsp package which is
not what you want.

Jasper uses Javac in order to compile the servlets that come out of the
JSPs, so you're using Javac indirectly if you are deploying uncompiled
JSPs.  You can use Jikes instead of you'd like.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 9:59 AM
To: 'Tomcat Users List'
Subject: Not wholly a Tomcat question but

Now I did a search of the archives, and found someone else with this
same
problem. It seemed to open a whole kettle of resentment, and I do not
wish
to reopen an old wound. However the question never really got answered
in a
way I can understand.

I have found the members of this group so helpful and do not wish to
offend
at all. If I am out of line here please tell me (but gently as I have
such
tender sensibilities).

I have my Servlets and JSP up and running. Thanks for all the help!

Then of course I had to mess with them, and added a bean to manage data
which I store in this folder with all my other class files.
C:\Tomcat\webapps\idcard\WEB-INF\classes\idcard.

Until I added the bean reference the JSP file ran nicely. The JSP file
is
stored in this folder:
C:\Tomcat\webapps\idcard

However when I run the JSP and hit submit to allow the capture of the
data
that the bean is used for I get this warning:
org.apache.jasper.JasperException: Unable to compile class for JSPNote:
sun.tools.javac.Main has been deprecated.
Which I don't understand because I am not aware of calling this class
but
it
must somehow be referenced as part of something else I am using...but
what?

and this error: Generated servlet error (with some variations on the
theme):

C:\Tomcat\work\Standalone\localhost\idcard\retrieveData$jsp.java:64:
Class
org.apache.jsp.GetData not found. GetData getData = null;

I have tried moving my bean file around to several different places
within
the structure and calling it by idcard.GetData but neither of those
solutions worked. Should the JSP and the bean be in the same folder? It
seems to me it would be adequate to use the path in calling the
bean...wouldn't it?

Can anyone explain what the issue is and how to resolve it?

Sandra Patricia Hunter




-
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]



Re: question on storing application level config information

2003-03-31 Thread Mark W. Webb
thanks for the information.  The serialized files would have a mapping 
from file-class.  This would make the deserialization simple.  

Thank you for the information.  This is what I had designed, but was 
hoping that tomcat had some way of telling the servlets to reload 
configuration information.

Shapira, Yoav wrote:

Howdy,
It'd be very difficult for this mechanism to figure out what the object
type in your serialized files is, wouldn't it?  ;)  

What you can do:

- Deserialize the files on startup, into some object (let's call it
MyServletConfig).
- Write or use (they are a dime a dozen out there) a FileWatchdog, which
checks a file every x seconds to see if it has been modified.  If so, it
sends an event to your MyServletConfig or somewhere else, which re-reads
the servlet config.
Yoav Shapira
Millennium ChemInformatics
 

-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 9:55 AM
To: [EMAIL PROTECTED]
Subject: question on storing application level config information
I have some config information that I set up for my servlets.  This
information is stored in serialized files.  I will need my servlets to
access this information in their normal processing.  Is there some
mechanism either in the servlet API or tomcat that will allow me to
'cache' this information and dynamically update the information as the
serialized files are changed?
Thank you.



-
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.

 

--
Mark Webb
Software Engineer
Dolphin Technology
474 Phoenix Drive
Rome, NY  13441-4911
	
Phone : 315.838.7000 
 : 315.838.7024	
Fax   : 315.838.7096
Email : [EMAIL PROTECTED]





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


JNDI and mod_webapp

2003-03-31 Thread Steve Gums
I have a situation when using mod-webapp with tomcat 4.1.18 running on
Solaris 2.9.
The situation is as follows. I have a JNDI resource configured (shown below)
Which work fine when accessing through the standard 8080 port. However my
resource is no longer available when using the apache connector on 8008.
Any ideas would be greatly appreciated. I have attempted to define this in
the global Resource but the same problem remained.  Thanks for your time.

server.xml (Defined inside my context):
   Resource name=jdbc/CIHDB
 auth=Container
 type=javax.sql.DataSource/

   ResourceParams name=jdbc/CIHDB
  parameter
 namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
 nameusername/name
 valueUSER/value
  /parameter
  parameter
 namepassword/name
 valuePASSWORD/value
  /parameter
  parameter
 namedriverClassName/name
 valuecom.mysql.jdbc.Driver/value
  /parameter
  parameter
 nameurl/name
 valuejdbc:mysql://localhost/cih/value
  /parameter
  parameter
 nameremoveAdandoned/name
 valuetrue/value
  /parameter
  parameter
 nameremoveAdandonedTimeout/name
 value120/value
  /parameter
  parameter
 nameMaxActive/name
 value50/value
  /parameter
  parameter
 nameMaxIdle/name
 value10/value
  /parameter
  parameter
 nameMaxWait/name
 value5000/value
  /parameter
   /ResourceParams

web.xml:
   resource-ref
  description
 Resource reference to a factory for java.sql.Connection
 instance that may be used for talking to a particular
 database that is configured in the server.xml file
  /description
  res-ref-namejdbc/CIHDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
   /resource-ref

Steve Gums


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



Re: GUI for ant ...

2003-03-31 Thread Jean-Francois Arcand
www.netbeans.org
www.eclipse.org
Those are IDE who integrate ANT and have a simili GUI around ANT.

-- Jeanfrancois

[EMAIL PROTECTED] wrote:

Hi,
	Being a newbie to ant ( have to use it ) ... can any one give me a
link to a s/w with GUI for ant ??? 


Gurumoorthy Raghupathy
Aegon Benefit Solution 
Email : [EMAIL PROTECTED]
Phone : 0044 20 72404801
Mobile : 07745988336


-
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: Where to store files in a portable app?

2003-03-31 Thread Shapira, Yoav

Howdy,
There have been several approaches mentioned, and all of them seem
reasonable to some extent, so I'm not going to offer any more.  I just
wanted to disagree with this statement:

I think the decision about where the locally stored data should go
should
be done at build time.

While that may be true for your particular organization / application,
it may not be true in general.  This type of decision is typically done
as deploy time, but the deployer or installer of the application.  The
server administrator is the one who decides where these files go, not
the developer.  The developer provides a mechanism for the deployer to
configure this.  So you should have a configuration setting somewhere,
e.g. a context-param or a outputDirectory property in a configuration
file, and the application will write to the location specified by this
configuration setting.

Personally, I like using Ant tokens for this, so I tend to have
@outputDirectory@ tokens in configuration files, and fill them in at
deployment times, as I have different deployment targets
(local/development, staging/QA, userAcceptanceTesting, production) for
different needs.

Yoav Shapira
Millennium ChemInformatics




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]



Tomcat redirect to 8080 Help please?

2003-03-31 Thread Taylor, Robert
When I browse to my Tomcat server examples from the web, I have no problems. When I 
browse to my WebApp and add the port 8080 I have no problems. But when I browse to my 
Web App without the 8080 the request does not seem to get redirected to Tomcat.
 
Why can I find the Tomcat Examples without 8080 but I need it for my App?
 
Please help
 
Rob

 


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

RE: URGENT: java.lang.OutOfMemoryError

2003-03-31 Thread Shapira, Yoav

Howdy,
First, you need to tell if you're really leaking memory.  You can do
this with a Profiler, e.g. OptimizeIt or JProbe.

It may be that you're not leaking memory, you just need more than the
default 64MB.  There are many JVM runtime parameters available for
tuning the heap, the key of which is -Xmx.  Look at the VM Options page
on java.sun.com for details.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Galbayar Dorjgotov [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 8:26 PM
To: Tomcat Users List
Subject: URGENT: java.lang.OutOfMemoryError

I'm running Tomcat 4.1.18 on Linux 7.3+jdk 1.4 and installed few
webapps.
I think one application leaks memory but i can't detect what one leaks
memory?

Tomcat reports(catalina.out)
Mar 29, 2003 11:34:25 PM org.apache.tomcat.util.log.CommonLogHandler
log
SEVERE: Exception in acceptSocket
java.lang.OutOfMemoryError
java.lang.OutOfMemoryError


How do i detect which application leaks memory?



-
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]



RE: Not wholly a Tomcat question but

2003-03-31 Thread Sandra Patricia Hunter
Sometimes Yoav I frighten myself with how ignorant I am.
I say at the top of the bean: package idcard, and then I keep it in the
idcard folder with all the other classes that are part of the app.
Do I need to do anything else to make it a package?

How would I use JIKES instead? Is it a classpath thing?

Sandra Patricia Hunter

 


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: March 31, 2003 7:09 AM
To: Tomcat Users List
Subject: RE: Not wholly a Tomcat question but



Howdy,
Does the bean (or GetData) have a package?  It should.  If it doesn't have a
package, Jasper will put in the org.apache.jsp package which is not what you
want.

Jasper uses Javac in order to compile the servlets that come out of the
JSPs, so you're using Javac indirectly if you are deploying uncompiled JSPs.
You can use Jikes instead of you'd like.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 9:59 AM
To: 'Tomcat Users List'
Subject: Not wholly a Tomcat question but

Now I did a search of the archives, and found someone else with this
same
problem. It seemed to open a whole kettle of resentment, and I do not
wish
to reopen an old wound. However the question never really got answered
in a
way I can understand.

I have found the members of this group so helpful and do not wish to
offend
at all. If I am out of line here please tell me (but gently as I have
such
tender sensibilities).

I have my Servlets and JSP up and running. Thanks for all the help!

Then of course I had to mess with them, and added a bean to manage data 
which I store in this folder with all my other class files. 
C:\Tomcat\webapps\idcard\WEB-INF\classes\idcard.

Until I added the bean reference the JSP file ran nicely. The JSP file
is
stored in this folder:
C:\Tomcat\webapps\idcard

However when I run the JSP and hit submit to allow the capture of the
data
that the bean is used for I get this warning:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: 
sun.tools.javac.Main has been deprecated. Which I don't understand 
because I am not aware of calling this class
but
it
must somehow be referenced as part of something else I am using...but
what?

and this error: Generated servlet error (with some variations on the
theme):

C:\Tomcat\work\Standalone\localhost\idcard\retrieveData$jsp.java:64:
Class
org.apache.jsp.GetData not found. GetData getData = null;

I have tried moving my bean file around to several different places
within
the structure and calling it by idcard.GetData but neither of those 
solutions worked. Should the JSP and the bean be in the same folder? It 
seems to me it would be adequate to use the path in calling the 
bean...wouldn't it?

Can anyone explain what the issue is and how to resolve it?

Sandra Patricia Hunter




-
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]



Casting DBCP Connection to OracleConnection

2003-03-31 Thread Chakravarthy, Sundar

HI,

I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
Connection returned from DBCP to OracleConnection I get a
ClassCastException .

Anyone here know how to cast correctly ?

Thanks

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



Re: GUI for ant ...

2003-03-31 Thread Michele Neylon :: Blacknight Solutions

 Hi,
   Being a newbie to ant ( have to use it ) ... can any one give me a
 link to a s/w with GUI for ant ???

As far as I know there isn't one, though I could be wrong.
You should only have to type in 'ant' to run it.

-- 
Mr. Michele Neylon
Blacknight Solutions
http://www.blacknightsolutions.com/
Reseller plans now available




This e-mail messages has been scanned by MailScanner and is believed to be
clean of dangerous content and virus'.
http://www.mailscanner.info


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



DataSource implementation

2003-03-31 Thread Marco Rossi
Hi,
it's possible to configure Tomcat 4.1.24 to use another DataSource implementation, and 
not DBCP?

Thanks,
marco

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



Re: Anygood Howto on Multiple Virtual Hosts Apache, mod_jk and Tomcat

2003-03-31 Thread Michele Neylon :: Blacknight Solutions

John Turner is rumoured to have said

http://www.galatea.com - there are a couple of Flash Guides that should help.


-- 
Mr. Michele Neylon
Blacknight Solutions
http://www.blacknightsolutions.com/
Reseller plans now available




This e-mail messages has been scanned by MailScanner and is believed to be
clean of dangerous content and virus'.
http://www.mailscanner.info


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



RE: Not wholly a Tomcat question but

2003-03-31 Thread Shapira, Yoav

Howdy,

Sometimes Yoav I frighten myself with how ignorant I am.

It doesn't seem like your ignorant at all ;)  You can be sure for every
question you ask, at least 3 people on the list have run into the
problem, and most people on this list aren't at all clueless...

I say at the top of the bean: package idcard, and then I keep it in the
idcard folder with all the other classes that are part of the app.
Do I need to do anything else to make it a package?

C:\Tomcat\work\Standalone\localhost\idcard\retrieveData$jsp.java:64:
Class
org.apache.jsp.GetData not found. GetData getData = null;

This error typically means that GetData didn't have a package statement,
so Jasper stuck it in Jasper's default package, org.apache.jsp, which
would make other classes that refer to GetData fail.

Take a look at retrieveData$jsp.java, which should be in tomcat's work
directory.  Take a look at GetData, make sure it has a package
statement, e.g. package idcard, and make sure the classes that use
GetData import it by the appropriate package name.

How would I use JIKES instead? Is it a classpath thing?

See the Jasper 2 how-to:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html#Using%
20Jikes

I wouldn't move to jikes at this time, as I don't think your problem is
javac-related and moving to jikes now will just add a variable.  Solve
this first ;)

Yoav Shapira
Millennium ChemInformatics



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]



Re: Casting DBCP Connection to OracleConnection

2003-03-31 Thread Marco Rossi
I have the same problem. If you find a solution, please reply


HI,

I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
Connection returned from DBCP to OracleConnection I get a
ClassCastException .

Anyone here know how to cast correctly ?

Thanks

-
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: DataSource implementation

2003-03-31 Thread Jeff Mesnil
Hi,

Marco Rossi wrote:
Hi,
it's possible to configure Tomcat 4.1.24 to use another DataSource implementation, and 
not DBCP?
yes. Tomcat can be configured to use another DataSource than DBCP by modifying its 
server.xml file
(see JNDI DataSource HOWTO[1]).
AS an example, I've done it to use a XA-aware pool instead of DBCP to integrate JOTM 
(a transaction
manager) with Tomcat (see Tomcat-JOTM howto[2]).
jeff

[1] http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
[2] http://www.objectweb.org/jotm/current/jotm/doc/howto-tomcat-jotm.html
--
Jeff Mesnil INRIA - ObjectWeb Consortium
JOTM project leader
email: jmesnil at inrialpes.fr
homepage: http://sardes.inrialpes.fr/people/jmesnil/perso.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Casting DBCP Connection to OracleConnection

2003-03-31 Thread Tim Funk
All dbcp objects have a getDelegate() method (I think). But you'll need 
to do 2 casts.
- dbcpConn = (DBCPClassCast)conn-- The dbcp connection
- myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the 
underlying implementation

Look at the DBCP javadocs for the correct class names.

BUT you'll need to use a nightly build of dbcp to do this since the 
version shipped with tomcat doesn't have the getDeletgate() methods.

-Tim

Marco Rossi wrote:
I have the same problem. If you find a solution, please reply


HI,

I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
Connection returned from DBCP to OracleConnection I get a
ClassCastException .
Anyone here know how to cast correctly ?

Thanks



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


RE: Not wholly a Tomcat question but

2003-03-31 Thread Sandra Patricia Hunter


It doesn't seem like your ignorant at all ;) 

Ah mush, it'll win me over every time!

Okay: So I mucked around a very little bit: 
My bean DOES say package idcard; and always has, yet the $jsp.java file says
package org.apache.jsp like you said.
I have restarted Tomcat several times since this problem appeared.
It is my understanding that Tomcat compiles the jsp files when they are
called but perhaps I am wrong about that? I compile the servelts and beans
but is there more I should be doing with the jsp files? Why would the work
file reference a different package from the webapp file? 
H
Sandra 


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



RE: Casting DBCP Connection to OracleConnection

2003-03-31 Thread Chakravarthy, Sundar
I tried the following with no success,

1. PoolableConnection pc = (PoolableConnection)conn;
2. OracleConnection oc = (OracleConnection)pc.getDelegate();

Fails in line 2

-Sundar


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 10:34 AM
To: Tomcat Users List
Subject: Re: Casting DBCP Connection to OracleConnection

All dbcp objects have a getDelegate() method (I think). But you'll need 
to do 2 casts.
- dbcpConn = (DBCPClassCast)conn-- The dbcp connection
- myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the 
underlying implementation

Look at the DBCP javadocs for the correct class names.

BUT you'll need to use a nightly build of dbcp to do this since the 
version shipped with tomcat doesn't have the getDeletgate() methods.

-Tim

Marco Rossi wrote:
 I have the same problem. If you find a solution, please reply
 
 
HI,

I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
Connection returned from DBCP to OracleConnection I get a
ClassCastException .

Anyone here know how to cast correctly ?

Thanks
 


-
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: Not wholly a Tomcat question but

2003-03-31 Thread Shapira, Yoav

Howdy,
Try stopping tomcat, removing the contents of the work directory, and
restarting tomcat.  Tomcat recompiles JSP files on an as-needed bases,
e.g. when they change.  If they don't change, but one of the classes
they depend on does change, the JSP will not be recompiled
automatically.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 10:37 AM
To: 'Tomcat Users List'
Subject: RE: Not wholly a Tomcat question but



It doesn't seem like your ignorant at all ;) 

Ah mush, it'll win me over every time!

Okay: So I mucked around a very little bit:
My bean DOES say package idcard; and always has, yet the $jsp.java file
says
package org.apache.jsp like you said.
I have restarted Tomcat several times since this problem appeared.
It is my understanding that Tomcat compiles the jsp files when they are
called but perhaps I am wrong about that? I compile the servelts and
beans
but is there more I should be doing with the jsp files? Why would the
work
file reference a different package from the webapp file?
H
Sandra


-
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]



RE: Tomcat redirect to 8080 Help please?

2003-03-31 Thread Brian Menke
By default, tomcat serves EVERYTHING on port 8080. You can easily change it
to serve on port 80 so that you don't need to add any port numbers to your
url. You make this change in the tomcat_install_dir\conf\server.xml file.
Look for


   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2
   useURIValidationHack=false disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
 to -1 --



8080 and change it to 80, restart your tomcat and it will work.


HOWEVER, you need to make sure you don't have any other web server running
on port 80 first. If you have apache or IIS installed, they usually install
on port 80 by default. If you have another web server using that port, you
will need to change it first, consult the applicable documentation. Of
course there are other ways to configure also, but that is a much longer
discussion.

-Brian

-Original Message-
From: Taylor, Robert [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 7:15 AM
To: Tomcat Users List
Subject: Tomcat redirect to 8080 Help please?


When I browse to my Tomcat server examples from the web, I have no problems.
When I browse to my WebApp and add the port 8080 I have no problems. But
when I browse to my Web App without the 8080 the request does not seem to
get redirected to Tomcat.

Why can I find the Tomcat Examples without 8080 but I need it for my App?

Please help

Rob






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



RE: Not wholly a Tomcat question but I FIXED IT!

2003-03-31 Thread Sandra Patricia Hunter
It was stupid microsoft thing: I had changed the file name from getData to
GetData and microsoft didn't recognize the difference in the two names but
java and tomcat sure did.
Thanks for your help. Again!+


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



RE: Not wholly a Tomcat question but

2003-03-31 Thread Filip Hanik
does your JSP have the import statements?

[EMAIL PROTECTED] import=idcard.*%

also, have you tried in your JSP file to do

%
idcard.GenData data = null;

%
instead of
%
GenData data = null;
%

Filip

 -Original Message-
 From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 7:37 AM
 To: 'Tomcat Users List'
 Subject: RE: Not wholly a Tomcat question but




 It doesn't seem like your ignorant at all ;) 

 Ah mush, it'll win me over every time!

 Okay: So I mucked around a very little bit:
 My bean DOES say package idcard; and always has, yet the
 $jsp.java file says
 package org.apache.jsp like you said.
 I have restarted Tomcat several times since this problem appeared.
 It is my understanding that Tomcat compiles the jsp files when they are
 called but perhaps I am wrong about that? I compile the servelts and beans
 but is there more I should be doing with the jsp files? Why would the work
 file reference a different package from the webapp file?
 H
 Sandra


 -
 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: Casting DBCP Connection to OracleConnection

2003-03-31 Thread Tim Funk
Compile fail or run-time fail?

If compile fail - you need a nightly of dbcp.
If run-time fail, you may need to use getInnermostDelegate() instead
-Tim

Chakravarthy, Sundar wrote:
I tried the following with no success,

1. PoolableConnection pc = (PoolableConnection)conn;
2. OracleConnection oc = (OracleConnection)pc.getDelegate();
Fails in line 2

-Sundar

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 10:34 AM
To: Tomcat Users List
Subject: Re: Casting DBCP Connection to OracleConnection

All dbcp objects have a getDelegate() method (I think). But you'll need 
to do 2 casts.
- dbcpConn = (DBCPClassCast)conn-- The dbcp connection
- myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the 
underlying implementation

Look at the DBCP javadocs for the correct class names.

BUT you'll need to use a nightly build of dbcp to do this since the 
version shipped with tomcat doesn't have the getDeletgate() methods.

-Tim

Marco Rossi wrote:

I have the same problem. If you find a solution, please reply



HI,

I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
Connection returned from DBCP to OracleConnection I get a
ClassCastException .
Anyone here know how to cast correctly ?

Thanks



-
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: mutual SSL authentication

2003-03-31 Thread Janne Ruuttunen
- Original Message -
From: Mark W. Webb [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 31, 2003 4:54 PM
Subject: Re: mutual SSL authentication


 Is there a way that I can have apache handle all of the SSL?  This would
 allow tomcat to only handle the servlet processing.  Also, if there is a
 way to do this, could tomcat still get the user certificate information?

Yes, at least using mod_jk and mod_ssl. I finally succeeded to make it work
with the help of http://www.houseofice.com/techie/projects/modjk/

Using apache1.3+mod_ssl, the directive SSLOptions +ExportCertData
exports the (PEM encoded) client certificate in an environment variable
called SSL_CLIENT_CERT.

Didn't try that one out having realized that it can be done with a
standalone Tomcat.

 I do not want to get into storing client certs in the cacerts file.  I
 am using tomcat in a PKI environment.  If there are thousands of users
 accessing tomcat, this would mean that I would need to import 1000's of
 certs into this file.

No need to. You just need the CA (certificate authority) certificates in the
cacerts file.
That is, an authority that has digitally signed the client certificates
presented.
This is not really different from the mod_ssl's SSLCACertificateFile
directive.

...I think.

Janne

...


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



RE: Tomcat redirect to 8080 Help please?

2003-03-31 Thread Taylor, Robert
I am puzzeled by this behavior though.
 
I currently have IIS running on 80 and when I browse to http://IP/examples  It works 
properly, and Tomcat serves up the proper pages based on the Servlets. When I browse 
to http://IP/myApp Tomcat never gets the call. When I browse to 
http://IP:8080/myApp then I am forcing Tomcat to take the call.
 
Why does Tomcat get the call for examples (Without a port) but myApp does not?
 
I need to keep IIS running for my Static HTML sites, and I can see from Examples that 
Tomcat can get the requests necessary for examples. This makes me thing that I missed 
something in the configuration for myApp or Tomcat.
 
Any advice here would be much appreciated.

-Original Message- 
From: Brian Menke [mailto:[EMAIL PROTECTED] 
Sent: Mon 31/03/2003 10:43 
To: Tomcat Users List 
Cc: 
Subject: RE: Tomcat redirect to 8080 Help please?



By default, tomcat serves EVERYTHING on port 8080. You can easily change it
to serve on port 80 so that you don't need to add any port numbers to your
url. You make this change in the tomcat_install_dir\conf\server.xml file.
Look for


   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2
   useURIValidationHack=false disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
 to -1 --



8080 and change it to 80, restart your tomcat and it will work.


HOWEVER, you need to make sure you don't have any other web server running
on port 80 first. If you have apache or IIS installed, they usually install
on port 80 by default. If you have another web server using that port, you
will need to change it first, consult the applicable documentation. Of
course there are other ways to configure also, but that is a much longer
discussion.

-Brian

-Original Message-
From: Taylor, Robert [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 7:15 AM
To: Tomcat Users List
Subject: Tomcat redirect to 8080 Help please?


When I browse to my Tomcat server examples from the web, I have no problems.
When I browse to my WebApp and add the port 8080 I have no problems. But
when I browse to my Web App without the 8080 the request does not seem to
get redirected to Tomcat.

Why can I find the Tomcat Examples without 8080 but I need it for my App?

Please help

Rob






-
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: Casting DBCP Connection to OracleConnection

2003-03-31 Thread Chakravarthy, Sundar

Run-time failure using both getInnermostDelegate() and getDelegate().
Any other alternatives ? 

-Sundar

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 10:49 AM
To: Tomcat Users List
Subject: Re: Casting DBCP Connection to OracleConnection

Compile fail or run-time fail?

If compile fail - you need a nightly of dbcp.
If run-time fail, you may need to use getInnermostDelegate() instead

-Tim

Chakravarthy, Sundar wrote:
 I tried the following with no success,
 
 1. PoolableConnection pc = (PoolableConnection)conn;
 2. OracleConnection oc = (OracleConnection)pc.getDelegate();
 
 Fails in line 2
 
 -Sundar
 
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 31, 2003 10:34 AM
 To: Tomcat Users List
 Subject: Re: Casting DBCP Connection to OracleConnection
 
 All dbcp objects have a getDelegate() method (I think). But you'll
need 
 to do 2 casts.
 - dbcpConn = (DBCPClassCast)conn-- The dbcp connection
 - myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the 
 underlying implementation
 
 Look at the DBCP javadocs for the correct class names.
 
 BUT you'll need to use a nightly build of dbcp to do this since the 
 version shipped with tomcat doesn't have the getDeletgate() methods.
 
 -Tim
 
 Marco Rossi wrote:
 
I have the same problem. If you find a solution, please reply



HI,

I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
Connection returned from DBCP to OracleConnection I get a
ClassCastException .

Anyone here know how to cast correctly ?

Thanks

 
 
 
 -
 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]


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



[OT] Re: Casting DBCP Connection to OracleConnection

2003-03-31 Thread Tim Funk
What kind of run-time failure? Is it a class-cast exception? If so what 
is the exception?

-Tim

Chakravarthy, Sundar wrote:
Run-time failure using both getInnermostDelegate() and getDelegate().
Any other alternatives ? 

-Sundar

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 10:49 AM
To: Tomcat Users List
Subject: Re: Casting DBCP Connection to OracleConnection

Compile fail or run-time fail?

If compile fail - you need a nightly of dbcp.
If run-time fail, you may need to use getInnermostDelegate() instead
-Tim



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


RE: [OT] Re: Casting DBCP Connection to OracleConnection

2003-03-31 Thread Chakravarthy, Sundar
Here is part of the stacktrace ,

2003-03-31 10:47:41 Exception -
SearchInventory:doSearch()java.lang.ClassCastException
java.lang.ClassCastException
at
doas.inventory.SearchInventory.doSearch(SearchInventory.java:189)
at
org.apache.jsp.search_inventory_jsp._jspService(search_inventory_jsp.
java:351)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
95)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
ispatcher.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
patcher.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
.java:822)
at org.apache.jsp.main_jsp._jspService(main_jsp.java:282)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
95)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)

-Sundar


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 11:02 AM
To: Tomcat Users List
Subject: [OT] Re: Casting DBCP Connection to OracleConnection

What kind of run-time failure? Is it a class-cast exception? If so what 
is the exception?

-Tim

Chakravarthy, Sundar wrote:
 Run-time failure using both getInnermostDelegate() and getDelegate().
 Any other alternatives ? 
 
 -Sundar
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 31, 2003 10:49 AM
 To: Tomcat Users List
 Subject: Re: Casting DBCP Connection to OracleConnection
 
 Compile fail or run-time fail?
 
 If compile fail - you need a nightly of dbcp.
 If run-time fail, you may need to use getInnermostDelegate() instead
 
 -Tim
 


-
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: Casting DBCP Connection to OracleConnection

2003-03-31 Thread Filip Hanik
hi Sundar,
as an alternative, why don't you print the class names to know what you are
doing

for example

System.out.println(delegate=+conn.getDelegate().getClass().getName());

and do that for all of the things you try to cast, that way you can see what
you are accessing before you try to cast it

Filip

 -Original Message-
 From: Chakravarthy, Sundar [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 7:57 AM
 To: Tomcat Users List
 Subject: RE: Casting DBCP Connection to OracleConnection



 Run-time failure using both getInnermostDelegate() and getDelegate().
 Any other alternatives ?

 -Sundar

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 10:49 AM
 To: Tomcat Users List
 Subject: Re: Casting DBCP Connection to OracleConnection

 Compile fail or run-time fail?

 If compile fail - you need a nightly of dbcp.
 If run-time fail, you may need to use getInnermostDelegate() instead

 -Tim

 Chakravarthy, Sundar wrote:
  I tried the following with no success,
 
  1. PoolableConnection pc = (PoolableConnection)conn;
  2. OracleConnection oc = (OracleConnection)pc.getDelegate();
 
  Fails in line 2
 
  -Sundar
 
 
  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 31, 2003 10:34 AM
  To: Tomcat Users List
  Subject: Re: Casting DBCP Connection to OracleConnection
 
  All dbcp objects have a getDelegate() method (I think). But you'll
 need
  to do 2 casts.
  - dbcpConn = (DBCPClassCast)conn-- The dbcp connection
  - myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the
  underlying implementation
 
  Look at the DBCP javadocs for the correct class names.
 
  BUT you'll need to use a nightly build of dbcp to do this since the
  version shipped with tomcat doesn't have the getDeletgate() methods.
 
  -Tim
 
  Marco Rossi wrote:
 
 I have the same problem. If you find a solution, please reply
 
 
 
 HI,
 
 I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
 Connection returned from DBCP to OracleConnection I get a
 ClassCastException .
 
 Anyone here know how to cast correctly ?
 
 Thanks
 
 
 
 
  -
  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]


 -
 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]



Strange mod_jk 1.2.2 behavior?

2003-03-31 Thread Andy Meadows
We are experiencing a weird behavior with DirectoryIndex using apache
(actually, it's IBM HttpServer 1.3.26) and mod_jk 1.2.2 on AIX 4.3.3 (I
think).

There is an application hosted by the web server that specifically states
it's DirectoryIndex is index.php.  That's it, nothing else.  Now, when
mod_jk is not loaded, this works fine.  However, adding the LoadModule and
AddModule to httpd.conf is enough to break the application.  These two calls
send any request for the non-related php application to Tomcat.  It's almost
as if mod_jk searches the directory tree for any DirectoryIndex values.
When it finds these values it inserts, at the beginning, index.jsp if it
doesn't exist in the DirectoryIndex list.

I should note that adding index.jsp at the end of the DirectoryIndex fixes
this problem and tends to reinforce the above conclusion.

Does anyone know if this is a documented behavior somewhere?

Thanks.
Andy


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



Problems with ajp13, mod_jk, and load balancer

2003-03-31 Thread Jeff . Edwards
Hi,
 
I'm having problems getting ajp13 working reliably with mod_jk and the load
balancer.  Here is my configuration:
 
- Linux machines with Red Hat 7.2
- Apache 1.3.27
- Tomcat 4.1.x 
- JDK 1.4.0_01 
- Running Apache AXIS web-services
 
I have setup the workers.properties file to load balance between two Tomcat
nodes.  Everything works fine until one of the Tomcat nodes is brought down.
At this time, the XML that is received by the remaining Tomcat node
(configured to process SOAP message via AXIS servlet) has an invalid
character in the XML's document root.  The actual exception is:
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xfa) was
found in the prolog of the document.  When both nodes are up, SOAP requests
are forwarded to the two Tomcat nodes in a round-robin fashion.  The content
of the valid SOAP message is as follows:
 
?xml version=1.0 encoding=UTF-8?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body
ns1:getFailures
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:ns1=urn:NaagSchema/ /soapenv:Body/soapenv:Envelope
 
When the one node is brought down, I see in the mod_jk.log file that the
request failed delivery to the down node and is being routed to the
remaining worker.  When this occurs, the content of the SOAP message is
corrupted and is as follows:
 
ú?xml version=1.0 encoding=UTF-8?soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body
ns1:getFailures
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:ns1=urn:NaagSchema/ /soapenv:Body/soapenv:Envelope
 
You can see that the first character is trashed!
 
Here is what is in the mod_jk.log file during this ordeal:
 
[Mon Mar 31 09:11:00 2003]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Mon Mar 31 09:11:00 2003]  [jk_uri_worker_map.c (477)]: Attempting to map
URI '/naag/services/NaagPort'
[Mon Mar 31 09:11:00 2003]  [jk_uri_worker_map.c (502)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match naag_balancer
- /naag/services/
[Mon Mar 31 09:11:00 2003]  [jk_worker.c (132)]: Into wc_get_worker_for_name
naag_balancer
[Mon Mar 31 09:11:00 2003]  [jk_worker.c (136)]: wc_get_worker_for_name,
done  found a worker
[Mon Mar 31 09:11:00 2003]  [jk_lb_worker.c (527)]: Into
jk_worker_t::get_endpoint
[Mon Mar 31 09:11:00 2003]  [jk_lb_worker.c (310)]: Into
jk_endpoint_t::service
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (1355)]: Into
jk_worker_t::get_endpoint
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (1079)]: Into
jk_endpoint_t::service
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (280)]: Into
ajp_marshal_into_msgb
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (413)]: ajp_marshal_into_msgb -
Done
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (613)]: sending to ajp13 #297
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (854)]: ajp_send_request 2:
request body to send 381 - request body to resend 0
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (613)]: sending to ajp13 #387
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (652)]:
ajp_connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (1013)]: Error reading reply
[Mon Mar 31 09:11:00 2003]  [jk_ajp_common.c (1150)]: In
jk_endpoint_t::service, ajp_get_reply failed in send loop 0
[Mon Mar 31 09:11:00 2003]  [jk_connect.c (116)]: Into jk_open_socket
[Mon Mar 31 09:11:00 2003]  [jk_connect.c (123)]: jk_open_socket, try to
connect socket = 6
[Mon Mar 31 09:11:03 2003]  [jk_connect.c (132)]: jk_open_socket, after
connect ret = -1
[Mon Mar 31 09:11:03 2003]  [jk_connect.c (151)]: jk_open_socket, connect()
failed errno = 111
[Mon Mar 31 09:11:03 2003]  [jk_ajp_common.c (599)]: In
jk_endpoint_t::ajp_connect_to_endpoint, failed errno = 111
[Mon Mar 31 09:11:03 2003]  [jk_ajp_common.c (844)]: Error connecting to the
Tomcat process.
[Mon Mar 31 09:11:03 2003]  [jk_ajp_common.c (1153)]: In
jk_endpoint_t::service, ajp_send_request failed in send loop 1
[Mon Mar 31 09:11:03 2003]  [jk_connect.c (116)]: Into jk_open_socket
[Mon Mar 31 09:11:03 2003]  [jk_connect.c (123)]: jk_open_socket, try to
connect socket = 6
[Mon Mar 31 09:11:03 2003]  [jk_connect.c (132)]: jk_open_socket, after
connect ret = -1
[Mon Mar 31 09:11:03 2003]  [jk_connect.c (151)]: jk_open_socket, connect()
failed errno = 111
[Mon Mar 31 09:11:03 2003]  [jk_ajp_common.c (599)]: In
jk_endpoint_t::ajp_connect_to_endpoint, failed errno = 111
[Mon Mar 31 09:11:03 2003]  [jk_ajp_common.c (844)]: Error connecting to the
Tomcat process.
[Mon Mar 31 09:11:03 2003]  [jk_ajp_common.c (1153)]: In
jk_endpoint_t::service, ajp_send_request failed in send loop 2
[Mon Mar 31 09:11:03 2003]  [jk_ajp_common.c (1339)]: Into
jk_endpoint_t::done, closing 

RE: Casting DBCP Connection to OracleConnection

2003-03-31 Thread Chakravarthy, Sundar
Strange .. the getDelegate().getClass().getName() returns
oracle.jdbc.driver.OracleConnection . But the cast fails at runtime.

Sundar

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 11:05 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection

hi Sundar,
as an alternative, why don't you print the class names to know what you
are
doing

for example

System.out.println(delegate=+conn.getDelegate().getClass().getName());

and do that for all of the things you try to cast, that way you can see
what
you are accessing before you try to cast it

Filip

 -Original Message-
 From: Chakravarthy, Sundar [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 7:57 AM
 To: Tomcat Users List
 Subject: RE: Casting DBCP Connection to OracleConnection



 Run-time failure using both getInnermostDelegate() and getDelegate().
 Any other alternatives ?

 -Sundar

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 10:49 AM
 To: Tomcat Users List
 Subject: Re: Casting DBCP Connection to OracleConnection

 Compile fail or run-time fail?

 If compile fail - you need a nightly of dbcp.
 If run-time fail, you may need to use getInnermostDelegate() instead

 -Tim

 Chakravarthy, Sundar wrote:
  I tried the following with no success,
 
  1. PoolableConnection pc = (PoolableConnection)conn;
  2. OracleConnection oc = (OracleConnection)pc.getDelegate();
 
  Fails in line 2
 
  -Sundar
 
 
  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 31, 2003 10:34 AM
  To: Tomcat Users List
  Subject: Re: Casting DBCP Connection to OracleConnection
 
  All dbcp objects have a getDelegate() method (I think). But you'll
 need
  to do 2 casts.
  - dbcpConn = (DBCPClassCast)conn-- The dbcp connection
  - myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the
  underlying implementation
 
  Look at the DBCP javadocs for the correct class names.
 
  BUT you'll need to use a nightly build of dbcp to do this since the
  version shipped with tomcat doesn't have the getDeletgate() methods.
 
  -Tim
 
  Marco Rossi wrote:
 
 I have the same problem. If you find a solution, please reply
 
 
 
 HI,
 
 I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
 Connection returned from DBCP to OracleConnection I get a
 ClassCastException .
 
 Anyone here know how to cast correctly ?
 
 Thanks
 
 
 
 
 
-
  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]


 -
 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: Casting DBCP Connection to OracleConnection - Solved IT!

2003-03-31 Thread Chakravarthy, Sundar
I was using ojdbc_g.jar instead of classes12.zip ( i.e classes12.jar )

Sundar

-Original Message-
From: Chakravarthy, Sundar 
Sent: Monday, March 31, 2003 11:11 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection

Strange .. the getDelegate().getClass().getName() returns
oracle.jdbc.driver.OracleConnection . But the cast fails at runtime.

Sundar

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 11:05 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection

hi Sundar,
as an alternative, why don't you print the class names to know what you
are
doing

for example

System.out.println(delegate=+conn.getDelegate().getClass().getName());

and do that for all of the things you try to cast, that way you can see
what
you are accessing before you try to cast it

Filip

 -Original Message-
 From: Chakravarthy, Sundar [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 7:57 AM
 To: Tomcat Users List
 Subject: RE: Casting DBCP Connection to OracleConnection



 Run-time failure using both getInnermostDelegate() and getDelegate().
 Any other alternatives ?

 -Sundar

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 10:49 AM
 To: Tomcat Users List
 Subject: Re: Casting DBCP Connection to OracleConnection

 Compile fail or run-time fail?

 If compile fail - you need a nightly of dbcp.
 If run-time fail, you may need to use getInnermostDelegate() instead

 -Tim

 Chakravarthy, Sundar wrote:
  I tried the following with no success,
 
  1. PoolableConnection pc = (PoolableConnection)conn;
  2. OracleConnection oc = (OracleConnection)pc.getDelegate();
 
  Fails in line 2
 
  -Sundar
 
 
  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 31, 2003 10:34 AM
  To: Tomcat Users List
  Subject: Re: Casting DBCP Connection to OracleConnection
 
  All dbcp objects have a getDelegate() method (I think). But you'll
 need
  to do 2 casts.
  - dbcpConn = (DBCPClassCast)conn-- The dbcp connection
  - myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the
  underlying implementation
 
  Look at the DBCP javadocs for the correct class names.
 
  BUT you'll need to use a nightly build of dbcp to do this since the
  version shipped with tomcat doesn't have the getDeletgate() methods.
 
  -Tim
 
  Marco Rossi wrote:
 
 I have the same problem. If you find a solution, please reply
 
 
 
 HI,
 
 I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
 Connection returned from DBCP to OracleConnection I get a
 ClassCastException .
 
 Anyone here know how to cast correctly ?
 
 Thanks
 
 
 
 
 
-
  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]


 -
 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]


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



Re: ?? Simple Newbie Question about Root Context ??

2003-03-31 Thread Micael
No, it is not a guess.  I mean has to be.  The default has to be 
hardcoded somewhere, since it is not configured and it does not happen 
magically.

At 05:59 AM 3/31/03 -0600, you wrote:
Well, it sounds like a guess...

- Original Message -
From: Micael [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 31, 2003 12:33 AM
Subject: Re: ?? Simple Newbie Question about Root Context ??
 The reason has to be, then, that the startup of the webapp creates a
 default context on its own, because it cannot happen magically.  I hope
 that does not sound smart-alexey but, rather, clear.



 At 08:14 PM 3/30/03 -0600, you wrote:
 But my point is that everything works fine even *with* the comment. THAT
is
 what's confusing.
 
 
 - Original Message -
 From: Carol Carrick [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Sunday, March 30, 2003 4:20 PM
 Subject: Re: ?? Simple Newbie Question about Root Context ??
 
 
   The website I sent tells you to take the comments out.
   - Original Message -
   From: Tony LaPaso [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Sunday, March 30, 2003 5:01 PM
   Subject: Re: ?? Simple Newbie Question about Root Context ??
  
  
Well, I don't have to create pages under ROOT as you did, but that's
a
separate issue from what I'm asking.
   
   
   
- Original Message -
From: Carol Carrick [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 3:50 PM
Subject: Re: ?? Simple Newbie Question about Root Context ??
   
   
 Although I am really a newbie, I have the same o/s system.  I have
   trouble
 loading my pages until I created them under the ROOT path and
   uncommented
 the section you are referring to.  Here is a good web reference.
 http://www.moreservlets.com/Using-Tomcat-4.html




 - Original Message -
 From: Tony LaPaso [EMAIL PROTECTED]
 To: Tomcat User [EMAIL PROTECTED]
 Sent: Sunday, March 30, 2003 4:00 PM
 Subject: ?? Simple Newbie Question about Root Context ??


  My Tomcat skills are rusty -- I must be missing something easy
here.
 
  I just installed TC v4.1.24 on Win 2k. The installation worked
right
   out
 of
  the box. I didn't have to make any changes to the server.xml. TC
is
 up
and
  running but I'm seeing something strange I was hoping someone
could
 explain:
 
 
  Here's a quote from the TC documentation: ...you MUST define a
   Context
 with
  a context path equal to a zero-length string. This Context
becomes
 the
  default web application for this virtual host, and is used to
 process
all
  requests that do not match any other Context's context path.
 
  Okay, that's fine, but when I look at conf/server.xml I see
this:
 
  !-- Tomcat Root Context --
  !--
  Context path= docBase=ROOT debug=0/
  --
 
 
  Why is this commented out? According to the documentation there
must
   be
a
  context path equal to a zero-length string. The quote I cited
 seems
   to
  contradict what I'm seeing in server.xml.
 
  Even though this is commented out everything seems to work fine.
In
other
  words, if I browse to localhost:8080 I do indeed see
 webapps/ROOT/index.jsp.
  Is the docBase named ROOT the default? If so, then the
 documentation
  should mention that I think.
 
  Thanks very much,
 
  Tony
 
 
 
 
 
 
 

   -
  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]
   
  
  
   -
   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]



 LEGAL NOTICE

 This electronic mail  transmission and any accompanying documents contain
 information belonging to the sender which may be confidential and legally
 privileged.  This information is intended only for the use of the
 individual or entity to whom this electronic mail transmission was sent as
 indicated above. If you are not the intended recipient, any disclosure,
 copying, distribution, or action taken in reliance on the contents of the

RE: Casting DBCP Connection to OracleConnection - Solved IT!

2003-03-31 Thread Marco Rossi
Where do you find ojdbc_g.jar?

I was using ojdbc_g.jar instead of classes12.zip ( i.e classes12.jar )

Sundar

-Original Message-
From: Chakravarthy, Sundar 
Sent: Monday, March 31, 2003 11:11 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection

Strange .. the getDelegate().getClass().getName() returns
oracle.jdbc.driver.OracleConnection . But the cast fails at runtime.

Sundar

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 11:05 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection

hi Sundar,
as an alternative, why don't you print the class names to know what you
are
doing

for example

System.out.println(delegate=+conn.getDelegate().getClass().getName());

and do that for all of the things you try to cast, that way you can see
what
you are accessing before you try to cast it

Filip

 -Original Message-
 From: Chakravarthy, Sundar [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 7:57 AM
 To: Tomcat Users List
 Subject: RE: Casting DBCP Connection to OracleConnection



 Run-time failure using both getInnermostDelegate() and getDelegate().
 Any other alternatives ?

 -Sundar

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 10:49 AM
 To: Tomcat Users List
 Subject: Re: Casting DBCP Connection to OracleConnection

 Compile fail or run-time fail?

 If compile fail - you need a nightly of dbcp.
 If run-time fail, you may need to use getInnermostDelegate() instead

 -Tim

 Chakravarthy, Sundar wrote:
  I tried the following with no success,
 
  1. PoolableConnection pc = (PoolableConnection)conn;
  2. OracleConnection oc = (OracleConnection)pc.getDelegate();
 
  Fails in line 2
 
  -Sundar
 
 
  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 31, 2003 10:34 AM
  To: Tomcat Users List
  Subject: Re: Casting DBCP Connection to OracleConnection
 
  All dbcp objects have a getDelegate() method (I think). But you'll
 need
  to do 2 casts.
  - dbcpConn = (DBCPClassCast)conn-- The dbcp connection
  - myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the
  underlying implementation
 
  Look at the DBCP javadocs for the correct class names.
 
  BUT you'll need to use a nightly build of dbcp to do this since the
  version shipped with tomcat doesn't have the getDeletgate() methods.
 
  -Tim
 
  Marco Rossi wrote:
 
 I have the same problem. If you find a solution, please reply
 
 
 
 HI,
 
 I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
 Connection returned from DBCP to OracleConnection I get a
 ClassCastException .
 
 Anyone here know how to cast correctly ?
 
 Thanks
 
 
 
 
 
-
  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]


 -
 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]


-
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]



having a problem with undeploy in tomcat web manager

2003-03-31 Thread Blohm, Ed
I am having problems with the tomcat web manager.  When I try to undeploy my
webapp using the ant task undeploy, I get an error that looks like:

undeploy:
 [undeploy] FAIL - Cannot remove document base for path /

I can stop, start and reload my webapp using the ant tasks, but not undeploy
or remove the webapp.  I am running tomcat 4.1.24 and redhat 7.1. Thanks for
any help.

Eddie


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



Re: Memory Woes

2003-03-31 Thread Jacob Kjome
Possibly this StringBufffer.toString() memory leak bug in j2sdk1.4.1?  What 
JDK do you use?  j2sdk1.4.0 doesn't suffer from this issue...
http://developer.java.sun.com/developer/bugParade/bugs/4724129.html

Jake

At 03:05 PM 3/30/2003 -0500, you wrote:
Actually, this is 100% servlet-powered... no JSP pages are used.  Anyone
else know of any issues?
Mark

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 8:17 AM
Subject: Memory Woes
Hello,

Has anyone had any memory issues when running Tomcat in a production
environment where it stays up for weeks?  I have a webapp that is fairly
intense, using the Struts framework (which is great, by the way!)  with
streaming data to sockets and database logging to mySQL.  I have several of
these apps running in one Tomcat installation.
My problem is that memory usage keeps steadily creeping up on me until I
start
getting the dreaded java.lang.OutOfMemoryError (or something like that).
I bumped up the memory settings for the JVM memory settings, which simply
delays the problem, but it still happens. (-Xmx... )
I have also profiled the application, and found that after garbage
collection
all of my objects go back to the original usage levels (as far as
instances). None of them are continually appending to a string or anything
like that... mainly just state information.
I'm not sure where to go from here - having to occasionally restart Tomcat
once a month is not a workable solution for me.
Any advice would be GREATLY appreciated!

Mark



-
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: Casting DBCP Connection to OracleConnection - Solved IT!

2003-03-31 Thread Chakravarthy, Sundar
In my tomcat common/lib; apparently it is the debug version of Oracle's
jdbc implentation. Download classes12.zip ( and rename to classes12.jar
) from Oracle site.

Sundar

-Original Message-
From: Marco Rossi [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 11:25 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection - Solved IT!

Where do you find ojdbc_g.jar?

I was using ojdbc_g.jar instead of classes12.zip ( i.e classes12.jar )

Sundar

-Original Message-
From: Chakravarthy, Sundar 
Sent: Monday, March 31, 2003 11:11 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection

Strange .. the getDelegate().getClass().getName() returns
oracle.jdbc.driver.OracleConnection . But the cast fails at runtime.

Sundar

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 11:05 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection

hi Sundar,
as an alternative, why don't you print the class names to know what you
are
doing

for example

System.out.println(delegate=+conn.getDelegate().getClass().getName())
;

and do that for all of the things you try to cast, that way you can see
what
you are accessing before you try to cast it

Filip

 -Original Message-
 From: Chakravarthy, Sundar [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 7:57 AM
 To: Tomcat Users List
 Subject: RE: Casting DBCP Connection to OracleConnection



 Run-time failure using both getInnermostDelegate() and getDelegate().
 Any other alternatives ?

 -Sundar

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 10:49 AM
 To: Tomcat Users List
 Subject: Re: Casting DBCP Connection to OracleConnection

 Compile fail or run-time fail?

 If compile fail - you need a nightly of dbcp.
 If run-time fail, you may need to use getInnermostDelegate() instead

 -Tim

 Chakravarthy, Sundar wrote:
  I tried the following with no success,
 
  1. PoolableConnection pc = (PoolableConnection)conn;
  2. OracleConnection oc = (OracleConnection)pc.getDelegate();
 
  Fails in line 2
 
  -Sundar
 
 
  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 31, 2003 10:34 AM
  To: Tomcat Users List
  Subject: Re: Casting DBCP Connection to OracleConnection
 
  All dbcp objects have a getDelegate() method (I think). But you'll
 need
  to do 2 casts.
  - dbcpConn = (DBCPClassCast)conn-- The dbcp connection
  - myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the
  underlying implementation
 
  Look at the DBCP javadocs for the correct class names.
 
  BUT you'll need to use a nightly build of dbcp to do this since the
  version shipped with tomcat doesn't have the getDeletgate()
methods.
 
  -Tim
 
  Marco Rossi wrote:
 
 I have the same problem. If you find a solution, please reply
 
 
 
 HI,
 
 I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
 Connection returned from DBCP to OracleConnection I get a
 ClassCastException .
 
 Anyone here know how to cast correctly ?
 
 Thanks
 
 
 
 
 
-
  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]


 -
 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]


-
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: ?? Simple Newbie Question about Root Context ??

2003-03-31 Thread Jacob Kjome
ROOT is sort of a magical directory/WAR name that Tomcat recognizes and, 
if present, will be treated as the no-path context whether it has a 
Context ... entry or not.  I think one thing you need to watch out for is 
having th ROOT directory present when, at the same time, you use another 
context as the no-path context such as...

webapps
   /ROOT
   /myapp
in server.xml
Context path= docBase=myapp/
You might have to remove ROOT in order for this setup to work properly 
because I think Tomcat might get confused with trying to treat ROOT as the 
no-path context since it tries to make it the no-path context by 
default.  However, I haven't tested this assumption.  You'll have to see 
what works for you.

Either way, I think that documentation is either wrong, misleading, or just 
outdated.

Jake

At 03:00 PM 3/30/2003 -0600, you wrote:
My Tomcat skills are rusty -- I must be missing something easy here.

I just installed TC v4.1.24 on Win 2k. The installation worked right out of
the box. I didn't have to make any changes to the server.xml. TC is up and
running but I'm seeing something strange I was hoping someone could explain:
Here's a quote from the TC documentation: ...you MUST define a Context with
a context path equal to a zero-length string. This Context becomes the
default web application for this virtual host, and is used to process all
requests that do not match any other Context's context path.
Okay, that's fine, but when I look at conf/server.xml I see this:

!-- Tomcat Root Context --
!--
Context path= docBase=ROOT debug=0/
--
Why is this commented out? According to the documentation there must be a
context path equal to a zero-length string. The quote I cited seems to
contradict what I'm seeing in server.xml.
Even though this is commented out everything seems to work fine. In other
words, if I browse to localhost:8080 I do indeed see webapps/ROOT/index.jsp.
Is the docBase named ROOT the default? If so, then the documentation
should mention that I think.
Thanks very much,

Tony







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


Re: Re: shared resources

2003-03-31 Thread Pat McGroin
Paul,

That worked *BUT* the documentation says otherwise:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

For classes and resources that must be shared across all web applications, place 
unpacked classes and resources under $CATALINA_HOME/shared/classes, or place JAR files 
containing those classes and resources under $CATALINA_HOME/shared/lib.

This class loader contains additional classes that are made visible to both Tomcat 
internal classes and to all web applications. Normally, application classes should NOT 
be placed here.

The $CATALINA_HOME/common/lib contains such JAR files as ant.jar and servlet.jar so it 
does not seem like the place for my shared JAR files.

Is the documentation wrong or is this a bug?
Or am I just reading the documentation incorrectly?

Thanks,
Todd


-Original Message-
From: Paul Hsu[EMAIL PROTECTED]
To: Tomcat Users List[EMAIL PROTECTED]
Date: Sun Mar 30 19:20:44 PST 2003
Subject: Re: shared resources

Todd,

You need to put your jar file under $CATALINA_HOME/common direcotry.
$CATALINA_HOME/shared directory are only available to Catalina engine, not
application but /common can be seen by both engine and application.

Paul
- Original Message -
From: Pat McGroin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 5:32 PM
Subject: Re: shared resources


 Craig,

 Thanks again for the information.
 The info. you've supplied has been very useful.
 However, my problem remains:

 I cannot access the class that resides in a JAR file (utilities.jar) in
tomcat_home/shared/lib and get a java.lang.NoClassDefFoundError

 I am spinning my wheels on this so hopefully some details will shed some
light on my problem. I wrote a very simple servlet that attempts to use the
class in the shared dir.

 
 import com.myco.utilities.CASDate;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;

 public class Test1 extends HttpServlet {
 //
 public void doGet(HttpServletRequest request, HttpServletResponse
response) throws javax.servlet.ServletException, java.io.IOException {

 System.out.println(GET method of Test1 invloked);
 performTask(request, response);
 }
 //
 public void doPost(HttpServletRequest request, HttpServletResponse
response) throws javax.servlet.ServletException, java.io.IOException {

 System.out.println(POST method of Test1 invloked);
 performTask(request, response);
 }
 /**
 * Test the use of a shared class.
 */
 public void performTask(HttpServletRequest request, HttpServletResponse
response) {

 try {
 java.io.PrintWriter pw = response.getWriter();
 CASDate today = new CASDate();
 pw.println(CASDate today is  + today.toString());
 pw.println(CASDate class loaded...);
 }
 catch(Throwable theException) {
 System.out.println(Error...);
 theException.printStackTrace(System.out);
 }
 }
 }
 
 This is the utility class (some getXXX methods deleted for brevity):
 
 package com.myco.utilities;

 import java.util.Calendar;
 import java.util.GregorianCalendar;

 public class CASDate {
 private int ccc = 0;
 private int yyy = 0;
 private int mmm = 0;
 private int ddd = 0;
 private int time = 0;
 /**
 * Default constructor is to create CAS date using the current date.
 */
 public CASDate() {
 super();
 GregorianCalendar cal = new GregorianCalendar();
 ccc = 20;
 yyy = cal.get(Calendar.YEAR) - 2000;
 mmm = cal.get(Calendar.MONTH) + 1;
 ddd = cal.get(Calendar.DAY_OF_MONTH);
 }
 /**
 * Return a string in MM/DD/CCYY format.
 */
 public String toString() {
 String returnValue = getMonth() + / + getDay() + / +
getYearAndCentury();
 return returnValue;
 }
 }
 

 The error I get is:
 java.lang.NoClassDefFoundError: com/myco/utilities/CASDate

 When I moved utilities.jar to webapp/WEB-INF/lib the error goes away.
 I hope this provides some clues as to what is going wrong. At this point
it looks like a bug but I hope I'm wrong. I am using Tomcat 4.1.18.

 Any help is GREATLY appreciated.

 Thanks,
 Todd


 -Original Message-
 From: Craig R. McClanahan[EMAIL PROTECTED]
 To: Pat McGroin[EMAIL PROTECTED]
 Date: Thu Mar 27 13:53:24 PST 2003
 Subject: Re: shared resources

 
 
 On Thu, 27 Mar 2003, Pat McGroin wrote:
 
  Date: Thu, 27 Mar 2003 12:57:03 -0800 (PST)
  From: Pat McGroin [EMAIL PROTECTED]
  To: Craig R. McClanahan [EMAIL PROTECTED]
  Subject: Re: Re: shared resources
 
  Craig,
 
  Thanks very much for the detailed reply.
  That is very useful information for getting at resource files.
  However, my problem is much simpler. I am simply getting
java.lang.NoClassDefFoundError errors when I try to use classes in JAR files
in the tomcat_home/shared/lib directory.
  When I move the jar files to my webapp root/WEB-INF/lib the classes
are loaded just fine and I don't see these errors.
 
 
 One likely cause for this sort of thing: if a class in your problem
 child JAR file is itself loaded from the shared class loader, but tries
 to 

RE: Casting DBCP Connection to OracleConnection - Solved IT!

2003-03-31 Thread Marco Rossi
I'm sorry, but i think to have an old release of commons-dbcp.jar, and i don't' find 
the getDelegate() method. It's in org.apache.commons.dbcp.PoolableConnection class??

In my tomcat common/lib; apparently it is the debug version of Oracle's
jdbc implentation. Download classes12.zip ( and rename to classes12.jar
) from Oracle site.

Sundar

-Original Message-
From: Marco Rossi [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 11:25 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection - Solved IT!

Where do you find ojdbc_g.jar?

I was using ojdbc_g.jar instead of classes12.zip ( i.e classes12.jar )

Sundar

-Original Message-
From: Chakravarthy, Sundar 
Sent: Monday, March 31, 2003 11:11 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection

Strange .. the getDelegate().getClass().getName() returns
oracle.jdbc.driver.OracleConnection . But the cast fails at runtime.

Sundar

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2003 11:05 AM
To: Tomcat Users List
Subject: RE: Casting DBCP Connection to OracleConnection

hi Sundar,
as an alternative, why don't you print the class names to know what you
are
doing

for example

System.out.println(delegate=+conn.getDelegate().getClass().getName())
;

and do that for all of the things you try to cast, that way you can see
what
you are accessing before you try to cast it

Filip

 -Original Message-
 From: Chakravarthy, Sundar [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 7:57 AM
 To: Tomcat Users List
 Subject: RE: Casting DBCP Connection to OracleConnection



 Run-time failure using both getInnermostDelegate() and getDelegate().
 Any other alternatives ?

 -Sundar

 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 10:49 AM
 To: Tomcat Users List
 Subject: Re: Casting DBCP Connection to OracleConnection

 Compile fail or run-time fail?

 If compile fail - you need a nightly of dbcp.
 If run-time fail, you may need to use getInnermostDelegate() instead

 -Tim

 Chakravarthy, Sundar wrote:
  I tried the following with no success,
 
  1. PoolableConnection pc = (PoolableConnection)conn;
  2. OracleConnection oc = (OracleConnection)pc.getDelegate();
 
  Fails in line 2
 
  -Sundar
 
 
  -Original Message-
  From: Tim Funk [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 31, 2003 10:34 AM
  To: Tomcat Users List
  Subject: Re: Casting DBCP Connection to OracleConnection
 
  All dbcp objects have a getDelegate() method (I think). But you'll
 need
  to do 2 casts.
  - dbcpConn = (DBCPClassCast)conn-- The dbcp connection
  - myOraConn = (OraClassCast)dbcpConn.getDelegate() -- Get the
  underlying implementation
 
  Look at the DBCP javadocs for the correct class names.
 
  BUT you'll need to use a nightly build of dbcp to do this since the
  version shipped with tomcat doesn't have the getDeletgate()
methods.
 
  -Tim
 
  Marco Rossi wrote:
 
 I have the same problem. If you find a solution, please reply
 
 
 
 HI,
 
 I am using Tomcat 4.1.18 with Oracle 9i. When I try to cast the
 Connection returned from DBCP to OracleConnection I get a
 ClassCastException .
 
 Anyone here know how to cast correctly ?
 
 Thanks
 
 
 
 
 
-
  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]


 -
 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]


-
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]

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



RE: JNDI resources

2003-03-31 Thread Jacob Kjome
No, that is absolutely not true and very misleading.  The spec actually 
declares that it should definitely be specified in web.xml no matter 
what.  Tomcat doesn't enforce this, but if you want your webapp to be 
portable, then you should include it in web.xml.  Remember, server.xml is 
Tomcat's proprietary configuration.  J2EE is all about providing a 
specification for configuration and then allowing proprietary servers to 
have their own configuration that maps to this and allows it to override it.

The configuration is correct from what I can tell.  You might try the 
following code, though...

Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/Pool);
Not sure if this will fix the problem, but the problem most assuredly is 
not the issue of having the web.xml config stuff.

Jake

At 10:47 AM 3/31/2003 +0200, you wrote:
Hi,

What is in your web.xml relating to the datasource?

If the datasource is correctly defined in server.xml, there is no need to 
define it in web.xml, but if you do, web.xml will supersede server.xml, 
and if web.xml does not have all the correct parameters, you will get this 
problem.

HTH

-Original Message-
From: Greg Speechley [mailto:[EMAIL PROTECTED]
Sent: 31 March 2003 10:40
To: Tomcat User
Subject: Re: JNDI resources
I am trying to use tomcat's DBCP and access it by setting variables in
server.xml and web.xml as outlined in the documentation. However it is not
getting any of the values that are set in server.xml.
Here is my java code:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
// Look up our data source
DataSource ds = (DataSource) envCtx.lookup(jdbc/Pool);
if (ds != null)
{
Connection conn = ds.getConnection();
...
}
However I get the following error: java.sql.SQLException: Cannot load JDBC
driver class 'null'. ds is not null but all its variables are (I checked by
casting it to BasicDataSource and using the getter methods).
I have the mysql driver in a jar in common/lib and I think I have followed
all the steps correctly.
Thanks for your help
Greg
PS I am having the same sort of problems with getting the mail variables as
well
server.xml

---
Server port=8005 shutdown=SHUTDOWN debug=0
  !-- Uncomment these entries to enable JMX MBeans support --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/
  !-- Global JNDI resources --
  GlobalNamingResources
!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
  /GlobalNamingResources
  !-- Define the Tomcat Stand-Alone Service --
  Service name=Tomcat-Standalone
!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=80   minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=100 debug=0 connectionTimeout=2
   useURIValidationHack=false disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
 to -1 --
!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
Connector 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/

!-- Define the top level container in our container hierarchy --
Engine name=Standalone defaultHost=localhost debug=0
  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_log. suffix=.txt
  timestamp=true/
Realm className=org.apache.catalina.realm.UserDatabaseRealm
 debug=0 resourceName=UserDatabase/
  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
!-- Logger shared by all Contexts related to this virtual host.  By
 default (when using FileLogger), log files are created in the
logs
 directory relative to $CATALINA_HOME.  

RE: Re: shared resources

2003-03-31 Thread Shapira, Yoav

Howdy,
I believe the documentation is correct.

If you've searched this list's archives for topics like this one, you'll
find they come up all the time ;(.  I usually chime in with the
following:

What do you gain from sharing a jar across webapps?  With some notable
exceptions, e.g. a JDBC driver you want pooled using a pool defined in
server.xml, you don't gain much from sharing a jar.  Your deployment
becomes more complicated, and you can't use a true war file approach.
Disk space is cheap.  My philosophy is to not share jars in locations
like common/lib or shared/lib unless absolutely necessary.  Yes, this
does force you to pay extra attention to what versions of jars are
deployed along with your webapps, but this is something you have to pay
attention to anyways.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Pat McGroin [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 11:10 AM
To: Tomcat Users List
Cc: Paul Hsu
Subject: Re: Re: shared resources

Paul,

That worked *BUT* the documentation says otherwise:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

For classes and resources that must be shared across all web
applications,
place unpacked classes and resources under
$CATALINA_HOME/shared/classes,
or place JAR files containing those classes and resources under
$CATALINA_HOME/shared/lib.

This class loader contains additional classes that are made visible to
both Tomcat internal classes and to all web applications. Normally,
application classes should NOT be placed here.

The $CATALINA_HOME/common/lib contains such JAR files as ant.jar and
servlet.jar so it does not seem like the place for my shared JAR files.

Is the documentation wrong or is this a bug?
Or am I just reading the documentation incorrectly?

Thanks,
Todd


-Original Message-
From: Paul Hsu[EMAIL PROTECTED]
To: Tomcat Users List[EMAIL PROTECTED]
Date: Sun Mar 30 19:20:44 PST 2003
Subject: Re: shared resources

Todd,

You need to put your jar file under $CATALINA_HOME/common direcotry.
$CATALINA_HOME/shared directory are only available to Catalina engine,
not
application but /common can be seen by both engine and application.

Paul
- Original Message -
From: Pat McGroin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 5:32 PM
Subject: Re: shared resources


 Craig,

 Thanks again for the information.
 The info. you've supplied has been very useful.
 However, my problem remains:

 I cannot access the class that resides in a JAR file (utilities.jar)
in
tomcat_home/shared/lib and get a java.lang.NoClassDefFoundError

 I am spinning my wheels on this so hopefully some details will shed
some
light on my problem. I wrote a very simple servlet that attempts to
use
the
class in the shared dir.

 
 import com.myco.utilities.CASDate;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;

 public class Test1 extends HttpServlet {
 //
 public void doGet(HttpServletRequest request, HttpServletResponse
response) throws javax.servlet.ServletException, java.io.IOException {

 System.out.println(GET method of Test1 invloked);
 performTask(request, response);
 }
 //
 public void doPost(HttpServletRequest request, HttpServletResponse
response) throws javax.servlet.ServletException, java.io.IOException {

 System.out.println(POST method of Test1 invloked);
 performTask(request, response);
 }
 /**
 * Test the use of a shared class.
 */
 public void performTask(HttpServletRequest request,
HttpServletResponse
response) {

 try {
 java.io.PrintWriter pw = response.getWriter();
 CASDate today = new CASDate();
 pw.println(CASDate today is  + today.toString());
 pw.println(CASDate class loaded...);
 }
 catch(Throwable theException) {
 System.out.println(Error...);
 theException.printStackTrace(System.out);
 }
 }
 }
 
 This is the utility class (some getXXX methods deleted for brevity):
 
 package com.myco.utilities;

 import java.util.Calendar;
 import java.util.GregorianCalendar;

 public class CASDate {
 private int ccc = 0;
 private int yyy = 0;
 private int mmm = 0;
 private int ddd = 0;
 private int time = 0;
 /**
 * Default constructor is to create CAS date using the current date.
 */
 public CASDate() {
 super();
 GregorianCalendar cal = new GregorianCalendar();
 ccc = 20;
 yyy = cal.get(Calendar.YEAR) - 2000;
 mmm = cal.get(Calendar.MONTH) + 1;
 ddd = cal.get(Calendar.DAY_OF_MONTH);
 }
 /**
 * Return a string in MM/DD/CCYY format.
 */
 public String toString() {
 String returnValue = getMonth() + / + getDay() + / +
getYearAndCentury();
 return returnValue;
 }
 }
 

 The error I get is:
 java.lang.NoClassDefFoundError: com/myco/utilities/CASDate

 When I moved utilities.jar to webapp/WEB-INF/lib the error goes
away.
 I hope this provides some clues as to what is going wrong. At this
point
it looks like a bug but I hope I'm wrong. I am using Tomcat 4.1.18.

 Any help 

RE: JNDI resources

2003-03-31 Thread Steve Gums
Not that I really have a clue what I am talking about, but I receive the
same error if I remove/reload the webapp with ant without restarting the
tomcat application.  From reading below it sounds like the entire
declaration should be in the web.xml instead of the server.xml  That being
said, try restarting tomcat and see if the problem resolves...
If it does you might want to try to move the declaration to the web.xml.


-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 9:54 AM
To: Tomcat Users List
Subject: RE: JNDI resources



No, that is absolutely not true and very misleading.  The spec actually
declares that it should definitely be specified in web.xml no matter
what.  Tomcat doesn't enforce this, but if you want your webapp to be
portable, then you should include it in web.xml.  Remember, server.xml is
Tomcat's proprietary configuration.  J2EE is all about providing a
specification for configuration and then allowing proprietary servers to
have their own configuration that maps to this and allows it to override it.

The configuration is correct from what I can tell.  You might try the
following code, though...

Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/Pool);


Not sure if this will fix the problem, but the problem most assuredly is
not the issue of having the web.xml config stuff.

Jake


At 10:47 AM 3/31/2003 +0200, you wrote:
Hi,

What is in your web.xml relating to the datasource?

If the datasource is correctly defined in server.xml, there is no need to
define it in web.xml, but if you do, web.xml will supersede server.xml,
and if web.xml does not have all the correct parameters, you will get this
problem.

HTH

-Original Message-
From: Greg Speechley [mailto:[EMAIL PROTECTED]
Sent: 31 March 2003 10:40
To: Tomcat User
Subject: Re: JNDI resources


I am trying to use tomcat's DBCP and access it by setting variables in
server.xml and web.xml as outlined in the documentation. However it is not
getting any of the values that are set in server.xml.

Here is my java code:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
// Look up our data source
DataSource ds = (DataSource) envCtx.lookup(jdbc/Pool);
if (ds != null)
{
Connection conn = ds.getConnection();
...
}

However I get the following error: java.sql.SQLException: Cannot load JDBC
driver class 'null'. ds is not null but all its variables are (I checked by
casting it to BasicDataSource and using the getter methods).

I have the mysql driver in a jar in common/lib and I think I have followed
all the steps correctly.

Thanks for your help
Greg

PS I am having the same sort of problems with getting the mail variables as
well

server.xml
---
-
---
Server port=8005 shutdown=SHUTDOWN debug=0
   !-- Uncomment these entries to enable JMX MBeans support --
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
 debug=0/
   Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 debug=0/

   !-- Global JNDI resources --
   GlobalNamingResources

 !-- Editable user database that can also be used by
  UserDatabaseRealm to authenticate users --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved
 /Resource
 ResourceParams name=UserDatabase
   parameter
 namefactory/name
 valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
   /parameter
   parameter
 namepathname/name
 valueconf/tomcat-users.xml/value
   /parameter
 /ResourceParams

   /GlobalNamingResources
   !-- Define the Tomcat Stand-Alone Service --
   Service name=Tomcat-Standalone

 !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 --
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=80   minProcessors=5 maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0 connectionTimeout=2
useURIValidationHack=false disableUploadTimeout=true /
 !-- Note : To disable connection timeouts, set connectionTimeout
value
  to -1 --


 !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
 Connector 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/


 !-- Define the top level container in our container hierarchy --
 Engine name=Standalone defaultHost=localhost debug=0

   !-- Global logger 

Re: GUI for ant ...

2003-03-31 Thread Kristján Bjarni Guðmundsson
Well it depends on what you mean, if you mean a grapchical designer for 
ant build xml files then
I don't think there is any. But if you mean a GUI tool to run ant build 
files, well I personally use
JEdit (http://www.jedit.org) and it has a graphical plugin (AntFarm) for 
runnint ant targets.


[EMAIL PROTECTED] wrote on 31.03.2003 14:47:05:

 Hi,
Being a newbie to ant ( have to use it ) ... can any one give me a
 link to a s/w with GUI for ant ??? 
 
 
 Gurumoorthy Raghupathy
 Aegon Benefit Solution 
 Email : [EMAIL PROTECTED]
 Phone : 0044 20 72404801
 Mobile : 07745988336
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


RE: GUI for ant ...

2003-03-31 Thread Reynir Hübner
Hi guys..

How about http://ant.apache.org/projects/antidote/index.html

-reynir


 -Original Message-
 From: Kristján Bjarni Guðmundsson [mailto:[EMAIL PROTECTED] 
 Sent: 31. mars 2003 16:41
 To: Tomcat Users List
 Subject: Re: GUI for ant ...
 
 
 Well it depends on what you mean, if you mean a grapchical 
 designer for 
 ant build xml files then
 I don't think there is any. But if you mean a GUI tool to run 
 ant build 
 files, well I personally use
 JEdit (http://www.jedit.org) and it has a graphical plugin 
 (AntFarm) for 
 runnint ant targets.
 
 
 [EMAIL PROTECTED] wrote on 31.03.2003 14:47:05:
 
  Hi,
 Being a newbie to ant ( have to use it ) ... can any one 
 give me a 
  link to a s/w with GUI for ant ???
  
  
  Gurumoorthy Raghupathy
  Aegon Benefit Solution
  Email : [EMAIL PROTECTED]
  Phone : 0044 20 72404801
  Mobile : 07745988336
  
  
  
  
 -
  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: JNDI resources

2003-03-31 Thread Jacob Kjome
No, it shouldn't be entirely in the web.xml.  Consider the stuff in web.xml 
to be the interface, not the implementation (speaking in Java terms).  The 
implementation, DBCP, is provided in the server's proprietary 
configuration.  Apps are portable because the standard configuration such 
as web.xml only specifies some general interfaces and then the containers 
are free to provide their own implementation.  As such, you need to provide 
the DBCP implementation in Tomcat's server.xml.

Like I said, the configuration all looks correct to me.  The problem is 
*not* the configuration as far as I can tell.

Jake

At 10:02 AM 3/31/2003 -0700, you wrote:
Not that I really have a clue what I am talking about, but I receive the
same error if I remove/reload the webapp with ant without restarting the
tomcat application.  From reading below it sounds like the entire
declaration should be in the web.xml instead of the server.xml  That being
said, try restarting tomcat and see if the problem resolves...
If it does you might want to try to move the declaration to the web.xml.
-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 9:54 AM
To: Tomcat Users List
Subject: RE: JNDI resources


No, that is absolutely not true and very misleading.  The spec actually
declares that it should definitely be specified in web.xml no matter
what.  Tomcat doesn't enforce this, but if you want your webapp to be
portable, then you should include it in web.xml.  Remember, server.xml is
Tomcat's proprietary configuration.  J2EE is all about providing a
specification for configuration and then allowing proprietary servers to
have their own configuration that maps to this and allows it to override it.
The configuration is correct from what I can tell.  You might try the
following code, though...
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/Pool);
Not sure if this will fix the problem, but the problem most assuredly is
not the issue of having the web.xml config stuff.
Jake

At 10:47 AM 3/31/2003 +0200, you wrote:
Hi,

What is in your web.xml relating to the datasource?

If the datasource is correctly defined in server.xml, there is no need to
define it in web.xml, but if you do, web.xml will supersede server.xml,
and if web.xml does not have all the correct parameters, you will get this
problem.

HTH

-Original Message-
From: Greg Speechley [mailto:[EMAIL PROTECTED]
Sent: 31 March 2003 10:40
To: Tomcat User
Subject: Re: JNDI resources


I am trying to use tomcat's DBCP and access it by setting variables in
server.xml and web.xml as outlined in the documentation. However it is not
getting any of the values that are set in server.xml.

Here is my java code:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
// Look up our data source
DataSource ds = (DataSource) envCtx.lookup(jdbc/Pool);
if (ds != null)
{
Connection conn = ds.getConnection();
...
}

However I get the following error: java.sql.SQLException: Cannot load JDBC
driver class 'null'. ds is not null but all its variables are (I checked by
casting it to BasicDataSource and using the getter methods).

I have the mysql driver in a jar in common/lib and I think I have followed
all the steps correctly.

Thanks for your help
Greg

PS I am having the same sort of problems with getting the mail variables as
well

server.xml
---
-
---
Server port=8005 shutdown=SHUTDOWN debug=0
   !-- Uncomment these entries to enable JMX MBeans support --
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
 debug=0/
   Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 debug=0/

   !-- Global JNDI resources --
   GlobalNamingResources

 !-- Editable user database that can also be used by
  UserDatabaseRealm to authenticate users --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved
 /Resource
 ResourceParams name=UserDatabase
   parameter
 namefactory/name
 valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
   /parameter
   parameter
 namepathname/name
 valueconf/tomcat-users.xml/value
   /parameter
 /ResourceParams

   /GlobalNamingResources
   !-- Define the Tomcat Stand-Alone Service --
   Service name=Tomcat-Standalone

 !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 --
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=80   minProcessors=5 maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=0 connectionTimeout=2
useURIValidationHack=false disableUploadTimeout=true /
 !-- Note : To 

Re: having a problem with undeploy in tomcat web manager

2003-03-31 Thread Jacob Kjome
Did you originally use the Ant manager tasks to deploy the 
application?  If not, you need to use install and remove.  deploy and 
undeploy are a special case for remote deployment of a .war file using 
HTTP PUT which normal browsers don't support.  So, if you didn't use the 
Ant manager deploy task to deploy the application in the first place, 
don't use undeploy to undeploy the application.

Jake

At 08:26 AM 3/31/2003 -0800, you wrote:
I am having problems with the tomcat web manager.  When I try to undeploy my
webapp using the ant task undeploy, I get an error that looks like:
undeploy:
 [undeploy] FAIL - Cannot remove document base for path /
I can stop, start and reload my webapp using the ant tasks, but not undeploy
or remove the webapp.  I am running tomcat 4.1.24 and redhat 7.1. Thanks for
any help.
Eddie

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


RE: JNDI resources

2003-03-31 Thread Steve Gums
Sorry Jake, I am still trying to get the hang on this stuff, it's rather new
to me.

I have gotten this style of resource to work but I do have to restart tomcat
after a reload otherwise I get a null datasource as well.  Not sure why this
is, but this is what I have seen.

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 10:16 AM
To: Tomcat Users List
Subject: RE: JNDI resources



No, it shouldn't be entirely in the web.xml.  Consider the stuff in web.xml
to be the interface, not the implementation (speaking in Java terms).  The
implementation, DBCP, is provided in the server's proprietary
configuration.  Apps are portable because the standard configuration such
as web.xml only specifies some general interfaces and then the containers
are free to provide their own implementation.  As such, you need to provide
the DBCP implementation in Tomcat's server.xml.

Like I said, the configuration all looks correct to me.  The problem is
*not* the configuration as far as I can tell.

Jake

At 10:02 AM 3/31/2003 -0700, you wrote:
Not that I really have a clue what I am talking about, but I receive the
same error if I remove/reload the webapp with ant without restarting the
tomcat application.  From reading below it sounds like the entire
declaration should be in the web.xml instead of the server.xml  That being
said, try restarting tomcat and see if the problem resolves...
If it does you might want to try to move the declaration to the web.xml.


-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 9:54 AM
To: Tomcat Users List
Subject: RE: JNDI resources



No, that is absolutely not true and very misleading.  The spec actually
declares that it should definitely be specified in web.xml no matter
what.  Tomcat doesn't enforce this, but if you want your webapp to be
portable, then you should include it in web.xml.  Remember, server.xml is
Tomcat's proprietary configuration.  J2EE is all about providing a
specification for configuration and then allowing proprietary servers to
have their own configuration that maps to this and allows it to override
it.

The configuration is correct from what I can tell.  You might try the
following code, though...

Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/Pool);


Not sure if this will fix the problem, but the problem most assuredly is
not the issue of having the web.xml config stuff.

Jake


At 10:47 AM 3/31/2003 +0200, you wrote:
 Hi,
 
 What is in your web.xml relating to the datasource?
 
 If the datasource is correctly defined in server.xml, there is no need to
 define it in web.xml, but if you do, web.xml will supersede server.xml,
 and if web.xml does not have all the correct parameters, you will get
this
 problem.
 
 HTH
 
 -Original Message-
 From: Greg Speechley [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2003 10:40
 To: Tomcat User
 Subject: Re: JNDI resources
 
 
 I am trying to use tomcat's DBCP and access it by setting variables in
 server.xml and web.xml as outlined in the documentation. However it is
not
 getting any of the values that are set in server.xml.
 
 Here is my java code:
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup(java:comp/env);
 // Look up our data source
 DataSource ds = (DataSource) envCtx.lookup(jdbc/Pool);
 if (ds != null)
 {
 Connection conn = ds.getConnection();
 ...
 }
 
 However I get the following error: java.sql.SQLException: Cannot load
JDBC
 driver class 'null'. ds is not null but all its variables are (I checked
by
 casting it to BasicDataSource and using the getter methods).
 
 I have the mysql driver in a jar in common/lib and I think I have
followed
 all the steps correctly.
 
 Thanks for your help
 Greg
 
 PS I am having the same sort of problems with getting the mail variables
as
 well
 
 server.xml

---
-
 ---
 Server port=8005 shutdown=SHUTDOWN debug=0
!-- Uncomment these entries to enable JMX MBeans support --
Listener
className=org.apache.catalina.mbeans.ServerLifecycleListener
  debug=0/
Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
  debug=0/
 
!-- Global JNDI resources --
GlobalNamingResources
 
  !-- Editable user database that can also be used by
   UserDatabaseRealm to authenticate users --
  Resource name=UserDatabase auth=Container
type=org.apache.catalina.UserDatabase
 description=User database that can be updated and saved
  /Resource
  ResourceParams name=UserDatabase
parameter
  namefactory/name
 
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
/parameter
parameter
  namepathname/name
  valueconf/tomcat-users.xml/value
/parameter
  /ResourceParams
 

Re: it's always the simplest things (redeploy)

2003-03-31 Thread Dan Allen
 
 If you don't mind me asking, where did you get the impression that the
 solution just seems to be 'just use resin for development' ?

Many people on the struts mailinglist and in private have told me
that resin is smart enough to be able to unpack a new version of a
war and delete any files which are no longer needed.


 Set unpackWARS=false and autodeploy=true in your Host element in
 server.xml.  Make sure you app can run inside a packed WAR, i.e. it
 doesn't try to read/write from Files using the FileReader/Writer-type
 APIs.  Then you can use the Ant tasks that come with tomcat to redeploy
 a WAR file to a running server.

After reading the first response on how to redeploy an app in tomcat
and then this one I just have to ask, does anyone else think that it
is kind of ridiculous what you have to do?  Unless you run from the
war file, you have to remove the old war, remove the directory and
then remove the work directory.  First, you are assuming that the
person deploying the app has permission to all of those directories
(which is a stretch).  Then, you are assuming that the application
can go down for more than 30 seconds while redeploying, which is
understandable, but still a stretch.

I just hope that somebody stands back and look at how the developer
has to practically break his/her back to get a few changes made on a
running application.  This really sucks.  Imagine I change a few
graphics and some of the language file references in the properties
file.  Now I have to totally wipe out the running application to
make it happen?  Run from the war file makes a little bit more
sense, except for it's limitations of not allowing apache to serve
up graphics and not being able to write anywhere in the current
application (uploaded files, etc).

Except for the initial use of a war file to move an application from
one server to another, war files become more of a pain than a
convenience.

Remember, I never said I couldn't get it to work, I could write an
ant script to move each file one at a time if I wanted, that is far
from the point.  The point is that the way war files are handled
right now makes absolutely no sense.  Sorry I seem a bit on edge
here, but I am hoping this time my point comes across.

Thanks for listening ;)

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, [EMAIL PROTECTED]
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
The Linux philosophy is to laugh in face of danger.  Oops. 
Wrong one. 'Do it yourself' That's it 
 -- Linus Torvalds
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



Apache Tomcat 5 website administration

2003-03-31 Thread Aziz Panjwani
Hi,

I just recently installed Apache Tomcat 5 on my windows 2000 system for development.  
Upon opening the default website (http://localhost:8080) I was unable to log in as the 
Administrator or Manager, two links found under the Administration group on the left 
navigation.  Where in the documentation can I find the login and passwords for each of 
these?  Where can I find documentation on how the directory structures is set up so I 
could try developing and testing some samples?  I would appreciate any assistance you 
could offer.

Regards,
Aziz

Re: Apache Tomcat 5 website administration

2003-03-31 Thread Kevin Hartig


Aziz Panjwani wrote:
The documentation at this point is kinda sparse. Soon to be more 
complete I'm sure.
The user/password definitions for the Administrator and Manger should be 
defined in the conf/tomcat-users.xml file.

-kevin.

Hi,

I just recently installed Apache Tomcat 5 on my windows 2000 system for development.  Upon opening the default website (http://localhost:8080) I was unable to log in as the Administrator or Manager, two links found under the Administration group on the left navigation.  Where in the documentation can I find the login and passwords for each of these?  Where can I find documentation on how the directory structures is set up so I could try developing and testing some samples?  I would appreciate any assistance you could offer.

Regards,
Aziz
 



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


RE: it's always the simplest things (redeploy)

2003-03-31 Thread Shapira, Yoav

Howdy,
What every person defines as reasonable for their needs if subjective by
definition.  For example,

Many people on the struts mailinglist and in private have told me
that resin is smart enough to be able to unpack a new version of a
war and delete any files which are no longer needed.

For $500/server, now more expensive than Weblogic 8.1 express on one
CPU, it better be able to do that ;) ;)

Seriously though: I doubt Resin's claim, but I don't care to turn this
into yet another Resin vs. Tomcat (vs. anything else) debate.  That's
been discussed many times on this and other lists, with the obvious
conclusion that everyone uses what they like or what their
organization/boss likes the best. ;)

After reading the first response on how to redeploy an app in tomcat
and then this one I just have to ask, does anyone else think that it
is kind of ridiculous what you have to do?  Unless you run from the

I don't.

war file, you have to remove the old war, remove the directory and
then remove the work directory.  First, you are assuming that the
person deploying the app has permission to all of those directories
(which is a stretch).

I don't think that's a stretch.  In fact I think the opposite is a
stretch: for the server administrator to not have access to the webapps
or work directory seems unreasonable to me.  But then again, see above
about subjectivness.

Then, you are assuming that the application
can go down for more than 30 seconds while redeploying, which is
understandable, but still a stretch.

I think this is a reasonable assumption as well.  Moreover, it's proven
more than reasonable in my experience.  Again, your mileage may vary.
Obviously some applications have operations which routinely exceed 30sec
in length, so 30sec to release a new version is negligible.

I just hope that somebody stands back and look at how the developer
has to practically break his/her back to get a few changes made on a

You've already done that.

running application.  This really sucks.  Imagine I change a few

Then feel free to inspect and if needed rewrite the autodeploy code.
Enhancing it to look for and remove the existing webapp directory
shouldn't be very difficult.  Same thing goes for the work directory.
If enough people want this, it will happen eventually.

Except for the initial use of a war file to move an application from
one server to another, war files become more of a pain than a
convenience.

I completely disagree.  I find deploying and running from packed WARs
easy and convenient.  Moreover, it's proven easy and useful for times
when I migrate containers.  We routinely benchmark our app on several
servers (including Resin 3.0 beta by the way) and find this to be the
easiest way to deploy and run on multiple heterogeneous servers.

from the point.  The point is that the way war files are handled
right now makes absolutely no sense.

Strong words ;)  As illustrated above, I don't agree with most of what
you said, and I find the current autoDeploy to not only work well, but
work conveniently.  But your situation may be completely different and I
have no doubt some of what you suggest other people will find useful as
well.  Contributions are always welcome ;)

Yoav Shapira
Millennium ChemInformatics




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]



RE: having a problem with undeploy in tomcat web manager

2003-03-31 Thread Blohm, Ed
Since the application is at root I cannot deploy or install my webapp first.
I need to be able to disable the app and free up the context path.  But
undeploy and remove both give me the same error.

Eddie 

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 9:21 AM
To: Tomcat Users List
Subject: Re: having a problem with undeploy in tomcat web manager



Did you originally use the Ant manager tasks to deploy the 
application?  If not, you need to use install and remove.  deploy and 
undeploy are a special case for remote deployment of a .war file using 
HTTP PUT which normal browsers don't support.  So, if you didn't use the 
Ant manager deploy task to deploy the application in the first place, 
don't use undeploy to undeploy the application.

Jake

At 08:26 AM 3/31/2003 -0800, you wrote:
I am having problems with the tomcat web manager.  When I try to undeploy
my
webapp using the ant task undeploy, I get an error that looks like:

undeploy:
  [undeploy] FAIL - Cannot remove document base for path /

I can stop, start and reload my webapp using the ant tasks, but not
undeploy
or remove the webapp.  I am running tomcat 4.1.24 and redhat 7.1. Thanks
for
any help.

Eddie


-
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: Tomcat 4.1.24- do not follow symbolic link- works finein4.0 .6

2003-03-31 Thread Raible, Matt
You must do it for your test context - not the example context.

Please post these messages to the list rather than to me directly - you'll
get better support from the list.

Matt

 -Original Message-
 From: Ajay Agrawal [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 11:04 AM
 To: Raible, Matt
 Subject: RE: Tomcat 4.1.24- do not follow symbolic link- works fine
 in4.0 .6
 
 
 Hi Matt,
 
 I tried your suggestion as follows but still symbolic link is 
 not working. 
 
 
   !-- Tomcat Examples Context --
 Context path=/examples docBase=examples debug=0
  reloadable=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_examples_log. suffix=.txt
   timestamp=true/
Resources 
 className=org.apache.naming.resources.FileDirContext
 allowLinking=true caseSensitive=true/
   Ejb   name=ejb/EmplRecord type=Entity
  home=com.wombat.empl.EmployeeRecordHome
remote=com.wombat.empl.EmployeeRecord/
 
 
 Also tried
 
 !-- Tomcat Examples Context --
 Context path=/examples docBase=examples debug=0
  reloadable=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_examples_log. suffix=.txt
   timestamp=true/
Resources 
 className=org.apache.naming.resources.FileDirContext
 allowLinking=true docBase=/
   Ejb   name=ejb/EmplRecord type=Entity
  home=com.wombat.empl.EmployeeRecordHome
remote=com.wombat.empl.EmployeeRecord/
 
 
 Please let me know if you see any problem with my defnition.
 
 Thanks in advance for any input,
 Ajay
 
 
 -Original Message-
 From: Raible, Matt [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 28, 2003 1:53 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.1.24- do not follow symbolic link- works fine
 in4.0 .6
 
 
 Context path= docBase=ROOT debug=0
 Resources
 className=org.apache.naming.resources.FileDirContext
 allowLinking=true caseSensitive=true /
 ...
 
  -Original Message-
  From: Ajay Agrawal [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 28, 2003 2:38 PM
  To: Tomcat Users List
  Subject: Tomcat 4.1.24- do not follow symbolic link- works 
  fine in 4.0.6
  
  
  Hi,
  
  I have installed Tomcat 4.1.24 and having problem with 
  symbolic link. It 
  does not recognise symbolic link directory.
  
  Lets say I have created a symbolic link directory test in 
  webapps/ROOT =
  and trying to access page by
  
  http://server:8080/test give me error 
  
  desciption  The requested =resource (/test/) is not available
  But same works fine tomcat 4.0.4.
  
  
  Please Advice? Any input would be highly appreciated.
  
  Thanks in Advance,
  Ajay
  
  
 -
  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: Re: shared resources

2003-03-31 Thread Pat McGroin
Hello.

If the docs are correct, then why are my JAR files in $CATALINA_HOME/shared/lib not 
being loaded?
The utility class in the JAR file was loaded just fine when I placed the JAR in 
$CATALINA_HOME/common/lib, but the docs say this is not the right place to put it.

I need to share a few utility classes and a JDBC driver across all apps and would 
rather keep them in 1 place.

This looks like a bug.  I am using Tomcat 4.1.18 and am going to try 4.1.24 to see if 
that helps.
Has anyone else seen this behavior?

Thanks.


-Original Message-
From: Shapira, Yoav[EMAIL PROTECTED]
To: Tomcat Users List[EMAIL PROTECTED]
Date: Mon Mar 31 08:53:39 PST 2003
Subject: Re: shared resources


Howdy,
I believe the documentation is correct.

If you've searched this list's archives for topics like this one, you'll
find they come up all the time ;(.  I usually chime in with the
following:

What do you gain from sharing a jar across webapps?  With some notable
exceptions, e.g. a JDBC driver you want pooled using a pool defined in
server.xml, you don't gain much from sharing a jar.  Your deployment
becomes more complicated, and you can't use a true war file approach.
Disk space is cheap.  My philosophy is to not share jars in locations
like common/lib or shared/lib unless absolutely necessary.  Yes, this
does force you to pay extra attention to what versions of jars are
deployed along with your webapps, but this is something you have to pay
attention to anyways.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Pat McGroin [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 11:10 AM
To: Tomcat Users List
Cc: Paul Hsu
Subject: Re: Re: shared resources

Paul,

That worked *BUT* the documentation says otherwise:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

For classes and resources that must be shared across all web
applications,
place unpacked classes and resources under
$CATALINA_HOME/shared/classes,
or place JAR files containing those classes and resources under
$CATALINA_HOME/shared/lib.

This class loader contains additional classes that are made visible to
both Tomcat internal classes and to all web applications. Normally,
application classes should NOT be placed here.

The $CATALINA_HOME/common/lib contains such JAR files as ant.jar and
servlet.jar so it does not seem like the place for my shared JAR files.

Is the documentation wrong or is this a bug?
Or am I just reading the documentation incorrectly?

Thanks,
Todd


-Original Message-
From: Paul Hsu[EMAIL PROTECTED]
To: Tomcat Users List[EMAIL PROTECTED]
Date: Sun Mar 30 19:20:44 PST 2003
Subject: Re: shared resources

Todd,

You need to put your jar file under $CATALINA_HOME/common direcotry.
$CATALINA_HOME/shared directory are only available to Catalina engine,
not
application but /common can be seen by both engine and application.

Paul
- Original Message -
From: Pat McGroin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 30, 2003 5:32 PM
Subject: Re: shared resources


 Craig,

 Thanks again for the information.
 The info. you've supplied has been very useful.
 However, my problem remains:

 I cannot access the class that resides in a JAR file (utilities.jar)
in
tomcat_home/shared/lib and get a java.lang.NoClassDefFoundError

 I am spinning my wheels on this so hopefully some details will shed
some
light on my problem. I wrote a very simple servlet that attempts to
use
the
class in the shared dir.

 
 import com.myco.utilities.CASDate;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;

 public class Test1 extends HttpServlet {
 //
 public void doGet(HttpServletRequest request, HttpServletResponse
response) throws javax.servlet.ServletException, java.io.IOException {

 System.out.println(GET method of Test1 invloked);
 performTask(request, response);
 }
 //
 public void doPost(HttpServletRequest request, HttpServletResponse
response) throws javax.servlet.ServletException, java.io.IOException {

 System.out.println(POST method of Test1 invloked);
 performTask(request, response);
 }
 /**
 * Test the use of a shared class.
 */
 public void performTask(HttpServletRequest request,
HttpServletResponse
response) {

 try {
 java.io.PrintWriter pw = response.getWriter();
 CASDate today = new CASDate();
 pw.println(CASDate today is  + today.toString());
 pw.println(CASDate class loaded...);
 }
 catch(Throwable theException) {
 System.out.println(Error...);
 theException.printStackTrace(System.out);
 }
 }
 }
 
 This is the utility class (some getXXX methods deleted for brevity):
 
 package com.myco.utilities;

 import java.util.Calendar;
 import java.util.GregorianCalendar;

 public class CASDate {
 private int ccc = 0;
 private int yyy = 0;
 private int mmm = 0;
 private int ddd = 0;
 private int time = 0;
 /**
 * Default constructor is to create CAS date using the current date.
 */
 

Local DTDs not working

2003-03-31 Thread Simon MacMullen
I'm building a web application (or two) with Tomcat (4.1.18 LE, Windows 2000). Every 
time my connection to the internet goes down (or Sun's website...), Tomcat stops 
working, unable to resolve DTDs.

Is this the correct behaviour? From googling, I gather that Tomcat is supposed to keep 
a local cache of DTDs. Do I have to turn this behaviour on?

In case this is the expected behaviour, I'm trying to change all XML files to refer to 
local copies of DTDs. For web.xml this is fine, I can change

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

to

!DOCTYPE web-app SYSTEM web-app_2_3.dtd,

stick the DTD file in WEB-INF and I'm done. But my application also features a tag 
library. Sticking 

!DOCTYPE taglib SYSTEM web-jsptaglibrary_1_1.dtd

at the top of my TLD file, and putting the DTD in the jar's META-INF path doesn't work:

SEVERE: Parse Fatal Error at line 2 column -1: Relative URI 
web-jsptaglibrary_1_1.dtd; can not be resolved without a base URI.
org.xml.sax.SAXParseException: Relative URI web-jsptaglibrary_1_1.dtd; can not be 
resolved without a base URI.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176)
at org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2758)
at org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2730)
at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1129)
(snip huge stack trace)

So can anyone help with either approach?

Cheers, Simon

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



why has tomcat just crashed

2003-03-31 Thread JS
Hi All,
I recently began using the Java Web Services Devloper Pack (JWSDP)
installation of tomcat, which had been running fine up until now.I changed the 
server.xml file briefly to try and install a new context for
my app, but later replaced my changes with the original backup of the
server.xml file.
Now tomcat is refusing to start up, any idea why this is the case?

Heres the error

The requested URL could not be retrieved


While trying to retrieve the URL: http://localhost:8080/

The following error was encountered:

Unable to determine IP address from host name for localhost
The dnsserver returned:

Name Error: The domain name does not exist.
This means that:

 The cache was not able to resolve the hostname presented in the URL.
 Check if the address is correct.

Your cache administrator is webmaster.


Regards
JS



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



RE: why has tomcat just crashed

2003-03-31 Thread Shapira, Yoav

Howdy,
The error you posted seems to be network-related, not specific to
tomcat.  What happens when you try to do nslookup www.cnn.com (or
whatever other site you like)?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: JS [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:28 PM
To: [EMAIL PROTECTED]
Subject: why has tomcat just crashed

Hi All,
I recently began using the Java Web Services Devloper Pack (JWSDP)
installation of tomcat, which had been running fine up until now.I
changed
the server.xml file briefly to try and install a new context for
my app, but later replaced my changes with the original backup of the
server.xml file.
Now tomcat is refusing to start up, any idea why this is the case?

Heres the error

The requested URL could not be retrieved

---

-
While trying to retrieve the URL: http://localhost:8080/

The following error was encountered:

Unable to determine IP address from host name for localhost
The dnsserver returned:

Name Error: The domain name does not exist.
This means that:

 The cache was not able to resolve the hostname presented in the URL.
 Check if the address is correct.

Your cache administrator is webmaster.


Regards
JS



-
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]



Re: Anygood Howto on Multiple Virtual Hosts Apache, mod_jk andTomcat

2003-03-31 Thread Richard Anderson
Is there something similar for mod_jk2?

--Rick

On Mon, 2003-03-31 at 10:22, Michele Neylon :: Blacknight Solutions
wrote:
 
 John Turner is rumoured to have said
 
 http://www.galatea.com - there are a couple of Flash Guides that should help.
 
 
 -- 
 Mr. Michele Neylon
 Blacknight Solutions
 http://www.blacknightsolutions.com/
 Reseller plans now available
 
 
 
 
 This e-mail messages has been scanned by MailScanner and is believed to be
 clean of dangerous content and virus'.
 http://www.mailscanner.info
 
 
 -
 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]



  1   2   >