Re: Single SignOn Configuration

2004-07-15 Thread Bill Barker
In theory, you should be able to mix Tomcat Realms with SSO in TC 5 (but
I've never tried it myself).  Of course, if you are using a custom Realm,
you are on your own :).

It looks like this is another case of the docs not keeping up with the code
:).

"Robb, Rebecca" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am using Tomcat 5.0.1 and I have two web apps that I manage that have
> the same user authentication.  I would like to use single signon.
> However, when I configure the single signon valve in the server.xml file
> and move my realm from my app.xml files to the server.xml file, I can no
> longer access the manager app I've signed on to my  other applications
> because it uses a different authentication.  The comment in the
> server.xml file states that all apps must have the same authentication
> if single signon is configured.  If I change the manager app to have the
> same authentication as the other two apps, then I think that all my
> users could also get into the manager app with their standard
> authentication which I do not want to happen.  Can I configure Tomcat
> somehow so that I can have single signon without losing the convenience
> of having the manager app available only to the web administrators?
>
>
>
> Any help would be appreciated.
>
>




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



Re: Wildcard virtual hosts help

2004-07-15 Thread Cott Lang
On Thu, 2004-07-15 at 13:15, Daniel J. Obregon wrote:
> Have you considered using apache/mod_jk?
> 
> If you are mapping thousands of domains to a few webapps, it might be
> better to use apache.  Then, *worst* case you can write a script to
> generate and/or maintain a set of virtual hosts

Actually, I am using Apache/mod_jk. How does that help me map domains to
particular webapps ?  I hope I'm missing something simple. ;)

thanks!



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



Re: Overlapping security-constraint definitions?

2004-07-15 Thread Bill Barker
It's true that how Overlapping security-constraints are handled has changed
between TC 4 & TC 5 (since they changed in the servlet-spec), but that's not
what is causing your problem.

The /edit* isn't valid, so it looks like you were
relying on an 'undocumented feature' of TC 4 ;-).  TC 5 will treat this a
match for a URL that is literally '/myapp/edit*'.

The valid pattern is /edit/*, so if you move all
of your edit* files to a subdirectory (and fix the links), then you can have
a wild-card pattern.  Otherwise, there is nothing to do but to list all of
your edit* URLs.

"Craig Berry" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I recently moved from Tomcat 4 to 5, and have discovered that the
handling of overlapping security-constraint definitions in web.xml seems
to have changed.  I am hoping someone can recommend the best way to
accomplish what I need to do under TC5.

I have two possible user roles.  All users have the role "User"; in
addition, some have a second role, "Admin".  I want to require at least
"User" role to access any page, but require "Admin" role to access a few
specific page patterns.  So I have two security-constraint entries, like
this (this is a simplified version):


  
  Secure content
*.do
  
  
User
  



  
Admin content
  /edit*

  
Admin
  


This worked under TC4; since all users have the "User" role, everyone
could get at all my *.do pages, but users without the "Admin" role would
get a 403 if they tried to reach a page starting with "edit".

However, under TC5, it appears that permissions are adding rather than
subtracting, if that makes sense.  In other words, the presence of the
blanket permission for *.do makes all pages accessible, and the attempt
to add an additional rule about /edit* pages is ignored.

I could obviously enumerate all the pages in both categories, but that
would be brittle in the face of new development.  Is there a way to do
this with patterns as I did under TC4?

-- 
Craig Berry
Principal Architect and Technical Manager
PortBlue
(310) 566-7546




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



Re: Tomcat 3 will not load on Windows 98

2004-07-15 Thread Bill Barker
You need to do it to tomcat-util.jar and tomcat33-resource.jar as well.

I've happily run JDK 1.3.1 and JDK 1.4.1 on W98 before.  Just download the
Windows version and install.

"Donald Brewer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I cannot find an upgrade for win 98 of the JDK above version 1.3.0
> I removed the META-INF/INDEX.LIST from tomcat33-coyote.jar and
> tomcat-coyote.jar, using the
> M option to repackage without index info. The error message is unchanged.
>
>
> - Original Message -
> From: "Bill Barker" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, July 15, 2004 5:36 PM
> Subject: Re: Tomcat 3 will not load on Windows 98
>
>
> > Well, That gets rid of TC 4 & 5 as well ;-).
> >
> > The CoyoteConnector jars are indexed, and jar indexing is broken on the
> > 1.3.0 JDK.  You can either remove the META-INF/INDEX.LIST from the jars,
> or
> > upgrade your JVM version to at least 1.3.1.
> >
> >
> > - Original Message -
> > From: "Donald Brewer" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Thursday, July 15, 2004 1:43 PM
> > Subject: Re: Tomcat 3 will not load on Windows 98
> >
> >
> > > c:\jdk1.3.0_02\jre\lib\ext is empty
> > >
> > > under c:\Program Files\JavaSoft\JRE\lib\ext\:
> > > QTJava.zip is the only file
> > >
> > > is it possible that i have 2 runtime engines installed?
> > >
> > > Will tomcat 4 or 5 work with windows 98? i could not even find a
> download
> > > for anything older that xp for 4 or 5
> > >
> > > - Original Message -
> > > From: "Larry Isaacs" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Thursday, July 15, 2004 4:16 PM
> > > Subject: RE: Tomcat 3 will not load on Windows 98
> > >
> > >
> > > > You may wish to consider Tomcat 4 or 5, which implement more
> > > > recent versions of the Servlet and JSP specs (with all their
> > > > new features).  However, what is causing this odd problem with
> > > > Tomcat 3.3.2 could also cause problems for Tomcat 4 and 5
> > > > as well.
> > > >
> > > > What is the contents of the jre\lib\ext directory of the JDK
> > > > you are using with Tomcat 3.3.2?
> > > >
> > > > Larry
> > > >
> > > > > -Original Message-
> > > > > From: Donald Brewer [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thursday, July 15, 2004 3:49 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: Tomcat 3 will not load on Windows 98
> > > > >
> > > > >
> > > > > I am trying to load tomcat 3 on a windows 98 platform.
> > > > > I have been sitting in this chair for two days now!!! It just
> > > > > will not load.
> > > > > I generated all this by putting >>hold.txt at the end of the
> > > > > run command in the tomcat.bat file. The DOS windows scroll by
> > > > > and leave me with nothing to look at.
> > > > >
> > > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > > At Line 241 /Server/ContextManager/CoyoteConnector/ port=8080
> > > > > maxThreads=150 minSpareThreads=25 maxSpareThreads=75
> > > > > enableLookups=false acceptCount=100 debug=0
> > > > > connectionTimeout=2 disableUploadTimeout=true
> > > > >
> > > > > EmbededTomcat: exception initializing ContextManager
> > > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > > Exception: java.lang.reflect.InvocationTargetException
> > > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > > EmbededTomcat.initContextManager
> > > > >
> > > > >
> > > > > When I comment out the Coyote Connector lines in
> > > > > conf/server.xml, the next connector down has a problem:
> > > > >
> > > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > > At Line 287 /Server/ContextManager/Ajp12Connector/ port=8007
> > > > >
> > > > > EmbededTomcat: exception initializing ContextManager
> > > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > > Exception: java.lang.reflect.InvocationTargetException
> > > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > > EmbededTomcat.initContextManager
> > > > >
> > > > > When I comment out the Ajp12 lines, this is the output:
> > > > >
> > > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > > At Line 312 /Server/ContextManager/CoyoteConnector/
> > > > > processorClassName=org.apache.jk.server.JkCoyoteHandler port=8009
> > > > >
> > > > > EmbededTomcat: exception initializing ContextManager
> > > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > > Exception: java.lang.reflect.InvocationTargetException
> > > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > > EmbededTomcat.initContextManager
> > > > >
> > > > >
> > > > > With those lines commented out of the xml doc, i get this in
> > > > > the main dos window:
> > > > >
> > > > > C:\jakarta-tomcat-3.3.2\bin>call ".\tomcat" run
> > > > > 2004-07-15 15:30:55 - ServerXmlReader:
> > > > > Config=$TOMCAT_HOME\conf\server.xml
> > > > > 2004-07-15 15:30:55 - PathSetter: home=C:\jakarta-tomcat-3.3.2
> > > > > 2004-07-15

Re: Is anyone successfully using DBCP with mySQL?

2004-07-15 Thread David Smith
I run this exact setup with DBCP and MySQL in production.  First, make 
sure the mysql jar file is placed in common/lib with the dbcp.jar file.

In your server.xml file:

 dataSourceClassName
 com.mysql.jdbc.jdbc2.optional.MysqlDataSource

should be

 dataSourceClassName
 com.mysql.jdbc.Driver

Replace the serverName, databaseName, and port parameters with one url 
parameter:


 url
 jdbc:mysql://localhost:3306/amx?autoReconnect=true

username and password are both fine as typed.  No caps required.
In web.xml, replace that whole long com.mysqlMysqlDatasource with 
javax.sql.Datasource.  I can't comment on the res-sharing-scope since I 
don't use it.  The test code looks good on the surface.  Now restart 
your Tomcat server to make all these changes live.

That should do it.  If you still have problem, post your exception 
report from the logs so we can see what's happening.

Good luck.
--David
Frank Burns wrote:
I can't get a simple DBCP with mySQL working.
I've looked at gazillions of howtos and tutorials and trawled the archives,
but they seem to be littered with inconsistencies. For example, the example
on the jakarta site for setting up the JNDI Datasource in server.xml for
mySQL uses the param name "username" , yet the Connector/J documentation
specifies "user".
Is there one simple, perfect example implementation out there that I can
follow?
What am I doing wrong? I get null pointer exceptions for the connection I'm
trying to retrive from the datasource. Here are my details.
Tomcat 5.0.16. MySQL Connector/J 3.0.11.
Here's my server.xml entry:

 

 
  factory
  org.apache.commons.dbcp.BasicDataSourceFactory
 
 
  dataSourceClassName
  com.mysql.jdbc.jdbc2.optional.MysqlDataSource
 
 
  serverName
  localhost
 
 
  databaseName
  amx
 
 
  port
  3306
 
 
  username
  frank
 
 
  password
  banana
 


Here's my web.xml entry:
 
  JNDI Datasource for the database
  jdbc/AmxResources
com.mysql.jdbc.jdbc2.optional.MysqlDataSource
  Container
  Sharable
 
Here's test code:
...
 DataSource ds = null;
 Context ctx = null;
 try {
  ctx = new InitialContext();
  ds = (DataSource) ctx.lookup("java:comp/env/jdbc/AmxResources");
 } catch (NamingException ex) {
  application.log("Failed to access JNDI resource: " +
ex.getMessage());
 }
 Statement stmt = null;
 ResultSet rs = null;
 try {
  Connection conn =
  ds.getConnection();
  stmt = conn.createStatement();
  stmt.execute("SELECT * FROM users");
  rs = stmt.getResultSet();
  while (rs.next()) {
   out.print("Username = " + rs.getString("UserName"));
  }
 } catch (SQLException ex) {
  // handle any errors
  out.println("SQLException: " + ex.getMessage());
  out.println("SQLState: " + ex.getSQLState());
  out.println("VendorError: " + ex.getErrorCode());
 } finally {
  if (rs != null) {
   try {
rs.close();
   } catch (SQLException sqlEx) { // ignore }
rs = null;
   }
   if (stmt != null) {
try {
 stmt.close();
} catch (SQLException sqlEx) { // ignore }
 stmt = null;
}
   }
  }
 } // end finally

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


Is anyone successfully using DBCP with mySQL?

2004-07-15 Thread Frank Burns
I can't get a simple DBCP with mySQL working.

I've looked at gazillions of howtos and tutorials and trawled the archives,
but they seem to be littered with inconsistencies. For example, the example
on the jakarta site for setting up the JNDI Datasource in server.xml for
mySQL uses the param name "username" , yet the Connector/J documentation
specifies "user".

Is there one simple, perfect example implementation out there that I can
follow?

What am I doing wrong? I get null pointer exceptions for the connection I'm
trying to retrive from the datasource. Here are my details.

Tomcat 5.0.16. MySQL Connector/J 3.0.11.

Here's my server.xml entry:

  
 
  
   factory
   org.apache.commons.dbcp.BasicDataSourceFactory
  
  
   dataSourceClassName
   com.mysql.jdbc.jdbc2.optional.MysqlDataSource
  
  
   serverName
   localhost
  
  
   databaseName
   amx
  
  
   port
   3306
  
  
   username
   frank
  
  
   password
   banana
  
 


Here's my web.xml entry:
  
   JNDI Datasource for the database
   jdbc/AmxResources
 com.mysql.jdbc.jdbc2.optional.MysqlDataSource
   Container
   Sharable
  

Here's test code:
...
  DataSource ds = null;
  Context ctx = null;
  try {
   ctx = new InitialContext();
   ds = (DataSource) ctx.lookup("java:comp/env/jdbc/AmxResources");
  } catch (NamingException ex) {
   application.log("Failed to access JNDI resource: " +
ex.getMessage());
  }

  Statement stmt = null;
  ResultSet rs = null;

  try {
   Connection conn =
   ds.getConnection();

   stmt = conn.createStatement();
   stmt.execute("SELECT * FROM users");
   rs = stmt.getResultSet();
   while (rs.next()) {
out.print("Username = " + rs.getString("UserName"));
   }
  } catch (SQLException ex) {
   // handle any errors
   out.println("SQLException: " + ex.getMessage());
   out.println("SQLState: " + ex.getSQLState());
   out.println("VendorError: " + ex.getErrorCode());
  } finally {
   if (rs != null) {
try {
 rs.close();
} catch (SQLException sqlEx) { // ignore }
 rs = null;
}
if (stmt != null) {
 try {
  stmt.close();
 } catch (SQLException sqlEx) { // ignore }
  stmt = null;
 }
}
   }
  } // end finally




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



RE: Tomcat 3 will not load on Windows 98

2004-07-15 Thread Caldarale, Charles R
> From: Donald Brewer [mailto:[EMAIL PROTECTED]
> Subject: Re: Tomcat 3 will not load on Windows 98
> 
> I will try again in the morning, with a fresh version of the 
> J2EE and Tomcat

NO! As I said before, do not download the J2EE package from Sun - you don't need it, 
and it can only mess up Tomcat execution. Just get the current J2SE SDK.

 - Chuck


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

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



RE: Tomcat 3 will not load on Windows 98

2004-07-15 Thread Caldarale, Charles R
> From: Donald Brewer [mailto:[EMAIL PROTECTED]
> Subject: Re: Tomcat 3 will not load on Windows 98
> 
> so you're saying that I should download the NT version?

I really don't know what you mean by "the NT version". Neither the Sun nor the Tomcat 
download sites differentiate among the various versions of Windows. Just install the 
latest J2SE SDK from Sun (1.4.2_05) and the current .zip version of Tomcat (5.0.27), 
modify the 3-line .bat file I sent to correspond to your installation directories, and 
have at it.

 - Chuck


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

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



Re: Tomcat 3 will not load on Windows 98

2004-07-15 Thread Donald Brewer
so you're saying that I should download the NT version?

I tried tomcat 4, but i had to keep putting jars in the classpath till i ran
out of room in dos, which i had already extended.
If I did not put the full jar name in the classpath, it would not find the
class. So I tried tomcat 3.

I will try again in the morning, with a fresh version of the J2EE and Tomcat
5. Wish me luck.



- Original Message -
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 15, 2004 7:55 PM
Subject: Tomcat 3 will not load on Windows 98


> > From: Donald Brewer [mailto:[EMAIL PROTECTED]
> > Subject: Re: Tomcat 3 will not load on Windows 98
> >
> > 1.3.1 JDK:
> >
> > This release of the J2EE SDK is available for the following platforms:
>
> You don't want to download the Sun J2EE package - Tomcat supplies its own,
and having both on your system at the same time can lead to some
"interesting" events.
>
> You should be able to download and install the 1.4.2 J2SDK and the current
Tomcat (5.0.27, ZIP version) on Win98 without any problems. Both work fine
on my recently resurrected Win98SE box. You do have to modify the .bat
files, since they work only on NT and above, and you can't run it as a
service. I used the following:
>
> set CATALINA_HOME=E:\jakarta-tomcat-5.0.27
> set JAVA_HOME=C:\j2sdk1.4.2_04
> java -cp
%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar -Djava.endorsed.
dirs=%CATALINA_HOME%\common\endorsed -Dcatalina.base=%CATALINA_HOME% -Dcatal
ina.home=%CATALINA_HOME% -Djava.io.tmpdir=%CATALINA_HOME%\temp
org.apache.catalina.startup.Bootstrap start
>
> (The above is really only 3 lines - no telling how the various mailers are
going to mess it up.)
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Tomcat 3 will not load on Windows 98

2004-07-15 Thread Caldarale, Charles R
> From: Donald Brewer [mailto:[EMAIL PROTECTED]
> Subject: Re: Tomcat 3 will not load on Windows 98
> 
> 1.3.1 JDK:
> 
> This release of the J2EE SDK is available for the following platforms:

You don't want to download the Sun J2EE package - Tomcat supplies its own, and having 
both on your system at the same time can lead to some "interesting" events.

You should be able to download and install the 1.4.2 J2SDK and the current Tomcat 
(5.0.27, ZIP version) on Win98 without any problems. Both work fine on my recently 
resurrected Win98SE box. You do have to modify the .bat files, since they work only on 
NT and above, and you can't run it as a service. I used the following:

set CATALINA_HOME=E:\jakarta-tomcat-5.0.27
set JAVA_HOME=C:\j2sdk1.4.2_04
java -cp %CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar 
-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed -Dcatalina.base=%CATALINA_HOME% 
-Dcatalina.home=%CATALINA_HOME% -Djava.io.tmpdir=%CATALINA_HOME%\temp 
org.apache.catalina.startup.Bootstrap start

(The above is really only 3 lines - no telling how the various mailers are going to 
mess it up.)

 - Chuck


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

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



session listener not listening

2004-07-15 Thread Stephen Charles Huey
My session listener doesn't seem to be listening.  At the top of my
web.xml (before any servlet elements, and I have nothing like a filter
or anything else before it), I have this:


central.OurSessionListener  






Here is my listener class:


package central;

import java.util.HashMap;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import wwxchange.utility.*;
import wwxchange.beans.*;

public class OurSessionListener implements HttpSessionListener {

  public void sessionCreated(HttpSessionEvent se) {
HttpSession session = se.getSession();
UserAcctBean user = (UserAcctBean)
session.getAttribute("currentuser");
String loginID = user.getLoginID();
System.out.println("Added session: " + session.getId() + " for user
" + user.getLoginID());
SystemControl.addActiveUser(session.getId(), user.getLoginID() );
  }

  public void sessionDestroyed(HttpSessionEvent se) {
HttpSession session = se.getSession();
SystemControl.removeActiveUser(session.getId());
System.out.println("Removed session: " + session.getId());
  }
}


My SystemControl's static HashMap doesn't seem to be getting updated,
and the above methods aren't even getting called because nothing is
going to stdout when I log in as different users.  

What am I doing wrong?  Is my listener not registered to listen?  

Thanks,
Stephen

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



Re: Tomcat 3 will not load on Windows 98

2004-07-15 Thread Donald Brewer
I cannot find an upgrade for win 98 of the JDK above version 1.3.0
I removed the META-INF/INDEX.LIST from tomcat33-coyote.jar and
tomcat-coyote.jar, using the
M option to repackage without index info. The error message is unchanged.


- Original Message -
From: "Bill Barker" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, July 15, 2004 5:36 PM
Subject: Re: Tomcat 3 will not load on Windows 98


> Well, That gets rid of TC 4 & 5 as well ;-).
>
> The CoyoteConnector jars are indexed, and jar indexing is broken on the
> 1.3.0 JDK.  You can either remove the META-INF/INDEX.LIST from the jars,
or
> upgrade your JVM version to at least 1.3.1.
>
>
> - Original Message -
> From: "Donald Brewer" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, July 15, 2004 1:43 PM
> Subject: Re: Tomcat 3 will not load on Windows 98
>
>
> > c:\jdk1.3.0_02\jre\lib\ext is empty
> >
> > under c:\Program Files\JavaSoft\JRE\lib\ext\:
> > QTJava.zip is the only file
> >
> > is it possible that i have 2 runtime engines installed?
> >
> > Will tomcat 4 or 5 work with windows 98? i could not even find a
download
> > for anything older that xp for 4 or 5
> >
> > - Original Message -
> > From: "Larry Isaacs" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Thursday, July 15, 2004 4:16 PM
> > Subject: RE: Tomcat 3 will not load on Windows 98
> >
> >
> > > You may wish to consider Tomcat 4 or 5, which implement more
> > > recent versions of the Servlet and JSP specs (with all their
> > > new features).  However, what is causing this odd problem with
> > > Tomcat 3.3.2 could also cause problems for Tomcat 4 and 5
> > > as well.
> > >
> > > What is the contents of the jre\lib\ext directory of the JDK
> > > you are using with Tomcat 3.3.2?
> > >
> > > Larry
> > >
> > > > -Original Message-
> > > > From: Donald Brewer [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, July 15, 2004 3:49 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Tomcat 3 will not load on Windows 98
> > > >
> > > >
> > > > I am trying to load tomcat 3 on a windows 98 platform.
> > > > I have been sitting in this chair for two days now!!! It just
> > > > will not load.
> > > > I generated all this by putting >>hold.txt at the end of the
> > > > run command in the tomcat.bat file. The DOS windows scroll by
> > > > and leave me with nothing to look at.
> > > >
> > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > At Line 241 /Server/ContextManager/CoyoteConnector/ port=8080
> > > > maxThreads=150 minSpareThreads=25 maxSpareThreads=75
> > > > enableLookups=false acceptCount=100 debug=0
> > > > connectionTimeout=2 disableUploadTimeout=true
> > > >
> > > > EmbededTomcat: exception initializing ContextManager
> > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > Exception: java.lang.reflect.InvocationTargetException
> > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > EmbededTomcat.initContextManager
> > > >
> > > >
> > > > When I comment out the Coyote Connector lines in
> > > > conf/server.xml, the next connector down has a problem:
> > > >
> > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > At Line 287 /Server/ContextManager/Ajp12Connector/ port=8007
> > > >
> > > > EmbededTomcat: exception initializing ContextManager
> > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > Exception: java.lang.reflect.InvocationTargetException
> > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > EmbededTomcat.initContextManager
> > > >
> > > > When I comment out the Ajp12 lines, this is the output:
> > > >
> > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > At Line 312 /Server/ContextManager/CoyoteConnector/
> > > > processorClassName=org.apache.jk.server.JkCoyoteHandler port=8009
> > > >
> > > > EmbededTomcat: exception initializing ContextManager
> > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > Exception: java.lang.reflect.InvocationTargetException
> > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > EmbededTomcat.initContextManager
> > > >
> > > >
> > > > With those lines commented out of the xml doc, i get this in
> > > > the main dos window:
> > > >
> > > > C:\jakarta-tomcat-3.3.2\bin>call ".\tomcat" run
> > > > 2004-07-15 15:30:55 - ServerXmlReader:
> > > > Config=$TOMCAT_HOME\conf\server.xml
> > > > 2004-07-15 15:30:55 - PathSetter: home=C:\jakarta-tomcat-3.3.2
> > > > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > > > config=$TOMCAT_HOME\conf\apps-127.0.0.1.xml
> > > > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > > > config=$TOMCAT_HOME\conf\apps-admin.xml
> > > > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > > > config=$TOMCAT_HOME\conf\apps-examples.xml
> > > > 2004-07-15 15:30:56 - AutoWebApp: Auto-Adding DEFAULT:/
> > > > 2004-07-15 15:30:56 - AutoWebApp: Loaded from config: DEFAULT:/admin
> > > > 2004-07-15 15:30:56 - AutoWebApp: 

RE: DBCP pool

2004-07-15 Thread Mike Curwen
 

  

ONE SET OF PARAMETER TAGS
  


 

  
   
   SECOND SET OF PARAMETER TAGS
  


That's the way I'd do it.


> -Original Message-
> From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 15, 2004 4:40 PM
> To: Tomcat Users List
> Subject: Re: DBCP pool
> 
> 
> What about this other question:
> 
> May I mix the Resource and ResourceParams tags?? I'm asking 
> this because I have  to configure 2 connection in some apps, 
> so I must put a Resource and a ResourceParams tag 
> sequencially for each connection I want to configure??
> 
> Thanks for your response
> 
> Emerson
> 
> Mike Curwen wrote:
> > I think the way to do this with DBCP is to specify a test 
> query.  The 
> > pool would then run this query (like "SELECT 1") before 
> giving out the 
> > connection. If it failed (and if it's because the connection is 
> > closed), it will null this connection in the pool, open a new 
> > connection, and retest it, and then give this one out.
> >  
> > If any of that is factually wrong, someone will be sure to 
> jump in and 
> > correct me.
> > 
> > 
> > 
> > 
> >>-Original Message-
> >>From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, July 15, 2004 3:03 PM
> >>To: Tomcat Users List
> >>Subject: Re: DBCP pool
> >>
> >>
> >>none of them, I mean the timeout set in database, the maximum
> >>life time 
> >>for an connection. This is used when you have a database that has a 
> >>given timeout, let's say, 10 minutes, so you can't have this 
> >>connection 
> >>opened for more than 10 minutes, what would case an error due to an 
> >>timeouted connection.
> >>
> >>
> > 
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -- 
> Emerson Cargnin
> Analista de Sistemas - Gerente Regional - Tubarão
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
> 
> -
> 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: DBCP pool

2004-07-15 Thread Mike Curwen
http://jakarta.apache.org/commons/dbcp/configuration.html


> -Original Message-
> From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 15, 2004 4:40 PM
> To: Tomcat Users List
> Subject: Re: DBCP pool
> 
> 
> If testOnBorrow is not true, when is it tested?
> 
> 
> 
> 
> Mike Curwen wrote:
> > I'm not an expert, but I suspect that the resource config 
> parameters 
> > will act like javabean setters.  So you should be able to specify 
> > something like:
> >  
> > 
> >validationQuery
> >SELECT 1
> > 
> > 
> >testOnBorrow
> >true
> > 
> > 
> > 
> > 
> >>-Original Message-
> >>From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, July 15, 2004 4:30 PM
> >>To: Tomcat Users List
> >>Subject: Re: DBCP pool
> >>
> >>
> >>How do I specify the test query as context param? There is 
> nothing in
> >>the JDBC configuration of DBCP in tomcat 5 docs.
> >>BTW, I found some typos erros, must I create a bug, or may I 
> >>put it here?
> >>
> >>other question:
> >>
> >>May I mix the Resource and ResourceParams tags?? I'm asking
> >>this because 
> >>I have  to configure 2 connection in some apps, so I must put 
> >>a Resource 
> >>and a ResourceParams tag sequencially for each connection I want to 
> >>configure??
> >>
> >>Thanks for your response
> >>
> >>Emerson
> >>
> >>Mike Curwen wrote:
> >>
> >>>I think the way to do this with DBCP is to specify a test
> >>
> >>query.  The
> >>
> >>>pool would then run this query (like "SELECT 1") before
> >>
> >>giving out the
> >>
> >>>connection. If it failed (and if it's because the connection is
> >>>closed), it will null this connection in the pool, open a new 
> >>>connection, and retest it, and then give this one out.
> >>> 
> >>>If any of that is factually wrong, someone will be sure to
> >>
> >>jump in and
> >>
> >>>correct me.
> >>>
> >>>
> >>>
> >>>
> >>>
> -Original Message-
> From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 15, 2004 3:03 PM
> To: Tomcat Users List
> Subject: Re: DBCP pool
> 
> 
> none of them, I mean the timeout set in database, the 
> maximum life 
> time for an connection. This is used when you have a 
> database that 
> has a given timeout, let's say, 10 minutes, so you can't have this
> connection 
> opened for more than 10 minutes, what would case an error 
> due to an 
> timeouted connection.
> 
> 
> >>>
> >>>
> >>>
> >>>
> >>
> -
> >>
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: 
> [EMAIL PROTECTED]
> >>>
> >>>
> >>
> >>
> >>-- 
> >>Emerson Cargnin
> >>Analista de Sistemas - Gerente Regional - Tubarão
> >>Setor de Desenvolvimento de Sistemas - TRE-SC
> >>tel : (048) - 251-3700 - Ramal 3181
> >>
> >>
> -
> >>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]
> > 
> > 
> 
> 
> -- 
> Emerson Cargnin
> Analista de Sistemas - Gerente Regional - Tubarão
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
> 
> -
> 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 3 will not load on Windows 98

2004-07-15 Thread Ivan Jouikov
Time to buy linux my friend.

> -Original Message-
> From: Donald Brewer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 15, 2004 2:47 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 3 will not load on Windows 98
> 
> 1.3.1 JDK:
> 
> This release of the J2EE SDK is available for the following platforms:
> Solaris
> Windows NT
> Windows 2000 Professional
> Linux
> 
> Windows 98 is not even listed for the more recent releases, nothing for
> 1.3.1 for windows 98
> 
> - Original Message -
> From: "Bill Barker" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, July 15, 2004 5:36 PM
> Subject: Re: Tomcat 3 will not load on Windows 98
> 
> 
> > Well, That gets rid of TC 4 & 5 as well ;-).
> >
> > The CoyoteConnector jars are indexed, and jar indexing is broken on the
> > 1.3.0 JDK.  You can either remove the META-INF/INDEX.LIST from the jars,
> or
> > upgrade your JVM version to at least 1.3.1.
> >
> >
> > - Original Message -
> > From: "Donald Brewer" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Thursday, July 15, 2004 1:43 PM
> > Subject: Re: Tomcat 3 will not load on Windows 98
> >
> >
> > > c:\jdk1.3.0_02\jre\lib\ext is empty
> > >
> > > under c:\Program Files\JavaSoft\JRE\lib\ext\:
> > > QTJava.zip is the only file
> > >
> > > is it possible that i have 2 runtime engines installed?
> > >
> > > Will tomcat 4 or 5 work with windows 98? i could not even find a
> download
> > > for anything older that xp for 4 or 5
> > >
> > > - Original Message -
> > > From: "Larry Isaacs" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Thursday, July 15, 2004 4:16 PM
> > > Subject: RE: Tomcat 3 will not load on Windows 98
> > >
> > >
> > > > You may wish to consider Tomcat 4 or 5, which implement more
> > > > recent versions of the Servlet and JSP specs (with all their
> > > > new features).  However, what is causing this odd problem with
> > > > Tomcat 3.3.2 could also cause problems for Tomcat 4 and 5
> > > > as well.
> > > >
> > > > What is the contents of the jre\lib\ext directory of the JDK
> > > > you are using with Tomcat 3.3.2?
> > > >
> > > > Larry
> > > >
> > > > > -Original Message-
> > > > > From: Donald Brewer [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thursday, July 15, 2004 3:49 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: Tomcat 3 will not load on Windows 98
> > > > >
> > > > >
> > > > > I am trying to load tomcat 3 on a windows 98 platform.
> > > > > I have been sitting in this chair for two days now!!! It just
> > > > > will not load.
> > > > > I generated all this by putting >>hold.txt at the end of the
> > > > > run command in the tomcat.bat file. The DOS windows scroll by
> > > > > and leave me with nothing to look at.
> > > > >
> > > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > > At Line 241 /Server/ContextManager/CoyoteConnector/ port=8080
> > > > > maxThreads=150 minSpareThreads=25 maxSpareThreads=75
> > > > > enableLookups=false acceptCount=100 debug=0
> > > > > connectionTimeout=2 disableUploadTimeout=true
> > > > >
> > > > > EmbededTomcat: exception initializing ContextManager
> > > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > > Exception: java.lang.reflect.InvocationTargetException
> > > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > > EmbededTomcat.initContextManager
> > > > >
> > > > >
> > > > > When I comment out the Coyote Connector lines in
> > > > > conf/server.xml, the next connector down has a problem:
> > > > >
> > > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > > At Line 287 /Server/ContextManager/Ajp12Connector/ port=8007
> > > > >
> > > > > EmbededTomcat: exception initializing ContextManager
> > > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > > Exception: java.lang.reflect.InvocationTargetException
> > > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > > EmbededTomcat.initContextManager
> > > > >
> > > > > When I comment out the Ajp12 lines, this is the output:
> > > > >
> > > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > > At Line 312 /Server/ContextManager/CoyoteConnector/
> > > > > processorClassName=org.apache.jk.server.JkCoyoteHandler port=8009
> > > > >
> > > > > EmbededTomcat: exception initializing ContextManager
> > > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > > Exception: java.lang.reflect.InvocationTargetException
> > > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > > EmbededTomcat.initContextManager
> > > > >
> > > > >
> > > > > With those lines commented out of the xml doc, i get this in
> > > > > the main dos window:
> > > > >
> > > > > C:\jakarta-tomcat-3.3.2\bin>call ".\tomcat" run
> > > > > 2004-07-15 15:30:55 - ServerXmlReader:
> > > > > Config=$TOMCAT_HOME\conf\server.xml
> > > > > 2004-07-15 15:30:55 - PathSetter: home=C:\jakarta-tomcat-3.3.2
> > > > > 2004-07-15 15:30:56 - ContextX

Re: Tomcat 3 will not load on Windows 98

2004-07-15 Thread Donald Brewer
1.3.1 JDK:

This release of the J2EE SDK is available for the following platforms:
Solaris
Windows NT
Windows 2000 Professional
Linux

Windows 98 is not even listed for the more recent releases, nothing for
1.3.1 for windows 98

- Original Message -
From: "Bill Barker" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, July 15, 2004 5:36 PM
Subject: Re: Tomcat 3 will not load on Windows 98


> Well, That gets rid of TC 4 & 5 as well ;-).
>
> The CoyoteConnector jars are indexed, and jar indexing is broken on the
> 1.3.0 JDK.  You can either remove the META-INF/INDEX.LIST from the jars,
or
> upgrade your JVM version to at least 1.3.1.
>
>
> - Original Message -
> From: "Donald Brewer" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, July 15, 2004 1:43 PM
> Subject: Re: Tomcat 3 will not load on Windows 98
>
>
> > c:\jdk1.3.0_02\jre\lib\ext is empty
> >
> > under c:\Program Files\JavaSoft\JRE\lib\ext\:
> > QTJava.zip is the only file
> >
> > is it possible that i have 2 runtime engines installed?
> >
> > Will tomcat 4 or 5 work with windows 98? i could not even find a
download
> > for anything older that xp for 4 or 5
> >
> > - Original Message -
> > From: "Larry Isaacs" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Thursday, July 15, 2004 4:16 PM
> > Subject: RE: Tomcat 3 will not load on Windows 98
> >
> >
> > > You may wish to consider Tomcat 4 or 5, which implement more
> > > recent versions of the Servlet and JSP specs (with all their
> > > new features).  However, what is causing this odd problem with
> > > Tomcat 3.3.2 could also cause problems for Tomcat 4 and 5
> > > as well.
> > >
> > > What is the contents of the jre\lib\ext directory of the JDK
> > > you are using with Tomcat 3.3.2?
> > >
> > > Larry
> > >
> > > > -Original Message-
> > > > From: Donald Brewer [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, July 15, 2004 3:49 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Tomcat 3 will not load on Windows 98
> > > >
> > > >
> > > > I am trying to load tomcat 3 on a windows 98 platform.
> > > > I have been sitting in this chair for two days now!!! It just
> > > > will not load.
> > > > I generated all this by putting >>hold.txt at the end of the
> > > > run command in the tomcat.bat file. The DOS windows scroll by
> > > > and leave me with nothing to look at.
> > > >
> > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > At Line 241 /Server/ContextManager/CoyoteConnector/ port=8080
> > > > maxThreads=150 minSpareThreads=25 maxSpareThreads=75
> > > > enableLookups=false acceptCount=100 debug=0
> > > > connectionTimeout=2 disableUploadTimeout=true
> > > >
> > > > EmbededTomcat: exception initializing ContextManager
> > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > Exception: java.lang.reflect.InvocationTargetException
> > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > EmbededTomcat.initContextManager
> > > >
> > > >
> > > > When I comment out the Coyote Connector lines in
> > > > conf/server.xml, the next connector down has a problem:
> > > >
> > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > At Line 287 /Server/ContextManager/Ajp12Connector/ port=8007
> > > >
> > > > EmbededTomcat: exception initializing ContextManager
> > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > Exception: java.lang.reflect.InvocationTargetException
> > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > EmbededTomcat.initContextManager
> > > >
> > > > When I comment out the Ajp12 lines, this is the output:
> > > >
> > > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > > At Line 312 /Server/ContextManager/CoyoteConnector/
> > > > processorClassName=org.apache.jk.server.JkCoyoteHandler port=8009
> > > >
> > > > EmbededTomcat: exception initializing ContextManager
> > > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > > Exception: java.lang.reflect.InvocationTargetException
> > > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > > EmbededTomcat.initContextManager
> > > >
> > > >
> > > > With those lines commented out of the xml doc, i get this in
> > > > the main dos window:
> > > >
> > > > C:\jakarta-tomcat-3.3.2\bin>call ".\tomcat" run
> > > > 2004-07-15 15:30:55 - ServerXmlReader:
> > > > Config=$TOMCAT_HOME\conf\server.xml
> > > > 2004-07-15 15:30:55 - PathSetter: home=C:\jakarta-tomcat-3.3.2
> > > > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > > > config=$TOMCAT_HOME\conf\apps-127.0.0.1.xml
> > > > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > > > config=$TOMCAT_HOME\conf\apps-admin.xml
> > > > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > > > config=$TOMCAT_HOME\conf\apps-examples.xml
> > > > 2004-07-15 15:30:56 - AutoWebApp: Auto-Adding DEFAULT:/
> > > > 2004-07-15 15:30:56 - AutoWebApp: Loaded from config: DEFAULT:/admin
> > > > 2004-07-15 15:30:56 - AutoWebApp: Loaded

session timeout: web.xml and setMaxInactiveInterval(int)

2004-07-15 Thread Stephen Charles Huey
My web.xml has the following:


30



However, when a user logs in, the following code in our app gets
executed:

  HttpSession session = request.getSession(false);
  session.setMaxInactiveInterval(7200);


I've been fiddling with the web.xml and didn't realize that other code
was in there, and I'm wondering who trumps who.  I would assume that the
web.xml's global setting would have priority over any individual
setting, but it could easily be the other way around!  

Thanks,
Stephen

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



Re: DBCP pool

2004-07-15 Thread Emerson Cargnin
If testOnBorrow is not true, when is it tested?

Mike Curwen wrote:
I'm not an expert, but I suspect that the resource config parameters
will act like javabean setters.  So you should be able to specify
something like:
 

   validationQuery
   SELECT 1


   testOnBorrow
   true



-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 15, 2004 4:30 PM
To: Tomcat Users List
Subject: Re: DBCP pool

How do I specify the test query as context param? There is nothing in 
the JDBC configuration of DBCP in tomcat 5 docs.
BTW, I found some typos erros, must I create a bug, or may I 
put it here?

other question:
May I mix the Resource and ResourceParams tags?? I'm asking 
this because 
I have  to configure 2 connection in some apps, so I must put 
a Resource 
and a ResourceParams tag sequencially for each connection I want to 
configure??

Thanks for your response
Emerson
Mike Curwen wrote:
I think the way to do this with DBCP is to specify a test 
query.  The 

pool would then run this query (like "SELECT 1") before 
giving out the 

connection. If it failed (and if it's because the connection is 
closed), it will null this connection in the pool, open a new 
connection, and retest it, and then give this one out.

If any of that is factually wrong, someone will be sure to 
jump in and 

correct me.


-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 3:03 PM
To: Tomcat Users List
Subject: Re: DBCP pool
none of them, I mean the timeout set in database, the maximum
life time 
for an connection. This is used when you have a database that has a 
given timeout, let's say, 10 minutes, so you can't have this 
connection 
opened for more than 10 minutes, what would case an error due to an 
timeouted connection.




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


--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubarão
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
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]


--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubarão
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DBCP pool

2004-07-15 Thread Emerson Cargnin
What about this other question:
May I mix the Resource and ResourceParams tags?? I'm asking this because
I have  to configure 2 connection in some apps, so I must put a Resource
and a ResourceParams tag sequencially for each connection I want to
configure??
Thanks for your response
Emerson
Mike Curwen wrote:
I think the way to do this with DBCP is to specify a test query.  The
pool would then run this query (like "SELECT 1") before giving out the
connection. If it failed (and if it's because the connection is closed),
it will null this connection in the pool, open a new connection, and
retest it, and then give this one out.
 
If any of that is factually wrong, someone will be sure to jump in and
correct me.



-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 15, 2004 3:03 PM
To: Tomcat Users List
Subject: Re: DBCP pool

none of them, I mean the timeout set in database, the maximum 
life time 
for an connection. This is used when you have a database that has a 
given timeout, let's say, 10 minutes, so you can't have this 
connection 
opened for more than 10 minutes, what would case an error due to an 
timeouted connection.



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


--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubarão
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
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: DBCP pool

2004-07-15 Thread Mike Curwen
I'm not an expert, but I suspect that the resource config parameters
will act like javabean setters.  So you should be able to specify
something like:
 

   validationQuery
   SELECT 1


   testOnBorrow
   true




> -Original Message-
> From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 15, 2004 4:30 PM
> To: Tomcat Users List
> Subject: Re: DBCP pool
> 
> 
> How do I specify the test query as context param? There is nothing in 
> the JDBC configuration of DBCP in tomcat 5 docs.
> BTW, I found some typos erros, must I create a bug, or may I 
> put it here?
> 
> other question:
> 
> May I mix the Resource and ResourceParams tags?? I'm asking 
> this because 
> I have  to configure 2 connection in some apps, so I must put 
> a Resource 
> and a ResourceParams tag sequencially for each connection I want to 
> configure??
> 
> Thanks for your response
> 
> Emerson
> 
> Mike Curwen wrote:
> > I think the way to do this with DBCP is to specify a test 
> query.  The 
> > pool would then run this query (like "SELECT 1") before 
> giving out the 
> > connection. If it failed (and if it's because the connection is 
> > closed), it will null this connection in the pool, open a new 
> > connection, and retest it, and then give this one out.
> >  
> > If any of that is factually wrong, someone will be sure to 
> jump in and 
> > correct me.
> > 
> > 
> > 
> > 
> >>-Original Message-
> >>From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, July 15, 2004 3:03 PM
> >>To: Tomcat Users List
> >>Subject: Re: DBCP pool
> >>
> >>
> >>none of them, I mean the timeout set in database, the maximum
> >>life time 
> >>for an connection. This is used when you have a database that has a 
> >>given timeout, let's say, 10 minutes, so you can't have this 
> >>connection 
> >>opened for more than 10 minutes, what would case an error due to an 
> >>timeouted connection.
> >>
> >>
> > 
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -- 
> Emerson Cargnin
> Analista de Sistemas - Gerente Regional - Tubarão
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
> 
> -
> 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 3 will not load on Windows 98

2004-07-15 Thread Bill Barker
Well, That gets rid of TC 4 & 5 as well ;-).

The CoyoteConnector jars are indexed, and jar indexing is broken on the
1.3.0 JDK.  You can either remove the META-INF/INDEX.LIST from the jars, or
upgrade your JVM version to at least 1.3.1.


- Original Message -
From: "Donald Brewer" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, July 15, 2004 1:43 PM
Subject: Re: Tomcat 3 will not load on Windows 98


> c:\jdk1.3.0_02\jre\lib\ext is empty
>
> under c:\Program Files\JavaSoft\JRE\lib\ext\:
> QTJava.zip is the only file
>
> is it possible that i have 2 runtime engines installed?
>
> Will tomcat 4 or 5 work with windows 98? i could not even find a download
> for anything older that xp for 4 or 5
>
> - Original Message -
> From: "Larry Isaacs" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, July 15, 2004 4:16 PM
> Subject: RE: Tomcat 3 will not load on Windows 98
>
>
> > You may wish to consider Tomcat 4 or 5, which implement more
> > recent versions of the Servlet and JSP specs (with all their
> > new features).  However, what is causing this odd problem with
> > Tomcat 3.3.2 could also cause problems for Tomcat 4 and 5
> > as well.
> >
> > What is the contents of the jre\lib\ext directory of the JDK
> > you are using with Tomcat 3.3.2?
> >
> > Larry
> >
> > > -Original Message-
> > > From: Donald Brewer [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, July 15, 2004 3:49 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Tomcat 3 will not load on Windows 98
> > >
> > >
> > > I am trying to load tomcat 3 on a windows 98 platform.
> > > I have been sitting in this chair for two days now!!! It just
> > > will not load.
> > > I generated all this by putting >>hold.txt at the end of the
> > > run command in the tomcat.bat file. The DOS windows scroll by
> > > and leave me with nothing to look at.
> > >
> > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > At Line 241 /Server/ContextManager/CoyoteConnector/ port=8080
> > > maxThreads=150 minSpareThreads=25 maxSpareThreads=75
> > > enableLookups=false acceptCount=100 debug=0
> > > connectionTimeout=2 disableUploadTimeout=true
> > >
> > > EmbededTomcat: exception initializing ContextManager
> > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > Exception: java.lang.reflect.InvocationTargetException
> > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > EmbededTomcat.initContextManager
> > >
> > >
> > > When I comment out the Coyote Connector lines in
> > > conf/server.xml, the next connector down has a problem:
> > >
> > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > At Line 287 /Server/ContextManager/Ajp12Connector/ port=8007
> > >
> > > EmbededTomcat: exception initializing ContextManager
> > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > Exception: java.lang.reflect.InvocationTargetException
> > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > EmbededTomcat.initContextManager
> > >
> > > When I comment out the Ajp12 lines, this is the output:
> > >
> > > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > > At Line 312 /Server/ContextManager/CoyoteConnector/
> > > processorClassName=org.apache.jk.server.JkCoyoteHandler port=8009
> > >
> > > EmbededTomcat: exception initializing ContextManager
> > > Guessed home=C:\jakarta-tomcat-3.3.2
> > > Exception: java.lang.reflect.InvocationTargetException
> > > Root Exception: org.apache.tomcat.core.TomcatException:
> > > EmbededTomcat.initContextManager
> > >
> > >
> > > With those lines commented out of the xml doc, i get this in
> > > the main dos window:
> > >
> > > C:\jakarta-tomcat-3.3.2\bin>call ".\tomcat" run
> > > 2004-07-15 15:30:55 - ServerXmlReader:
> > > Config=$TOMCAT_HOME\conf\server.xml
> > > 2004-07-15 15:30:55 - PathSetter: home=C:\jakarta-tomcat-3.3.2
> > > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > > config=$TOMCAT_HOME\conf\apps-127.0.0.1.xml
> > > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > > config=$TOMCAT_HOME\conf\apps-admin.xml
> > > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > > config=$TOMCAT_HOME\conf\apps-examples.xml
> > > 2004-07-15 15:30:56 - AutoWebApp: Auto-Adding DEFAULT:/
> > > 2004-07-15 15:30:56 - AutoWebApp: Loaded from config: DEFAULT:/admin
> > > 2004-07-15 15:30:56 - AutoWebApp: Loaded from config:
> > > DEFAULT:/examples
> > > 2004-07-15 15:30:56 - ContextManager: Tomcat configured and
> > > in stable state
> > > 2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/admin
> > > 2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/examples
> > > 2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/ROOT
> > >
> > > but it hangs right there. My process analyser does not see
> > > anything but the java window, http://localhost:8080/ is not available
> > >
> > >
> > > Got any ideas? I need Tomcat to study JSP for the next round
> > > of interviews. I am an out-of-work programmer. HELP ME PLEASE.
> > >
> > >
> > >
> >
>

Re: DBCP pool

2004-07-15 Thread Emerson Cargnin
How do I specify the test query as context param? There is nothing in 
the JDBC configuration of DBCP in tomcat 5 docs.
BTW, I found some typos erros, must I create a bug, or may I put it here?

other question:
May I mix the Resource and ResourceParams tags?? I'm asking this because 
I have  to configure 2 connection in some apps, so I must put a Resource 
and a ResourceParams tag sequencially for each connection I want to 
configure??

Thanks for your response
Emerson
Mike Curwen wrote:
I think the way to do this with DBCP is to specify a test query.  The
pool would then run this query (like "SELECT 1") before giving out the
connection. If it failed (and if it's because the connection is closed),
it will null this connection in the pool, open a new connection, and
retest it, and then give this one out.
 
If any of that is factually wrong, someone will be sure to jump in and
correct me.



-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 15, 2004 3:03 PM
To: Tomcat Users List
Subject: Re: DBCP pool

none of them, I mean the timeout set in database, the maximum 
life time 
for an connection. This is used when you have a database that has a 
given timeout, let's say, 10 minutes, so you can't have this 
connection 
opened for more than 10 minutes, what would case an error due to an 
timeouted connection.



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


--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubarão
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Apache 1.3 not loading Mod_Jk.so

2004-07-15 Thread bralston
All, 

  If anyone can help me I would be forever grateful, I have spent hours
on this problem. I am installing Apache 1.3 and Tomcat 4.0 on AIX. Apache
installs great and tomcat installs great. I am trying to build mod_jk.so
from jk-1.2.5. The mod_jk.so builds, but my htttpd.conf and apache fails
with the following error:

 

Syntax error on line 202 of /usr/local/apache/conf/httpd.conf:

Can't locate API module structure `jk_module' in file
/usr/local/apache/libexec/mod_jk.so: Function not implemented (jk_module)

/usr/local/apache/bin/apachectl restart: httpd could not be started

 

 

This is my build method (I have pasted output to be helpful):

 

1) gunzip jakarta-tomcat-connectors-jk-1.2.5-src.tar.gz

2) tar -xvf jakarta-tomcat-connectors-jk-1.2.5-src.tar

3) cd /usr/local/tomcat/jakarta-tomcat-connectors-jk-1.2.5-src/jk/native

4) ./buildconf.sh  

   libtoolize --force --automake --copy

   aclocal

   automake -a --foreign -i --copy

   autoconf

5) ./configure --with-apxs=/usr/local/apache/bin/apxs

   checking for libtool... /usr/local/bin/libtool

   need to check for Perl first, apxs depends on it...

   checking for perl... /usr/bin/perl

   building connector for "apache-1.3"

   checking for target platform... unix

   no apache given

   configure: creating ./config.status

   config.status: creating Makefile

   config.status: creating apache-1.3/Makefile

   config.status: creating apache-1.3/Makefile.apxs

   config.status: creating apache-2.0/Makefile

   config.status: creating apache-2.0/Makefile.apxs

   config.status: creating common/Makefile

   config.status: creating common/list.mk

   config.status: creating jni/Makefile

   config.status: executing depfiles commands

6) make

   cp .libs/mod_jk.lai /usr/local/tomcat/jakarta-tomcat-connectors-jk-
1.2.5-src/jk/native/apache-1.3/mod_jk.la

   libtool: install: warning: remember to run `libtool --finish
/usr/local/apache/libexec'

   make[1]: Leaving directory `/usr/local/tomcat/jakarta-tomcat-
connectors-jk-1.2.5-src/jk/native/apache-1.3'

   make[1]: Entering directory `/usr/local/tomcat/jakarta-tomcat-
connectors-jk-1.2.5-src/jk/native'

   make[1]: Nothing to be done for `all-am'.

   make[1]: Leaving directory `/usr/local/tomcat/jakarta-tomcat-
connectors-jk-1.2.5-src/jk/native'

   target="all"; \

   list='common apache-1.3'; \

   for i in $list; do \

   echo "Making $target in $i"; \

   if test "$i" != "."; then \

   (cd $i && make $target) || exit 1; \

   fi; \

   done;

   Making all in common

   make[1]: Entering directory `/usr/local/tomcat/jakarta-tomcat-
connectors-jk-1.2.5-src/jk/native/common'

   make[1]: Nothing to be done for `all'.

   make[1]: Leaving directory `/usr/local/tomcat/jakarta-tomcat-
connectors-jk-1.2.5-src/jk/native/common'

   Making all in apache-1.3

   make[1]: Entering directory `/usr/local/tomcat/jakarta-tomcat-
connectors-jk-1.2.5-src/jk/native/apache-1.3'

   /usr/local/bin/libtool --mode=install cp mod_jk.la `pwd`/mod_jk.so

   cp .libs/mod_jk.a /usr/local/tomcat/jakarta-tomcat-connectors-jk-
1.2.5-src/jk/native/apache-1.3/mod_jk.a

   cp .libs/mod_jk.lai /usr/local/tomcat/jakarta-tomcat-connectors-jk-
1.2.5-src/jk/native/apache-1.3/mod_jk.la

   libtool: install: warning: remember to run `libtool --finish
/usr/local/apache/libexec'

   make[1]: Leaving directory `/usr/local/tomcat/jakarta-tomcat-
connectors-jk-1.2.5-src/jk/native/apache-1.3'  

7) cd apache-1.3

8) ls

.cvsignoreMakefile.apxs Makefile.libdir   mod_jk.a
mod_jk.exp

.libs Makefile.apxs.in  Makefile.tmpl mod_jk.c
mod_jk.la

Makefile  Makefile.in   libjk.module  mod_jk.dsp
mod_jk.lo

9) No mod_jk.so is produced so I manually build the file

10)  /usr/local/apache/bin/apxs -I ../common -I /usr/java14/include -i -a -c
mod_jk.c ../common/*.c -o mod_jk.so

gcc -DAIX=520 -U__STR__ -DAIX_BIND_PROCESSOR -DUSE_HSREGEX -DUSE_EXPAT
-I../lib/expat-lite -fpic -DSHARED_MODULE -I/usr/local/apache/include
-I../common -I/usr/java14/include  -c mod_jk.c

gcc -DAIX=520 -U__STR__ -DAIX_BIND_PROCESSOR -DUSE_HSREGEX -DUSE_EXPAT
-I../lib/expat-lite -fpic -DSHARED_MODULE -I/usr/local/apache/include
-I../common -I/usr/java14/include  -c ../common/jk_ajp12_worker.c

gcc -DAIX=520 -U__STR__ -DAIX_BIND_PROCESSOR -DUSE_HSREGEX -DUSE_EXPAT
-I../lib/expat-lite -fpic -DSHARED_MODULE -I/usr/local/apache/include
-I../common -I/usr/java14/include  -c ../common/jk_ajp13.c

gcc -DAIX=520 -U__STR__ -DAIX_BIND_PROCESSOR -DUSE_HSREGEX -DUSE_EXPAT
-I../lib/expat-lite -fpic -DSHARED_MODULE -I/usr/local/apache/include
-I../common -I/usr/java14/include  -c ../common/jk_ajp13_worker.c

gcc -DAIX=520 -U__STR__ -DAIX_BIND_PROCESSOR -DUSE_HSREGEX -DUSE_EXPAT
-I../lib/expat-lite -fpic -DSHARED_MODULE -I/usr/local/apache/include
-I../commo

Re: [SPAM] - RE: I need a pointer about persistent info for my servlet, please - Email has different SMTP TO: and MIME TO: fields in the email addresses

2004-07-15 Thread QM
On Fri, Jul 16, 2004 at 08:29:49AM +1200, Bret Waldow wrote:
: I would still
: like to hear what the canonical way to persist data for a servlet -
: outside of the servlet .WAR file - is.  Is there one for Tomcat?  I'm
: assuming that someone else besides us might have this need, I just can't
: find anything definitive in the documentation or Google yet.

Does the app otherwise use a database?
If so, it'd be nothing to put the info in an extra table somewhere.

I don't think there's such a thing as a "canonical"/portable way for
this: webapps are supposed to be self-contained, somewhat sealed
products (as far as on-disk files).

The plus side is, this leaves plenty of room for creative solutions.
-or not-so-creative solutions, such as, "put it in a database." ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Using tomcat that is part of jboss directly instead of stand-alone tomcat

2004-07-15 Thread Jim Solderitsch
This might be a beginner's question, but I spent a good bit of time 
with google searches and did not come up with an answer. Any advice or 
suggestions where to look appreciated.

I have a web application that runs quite nicely within tomcat 5.0.25. 
When tomcat is running I just access the application with the usual 
http://localhost:8080/sgs

It does not need any EJB features, but we are planning to incorporate 
some new functionality that will require a full app server (e.g. JMS) 
-- hence the interest in jboss.

As a first step, I would like to configure the current app to run 
within the tomcat (5.0.26 I believe) that is part of jboss 3.2.5.

So I would like to make the necessary definitions/edits within the 
config files and directory structure of jboss so that when I launch 
jboss and it in turn starts tomcat, that I can use the same (or 
similar) url as above to access my web app.

We use JNDI to access a data source and part of the setup for this 
involves a  specification inside our app's context 
specification which is included in a  section that we have 
installed inside of tomcat's server.xml.

Here is the fragment for the current tomcat server.xml that works:
 

 
 
 factory
 
org.apache.commons.dbcp.BasicDataSourceFactory
 
 
 driverClassName
 org.postgresql.Driver
 
 
 url
  
jdbc:postgresql://localhost:5432/sgsdb?user=postgres
 
 
...
  

In addition, the web.xml for our web-app contains a  
section that relates to the JNDI.

The relevant example is:
  
postgreSQL datasource configuration
jdbc/sgsdb
javax.sql.DataSource
Container
  
I see that resource-ref tags do get used for jboss applications but in 
the examples I looked at, there were no examples of the use of 
.

My googling led me to define a jboss-web.xml file inside my app's 
WEB-INF folder for my application which currently has the following 
content:


/sgs

  jdbc/sgsdb
  java:/jdbc/sgsdb


I also moved a datasource specification file postgres-ds.xml into the 
server/default/deploy folder of jboss for my postgres credentials that 
included the lines:


  
jdbc/sgsdb

jdbc:postgresql://localhost:5432/sgsdb
org.postgresql.Driver
appuser
password
  


The bottom line is that with all of my configuration attempts, the 
application will not deploy cleanly.

Perhaps someone has walked down this road before -- moving from plain 
tomcat to tomcat within jboss.

What is the right sequence of re-configuration steps to make the web 
application accessible from jboss/tomcat? What new config files do I 
need and which edits do I need to make in the ones that I have?

Where do I move the application directory to? -- I saw some ideas about 
creating a sgs.war folder in the jboss installation and placing my 
files for the application inside this folder. I tried a couple of 
options for this but could not get access to the JNDI data source.

When I started this, I thought it would be an easy migration, but after 
a full day of trying I have not succeeded.

Any suggestions appreciated.
Jim
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Thread return to pool

2004-07-15 Thread Magne Skjeret
Hi
I have a bit peculiar problem, that I hope someone can help me with.
At the start of my servlet I bind some classes to the Thread, so it can 
be retrieved everywhere in that thread without passing it along into 
every method.

At the end of my servlet I unbind all the info from the thread. So far 
so good.
I use velocity to do the html output, and the templates do some java 
code calls aswell.
These code calls needs to access the info in the Thread too, but since 
it is already removed it cant.

Is there a way to run some code immidiately before the thread is 
returned to the pool?
This to avoid memory leaks.

There might be some I can do with velocity instead, but I will adress 
that to the velocity list.

Magne Skjeret

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


Re: Tomcat 3 will not load on Windows 98

2004-07-15 Thread Donald Brewer
c:\jdk1.3.0_02\jre\lib\ext is empty

under c:\Program Files\JavaSoft\JRE\lib\ext\:
QTJava.zip is the only file

is it possible that i have 2 runtime engines installed?

Will tomcat 4 or 5 work with windows 98? i could not even find a download
for anything older that xp for 4 or 5

- Original Message -
From: "Larry Isaacs" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, July 15, 2004 4:16 PM
Subject: RE: Tomcat 3 will not load on Windows 98


> You may wish to consider Tomcat 4 or 5, which implement more
> recent versions of the Servlet and JSP specs (with all their
> new features).  However, what is causing this odd problem with
> Tomcat 3.3.2 could also cause problems for Tomcat 4 and 5
> as well.
>
> What is the contents of the jre\lib\ext directory of the JDK
> you are using with Tomcat 3.3.2?
>
> Larry
>
> > -Original Message-
> > From: Donald Brewer [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, July 15, 2004 3:49 PM
> > To: [EMAIL PROTECTED]
> > Subject: Tomcat 3 will not load on Windows 98
> >
> >
> > I am trying to load tomcat 3 on a windows 98 platform.
> > I have been sitting in this chair for two days now!!! It just
> > will not load.
> > I generated all this by putting >>hold.txt at the end of the
> > run command in the tomcat.bat file. The DOS windows scroll by
> > and leave me with nothing to look at.
> >
> > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > At Line 241 /Server/ContextManager/CoyoteConnector/ port=8080
> > maxThreads=150 minSpareThreads=25 maxSpareThreads=75
> > enableLookups=false acceptCount=100 debug=0
> > connectionTimeout=2 disableUploadTimeout=true
> >
> > EmbededTomcat: exception initializing ContextManager
> > Guessed home=C:\jakarta-tomcat-3.3.2
> > Exception: java.lang.reflect.InvocationTargetException
> > Root Exception: org.apache.tomcat.core.TomcatException:
> > EmbededTomcat.initContextManager
> >
> >
> > When I comment out the Coyote Connector lines in
> > conf/server.xml, the next connector down has a problem:
> >
> > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > At Line 287 /Server/ContextManager/Ajp12Connector/ port=8007
> >
> > EmbededTomcat: exception initializing ContextManager
> > Guessed home=C:\jakarta-tomcat-3.3.2
> > Exception: java.lang.reflect.InvocationTargetException
> > Root Exception: org.apache.tomcat.core.TomcatException:
> > EmbededTomcat.initContextManager
> >
> > When I comment out the Ajp12 lines, this is the output:
> >
> > ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> > At Line 312 /Server/ContextManager/CoyoteConnector/
> > processorClassName=org.apache.jk.server.JkCoyoteHandler port=8009
> >
> > EmbededTomcat: exception initializing ContextManager
> > Guessed home=C:\jakarta-tomcat-3.3.2
> > Exception: java.lang.reflect.InvocationTargetException
> > Root Exception: org.apache.tomcat.core.TomcatException:
> > EmbededTomcat.initContextManager
> >
> >
> > With those lines commented out of the xml doc, i get this in
> > the main dos window:
> >
> > C:\jakarta-tomcat-3.3.2\bin>call ".\tomcat" run
> > 2004-07-15 15:30:55 - ServerXmlReader:
> > Config=$TOMCAT_HOME\conf\server.xml
> > 2004-07-15 15:30:55 - PathSetter: home=C:\jakarta-tomcat-3.3.2
> > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > config=$TOMCAT_HOME\conf\apps-127.0.0.1.xml
> > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > config=$TOMCAT_HOME\conf\apps-admin.xml
> > 2004-07-15 15:30:56 - ContextXmlReader: Context
> > config=$TOMCAT_HOME\conf\apps-examples.xml
> > 2004-07-15 15:30:56 - AutoWebApp: Auto-Adding DEFAULT:/
> > 2004-07-15 15:30:56 - AutoWebApp: Loaded from config: DEFAULT:/admin
> > 2004-07-15 15:30:56 - AutoWebApp: Loaded from config:
> > DEFAULT:/examples
> > 2004-07-15 15:30:56 - ContextManager: Tomcat configured and
> > in stable state
> > 2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/admin
> > 2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/examples
> > 2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/ROOT
> >
> > but it hangs right there. My process analyser does not see
> > anything but the java window, http://localhost:8080/ is not available
> >
> >
> > Got any ideas? I need Tomcat to study JSP for the next round
> > of interviews. I am an out-of-work programmer. HELP ME PLEASE.
> >
> >
> >
>
> -
> 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: [SPAM] - RE: I need a pointer about persistent info for my servlet, please - Email has different SMTP TO: and MIME TO: fields in the email addresses

2004-07-15 Thread Bret Waldow
Yes, we are currently using Tomcat 5.  In fairly short order, we will be
turning what we are writing into an SOA implementation, and I haven't
gone far enough yet to know if we can still use Tomcat 5 with Axis, or
if we need to shift back to Tomcat 4.  Of course, we also intend to be
deployable on anyone's existing server setup, if it meets standards.

Your suggestion makes sense, and thanks for the idea.  I would still
like to hear what the canonical way to persist data for a servlet -
outside of the servlet .WAR file - is.  Is there one for Tomcat?  I'm
assuming that someone else besides us might have this need, I just can't
find anything definitive in the documentation or Google yet.

Regards,
Bret

-Original Message-
From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 15 July 2004 6:27 p.m.
To: Tomcat Users List
Subject: [SPAM] - RE: I need a pointer about persistent info for my
servlet, please - Email has different SMTP TO: and MIME TO: fields in
the email addresses

Bret,

Two questions:
1) Are you using Tomcat 5?
2) If so are you using the Tomcat-Deployer to deploy your application?

If you answer yes to both, then this is probably a good foundation for a
solution to your problem. Let me explain.

The Tomcat deployer uses an Ant script and a associated properties file
to take your war file (in unzipped format) compile it and then deploy it
to Tomcat.

We made some simple modificaitons to Tomcat-Deployer "build.xml" script
and "deployer.properties" file to do additional customization
before/during the JSP compilation process. The customization we do
sounds similar to what you want to do - set directory names, links, etc.
custom for that site/customer.

The Ant build.xml would be customized just once and work everywhere. The
properties in deployer.properties (or an alternate properties file of
your choosing) would be customized once for each customer/site. Then
each time you installed an updated war file the prior customizations
would be "remembered" so to speak.

Hope that was clear and it helps.

Even if you are not using Tomcat, a similar approach should work with
other App servers. Using an Ant script to unzip, customize and then
rejar the webapp should be pretty straightforward.

 - Richard

-Original Message-
From: Bret Waldow [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 14, 2004 10:56 PM
To: [EMAIL PROTECTED]
Subject: I need a pointer about persistent info for my servlet, please


We are deploying a servlet front end to an existing application.  When
the application is installed, the user picks some parameters, like the
install directory, that aren't known to us when we make the .WAR file we
deploy from.



However, our servlet needs to know this, and it needs to know it in a
way that survives redeployment of the servlet from the .WAR file - so I
can't put it into the WEB-INF/web.xml file, as this will be overwritten
when the servlet is redeployed in Tomcat.



During product installation, where can I write the information the user
chooses so that it will always be available to our servlet?  (And in
what form, please?)



I've read about a tomcat/conf/Catalina/localhost/.xml file,
but I have only seen the examples for the built-in Tomcat apps, and
those don't show examples of  for me to use.



Can anyone point me to something that I can use for this?



Thanks,

Bret





-
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: DBCP pool

2004-07-15 Thread Mike Curwen
I think the way to do this with DBCP is to specify a test query.  The
pool would then run this query (like "SELECT 1") before giving out the
connection. If it failed (and if it's because the connection is closed),
it will null this connection in the pool, open a new connection, and
retest it, and then give this one out.
 
If any of that is factually wrong, someone will be sure to jump in and
correct me.



> -Original Message-
> From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 15, 2004 3:03 PM
> To: Tomcat Users List
> Subject: Re: DBCP pool
> 
> 
> none of them, I mean the timeout set in database, the maximum 
> life time 
> for an connection. This is used when you have a database that has a 
> given timeout, let's say, 10 minutes, so you can't have this 
> connection 
> opened for more than 10 minutes, what would case an error due to an 
> timeouted connection.
> 
> 


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



Re: Wildcard virtual hosts help

2004-07-15 Thread Daniel J. Obregon
Have you considered using apache/mod_jk?

If you are mapping thousands of domains to a few webapps, it might be
better to use apache.  Then, *worst* case you can write a script to
generate and/or maintain a set of virtual hosts

Just a thought...

- Dan Obregon -

> I have a specific problem that requires that I map hundreds of thousands
> (yes, hundreds of thousands) of domain names to a dozen or so different
> web-apps based on domain name. I currently use Resin to handle this, but
> really wish to abandon Resin for Tomcat for a variety of reasons.
>
> Uniquely defining each one as a web app isn't practical due to the sheer
> number involved, and the fact that hundreds of domain names come and go
> during the day.
>
> I've googled and searched the archives, and I can't seem to find an
> answer to how to do this with Tomcat 5, if it's even possible. I've seen
> several people asked, and the only one I found a number of responses to
> was chided for his decision to use wildcards. :)
>
> I would immensely appreciate it if anyone could point me in the
> direction of how to implement something like:
>
> 
>
> (which I've tried to no avail)
>
> 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]



Single SignOn Configuration

2004-07-15 Thread Robb, Rebecca
I am using Tomcat 5.0.1 and I have two web apps that I manage that have
the same user authentication.  I would like to use single signon.
However, when I configure the single signon valve in the server.xml file
and move my realm from my app.xml files to the server.xml file, I can no
longer access the manager app I've signed on to my  other applications
because it uses a different authentication.  The comment in the
server.xml file states that all apps must have the same authentication
if single signon is configured.  If I change the manager app to have the
same authentication as the other two apps, then I think that all my
users could also get into the manager app with their standard
authentication which I do not want to happen.  Can I configure Tomcat
somehow so that I can have single signon without losing the convenience
of having the manager app available only to the web administrators?

 

Any help would be appreciated.



RE: Tomcat 3 will not load on Windows 98

2004-07-15 Thread Larry Isaacs
You may wish to consider Tomcat 4 or 5, which implement more
recent versions of the Servlet and JSP specs (with all their
new features).  However, what is causing this odd problem with
Tomcat 3.3.2 could also cause problems for Tomcat 4 and 5
as well.

What is the contents of the jre\lib\ext directory of the JDK
you are using with Tomcat 3.3.2?

Larry

> -Original Message-
> From: Donald Brewer [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 15, 2004 3:49 PM
> To: [EMAIL PROTECTED]
> Subject: Tomcat 3 will not load on Windows 98
> 
> 
> I am trying to load tomcat 3 on a windows 98 platform.
> I have been sitting in this chair for two days now!!! It just 
> will not load.
> I generated all this by putting >>hold.txt at the end of the 
> run command in the tomcat.bat file. The DOS windows scroll by 
> and leave me with nothing to look at.
> 
> ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> At Line 241 /Server/ContextManager/CoyoteConnector/ port=8080 
> maxThreads=150 minSpareThreads=25 maxSpareThreads=75 
> enableLookups=false acceptCount=100 debug=0 
> connectionTimeout=2 disableUploadTimeout=true 
> 
> EmbededTomcat: exception initializing ContextManager
> Guessed home=C:\jakarta-tomcat-3.3.2
> Exception: java.lang.reflect.InvocationTargetException
> Root Exception: org.apache.tomcat.core.TomcatException: 
> EmbededTomcat.initContextManager
> 
> 
> When I comment out the Coyote Connector lines in 
> conf/server.xml, the next connector down has a problem:
> 
> ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> At Line 287 /Server/ContextManager/Ajp12Connector/ port=8007 
> 
> EmbededTomcat: exception initializing ContextManager
> Guessed home=C:\jakarta-tomcat-3.3.2
> Exception: java.lang.reflect.InvocationTargetException
> Root Exception: org.apache.tomcat.core.TomcatException: 
> EmbededTomcat.initContextManager
> 
> When I comment out the Ajp12 lines, this is the output:
> 
> ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
> At Line 312 /Server/ContextManager/CoyoteConnector/ 
> processorClassName=org.apache.jk.server.JkCoyoteHandler port=8009 
> 
> EmbededTomcat: exception initializing ContextManager
> Guessed home=C:\jakarta-tomcat-3.3.2
> Exception: java.lang.reflect.InvocationTargetException
> Root Exception: org.apache.tomcat.core.TomcatException: 
> EmbededTomcat.initContextManager
> 
> 
> With those lines commented out of the xml doc, i get this in 
> the main dos window:
> 
> C:\jakarta-tomcat-3.3.2\bin>call ".\tomcat" run
> 2004-07-15 15:30:55 - ServerXmlReader: 
> Config=$TOMCAT_HOME\conf\server.xml
> 2004-07-15 15:30:55 - PathSetter: home=C:\jakarta-tomcat-3.3.2
> 2004-07-15 15:30:56 - ContextXmlReader: Context 
> config=$TOMCAT_HOME\conf\apps-127.0.0.1.xml
> 2004-07-15 15:30:56 - ContextXmlReader: Context 
> config=$TOMCAT_HOME\conf\apps-admin.xml
> 2004-07-15 15:30:56 - ContextXmlReader: Context 
> config=$TOMCAT_HOME\conf\apps-examples.xml
> 2004-07-15 15:30:56 - AutoWebApp: Auto-Adding DEFAULT:/
> 2004-07-15 15:30:56 - AutoWebApp: Loaded from config: DEFAULT:/admin
> 2004-07-15 15:30:56 - AutoWebApp: Loaded from config: 
> DEFAULT:/examples
> 2004-07-15 15:30:56 - ContextManager: Tomcat configured and 
> in stable state
> 2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/admin
> 2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/examples
> 2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/ROOT
> 
> but it hangs right there. My process analyser does not see 
> anything but the java window, http://localhost:8080/ is not available
> 
> 
> Got any ideas? I need Tomcat to study JSP for the next round 
> of interviews. I am an out-of-work programmer. HELP ME PLEASE.
> 
> 
> 

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



Wildcard virtual hosts help

2004-07-15 Thread Cott Lang
I have a specific problem that requires that I map hundreds of thousands
(yes, hundreds of thousands) of domain names to a dozen or so different
web-apps based on domain name. I currently use Resin to handle this, but
really wish to abandon Resin for Tomcat for a variety of reasons.

Uniquely defining each one as a web app isn't practical due to the sheer
number involved, and the fact that hundreds of domain names come and go
during the day.

I've googled and searched the archives, and I can't seem to find an
answer to how to do this with Tomcat 5, if it's even possible. I've seen
several people asked, and the only one I found a number of responses to
was chided for his decision to use wildcards. :)

I would immensely appreciate it if anyone could point me in the
direction of how to implement something like:



(which I've tried to no avail)

thanks!



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



Re: DBCP pool

2004-07-15 Thread Emerson Cargnin
none of them, I mean the timeout set in database, the maximum life time 
for an connection. This is used when you have a database that has a 
given timeout, let's say, 10 minutes, so you can't have this connection 
opened for more than 10 minutes, what would case an error due to an 
timeouted connection.

Mike Curwen wrote:
what timeout?
the amount of time it keeps an idle connection in the pool?
the amount of time it waits before considering a connection abandoned?

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 15, 2004 2:40 PM
To: Tomcat Users List
Subject: DBCP pool

Is there a way to set the database timeout in dbcp??? I have 
a database 
which I have no control under its timeout. I used a pool api that 
allowed me to set the database timeout, but as I want to move 
to DBCP, 
is there a way to set this???

--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubarão
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
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]


--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubarão
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: DBCP pool

2004-07-15 Thread Mike Curwen
what timeout?

the amount of time it keeps an idle connection in the pool?
the amount of time it waits before considering a connection abandoned?


> -Original Message-
> From: Emerson Cargnin [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 15, 2004 2:40 PM
> To: Tomcat Users List
> Subject: DBCP pool
> 
> 
> Is there a way to set the database timeout in dbcp??? I have 
> a database 
> which I have no control under its timeout. I used a pool api that 
> allowed me to set the database timeout, but as I want to move 
> to DBCP, 
> is there a way to set this???
> 
> 
> -- 
> Emerson Cargnin
> Analista de Sistemas - Gerente Regional - Tubarão
> Setor de Desenvolvimento de Sistemas - TRE-SC
> tel : (048) - 251-3700 - Ramal 3181
> 
> -
> 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]



Tomcat 3 will not load on Windows 98

2004-07-15 Thread Donald Brewer
I am trying to load tomcat 3 on a windows 98 platform.
I have been sitting in this chair for two days now!!! It just will not load.
I generated all this by putting >>hold.txt at the end of the run command in the 
tomcat.bat file. The DOS windows scroll by and leave me with nothing to look at.

ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
At Line 241 /Server/ContextManager/CoyoteConnector/ port=8080 maxThreads=150 
minSpareThreads=25 maxSpareThreads=75 enableLookups=false acceptCount=100 debug=0 
connectionTimeout=2 disableUploadTimeout=true 

EmbededTomcat: exception initializing ContextManager
Guessed home=C:\jakarta-tomcat-3.3.2
Exception: java.lang.reflect.InvocationTargetException
Root Exception: org.apache.tomcat.core.TomcatException: 
EmbededTomcat.initContextManager


When I comment out the Coyote Connector lines in conf/server.xml, the next connector 
down has a problem:

ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
At Line 287 /Server/ContextManager/Ajp12Connector/ port=8007 

EmbededTomcat: exception initializing ContextManager
Guessed home=C:\jakarta-tomcat-3.3.2
Exception: java.lang.reflect.InvocationTargetException
Root Exception: org.apache.tomcat.core.TomcatException: 
EmbededTomcat.initContextManager

When I comment out the Ajp12 lines, this is the output:

ERROR reading C:\jakarta-tomcat-3.3.2\conf\server.xml
At Line 312 /Server/ContextManager/CoyoteConnector/ 
processorClassName=org.apache.jk.server.JkCoyoteHandler port=8009 

EmbededTomcat: exception initializing ContextManager
Guessed home=C:\jakarta-tomcat-3.3.2
Exception: java.lang.reflect.InvocationTargetException
Root Exception: org.apache.tomcat.core.TomcatException: 
EmbededTomcat.initContextManager


With those lines commented out of the xml doc, i get this in the main dos window:

C:\jakarta-tomcat-3.3.2\bin>call ".\tomcat" run
2004-07-15 15:30:55 - ServerXmlReader: Config=$TOMCAT_HOME\conf\server.xml
2004-07-15 15:30:55 - PathSetter: home=C:\jakarta-tomcat-3.3.2
2004-07-15 15:30:56 - ContextXmlReader: Context 
config=$TOMCAT_HOME\conf\apps-127.0.0.1.xml
2004-07-15 15:30:56 - ContextXmlReader: Context config=$TOMCAT_HOME\conf\apps-admin.xml
2004-07-15 15:30:56 - ContextXmlReader: Context 
config=$TOMCAT_HOME\conf\apps-examples.xml
2004-07-15 15:30:56 - AutoWebApp: Auto-Adding DEFAULT:/
2004-07-15 15:30:56 - AutoWebApp: Loaded from config: DEFAULT:/admin
2004-07-15 15:30:56 - AutoWebApp: Loaded from config: DEFAULT:/examples
2004-07-15 15:30:56 - ContextManager: Tomcat configured and in stable state
2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/admin
2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/examples
2004-07-15 15:30:56 - ContextManager: Adding  DEFAULT:/ROOT

but it hangs right there. My process analyser does not see anything but the java 
window, http://localhost:8080/ is not available


Got any ideas? I need Tomcat to study JSP for the next round of interviews. I am an 
out-of-work programmer. HELP ME PLEASE.




RE: Tomcat - Win2k service - GC output

2004-07-15 Thread Pooleery, Manoj
Hi,

I searched the entire system for .gc files, but couldn't find any.  Now the
question is, where is Tomcat outputting the gc log?

Thanks
-Manoj Pooleery.

-Original Message-
From: Carl Olivier [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 11:22 AM
To: Tomcat Users List
Subject: RE: Tomcat - Win2k service - GC output


Greetings.

OK, well I believe that the output from the  -verbose:gc flag in 1.3 will
write to a .gc file in your [windows]\system32 dirctory - although I am not
certain about this.

DO a system whide search for a .gc file on your server - the output does not
go to the normal log output file(s).

Carl

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED] 
Sent: 15 July 2004 05:21 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat - Win2k service - GC output

Hi,

Thank you for the quick response. I'm using jdk 1.3.1_05 and hence I cannot
use -Xloggc option.

Thanks
-Manoj Pooleery.

-Original Message-
From: Carl Olivier [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 11:17 AM
To: Tomcat Users List
Subject: RE: Tomcat - Win2k service - GC output


Hi.

If you are using JSDK 1.4.x use the following VM flag:

-Xloggc:normal.gc

This will create and write GC log entries to the following location on your
windows server:

[WINDOWS_SYSTEM_DIR]\system32\normal.gc

Regards,

Carl 

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]
Sent: 15 July 2004 05:14 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat - Win2k service - GC output

Hi,

I have set up Tomcat 4.1.27 as a service on a Win2k machine using the
following script -

tomcat -install "Apache Tomcat" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-verbose:gc -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar"
-Djava.endorsed.dir="%CATALINA_HOME%\common\endorsed"
-Dsun.io.useCanonCaches=false -Dcatalina.home="%CATALINA_HOME%" -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
"%CATALINA_HOME%\logs\stderr.log"

I wanted to see the GC ouput, so, I added the -verbose:gc flag.  When I see
the registry, I can see this has gone in as a JVM option.  But in the log
file, I cannot see any GC output at all.  When I try the -verbose:gc in the
console mode(putting it in the catalina.bat file), I can see the GC output
on the console.  Am I doing it correctly?  If not, what am I doing wrong?

Thanks
-Manoj Pooleery.

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



DBCP pool

2004-07-15 Thread Emerson Cargnin
Is there a way to set the database timeout in dbcp??? I have a database 
which I have no control under its timeout. I used a pool api that 
allowed me to set the database timeout, but as I want to move to DBCP, 
is there a way to set this???

--
Emerson Cargnin
Analista de Sistemas - Gerente Regional - Tubarão
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


R: No Java compiler was found to compile the generated source for the JSP

2004-07-15 Thread Simone - Dev
Yeah.. maybe this can be listed as bug :-)
 
Simone
 
 
-
Simone Chiaretta
  www.piyosailing.com/S
Any sufficiently advanced technology is indistinguishable from magic
"Life is short, play hard"

-Messaggio originale-
Da: Abner Conrado [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 15 luglio 2004 20.00
A: [EMAIL PROTECTED]
Oggetto: Re: No Java compiler was found to compile the generated source
for the JSP



Hi ! 
before you install the Tom Cat, set the JAVA_HOME enviroment variable to
"c:\j2sdk..." ! 
 
is that !

-
 Abner Conrado V. Oliveira  
 
 Bacharelado em Ciência da Computação - 6º Período
 Pontifícia Universidade Católica do Paraná - PUC-PR

-
Many are the plans in a man's heart, but 
  it is the Lord’s purpose that prevails
 Proverbs 19:21




[ANN] Tomcat v5.0.27 Stable Released

2004-07-15 Thread Shapira, Yoav

Hi,
The latest stable release of Tomcat is now available.  This is mostly a
bugfix release and contains no changes from 5.0.27-beta.  See the Change
Log at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html
for more details.

I just updated the download pages, so give the mirrors a few hours to
pick up the changes.  Thanks,

Yoav Shapira
Millennium Research Informatics





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]



Http 503 error when running servlet using tomcat 4.1.18

2004-07-15 Thread Kamaleshwaran Sivalingam
  
Hi,
      I am  using tomcat  4.1.18 with j2sdk1.4.1_02 running under redhat  linux.
I  have a strange error. for my servlet  The following is the error  that it gave .

HTTP Status 503 - Servlet org.apache.catalina.INVOKER.NirInsertPA is 
currently unavailable


type Status report

message Servlet org.apache.catalina.INVOKER.NirInsertPA is currently 
unavailable

description The requested service (Servlet 
org.apache.catalina.INVOKER.NirInsertPA is currently unavailable) is not 
currently available.


Apache Tomcat/4.1.18

It was working fine previously, untill i changed the code and  recompiled the 
java file and replaced the .class file. I recompiled the java file  using the same 
version of java but on  different machine. Then I copied the .class file from there 
and  then put it in linux machine.

There was no compilation  error. Can u help me out?

kamaleshwaran sivalingam



Re: Memory settings and thread management

2004-07-15 Thread QM
On Thu, Jul 15, 2004 at 11:45:31AM -0400, Jim Van Fleet wrote:
: They definitely don't each need their own thread, that was just the most 
: convenient way to write it at the time.  I didn't exactly foresee this 
: problem.

That certainly sounds like the source of memory problems: if each
message kicks off a thread, and the threads don't get serviced quickly
enough, you'll have a lot of objects laying around that are ineligible
for GC.

One more option: if you could somehow file the pertinent into in a
database (or other data store), you could have another app that takes
care of processing the large quantities e-mail.

This may, however, be too large a solution to your problem.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



An odd problem with Tomcat4

2004-07-15 Thread David Goodenough
I have a perplexing problem with Tomcat 4.1, and I wonder if anyone
recognises the symptoms or can make any suggestions.

I have a Debian unstable Tomcat 4.1 system which has a servlet which
takes XML datastreams and responds with XML responses.  This servlet
is being used (successfully) by some automated processes.  It has been
designed for concurrent access.  The servlet logs all request and the
responses that are returned.  The requests and responses are all done
using HTTPS.  This system is using the Sun 1.4.1 SDK.

Recently I added a web front end to this system, which is written
using JSP and JSTL and which uses the IO taglib to submit requests
to the servlet and then parse the reply onto the screen.  Normally
this works very well, but recently as we added more users we hit a
problem where the response that is received is empty.  Once this
user is hit any further requests from that user hit the same problem,
and also initially other users are unaffected eventually it spreads
like a cancer and everyone gets it (all the web users that is, the
automated XML users continue unaffected).  The servlet log
indicates that responses were sent to all requests, and using a
network traffic analyser there is a response which looks about
the right length (but is of course encrypted).

I have looked through the IO taglib source, and I can not find
anything that looks like a static or shared variable which might
cause this, but I can not see anything.

Anyone got any bright ideas?  

David

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



MOD_JK2 is mapping all URIs to Tomcat on IIS

2004-07-15 Thread Marcus Kellermann
I have a Tomcat 4.1X install on IIS 6.0 that is redirecting all traffice
to Tomcat and not just the URIs specified in the worker2.properties
file.  

Looking at the URI section in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configwebcom.htm
l it states that [URI:*] is a special case for when the virtual dir
can't be found in the config file.  How do you turn this feature off?  I
want IIS to handle anything that isn't in the worker2.properties file.

My configuration file looks like


#Look at 

#http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configwebcom.ht
ml 
#for parameter description 

[shm:] 
info=Scoreboard. Required for reconfiguration and status
with multiprocess servers 
file=C:\Program
Files\Bentley\ProjectWise\WebServer\temp\jk2.shm 
size=1048576 

[channel.socket:localhost:8009] 
info=Ajp13 forwarding over socket 
tomcatId=localhost:8009 

# Map webapps to the Web server uri space 
[uri:/WEL/*]

[status:]
info=Status worker, displays runtime informations

[uri:/jkstatus/*]
info=Display status information and checks the config
file for changes.
group=status:


And the output from JKSTATUS looks like 


uri runtime info
uri information, using getAttribute() 

id name host uri group context inheritGlobals match_type servlet
timing aliases path 
0 /WEL/* * /WEL/* lb:lb / 1 prefix null 0 null /WEL/* 
0 /jkstatus/* * /jkstatus/* status: / 1 prefix null 0 null
/jkstatus/* 
0 * * null null null 1 host null 0 null null 
0 */ * / lb:lb / 1 context null 0 null / 


[URI:*] isn't apart of my properties file so it must be in the code?
How can I turn it off?

Thanks
  Marcus Kellermann


RE: Tomcat 5 & startup.bat & no stdout.log

2004-07-15 Thread Dale, Matt

Have a look in catalina.out

Ta
Matt

-Original Message-
From: Alexio Cassani [mailto:[EMAIL PROTECTED]
Sent: 15 July 2004 18:42
To: [EMAIL PROTECTED]
Subject: Tomcat 5 & startup.bat & no stdout.log


Hi all,
I'm running Tomcat 5 on my windows 2000 box with the startup.bat, it starts
without problem and the web applications are loaded succesfully.

The only problem is that it doesn't write any entry in the standard log file
(that's to say logs/stdout.log is empty).

Any suggestion?

TIA
Alexio


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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

RE: Do servlets as welcome-files work in TC5?

2004-07-15 Thread George Sexton
The problem is the case of your entry in the Welcome file list, veruss the
case of your URL pattern.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: K.C. Baltz [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 14, 2004 3:22 PM
> To: Tomcat Users List
> Subject: Do servlets as welcome-files work in TC5?
> 
> I'm having trouble using a servlet as a welcome file in 
> Tomcat 5.  I haven't found any definitive documentation on 
> how to do it (The Servlet
> 2.4 spec doesn't even seem to be clear), but I've tried the 
> following (taken from: 
> http://www.onjava.com/pub/a/onjava/2004/02/11/jspcookbook.html):
> 
> |
> MyServlet 
> com.jspservletcookbook.MyServlet
> 
> 
> 
> MyServlet
> /myservlet
> 
> |
> 
> |
> MyServlet
> default.jsp
> |
> 
> 
> The names were changed to match my particular needs, but the 
> functionality should have been the same.  I'm using the 2.4 
> xsd.   The 
> servlet I'm trying to map is a Struts ActionServlet, so the 
> URL pattern is actually "*.do", not "/myservlet", but my 
> understanding is that it 
> shouldn't matter.   With that all done, requests to 
> http://mymachine/myWebapp/  should call MyServlet, but they don't.  
> Either default.jsp is returned or a directory listing if 
> default.jsp is missing. 
> 
> Does this work in TC5, and if so, how do I make it work?
> 
> K.C.
> 
> -
> 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]



Tomcat 5 & startup.bat & no stdout.log

2004-07-15 Thread Alexio Cassani
Hi all,
I'm running Tomcat 5 on my windows 2000 box with the startup.bat, it starts
without problem and the web applications are loaded succesfully.

The only problem is that it doesn't write any entry in the standard log file
(that's to say logs/stdout.log is empty).

Any suggestion?

TIA
Alexio


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



Overlapping security-constraint definitions?

2004-07-15 Thread Craig Berry
I recently moved from Tomcat 4 to 5, and have discovered that the
handling of overlapping security-constraint definitions in web.xml seems
to have changed.  I am hoping someone can recommend the best way to
accomplish what I need to do under TC5.

I have two possible user roles.  All users have the role "User"; in
addition, some have a second role, "Admin".  I want to require at least
"User" role to access any page, but require "Admin" role to access a few
specific page patterns.  So I have two security-constraint entries, like
this (this is a simplified version):


  
  Secure content
*.do
  
  
User
  



  
Admin content
  /edit*

  
Admin
  


This worked under TC4; since all users have the "User" role, everyone
could get at all my *.do pages, but users without the "Admin" role would
get a 403 if they tried to reach a page starting with "edit".

However, under TC5, it appears that permissions are adding rather than
subtracting, if that makes sense.  In other words, the presence of the
blanket permission for *.do makes all pages accessible, and the attempt
to add an additional rule about /edit* pages is ignored.

I could obviously enumerate all the pages in both categories, but that
would be brittle in the face of new development.  Is there a way to do
this with patterns as I did under TC4?

-- 
Craig Berry
Principal Architect and Technical Manager
PortBlue
(310) 566-7546
 

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



Error HTTP status 503 - servlet is currently unavailable

2004-07-15 Thread Kamaleshwaran Sivalingam
 Hi,
   I am  using tomcat  4.1.18 with j2sdk1.4.1_02 running under redhat  linux.
I  have a strange error. for my servlet  The following is the error  that it gave .

HTTP Status 503 - Servlet org.apache.catalina.INVOKER.NirInsertPA is 
currently unavailable


type Status report

message Servlet org.apache.catalina.INVOKER.NirInsertPA is currently 
unavailable

description The requested service (Servlet 
org.apache.catalina.INVOKER.NirInsertPA is currently unavailable) is not 
currently available.


Apache Tomcat/4.1.18

 It was working fine previously, untill i changed the code and  recompiled the 
java file and replaced the .class file. I recompiled the java file  using the same 
version of java but on  different machine. Then I copied the .class file from there 
and  then put it in linux machine.

There was no compilation  error. Can u help me out?

kamaleshwaran sivalingam

Re: Memory settings and thread management

2004-07-15 Thread Jim Van Fleet
QM wrote:
On Thu, Jul 15, 2004 at 11:08:18AM -0400, Jim Van Fleet wrote:

Don't you just love scope creep? ;)
If you only knew.  I've definitely earned my wings, but feeling good 
about myself might not last long in the face of an angry boss. ;-)

In addition to help suggestions from other people, consider this:
1/ if you're sending out the same e-mail to everyone else, what about
using a dedicated mailing list tool (such as mailman, listserv, etc)?
That way your program sends one e-mail to the mailing list server and it
handles distribution.
They each receive different e-mails.  It contains a link that they can 
click on to login to the system without having to identify a username 
and password.

2/ Do you have to start 1 thread for each e-mail?  What about a work
queue or leaders/followers setup?  (See any book on threading for
examples.)
Long story short: these and other thread patterns funnel X number of
jobs -- in your case, sending e-mail -- through Y number of threads.
X > Y.  Say you have 400 addys and 5 threads: each thread should take 80
addresses in sequence.
They definitely don't each need their own thread, that was just the most 
convenient way to write it at the time.  I didn't exactly foresee this 
problem.

This solution sounds like it could be a winner.  I'm certainly more 
comfortable in code world than configuration world.  I'll let you know 
how it turns out!

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


Re: Do servlets as welcome-files work in TC5?

2004-07-15 Thread David Smith
With Struts, I believe you need to create a default welcome jsp page 
that forwards to a struts action.  Insert that welcome jsp page in the 
 part of the web.xml file to get an entry 
point into Struts.  Like:


<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


Check the docs for the  tag.  What I did above was name 
a global forward as specified in the struts-config.xml file.  There are 
a few options with it depending on how you want to work things.  The 
struts-blank.war file distributed with struts has an example of this 
included.

--David
QM wrote:
On Wed, Jul 14, 2004 at 02:53:47PM -0700, K.C. Baltz wrote:
: Yes, I tried that first actually, but had no success with it either.
Gotcha.  I'm stumped, then -- from what I see, using
myservlet.do
should work as long as Struts has an Action mapped there.
Then again, I noticed something in the servlet spec (excerpt appended
below) that leads me to believe a servlet must be mapped to the given
URI.  Put another way, there's some wiggle room in the wording.  Struts
maps a pattern, not a URI, so the container may be skipping over such a
def as a welcome file.
I'm totally grasping here ;) but it's one possible explanation.
Could you create a simple HelloWorld-type servlet, map that to some
random URI, and try *that* as a welcome file?
 BEGIN: from servlet spec 2.4 , SRV 9.10 "Welcome Files" ...
The Web server must append each welcome file in the order specified in
the deployment descriptor to the partial request and check whether a
static resource or servlet in theWAR is mapped to that request URI.
TheWeb container must send the request to the first resource in the WAR
that matches.
 END: from servlet spec 2.4 , SRV 9.10 "Welcome Files" ...
-QM
 

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


Re: Memory settings and thread management

2004-07-15 Thread Jim Van Fleet
Daniel J. Obregon wrote:
Jim,
How are you doing mail?
If you are not shelling out to do email, you can probably disregard this
email, though it may be of use later
Thanks, of course.
I am using the SOFIA framework from http://www.sf.net/project/salmon
The SMTP object extends Runnable, then they wrap it up in a thread and 
run it.  It touches javax.mail.Service-- I don't think shelling out is 
involved.

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


Re: Memory settings and thread management

2004-07-15 Thread QM
On Thu, Jul 15, 2004 at 11:08:18AM -0400, Jim Van Fleet wrote:
: Roughly ten times as many people are registered to use the project than 
: I was told

Don't you just love scope creep? ;)

In addition to help suggestions from other people, consider this:

1/ if you're sending out the same e-mail to everyone else, what about
using a dedicated mailing list tool (such as mailman, listserv, etc)?
That way your program sends one e-mail to the mailing list server and it
handles distribution.

2/ Do you have to start 1 thread for each e-mail?  What about a work
queue or leaders/followers setup?  (See any book on threading for
examples.)

Long story short: these and other thread patterns funnel X number of
jobs -- in your case, sending e-mail -- through Y number of threads.
X > Y.  Say you have 400 addys and 5 threads: each thread should take 80
addresses in sequence.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: Tomcat - Win2k service - GC output

2004-07-15 Thread Carl Olivier
Greetings.

OK, well I believe that the output from the  -verbose:gc flag in 1.3 will
write to a .gc file in your [windows]\system32 dirctory - although I am not
certain about this.

DO a system whide search for a .gc file on your server - the output does not
go to the normal log output file(s).

Carl

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED] 
Sent: 15 July 2004 05:21 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat - Win2k service - GC output

Hi,

Thank you for the quick response. I'm using jdk 1.3.1_05 and hence I cannot
use -Xloggc option.

Thanks
-Manoj Pooleery.

-Original Message-
From: Carl Olivier [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 11:17 AM
To: Tomcat Users List
Subject: RE: Tomcat - Win2k service - GC output


Hi.

If you are using JSDK 1.4.x use the following VM flag:

-Xloggc:normal.gc

This will create and write GC log entries to the following location on your
windows server:

[WINDOWS_SYSTEM_DIR]\system32\normal.gc

Regards,

Carl 

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED]
Sent: 15 July 2004 05:14 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat - Win2k service - GC output

Hi,

I have set up Tomcat 4.1.27 as a service on a Win2k machine using the
following script -

tomcat -install "Apache Tomcat" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-verbose:gc -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar"
-Djava.endorsed.dir="%CATALINA_HOME%\common\endorsed"
-Dsun.io.useCanonCaches=false -Dcatalina.home="%CATALINA_HOME%" -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
"%CATALINA_HOME%\logs\stderr.log"

I wanted to see the GC ouput, so, I added the -verbose:gc flag.  When I see
the registry, I can see this has gone in as a JVM option.  But in the log
file, I cannot see any GC output at all.  When I try the -verbose:gc in the
console mode(putting it in the catalina.bat file), I can see the GC output
on the console.  Am I doing it correctly?  If not, what am I doing wrong?

Thanks
-Manoj Pooleery.

-
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: Memory settings and thread management

2004-07-15 Thread Daniel J. Obregon
Jim,

How are you doing mail?

If you are not shelling out to do email, you can probably disregard this
email, though it may be of use later

If you are shelling out from java to execute something locally, there's
something you should be aware of:

In this code snippet, I shell out to execute a program with arguments:

Process p = null;
try{
   Runtime runtime = Runtime.getRuntime();
   p = runtime.exec(arr_sCommands);
   int nStatus = p.waitFor();
} catch (Exception ex) {
   System.err.println("Caught this exception>" + ex.getMessage());
}

That will execute the command/arguments in arr_sCommands and wait for it to
return.

When running standalone, this is fine, but in a tomcat environment, there
is a pretty big problem.  Process opens up 3 file handles and DOES NOT
close them.  So that means every time you shell out to execute something,
you have 3 dangling file handles that could be eating up resources. 
Before long, you run into too many files open and all kinds of seemingly
unrelated errors.

to fix this, you should add this code:
try {
...
} catch (Exception ex) {
...
} finally {
   if ( p != null) {
  p.getErrorStream().close();
  p.getInputStream().close();
  p.getOutputStream().close();
  p.destroy();
  p = null;
   }
}


This is a bug in jdk's as recent as 1.4.2 (bugs # 4191034, 4637504)and has
no signs of being fixed soon, so beware of it!

Good Luck!

- Dan Obregon -

> I'm in a little over my head with a task I've got brewing in production
> land.  I'm a junior developer that was hired to be an entire team.
>
> Roughly ten times as many people are registered to use the project than
> I was told, so I purchased more RAM.  That makes the machine stats these.
>
> Pentium IV 2.4Ghz
> 2GB DDR ECC RAM
> Debian Linux 2 stable
> Tomcat 4.1.30
>
> A segment of the system is designed to send e-mail to everyone on a
> list.  Each e-mail is sent by starting a thread that terminates when the
> sending is complete.  The upper bound of emails in this list is about a
> thousand, but will rarely exceed five hundred.  The system was running
> as expected (e.g. capable of sending multiple hundreds of messages)
> before at 512MB of RAM with the following options appended to JAVA_OPTS
> in catalina.sh
>
> -Xms 220M -Xmx 440M
>
> Now that the products have gotten the RAM upgrade, I changed these
> options to
>
> -Xms220m -Xmx1536m
>
> The result was a drop to about forty messages before I got an "Out of
> Memory- unable to start new native thread" error.
>
> As a result of looking around, particularly at the links like
> http://h21007.www2.hp.com/cmdspp/QuestionAnswer/1,1764,4AF428BF-32E1-4297-938A-0A1F93DE31B1,00.html
> and
> http://jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenCannotCreateThread
>
> I changed the options to these
>
> -Xss1024K -Xms1536m -Xmx1536m
>
> but this only gets the boundary to about one hundred before thread
> creation fails.  We're nowhere near the process limit for Linux, running
> at approximately 400 or so.
>
> Should I just keep tweaking the configuration settings hoping to find
> something that works?  Give up a little bit more maximum heap size?  The
> one similar post I've seen since March had the user going down to 16k
> stack size.  Is that safe?  I can't be blowing my stack on the
> production machine, that's worse than the problem I have now!  I don't
> have any recursion going on, but I've seen some pretty deep stack traces.
>
> Is there something programmatically I could do, like having the call
> that starts the thread wait for awhile then try again if it fails?
>
> I've tried to do my homework, but I think I actually passed my limits on
> this project some time ago.  :-) Thanks and good karma in advance for
> any and all help.
>
>
> Cheers,
>
> Jim
>
>
> -
> 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 - Win2k service - GC output

2004-07-15 Thread Pooleery, Manoj
Hi,

Thank you for the quick response. I'm using jdk 1.3.1_05 and hence I cannot
use -Xloggc option.

Thanks
-Manoj Pooleery.

-Original Message-
From: Carl Olivier [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 11:17 AM
To: Tomcat Users List
Subject: RE: Tomcat - Win2k service - GC output


Hi.

If you are using JSDK 1.4.x use the following VM flag:

-Xloggc:normal.gc

This will create and write GC log entries to the following location on your
windows server:

[WINDOWS_SYSTEM_DIR]\system32\normal.gc

Regards,

Carl 

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED] 
Sent: 15 July 2004 05:14 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat - Win2k service - GC output

Hi,

I have set up Tomcat 4.1.27 as a service on a Win2k machine using the
following script -

tomcat -install "Apache Tomcat" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-verbose:gc -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar"
-Djava.endorsed.dir="%CATALINA_HOME%\common\endorsed"
-Dsun.io.useCanonCaches=false -Dcatalina.home="%CATALINA_HOME%" -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
"%CATALINA_HOME%\logs\stderr.log"

I wanted to see the GC ouput, so, I added the -verbose:gc flag.  When I see
the registry, I can see this has gone in as a JVM option.  But in the log
file, I cannot see any GC output at all.  When I try the -verbose:gc in the
console mode(putting it in the catalina.bat file), I can see the GC output
on the console.  Am I doing it correctly?  If not, what am I doing wrong?

Thanks
-Manoj Pooleery.

-
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: Tomcat - Win2k service - GC output

2004-07-15 Thread Carl Olivier
Hi.

If you are using JSDK 1.4.x use the following VM flag:

-Xloggc:normal.gc

This will create and write GC log entries to the following location on your
windows server:

[WINDOWS_SYSTEM_DIR]\system32\normal.gc

Regards,

Carl 

-Original Message-
From: Pooleery, Manoj [mailto:[EMAIL PROTECTED] 
Sent: 15 July 2004 05:14 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat - Win2k service - GC output

Hi,

I have set up Tomcat 4.1.27 as a service on a Win2k machine using the
following script -

tomcat -install "Apache Tomcat" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-verbose:gc -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar"
-Djava.endorsed.dir="%CATALINA_HOME%\common\endorsed"
-Dsun.io.useCanonCaches=false -Dcatalina.home="%CATALINA_HOME%" -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
"%CATALINA_HOME%\logs\stderr.log"

I wanted to see the GC ouput, so, I added the -verbose:gc flag.  When I see
the registry, I can see this has gone in as a JVM option.  But in the log
file, I cannot see any GC output at all.  When I try the -verbose:gc in the
console mode(putting it in the catalina.bat file), I can see the GC output
on the console.  Am I doing it correctly?  If not, what am I doing wrong?

Thanks
-Manoj Pooleery.

-
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: Memory settings and thread management

2004-07-15 Thread Carl Olivier
 Greetings.

Try the following settings:

-Xms220m -Xmx1024m 

To allow for memory allocation on the native heap.  

Have you looked at your SHM* settings for the Linux kernel?

Carl

-Original Message-
From: Jim Van Fleet [mailto:[EMAIL PROTECTED] 
Sent: 15 July 2004 05:08 PM
To: [EMAIL PROTECTED]
Subject: Memory settings and thread management

I'm in a little over my head with a task I've got brewing in production
land.  I'm a junior developer that was hired to be an entire team.

Roughly ten times as many people are registered to use the project than I
was told, so I purchased more RAM.  That makes the machine stats these.

Pentium IV 2.4Ghz
2GB DDR ECC RAM
Debian Linux 2 stable
Tomcat 4.1.30

A segment of the system is designed to send e-mail to everyone on a list.
Each e-mail is sent by starting a thread that terminates when the sending is
complete.  The upper bound of emails in this list is about a thousand, but
will rarely exceed five hundred.  The system was running as expected (e.g.
capable of sending multiple hundreds of messages) before at 512MB of RAM
with the following options appended to JAVA_OPTS in catalina.sh

-Xms 220M -Xmx 440M

Now that the products have gotten the RAM upgrade, I changed these options
to

-Xms220m -Xmx1536m

The result was a drop to about forty messages before I got an "Out of
Memory- unable to start new native thread" error.

As a result of looking around, particularly at the links like
http://h21007.www2.hp.com/cmdspp/QuestionAnswer/1,1764,4AF428BF-32E1-4297-93
8A-0A1F93DE31B1,00.html
and
http://jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenCannotCreateThre
ad

I changed the options to these

-Xss1024K -Xms1536m -Xmx1536m

but this only gets the boundary to about one hundred before thread creation
fails.  We're nowhere near the process limit for Linux, running at
approximately 400 or so.

Should I just keep tweaking the configuration settings hoping to find
something that works?  Give up a little bit more maximum heap size?  The one
similar post I've seen since March had the user going down to 16k stack
size.  Is that safe?  I can't be blowing my stack on the production machine,
that's worse than the problem I have now!  I don't have any recursion going
on, but I've seen some pretty deep stack traces.

Is there something programmatically I could do, like having the call that
starts the thread wait for awhile then try again if it fails?

I've tried to do my homework, but I think I actually passed my limits on
this project some time ago.  :-) Thanks and good karma in advance for any
and all help.


Cheers,

Jim


-
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: Replace Internal Server Error Page with User Defined Page

2004-07-15 Thread Hugh Field-Richards
Hi Tim
It was a bit more than that - the following works for me
in my master sitemap ...
 




 
  

...
 

   
  
  
   
   
  
  
   
   
  
  
   

 

   
Many thanks for pointing me in the right direction though.
Hugh F-R
Dr Hugh S. Field-Richards
QinetiQ, St Andrew's Road, Malvern, Worcs, WR14 3PS, UK
Tel: ++1684 895075   Fax: ++1684 896113
Email: [EMAIL PROTECTED]
The views expressed above area are entirely those of the writer and
do not represent the views, policy or understanding of any other
person or official body.
On 14 Jul 2004, at 18:15, Tim Funk wrote:
Probably 500
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
-Tim
Hugh Field-Richards wrote:
Hi
Thanks for the reply.
I had seen that. But what is the error number (or whatever) that 
generates the
Internal Error Page with the type of errors that I have given? 
Exactly what
do I write in the error-code field?
TIA
Hugh F-R
Dr Hugh S. Field-Richards
QinetiQ, St Andrew's Road, Malvern, Worcs, WR14 3PS, UK
Tel: ++1684 895075   Fax: ++1684 896113
Email: [EMAIL PROTECTED]
The views expressed above area are entirely those of the writer and
do not represent the views, policy or understanding of any other
person or official body.
On 14 Jul 2004, at 17:43, Tim Funk wrote:
http://jakarta.apache.org/tomcat/faq/misc.html#error
-Tim
Hugh Field-Richards wrote:
Hi
How do I restrict the amount of information that is given
on the Internal Server Error Page? For example I get the
standard page
Internal Server Error
Message: Unable to get transformer handler for file: 
Description: org.apache.cocoon.ProcessingException: Unable to 
get transformer handler for file: : 
org.apache.excalibur.xml.xslt.XSLTProcessorException: Exception in 
creating Transform Handler
Sender: org.apache.cocoon.servlet.CocoonServlet
Source: Cocoon Servlet
Request URI
index-en.html
cause
org.apache.xml.utils.WrappedRuntimeException: Could not 
find variable with the name of .
request-uri

full exception chain stacktrace
etc
I want to be able to put out the minimum amount of information
here on the working system from my own error page. For
example: the requesting URI, a simple message to say a
failure has happened, and please contact the webmaster etc etc.
Any help here would be much appreciated. My apologies if this
has already been discussed. I have looked in the archives and
nothing was immediately obvious.

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



Tomcat - Win2k service - GC output

2004-07-15 Thread Pooleery, Manoj
Hi,

I have set up Tomcat 4.1.27 as a service on a Win2k machine using the
following script -

tomcat -install "Apache Tomcat" "%JAVA_HOME%\jre\bin\server\jvm.dll"
-verbose:gc -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar"
-Djava.endorsed.dir="%CATALINA_HOME%\common\endorsed"
-Dsun.io.useCanonCaches=false -Dcatalina.home="%CATALINA_HOME%" -start
org.apache.catalina.startup.BootstrapService -params start -stop
org.apache.catalina.startup.BootstrapService -params stop -out
"%CATALINA_HOME%\logs\stderr.log"

I wanted to see the GC ouput, so, I added the -verbose:gc flag.  When I see
the registry, I can see this has gone in as a JVM option.  But in the log
file, I cannot see any GC output at all.  When I try the -verbose:gc in the
console mode(putting it in the catalina.bat file), I can see the GC output
on the console.  Am I doing it correctly?  If not, what am I doing wrong?

Thanks
-Manoj Pooleery.

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



Memory settings and thread management

2004-07-15 Thread Jim Van Fleet
I'm in a little over my head with a task I've got brewing in production 
land.  I'm a junior developer that was hired to be an entire team.

Roughly ten times as many people are registered to use the project than 
I was told, so I purchased more RAM.  That makes the machine stats these.

Pentium IV 2.4Ghz
2GB DDR ECC RAM
Debian Linux 2 stable
Tomcat 4.1.30
A segment of the system is designed to send e-mail to everyone on a 
list.  Each e-mail is sent by starting a thread that terminates when the 
sending is complete.  The upper bound of emails in this list is about a 
thousand, but will rarely exceed five hundred.  The system was running 
as expected (e.g. capable of sending multiple hundreds of messages) 
before at 512MB of RAM with the following options appended to JAVA_OPTS 
in catalina.sh

-Xms 220M -Xmx 440M
Now that the products have gotten the RAM upgrade, I changed these 
options to

-Xms220m -Xmx1536m
The result was a drop to about forty messages before I got an "Out of 
Memory- unable to start new native thread" error.

As a result of looking around, particularly at the links like
http://h21007.www2.hp.com/cmdspp/QuestionAnswer/1,1764,4AF428BF-32E1-4297-938A-0A1F93DE31B1,00.html
and
http://jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenCannotCreateThread
I changed the options to these
-Xss1024K -Xms1536m -Xmx1536m
but this only gets the boundary to about one hundred before thread 
creation fails.  We're nowhere near the process limit for Linux, running 
at approximately 400 or so.

Should I just keep tweaking the configuration settings hoping to find 
something that works?  Give up a little bit more maximum heap size?  The 
one similar post I've seen since March had the user going down to 16k 
stack size.  Is that safe?  I can't be blowing my stack on the 
production machine, that's worse than the problem I have now!  I don't 
have any recursion going on, but I've seen some pretty deep stack traces.

Is there something programmatically I could do, like having the call 
that starts the thread wait for awhile then try again if it fails?

I've tried to do my homework, but I think I actually passed my limits on 
this project some time ago.  :-) Thanks and good karma in advance for 
any and all help.

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


[very OT] "Enterprise JMS Programming" / 1.1?

2004-07-15 Thread QM
This is quite OT.

Does anyone here own "Enterprise JMS Programming" by Shaun Terry?  I'm
trying to find out whether it covers JMS 1.1 (as opposed to 1.0.2).

Google wasn't helpful, neither was the publisher, and none of the local
bookstores have it in stock.

It seems to be the latest JMS book on the market, and the pub date
leaves a chance it covers the more recent 1.1 spec.

Thanks much,
-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Do servlets as welcome-files work in TC5?

2004-07-15 Thread QM
On Wed, Jul 14, 2004 at 02:53:47PM -0700, K.C. Baltz wrote:
: Yes, I tried that first actually, but had no success with it either.

Gotcha.  I'm stumped, then -- from what I see, using
myservlet.do
should work as long as Struts has an Action mapped there.

Then again, I noticed something in the servlet spec (excerpt appended
below) that leads me to believe a servlet must be mapped to the given
URI.  Put another way, there's some wiggle room in the wording.  Struts
maps a pattern, not a URI, so the container may be skipping over such a
def as a welcome file.

I'm totally grasping here ;) but it's one possible explanation.


Could you create a simple HelloWorld-type servlet, map that to some
random URI, and try *that* as a welcome file?


 BEGIN: from servlet spec 2.4 , SRV 9.10 "Welcome Files" ...

The Web server must append each welcome file in the order specified in
the deployment descriptor to the partial request and check whether a
static resource or servlet in theWAR is mapped to that request URI.
TheWeb container must send the request to the first resource in the WAR
that matches.

 END: from servlet spec 2.4 , SRV 9.10 "Welcome Files" ...

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Other problems while building tomcat

2004-07-15 Thread Olivier
Hi,
I still have problems to build tomcat 5.0.25
I figured out the first problem, it was because I did not modify the
build.xml to tell where to find the build.properties
 
But now, I have a java problem while running ant after 15 minutes of
compilation
BUILD FAILED
/export/download/jakarta-tomcat5-build/build.xml:50: Following error occured
while executing this line
/export/download/jakarta-tomcat5-build/jakarta-tomcat-5/build.xml:564:
Following error occured while executing this line
/export/download/jakarta-tomcat5-build/jakarta-tomcat-5/build.xml:309:
java.lang.NoSuchMethodError:
javax.servlet.ServletContext.getResourceAsStream(Ljava/lang/String;)Ljava/io
/InputStream;
 
I use Solaris 8 and j2re1.4.2_04
 
 
 
So, I tried the binaries. They work. I can run jsp files and servlet
perfectly.
But it keeps crashing for no reason!
It can't stay online for more than 2 hours.
Even if I don't do anything. During the night, I don't run any pages, but it
crashes !
Sometimes, it even crashes right after I start it.
 
 
 
So, if someone could help me about building, or running the binaries, I
would really appreciate
 
Thanks
 
 
 


RE: can a virtual host have its own privatly used SSL certificate ?

2004-07-15 Thread Carl Olivier
Hi.


OK, thanks!  My terminology bad!

Carl 

-Original Message-
From: Graham Leggett [mailto:[EMAIL PROTECTED] 
Sent: 15 July 2004 03:16 PM
To: Tomcat Users List
Subject: Re: can a virtual host have its own privatly used SSL certificate ?

Carl Olivier wrote:

> Actually, you can as far as I know.

Technically no - what you're describing is the setup for a dedicated IP per
host, not virtual host.

You're describing the correct solution, it's just that calling it a "virtual
host" is potentially confusing, as the "virtual" part is no longer there in
this case.

Regards,
Graham
--

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



RE: Problems while deploying

2004-07-15 Thread Shapira, Yoav

Hi,
It's not your web.xml that's the problem, nor the JAVA_HOME environment
variable. What are the contents of your WAR?  Specifically, is there a
context.xml file in the META-INF directory?  How are you deploying?

Yoav Shapira
Millennium Research Informatics


>-Original Message-
>From: Peter Huesser [mailto:[EMAIL PROTECTED]
>Sent: Thursday, July 15, 2004 10:15 AM
>To: [EMAIL PROTECTED]
>Subject: Problems while deploying
>
>Hello
>
>I want to deploy a webapplication which has the web.xml file at the end
>of this mail. Unfortunately I get the following error message:
>
>FAIL - Encountered exception java.util.zip.ZipException: No such file
or
>directory
>
>In the Tomcat (version 5.0.25) logfile I see the following:
>
>2004-07-15 18:12:10 StandardContext[/manager]HTMLManager:
>ManagerServlet.configure[jar:file:afs/psi.ch/user/h/huesser/
>Projekte/Servlet/mydemo/mydemo.war!/META-INF/context.xml]
>java.util.zip.ZipException: No such file or directory
>at java.util.zip.ZipFile.open(Native Method)
>at java.util.zip.ZipFile.(ZipFile.java:112)
>...
>
>For me it looks as if the JAVA_HOME variable on the tomcat server ist
>not set correctly. But I allready checked this.
>
>Has there anybody an idea ?
>
>Thank's for any help
>
>Pedro
>
>
>
>---

>-
>
>
>
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>"http://java.sun.com/dtd/web-app_2_2.dtd";>
>
>
>
>
>  
>  Demo
>  
>  
>  mydemo.DemoServlet
>  
>
>
>
>  
>  Demo
>  
>  
>  /Demo
>  
>
>
>
>
>
>-
>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]



Problems while deploying

2004-07-15 Thread Peter Huesser
Hello
I want to deploy a webapplication which has the web.xml file at the end 
of this mail. Unfortunately I get the following error message:

FAIL - Encountered exception java.util.zip.ZipException: No such file or directory
In the Tomcat (version 5.0.25) logfile I see the following:
2004-07-15 18:12:10 StandardContext[/manager]HTMLManager: 
ManagerServlet.configure[jar:file:afs/psi.ch/user/h/huesser/
Projekte/Servlet/mydemo/mydemo.war!/META-INF/context.xml]
java.util.zip.ZipException: No such file or directory
   at java.util.zip.ZipFile.open(Native Method)
   at java.util.zip.ZipFile.(ZipFile.java:112)
   ...
For me it looks as if the JAVA_HOME variable on the tomcat server ist 
not set correctly. But I allready checked this.

Has there anybody an idea ?
Thank's for any help
Pedro



http://java.sun.com/dtd/web-app_2_2.dtd";>

   
 
 Demo
 
 
 mydemo.DemoServlet
 
   
   
 
 Demo
 
 
 /Demo
 
   


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


includes with JspC

2004-07-15 Thread Flisch, Alan
Does anybody know if there is a way to specify includes and excludes for 
org.apache.jasper.JspC as an Ant task as below.



  
  
  
  
  
  
  
  
  
   
  

  

Cheers,
Alan
Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

RE: Accessing javax.security.auth.Subject within a session

2004-07-15 Thread Matt Harrison
Thanks for your reply Jeanfrancois, but I need more help !!

- I know from the Javadocs the syntax for getting a subject from a login
context, and the login context from an Access controller, but how do you
access the particular login context and/or access controller for a logon.

-also I understand that I can store the subject as a session attribute, but
does Tomcat automatically store the subject as a session attribute?

Matt



> >
> >Can anybody tell me how to access in my servlets the
> >javax.security.auth.Subject object generated at login?
> >  
> >
> You can get it using
> 
> Subject.getSubject(AccessController.getContext())
> 
> 
> >
> Tomcat 5 store the Subject as an attribute. Do a:
> 
> getAttribute("javax.security.auth.subject")
> 
> 

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



Re: can a virtual host have its own privatly used SSL certificate ?

2004-07-15 Thread Graham Leggett
Carl Olivier wrote:
Actually, you can as far as I know.
Technically no - what you're describing is the setup for a dedicated IP 
per host, not virtual host.

You're describing the correct solution, it's just that calling it a 
"virtual host" is potentially confusing, as the "virtual" part is no 
longer there in this case.

Regards,
Graham
--


smime.p7s
Description: S/MIME Cryptographic Signature


RE: can a virtual host have its own privatly used SSL certificate ?

2004-07-15 Thread Carl Olivier
Actually, you can as far as I know.

What is required is a dedicated IP per virtual host.

In the tomcat configuration you would add a SSL  per virtual
host, on port 443 (for example) eah bound to a separate IP - each with its
own keystore - containing the cert for the relevant virtual host.

This should be done in a separate Tomcat  and .

Example:



































Hope that helps.

Regards,

Carl

-Original Message-
From: Graham Leggett [mailto:[EMAIL PROTECTED] 
Sent: 15 July 2004 10:49 AM
To: Tomcat Users List
Subject: Re: can a virtual host have its own privatly used SSL certificate?

Guy Katz wrote:

> i am going to put my application in  a shared hosting solution which 
> does not provide any shared SSL support.
> is it possible to buy and put a SSL certificate in the scope of my 
> virtual host in the hosting company. (i mean is it technically 
> possible - disregarding the hosting company policy).

Technical short answer: no.

Regards,
Graham
--

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



admin tool and password digestion

2004-07-15 Thread Dirk Brockmann
Hi,
I've just installed tomcat 5.0.25 and have started it succesfully.
I've set it up with a UserDatabaseRealm according to:


in the file tomcat_users.xml I've got a user definition


with a MD5 digested password. With this setup I can succesfully
authenticate against the admin and the manager tool.
However, if I add a new user with the admin tool the new data
is written into tomcat_users.xml with a clear text password, undigested.
My question is:
Defining a new user, can I provide a clear text password which is
digested by the admin tool before the data is written into tomcat_users.xml.
Help in this matter is greatly appreciated,
Dirk

--
Dr. Dirk Brockmann [EMAIL PROTECTED]
Nonlinear Dynamics Group  Office: +49 551 5176 411
MPI für Strömungsforschung  Cell: +49 179 2157 180
Göttingen, Germany   Fax: +49 551 5176 409 
--


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


Re: can a virtual host have its own privatly used SSL certificate?

2004-07-15 Thread Nikola Milutinovic
Graham Leggett wrote:
Nikola Milutinovic wrote:
SSL is done on IP level. I think (correct me if I'm wrong) that TLS is 
on application level, but I haven't heard of HTTP/TLS.

HTTP/TLS does exist, it just isn't supported by the major servers yet.
Good to hear that. IMHO, it will not be so much the server-side-support 
problem, but clients. There are a lot of clients out there and making 
them all compliant will take some time.

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


Getting https port number within servlet [2]

2004-07-15 Thread Tomasz Kuczyński
Sorry, forgot:

Tomcat/4.1.x

Thanks in advance,
Best regards,
Tomasz Kuczynski
[EMAIL PROTECTED]


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



Getting https port number within servlet

2004-07-15 Thread Tomasz Kuczyński
Hi,

How can I get value of redirectPort attribute of Connector element in
servlet/JSP ?

I need to make some redirection - change http request in some cases into
https request, but I run HTTP connectors and HTTPS connectors on non
standard ports - I wanted to know port number accordingly to settings of
connector I use.

I tried to change just scheme f.e.:
http://localhost:8081/... to https://localhost:8081/... but Tomcat
doesn't switch to HTTPS port.

Is it possible to do this without parsing server.xml ? Some method or ...

Thanks in advance,
Best regards,
Tomasz Kuczynski
[EMAIL PROTECTED]


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



Intercept shutdown on Embedded Server

2004-07-15 Thread Maurice Wijtten
I am currently using Tomcat (4) as an Embedded Server. Unfortunately, it is not
possible to intercept or catch any exceptions thrown in one of my webapplications.
Once i've invoked server through the  Embedded class, i'm unable to control, intercept
or catch exceptions thrown in the server. Also adding my own LifeCycleListener doesn't
help. It's almost like the Embedded server executes a Sytem.exit.  Is there any way to
prevent a shutdown of tomcat in case of exceptions in webapplications? (It works if
i execute the startup/catalina scripts). 
N.b. I'm using the commons-launcher to launch my application.

Kind regards,
Maurice Wijtten

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



servlet request.getInputStream() always returns an empty stream

2004-07-15 Thread Robert Shields
Hi,

request.getInputStream() always gives me an empty stream, even though
request.getContentLength() is non-zero (18)!



public class TestServlet extends HttpServlet {
   ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
   
   public void doGet(HttpServletRequest request,
 HttpServletResponse response)
   throws IOException, ServletException
   {
InputStream inputStream = request.getInputStream();


int length = request.getContentLength(); // 18

String contentType= request.getContentType();
  // application/x-www-form-urlencoded

int bytesAvailable = inputStream.available(); // 0

byte[] buf = new byte[1024];
int bytesread;

// bytesread is always -1
while((bytesread = inputStream.read(buf)) != -1)
{
// do stuff
}
   }

   public void doPost(HttpServletRequest request,
 HttpServletResponse response)
   throws IOException, ServletException
   {
   doGet(request, response);
   }
}


So bytesAvailable () is always 0, and inputStream.read(buf) immediately
returns -1.

Could there be something wrong with the configuration of Tomcat? If so,
what could it be?
I'm using Tomcat 5.0.25.

Thanks in advance,
Rob


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
_

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



Re: can a virtual host have its own privatly used SSL certificate?

2004-07-15 Thread Graham Leggett
Nikola Milutinovic wrote:
SSL is done on IP level. I think (correct me if I'm wrong) that TLS is 
on application level, but I haven't heard of HTTP/TLS.
HTTP/TLS does exist, it just isn't supported by the major servers yet.
Regards,
Graham
--


smime.p7s
Description: S/MIME Cryptographic Signature


Re: can a virtual host have its own privatly used SSL certificate ?

2004-07-15 Thread Graham Leggett
Guy Katz wrote:
you are relating to tomcat.
i think in my situation they have a different listen port for every vhost
internally such that the apache server delivers the http request on
different ports for different vhost.
does this simplify the problem?
This is the way to get around this problem - tell tomcat to listen on 
multiple ports, and run one certificate and one host per port. To make 
sure you stay on port 443, you'll need to have multiple IP addresses per 
box.

Regards,
Graham
--


smime.p7s
Description: S/MIME Cryptographic Signature


RE: can a virtual host have its own privatly used SSL certificate ?

2004-07-15 Thread Guy Katz
thanks;
you are relating to tomcat.
i think in my situation they have a different listen port for every vhost
internally such that the apache server delivers the http request on
different ports for different vhost.
does this simplify the problem?

-Original Message-
From: Graham Leggett [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 11:21 AM
To: Tomcat Users List
Subject: Re: can a virtual host have its own privatly used SSL certificate ?


Guy Katz wrote:

> thanks but are you sure?

I'm sure.

> i read some more and got the impression that when using apache+tomcat with
> ip based virtual hosting this can be achieved.

The problem is that there can only be one certificate per listening port 
that tomcat is listening on, and the certificate can only have one name 
at a time (unless you use wildcard certs, but this is a special case). 
There can be many virtual hosts per listening port, but only one 
certificate, and the certificate can only have one name (at the moment) 
- thus your problem.

:(

Regards,
Graham
--

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



Re: can a virtual host have its own privatly used SSL certificate?

2004-07-15 Thread Nikola Milutinovic
Guy Katz wrote:
hi;
i am going to put my application in  a shared hosting solution which does
not provide any shared SSL support.
is it possible to buy and put a SSL certificate in the scope of my virtual
host in the hosting company. (i mean is it technically possible -
disregarding the hosting company policy).
SSL is done on IP level. I think (correct me if I'm wrong) that TLS is 
on application level, but I haven't heard of HTTP/TLS.

What this boils down to is that a certificate can be issued for only one 
 host on one physical IP. If you have virtual hosts, only one of them 
can have a certificate.

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


Re: can a virtual host have its own privatly used SSL certificate?

2004-07-15 Thread Viorel Dragomir
Hi,

As I know, in order to use ssl on the tomcat, or apache you must make additional 
configurations regarding the webserver. Add modules and changing webserver 
configuration files.

If you don't have the right to make this changes you can't have ssl.

If you find a example more usefull.. If you can write a cd with Nero but without the 
cd-writer I guess you can make your webserver works without ssl module but with ssl 
certificate. 

Good luck,
viorel
  - Original Message - 
  From: Guy Katz 
  To: 'Tomcat Users List' 
  Sent: Thursday, July 15, 2004 12:55
  Subject: RE: can a virtual host have its own privatly used SSL certificate?


  thanks but are you sure?
  i read some more and got the impression that when using apache+tomcat with
  ip based virtual hosting this can be achieved.
  did i misunderstood?
  thanks

  -Original Message-
  From: Graham Leggett [mailto:[EMAIL PROTECTED]
  Sent: Thursday, July 15, 2004 10:49 AM
  To: Tomcat Users List
  Subject: Re: can a virtual host have its own privatly used SSL certificate?


  Guy Katz wrote:

  > i am going to put my application in  a shared hosting solution which does
  > not provide any shared SSL support.
  > is it possible to buy and put a SSL certificate in the scope of my virtual
  > host in the hosting company. (i mean is it technically possible -
  > disregarding the hosting company policy).

  Technical short answer: no.

  Regards,
  Graham
  --

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


Re: can a virtual host have its own privatly used SSL certificate ?

2004-07-15 Thread Graham Leggett
Guy Katz wrote:
thanks but are you sure?
I'm sure.
i read some more and got the impression that when using apache+tomcat with
ip based virtual hosting this can be achieved.
The problem is that there can only be one certificate per listening port 
that tomcat is listening on, and the certificate can only have one name 
at a time (unless you use wildcard certs, but this is a special case). 
There can be many virtual hosts per listening port, but only one 
certificate, and the certificate can only have one name (at the moment) 
- thus your problem.

:(
Regards,
Graham
--


smime.p7s
Description: S/MIME Cryptographic Signature


RE: can a virtual host have its own privatly used SSL certificate ?

2004-07-15 Thread Guy Katz
thanks but are you sure?
i read some more and got the impression that when using apache+tomcat with
ip based virtual hosting this can be achieved.
did i misunderstood?
thanks

-Original Message-
From: Graham Leggett [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 10:49 AM
To: Tomcat Users List
Subject: Re: can a virtual host have its own privatly used SSL certificate?


Guy Katz wrote:

> i am going to put my application in  a shared hosting solution which does
> not provide any shared SSL support.
> is it possible to buy and put a SSL certificate in the scope of my virtual
> host in the hosting company. (i mean is it technically possible -
> disregarding the hosting company policy).

Technical short answer: no.

Regards,
Graham
--

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



Re: can a virtual host have its own privatly used SSL certificate?

2004-07-15 Thread Graham Leggett
Guy Katz wrote:
i am going to put my application in  a shared hosting solution which does
not provide any shared SSL support.
is it possible to buy and put a SSL certificate in the scope of my virtual
host in the hosting company. (i mean is it technically possible -
disregarding the hosting company policy).
Technical short answer: no.
Regards,
Graham
--


smime.p7s
Description: S/MIME Cryptographic Signature


Re: tomcat hangs

2004-07-15 Thread Stefan Burkard
i don't tried this, because the app runs with ssl - therefore i'm using 
apache with mod_ssl in front of tomcat

greetings
stefan
Shapira, Yoav wrote:
Hi,
Does it happen if you run tomcat stand-alone, i.e. without the connector
and Apache in front?
Yoav Shapira
Millennium Research Informatics

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Stefan Burkard
Sent: Wednesday, July 14, 2004 3:25 AM
To: [EMAIL PROTECTED]
Subject: tomcat hangs
hi tomcat-users
we use a tomcat-based application and it runs well and fast. but from
time to time (this can be some hours but also some days) the
application
hangs.
if i have a look on the server, it's absolutely not busy (this would be
surprising because only about 10 people use the application).
because of the many ajp13-log-entries, i thought the jk2-connector
could
be the problem. here are some log entries:
[Tue Jul 13 17:48:19 2004] [error] Error ajp_process_callback - write
failed
[Tue Jul 13 17:48:19 2004] [error] ajp13.service() ajpGetReply
recoverable error 3
[Tue Jul 13 17:48:19 2004] [error] ajp13.service() Error  forwarding
ajp13:localhost:8007 1 0
[Tue Jul 13 17:48:19 2004] [error] mod_jk.handler() Error connecting to
tomcat 3
mod_jk: Error flushing
in most of all cases, the application (or tomcat or the connector) can
recover itself after some minutes of hanging.
can anybody help me?
thanks and greetings
stefan
-
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]


Logging with mod_jk

2004-07-15 Thread Jens . Mueller
Hello all,

is it possible to log the Client-IP with mod_jk on Apache 1.3.x ??
The is nothing about it in the Documentation.
I use the JkLogStampFormat-Directive.

Greets
Jens

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



z/OSS-USS and -Dfile.encoding

2004-07-15 Thread William Walsh
Hi all,

I've installed the Tomcat (5.0.27) binary on z/OS-USS 1.4 (an EBCDIC
platform).  tomcat-docs and the sample application are working.  In trying
to get Anthill (1.7.0.162) to run I appear to be having problems with file
encoding.  My normal approach to these problems is to try java with
-Dfile.encoding=UTF-8, but when I do that for Tomcat (set JAVA_OPTS and run
startup.sh) it won't come up, but I see nothing in the catalina.out log.
Unsetting JAVA_OPTS again allows Tomcat to come up.  

If anyone has specific information on this situation that would be great.
I've been looking for information on the -debug option to startup.sh and
debug="" in server.xml as I'm not seeing any additional information upon
setting these.  If anyone has information or can point me to some on how to
diagnose Tomcat startup that would be appreciated.  

Thanks,
www

The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful. If you are not the intended
addressee please contact the sender and dispose of this e-mail. Thank you.

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



Re: Apache2 and Tomcat 5.0.25 Configuration Using Mod_jk2

2004-07-15 Thread shiv juluru
test ur luck by use this site..
http://johnturner.com/howto/apache2-tomcat4127-jk-rh9-howto.html


Tonte Pouncil <[EMAIL PROTECTED]> wrote:
Hello:

I am using window 2000, Apache2, and Tomcat5.0.25. I have downloaded the mod_jk2.so 
from the tomcat-connectors site. http://jakarta.apache.org/site/binindex.cgi

How do I get Apache2 and Tomcat5 to talk to each other using the mod_jk2? If any one 
know of another solution, please do tell. I have already tried just about every 
suggestion on different forms, but still no luck.

Thanks!

Tonté

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


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

Re: problems with mod_jk2

2004-07-15 Thread shiv juluru
hi,
start the tomcat server and find where mod_jk2.so is creating.
copy that path in server.xml
ex:

and in httpd.conf u should add this line
"Include /usr/local/tomcat/conf/auto/mod_jk.conf"

 
and start apache after 1 min.
bcz  tomcat creates mod_jk.so after some time.,better thing is see the time of 
creation of mod_jk2.so,using ls -l option.
.
i am giving one url to u.
http://johnturner.com/howto/apache2-tomcat4127-jk-rh9-howto.html
 
i think it's help for u.
 
 
 
 
/usr/local/apache2/modules/jkjni.so
/etc/httpd/modules/mod_jk2.so


sarojini chowdary <[EMAIL PROTECTED]> wrote:
Please Help... 
Hi, 
I have problem with mod_jk2.so 
I have installed redhat 9 and I used the default 
version of apache that came with redhat 9 i.e. 
apache/2.0.40 
and I installed and configured tomcat 5.0.25. 
Till now both work fine when I start them alone. 
I have installed mod_jk 2 connector latest version 
i.e. jakarta-tomcat-connectors-jk2-2.0.4-src. 
I restarted tomcat. 
And when I look at CATALINA_OUT I see this line. 
INFO: APR not loaded, disabling jni components: 
java.io.IOException: java.lang.UnsatisfiedLinkError:

/usr/local/apache2/modules/jkjni.so: 
/usr/local/apache2/modules/jkjni.so: undefined 
symbol: 
apr_md5_final 
When I try to use apu-config to know the list of
libraries to attach it says the command is not found.
After this point, when I try to restart apache it 
gives this error. 
Starting httpd: Syntax error on line 157 of 
/etc/httpd/conf/httpd.conf: 
Cannot load /etc/httpd/modules/mod_jk2.so into 
server: 
/etc/httpd/modules/mod_jk2.so: undefined symbol: 
apr_socket_send 

[FAILED] 
I was trying to fix it right from past 2 days and I 
could not do it. 
Please tel me what I should do. 
Thanks in advance. 
Sarojini. 
IndusRAD Inc. 
Peoria, IL, 61606 
USA 
309-691-0591 



Yahoo! India Careers: Over 50,000 jobs online
Go to: http://yahoo.naukri.com/

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



-
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!