Tomcat 5.5 and SQL Server

2005-07-11 Thread Anderson, M. Paul
I am running Tomcat 5.5 with SQL Server on a separate machine.

I am getting the following error at random times:

Java.lang.Exception: java.sql.SQLException: [Microsoft][SQLServer 2000
Driver for JDBC]Connection rest by peer: socket write error.

I have been unable to determine a trigger for this error - it just seems
to happen randomly.  When it occurs, no user can then log in to the
application - I must reboot the SQL server machine to get a connection
to be made for subsequent logins.

Has anyone seen this and can point me to a solution?

Thanks,
Paul

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



RE: Tomcat 5.5 and SQL Server

2005-07-11 Thread Anderson, M. Paul
com.microsoft.jdbc.sqlserver.SQLServerDriver

-Original Message-
From: Sue Roe [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 11, 2005 11:43 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5.5 and SQL Server


What driver are you using between Tomcat and SQL server?

-Original Message-
From: Anderson, M. Paul [mailto:[EMAIL PROTECTED] 
Sent: 11 July 2005 16:35
To: Tomcat Users List
Subject: Tomcat 5.5 and SQL Server

I am running Tomcat 5.5 with SQL Server on a separate machine.

I am getting the following error at random times:

Java.lang.Exception: java.sql.SQLException: [Microsoft][SQLServer 2000
Driver for JDBC]Connection rest by peer: socket write error.

I have been unable to determine a trigger for this error - it just seems
to happen randomly.  When it occurs, no user can then log in to the
application - I must reboot the SQL server machine to get a connection
to be made for subsequent logins.

Has anyone seen this and can point me to a solution?

Thanks,
Paul

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





***Disclaimer***

The contents of this Email may be privileged and are confidential. 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.

Should you wish to use Email as a mode of communication, CMi plc and its
subsidiaries are unable to guarantee the security of Email content
outside of our own computer systems.

This footnote also confirms that this Email message has been checked by
MIMESweeper for the presence of computer viruses. Whilst we run
anti-virus software, you are solely responsible for ensuring that any
Email or attachment you receive is virus free. We disclaim any liability
for any damage you suffer as a consequence of receiving any virus.

Checkmate International plc (CMi)
Registered in England No: 1899857
Registered Office 4th Floor, 35 New Bridge Street, London, EC4V 6BW


-
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: file watcher

2005-03-10 Thread Anderson, M. Paul
What is a file watcher?

-Original Message-
From: deepak suldhal [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 7:41 AM
To: Tomcat Users List; Antony Paul
Subject: Re: file watcher


if you have a file watcher Please email, it will help me a lot.
 
 
Thanks

Antony Paul [EMAIL PROTECTED] wrote:
What you mean ?. You need a file watcher program or you have one. To
start it when tomcat is started, 
1. If it is servlet in web.xml use in servlet
declaration and run it from init() method.
2. Write a ContextListener and start it from there.

rgds
Antony Paul 


On Wed, 9 Mar 2005 15:31:12 -0800 (PST), deepak suldhal
wrote:
 Hi,
 I need to keep a file watcher program running.
 Is it possible for me to start this automatically when
 
 tomcat is hosted.
 
 Thanks
 D
 
 __
 Celebrate Yahoo!'s 10th Birthday!
 Yahoo! Netrospective: 100 Moments of the Web 
 http://birthday.yahoo.com/netrospective/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
rgds
Antony Paul
http://www.geocities.com/antonypaul24/

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



-
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 

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



Limiting number of login attempts

2005-03-10 Thread Anderson, M. Paul
Is there a way to limit the number of login attempts for a user when
using a JDBC realm?

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



RE: Cannot compile class in WEB-INF/classes

2005-03-10 Thread Anderson, M. Paul
Did you import javax.servlet.http.* ?

-Original Message-
From: Rahul Joshi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:19 PM
To: tomcat-user@jakarta.apache.org
Subject: Cannot compile class in WEB-INF/classes


I have a Simple JSP page in my webapps/myappname. I
have a utility class which this page will use. The
class file for this should be in webapps/myappname/WEB-INF/classes. So I
put the java source file in that directory
(webapps/myappname/WEB-INF/classes). Also, a method in this utility
class has HttpServletRequest request as an argument. This will be passed
when this method is called from the scriplet java code from the JSP
page. 

The Problem is that the utility java file does not
compile and gives error- Cannot recognize
HttpServletRequest. Shouldn't servlet-api.jar be
automatically visible?

I am using latest Tomcat 5.5.8 and latest JDK/JRE 1.5.
I can avoid the issue by not passing the request
object but still is there a way to pass the request
object?

Thanks!
Rahul.



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
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: Cannot compile class in WEB-INF/classes

2005-03-10 Thread Anderson, M. Paul
Have you compiled the class previously?  The source for the class does
not go in the WEB-INF/classes directory - only the class files go
here.  You also need to pre-compile your classes - Tomcat doesn't do
this for you.

-Original Message-
From: Rahul Joshi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:26 PM
To: Tomcat Users List
Subject: RE: Cannot compile class in WEB-INF/classes


Yes, I did.

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;


API signature:  String expand(HttpServletRequest
request)

-Rahul.

--- Anderson, M. Paul [EMAIL PROTECTED]
wrote:
 Did you import javax.servlet.http.* ?
 
 -Original Message-
 From: Rahul Joshi [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 10, 2005 1:19 PM
 To: tomcat-user@jakarta.apache.org
 Subject: Cannot compile class in WEB-INF/classes
 
 
 I have a Simple JSP page in my webapps/myappname. I
 have a utility class which this page will use. The
 class file for this should be in webapps/myappname/WEB-INF/classes. So

 I put the java source file in that directory
 (webapps/myappname/WEB-INF/classes). Also, a method
 in this utility
 class has HttpServletRequest request as an argument.
 This will be passed
 when this method is called from the scriplet java
 code from the JSP
 page. 
 
 The Problem is that the utility java file does not
 compile and gives error- Cannot recognize
 HttpServletRequest. Shouldn't servlet-api.jar be automatically 
 visible?
 
 I am using latest Tomcat 5.5.8 and latest JDK/JRE
 1.5.
 I can avoid the issue by not passing the request
 object but still is there a way to pass the request
 object?
 
 Thanks!
 Rahul.
 
 
   
 __
 Do you Yahoo!? 
 Yahoo! Small Business - Try our new resources site!
 http://smallbusiness.yahoo.com/resources/ 
 

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



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
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: JDBC Realm by-passing login page using a link

2005-03-10 Thread Anderson, M. Paul
It is my understanding that the JDBC realm will execute prior to any
filters or other servlets, so I wouldn't think this would be possible
unless you perform your own authentication - possibly in a filter - to
do just what you're looking for.

-Original Message-
From: Fredrik Liden [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:40 PM
To: Tomcat Users List
Subject: JDBC Realm by-passing login page using a link


Is it possible to pass login info in a link and then based on this
information set the JDBC realm status to logged in?

In other words is it possible to trigger the authentication manually in
a filter?

Thanks!

/Fredrik

-
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: Mapping context to root of website

2005-03-10 Thread Anderson, M. Paul
How would I do this if I am just using Tomcat (no apache, IIS, etc.)???

-Original Message-
From: Ronnie Tartar [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:50 PM
To: Tomcat Users List
Subject: RE: Mapping context to root of website


Is there a way to do this with jk or jk2?

Thanks



-Original Message-
From: Ronnie Tartar 
Sent: Monday, March 07, 2005 11:46 AM
To: Tomcat Users List
Subject: RE: Mapping context to root of website


This is how I use to be able to do it with mod_warp.

   WebAppConnection mps warp localhost:8019
   WebAppDeploy . mps /

Deployed the specific context to the root of the actual site leaving 1
instance of tomcat with multiple webapps.

Thanks

Ronnie Tartar
407-251-2036



-Original Message-
From: Ronnie Tartar 
Sent: Monday, March 07, 2005 10:50 AM
To: Tomcat Users List
Subject: RE: Mapping context to root of website


Y, but you can only have one ROOT in the webapps folder?  Is this what
you are talking about?  I would like to have multiple contexts mapped to
the ROOT of different web servers.

http://www.test1.com/mapped to /context1
http://www.test2.com/mapped to /context2
http://www.test3.com/mapped to /context3

I have created my application as ROOT in the webapps folder, and that
does work, but without creating multiple tomcat instances, I can only
have one ROOT.

I always seem to have trouble with the connectors, thanks for your
patience.



Ronnie Tartar
407-251-2036



-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 07, 2005 10:39 AM
To: Tomcat Users List
Subject: RE: Mapping context to root of website


Hi,

Yes this is extremely common and in TC 5.0 is configured using an empty
path attribute in the Context element and in 5.5 it is done by naming
your web application as ROOT. FOr IIS to TC look up JK 1.2.8, there's
even an installer. Your mappings would be /something=ajp13 rather than
/context/something=ajp13.

Good luck. Allistair.

 -Original Message-
 From: Ronnie Tartar [mailto:[EMAIL PROTECTED]
 Sent: 07 March 2005 15:37
 To: tomcat-user@jakarta.apache.org
 Subject: Mapping context to root of website
 
 
 Is there anyway to map a context to the root of a website.
  
 For instance:  http://www.test.com/context/ to
  
 http://www.test.com/
  
 I know I can do this by creating mulitple Tomcat Instances but this is

 not very efficient on resources.
  
 I have done it with Mod_warp with success but need to do it on IIS and

 Apache.
  
 Is there a doc out there somewhere?
  
 Thanks in advance.
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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


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


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


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


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



RE: Mapping context to root of website

2005-03-10 Thread Anderson, M. Paul
I'm not sure I understand what you mean but I'll do some researching!  Thanks!


-Original Message-
From: Parsons Technical Services [mailto:[EMAIL PROTECTED]
Sent: Thu 3/10/2005 9:42 PM
To: Tomcat Users List
Subject: Re: Mapping context to root of website
 
Virtual Host
Then define each app as the ROOT context for that host.


Doug

- Original Message - 
From: Anderson, M. Paul [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, March 10, 2005 1:53 PM
Subject: RE: Mapping context to root of website


How would I do this if I am just using Tomcat (no apache, IIS, etc.)???

-Original Message-
From: Ronnie Tartar [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 1:50 PM
To: Tomcat Users List
Subject: RE: Mapping context to root of website


Is there a way to do this with jk or jk2?

Thanks



-Original Message-
From: Ronnie Tartar 
Sent: Monday, March 07, 2005 11:46 AM
To: Tomcat Users List
Subject: RE: Mapping context to root of website


This is how I use to be able to do it with mod_warp.

   WebAppConnection mps warp localhost:8019
   WebAppDeploy . mps /

Deployed the specific context to the root of the actual site leaving 1
instance of tomcat with multiple webapps.

Thanks

Ronnie Tartar
407-251-2036



-Original Message-
From: Ronnie Tartar 
Sent: Monday, March 07, 2005 10:50 AM
To: Tomcat Users List
Subject: RE: Mapping context to root of website


Y, but you can only have one ROOT in the webapps folder?  Is this what
you are talking about?  I would like to have multiple contexts mapped to
the ROOT of different web servers.

http://www.test1.com/mapped to /context1
http://www.test2.com/mapped to /context2
http://www.test3.com/mapped to /context3

I have created my application as ROOT in the webapps folder, and that
does work, but without creating multiple tomcat instances, I can only
have one ROOT.

I always seem to have trouble with the connectors, thanks for your
patience.



Ronnie Tartar
407-251-2036



-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 07, 2005 10:39 AM
To: Tomcat Users List
Subject: RE: Mapping context to root of website


Hi,

Yes this is extremely common and in TC 5.0 is configured using an empty
path attribute in the Context element and in 5.5 it is done by naming
your web application as ROOT. FOr IIS to TC look up JK 1.2.8, there's
even an installer. Your mappings would be /something=ajp13 rather than
/context/something=ajp13.

Good luck. Allistair.

 -Original Message-
 From: Ronnie Tartar [mailto:[EMAIL PROTECTED]
 Sent: 07 March 2005 15:37
 To: tomcat-user@jakarta.apache.org
 Subject: Mapping context to root of website
 
 
 Is there anyway to map a context to the root of a website.
  
 For instance:  http://www.test.com/context/ to
  
 http://www.test.com/
  
 I know I can do this by creating mulitple Tomcat Instances but this is

 not very efficient on resources.
  
 I have done it with Mod_warp with success but need to do it on IIS and

 Apache.
  
 Is there a doc out there somewhere?
  
 Thanks in advance.
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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


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


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


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


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





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



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

JSP/Servlet Mailing List?

2005-03-07 Thread Anderson, M. Paul
Does anyone know of a good JSP/Servlet mailing list/help list that is
both active and similar in format to this group?

Thanks!

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



Tomcat at Standalone

2005-03-04 Thread Anderson, M. Paul
This question must have been asked a million times but I can't seem to
find any information on it - any advice would be appreciated.

I need to stand up a web site that will only serve jsp and servlets.  I
suspect the number of concurrent users will be no more than 10, but it
could possibly grow in the future.

Here are my questions:

What is industry best practice for setting up a jsp/servlet site that
will not require any static HTML pages?

Can Tomcat be reliably used as standalone for this purpose?  

Is this the normal configuration for this type of site?

Are there known security issues with using Tomcat in standalone?

The other piece would be Apache, if it is standard practice to use it
even if you don't need to serve HTML pages.  Also, I will be doing all
of my own authentication into the site so no security features of Apache
or Tomcat will be required.

Thanks a lot for any advice or pointers!

Paul

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



RE: org.apache.catalina.connector.Request

2004-11-30 Thread Anderson, M. Paul
I am creating a custom realm because I want to take advantage of
Tomcat's implementation to prevent users from accessing some
directories.  The only real addition I'm adding to the realm is storing
passwords using a salted hashing scheme so I'm only overriding the
authenticate method although I'd like access to the request object to
redirect when necessary.

In the CVS browser I only saw revisions relating to Tomcat 5 - it wasn't
obvious to me which version was for Tomcat 4.1.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 30, 2004 7:02 AM
To: Tomcat Users List
Subject: Re: org.apache.catalina.connector.Request


In the cvs browser, you can view by a specific tag. From there you can
easily 
determine which revision is associated with which version.

Next - it will probably be much easier to not use container based 
authentication based on your requirements. Servlet Filters would
probably be 
much easier.

As for the java imports, importing a class and importing a source file
are 2 
totally different actions.

-Tim


Anderson, M. Paul wrote:

 Sorry for another question...I am using Tomcat 4.1 ... Is there a way 
 to know which version of the org.apache.catalina.connector.Request 
 class is used with this version?  I have gone to the Apache CVS 
 Repository but I can't figure out which version revision of 
 JDBCRealm.java goes with this Tomcat version.  I guess in the mean 
 time I'll try to find the source for Tomcat 4.1 but I don't suspect 
 its available any longer.
 
 I'm trying to create a derived realm and I want to re-direct the user 
 to an error page after he/she has tried to access the site 3 times 
 unsuccessfully.  To do this I need access to a Response object but I 
 can't seem to get at this very easily.
 
 I find it odd that in Java the imports in a base class do not carry 
 over into a derived class...this is not like c++ as I am use to.
 

-
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: org.apache.catalina.connector.Request

2004-11-30 Thread Anderson, M. Paul
I've been on and off this topic for the last couple of months and have
just gotten back to it.  I also didn't realize there were significant
differences between Tomcat 4 and 5 until recently.  It's all been worth
the experience of learning a little about how Tomcat works and should
make it easier to implement a Tomcat 5 version at a later date.

Thanks for the info.

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 30, 2004 10:29 AM
To: Tomcat Users List
Subject: RE: org.apache.catalina.connector.Request



Hi,
Much of the Tomcat 4.x code is in the CVS module jakarta-tomcat-4.0. The
jakarta-tomcat-catalina, jakarta-tomcat-jasper, etc were separated out
for Tomcat 5.0.

It's kind of interesting how you've chosen to spend all this time doing
development work on an old branch.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Anderson, M. Paul [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 30, 2004 10:17 AM
To: Tomcat Users List
Subject: RE: org.apache.catalina.connector.Request

I am creating a custom realm because I want to take advantage of 
Tomcat's implementation to prevent users from accessing some 
directories.  The only real addition I'm adding to the realm is storing

passwords using a salted hashing scheme so I'm only overriding the 
authenticate method although I'd like access to the request object to 
redirect when necessary.

In the CVS browser I only saw revisions relating to Tomcat 5 - it
wasn't
obvious to me which version was for Tomcat 4.1.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 30, 2004 7:02 AM
To: Tomcat Users List
Subject: Re: org.apache.catalina.connector.Request


In the cvs browser, you can view by a specific tag. From there you can 
easily determine which revision is associated with which version.

Next - it will probably be much easier to not use container based 
authentication based on your requirements. Servlet Filters would 
probably be much easier.

As for the java imports, importing a class and importing a source file 
are 2 totally different actions.

-Tim


Anderson, M. Paul wrote:

 Sorry for another question...I am using Tomcat 4.1 ... Is there a way

 to know which version of the org.apache.catalina.connector.Request
 class is used with this version?  I have gone to the Apache CVS 
 Repository but I can't figure out which version revision of 
 JDBCRealm.java goes with this Tomcat version.  I guess in the mean 
 time I'll try to find the source for Tomcat 4.1 but I don't suspect 
 its available any longer.

 I'm trying to create a derived realm and I want to re-direct the user

 to an error page after he/she has tried to access the site 3 times 
 unsuccessfully.  To do this I need access to a Response object but I 
 can't seem to get at this very easily.

 I find it odd that in Java the imports in a base class do not carry 
 over into a derived class...this is not like c++ as I am use to.


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


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




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


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


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



org.apache.catalina.connector.Request

2004-11-29 Thread Anderson, M. Paul
Can anyone tell me which jar file the
org.apache.catalina.connector.Request class is in?  I can't find it to
add it to my project to allow me to compile my custom realm. 

Thanks a lot!!

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



RE: org.apache.catalina.connector.Request

2004-11-29 Thread Anderson, M. Paul
Never mind...I realize now it's in Tomcat 5 and I'm still using Tomcat
4.  

-Original Message-
From: Anderson, M. Paul [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 29, 2004 3:12 PM
To: Tomcat Users List
Subject: org.apache.catalina.connector.Request


Can anyone tell me which jar file the
org.apache.catalina.connector.Request class is in?  I can't find it to
add it to my project to allow me to compile my custom realm. 

Thanks a lot!!

-
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: org.apache.catalina.connector.Request

2004-11-29 Thread Anderson, M. Paul
Sorry for another question...I am using Tomcat 4.1 ... Is there a way to
know which version of the org.apache.catalina.connector.Request class is
used with this version?  I have gone to the Apache CVS Repository but I
can't figure out which version revision of JDBCRealm.java goes with this
Tomcat version.  I guess in the mean time I'll try to find the source
for Tomcat 4.1 but I don't suspect its available any longer.

I'm trying to create a derived realm and I want to re-direct the user to
an error page after he/she has tried to access the site 3 times
unsuccessfully.  To do this I need access to a Response object but I
can't seem to get at this very easily.

I find it odd that in Java the imports in a base class do not carry over
into a derived class...this is not like c++ as I am use to.

-Original Message-
From: Anderson, M. Paul [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 29, 2004 3:17 PM
To: Tomcat Users List
Subject: RE: org.apache.catalina.connector.Request


Never mind...I realize now it's in Tomcat 5 and I'm still using Tomcat
4.  

-Original Message-
From: Anderson, M. Paul [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 29, 2004 3:12 PM
To: Tomcat Users List
Subject: org.apache.catalina.connector.Request


Can anyone tell me which jar file the
org.apache.catalina.connector.Request class is in?  I can't find it to
add it to my project to allow me to compile my custom realm. 

Thanks a lot!!

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



Return Custom Error Page from Realm

2004-10-29 Thread Anderson, M. Paul
I've created a derived realm that performs a custom authentication scheme.  I'd like 
to be return a custom error page when the user has attempted to login to the system  
3 times and failed.  The user will be locked out until a sys admin allows them back 
in.  Since I'm obviously doing the authentication in the Realm I'd also like to return 
the error page from the realm.  Is there a way to do this?
 
Thanks!


Does DIGEST work in Tomcat 4.1.24?

2004-10-27 Thread Anderson, M. Paul
Looking at RealmBase, it doesn't seem as if DIGEST authentication can
ever work:

public Principal authenticate(String username, String clientDigest,
String nOnce, String nc, String cnonce,
String qop, String realm,
String md5a2) {

String md5a1 = getDigest(username, realm);

if (md5a1 == null)
return null;
snip
}

I have read that DIGEST does not work in conjunction with digesting of
passwords in the database (although I have seen the
DigestableMemoryRealm example that was posted to this group).  In the
above code, the getDigest(...) method will always return null unless the
user has set the digest=md5 attribute in the Realm configuration in
server.xml.  In this case, this authenticate method will always return
null unless md5 is in fact requested.  In previous postings I've already
seen where these cannot be combined.

Am I interpreting this method call correctly?  

I took a look at the latest code online for this class (
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/s
hare/org/apache/catalina/realm/RealmBase.java?rev=1.41view=auto ) and
it doesn't appear to have changed - am I missing something?  Shouldn't
this method handle the case when md5a1 returns null but not handle the
case when it returns md5?

Confused!


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 15, 2004 12:02 PM
To: Tomcat Users List
Subject: RE: org.apache.catalina.Realm



Hi,
Or follow any of the links that say CVS Repositories on the apache.org
pages, which will take you here: http://cvs.apache.org/viewcvs.cgi/.
Then go to
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 11:56 AM
To: [EMAIL PROTECTED]
Subject: RE: org.apache.catalina.Realm

Download the source distribution?

 [EMAIL PROTECTED] 10/15/04 9:51 AM 
Is there somewhere I can find the implementation of the JDBCRealm
class?
Looking at the Realm how-to I don't get a lot of information about 
sequence of calls, what methods are overridable, etc.  Can anyone point

me to the implementation of this class?

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: org.apache.catalina.Realm


IIRC, it is in $CATALINA_HOME/server/lib/catalina.jar, and that is
where
you
would put your implementation, too (if it is in a jar...if it is a 
class, put it in $CATALINA_HOME/server/classes).

Larry

 [EMAIL PROTECTED] 10/15/04 9:21 AM 
Can someone help me get started building my own custom realm?  I can't 
seem to locate which jar file this class is in.

Also, once I create the Realm in, say for example, package 
my.realm.package, where do I place the class files so that the custom 
realm can be accessed
from Tomcat?

Thanks!

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



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


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



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




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


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


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



org.apache.catalina.Realm

2004-10-15 Thread Anderson, M. Paul
Can someone help me get started building my own custom realm?  I can't seem
to locate which jar file this class is in.

Also, once I create the Realm in, say for example, package my.realm.package,
where do I place the class files so that the custom realm can be accessed
from Tomcat?

Thanks!

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



RE: org.apache.catalina.Realm

2004-10-15 Thread Anderson, M. Paul
THANK YOU!~

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 15, 2004 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: org.apache.catalina.Realm


IIRC, it is in $CATALINA_HOME/server/lib/catalina.jar, and that is where you
would put your implementation, too (if it is in a jar...if it is a class,
put it in $CATALINA_HOME/server/classes).

Larry

 [EMAIL PROTECTED] 10/15/04 9:21 AM 
Can someone help me get started building my own custom realm?  I can't seem
to locate which jar file this class is in.

Also, once I create the Realm in, say for example, package my.realm.package,
where do I place the class files so that the custom realm can be accessed
from Tomcat?

Thanks!

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



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


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



RE: org.apache.catalina.Realm

2004-10-15 Thread Anderson, M. Paul
Is there somewhere I can find the implementation of the JDBCRealm class?
Looking at the Realm how-to I don't get a lot of information about
sequence of calls, what methods are overridable, etc.  Can anyone point me
to the implementation of this class?  

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 15, 2004 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: org.apache.catalina.Realm


IIRC, it is in $CATALINA_HOME/server/lib/catalina.jar, and that is where you
would put your implementation, too (if it is in a jar...if it is a class,
put it in $CATALINA_HOME/server/classes).

Larry

 [EMAIL PROTECTED] 10/15/04 9:21 AM 
Can someone help me get started building my own custom realm?  I can't seem
to locate which jar file this class is in.

Also, once I create the Realm in, say for example, package my.realm.package,
where do I place the class files so that the custom realm can be accessed
from Tomcat?

Thanks!

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



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


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



RE: org.apache.catalina.Realm

2004-10-15 Thread Anderson, M. Paul
Thanks again!

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 12:02 PM
To: Tomcat Users List
Subject: RE: org.apache.catalina.Realm



Hi,
Or follow any of the links that say CVS Repositories on the apache.org
pages, which will take you here: http://cvs.apache.org/viewcvs.cgi/.
Then go to
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 11:56 AM
To: [EMAIL PROTECTED]
Subject: RE: org.apache.catalina.Realm

Download the source distribution?

 [EMAIL PROTECTED] 10/15/04 9:51 AM 
Is there somewhere I can find the implementation of the JDBCRealm
class?
Looking at the Realm how-to I don't get a lot of information about
sequence of calls, what methods are overridable, etc.  Can anyone point
me
to the implementation of this class?

-Original Message-
From: Larry Meadors [mailto:[EMAIL PROTECTED]
Sent: Friday, October 15, 2004 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: org.apache.catalina.Realm


IIRC, it is in $CATALINA_HOME/server/lib/catalina.jar, and that is
where
you
would put your implementation, too (if it is in a jar...if it is a
class,
put it in $CATALINA_HOME/server/classes).

Larry

 [EMAIL PROTECTED] 10/15/04 9:21 AM 
Can someone help me get started building my own custom realm?  I can't
seem
to locate which jar file this class is in.

Also, once I create the Realm in, say for example, package
my.realm.package,
where do I place the class files so that the custom realm can be
accessed
from Tomcat?

Thanks!

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



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


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



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




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


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


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



RE: Using Digested Passwords and DIGEST Authentication at the sam e time.

2004-10-07 Thread Anderson, M. Paul
As I am knew to Tomcat I will ask you to excuse my ignorance.  I have just
realized (and I am asking those with the necessary experience to verify
this) that when you talk about DIGEST authentication there are really two
separate and distinct forms of it:

1.  Indicate to the BROWSER to digest the password before it is passed over
the network.  Tomcat would then extract the PLAIN TEXT password from the
database, digest it using the same algorithm and copare it to the digested
value that was just received from the browser.

2.  Indicate to the REALM that passwords in the database are stored as hash
values of the user password.  Tomcat will receive the password from the
browser in PLAIN TEXT - the realm will hash it and compare it to the
retrieved hashed password from the database.

As mentioned below, combining these two mechanisms won't work.  This happens
to be fine for me - we use SSL for all data transfer but we were storing
passwords in plain text in the database.  We'd like to store hashed values.
It is now my understanding that I can continue to use BASIC authentication
but simply configure the realm to expect hashed passwords in the database.

That really clarifies a lot (assuming I haven't bungled it).  I kept finding
opposing views concerning digestion of passwords and I couldn't find any
absolutes about it.  What a relief to finally get some insight!

Any clarification or correction of this information would be greatly
appreciated before I commit it to memory.

Thanks!!!

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:17 PM
To: 'Tomcat Users List'
Subject: RE: Using Digested Passwords and DIGEST Authentication at the sam e
time.


I don't think MD5+DIGEST will work. Take a look at any subclass of
RealmBase. Realm has nothing to do with web.xml attribute login-config. In
the authenticate method, Realm checks hasMessageDigest() - value of Realm
digest=. If hasMessageDigest, in your case =MD5, Realm digests the password
and compare it with the value stored in database.

-Original Message-
From: Shinobu Kawai [mailto:[EMAIL PROTECTED] 
Sent: October 7, 2004 12:51 PM
To: Tomcat Users List
Subject: Re: Using Digested Passwords and DIGEST Authentication at the sam e
time.


Hi Phillip,

 Have you tried it based on the howto?
Yep.
Here's what I tried: (All with o.a.c.r.MemoryRealm)
clear text + BASIC - works!
clear text + DIGEST - works!
MD5 digest + BASIC - works!
SHA digest + BASIC - works!
MD5 digest + DIGEST - doesn't work!
SHA digest + DIGEST - doesn't work!

Strangely, if I enter the digested password, it passes.

Best regards,
-- Shinobu Kawai

-- 
Shinobu Kawai [EMAIL PROTECTED]

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


!DSPAM:416573fa311026568999013!

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



Authentication Mechanisms

2004-10-06 Thread Anderson, M. Paul
What mechanisms do you developers typically use for preventing unauthorized
access to a web application?  I'm trying to determine the best approach for
my web app.  Here are the basic guidelines I need to follow:

1.  We must limit access to the site to registered users.
2.  We currently use BASIC authentication.
3.  We currently store passwords in a database in plain text but we now wish
to encrypt them.
4.  I was leaning towards using DIGEST authentication but am not convinced
it works correctly based on various articles/books I've seen.

Do you recommend any other approaches?  Eventually we will be moving towards
a salted-hash scheme for encryption but we were hoping we could stand up a
site using DIGEST to provide some basic initial encryption before moving to
the stronger scheme. 

Any advice would be appreciated.


DIGEST Authentication in Tomcat 4 vs Tomcat 5

2004-10-05 Thread Anderson, M. Paul
Can anyone point me to information concerning whether or not DIGEST
authentication works in Tomcat 4 and/or Tomcat 5?  I have only found
conflicting information on the web as well as in several books.  Is there a
tutorial out there somewhere that would help me set this up?  I have seen
comments such as Container managed digest authentication is broken in
almost all of Tomcat 4.1's realm implementations.  Is this true?  Have they
been fixed in 5?

Thanks a million!

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



Apache/Tomcat Security

2002-11-20 Thread Anderson, M. Paul
I am preparing to launch my first web site utilizing an Apache/Tomcat
configuration.  The server will host a single web site, at least for now
that uses servlets and jsp with a database backend.  I have set up the
Apache and Tomcat as discussed in the documentation with much help from
people on this list.  Now my question concerns whether or not I need to do
anything in Apache or Tomcat to protect my site beyond what Apache and
Tomcat are already set up to do.  How secure can I truly expect my site to
be using Apache and Tomcat as is?

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




Help!!

2002-11-19 Thread Anderson, M. Paul
Thanks to everyone who has helped me thus far...I think I am almost there...

My current setup allows me to enter
http://localhost:8080:/MyServletName/ServletMappedName and the servlet
displays and works as designed.  I can also type
http://localhost:8080/Hello.jsp to test a jsp page and this works fine.
This is all when I start Tomcat as standalone.

I then say cool and start up apache and enter http://localhost/Hello.jsp
and I can once again see my Hello.jsp test page!  I am excited!  I then type
in http://localhost/MyServletName/ServletMappedName believing that I will
now see my Servlet and what happens to my surprise???  I get a page not
found error!  If I type in the original
http://localhost:8080/MyServletName/ServletMappedName my servlet runs as
expected which makes sense since Tomcat is listening on that port.  I have
changed the port that tomcat listens on to 80 but this makes no difference -
the pages display properly for standalone but only the jsp page displays
when apache is running. 

I don't understand why I can see my jsp pages fine when Apache is running
but not the servlet?  Can someone PLEASS  HELP ME! (Again)

Also, mod_jk.log is recording these messages which might have something to
do with it but I don't know how to interpret them:

[Tue Nov 19 10:23:28 2002]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 0
[Tue Nov 19 10:23:29 2002]  [jk_connect.c (143)]: jk_open_socket, connect()
failed errno = 61
[Tue Nov 19 10:23:29 2002]  [jk_ajp13_worker.c (196)]: In
jk_endpoint_t::connect_to_tomcat, failed errno = 61
[Tue Nov 19 10:23:29 2002]  [jk_ajp13_worker.c (635)]: Error connecting to
the Tomcat process.
[Tue Nov 19 10:23:29 2002]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 1
[Tue Nov 19 10:23:30 2002]  [jk_connect.c (143)]: jk_open_socket, connect()
failed errno = 61
[Tue Nov 19 10:23:30 2002]  [jk_ajp13_worker.c (196)]: In
jk_endpoint_t::connect_to_tomcat, failed errno = 61
[Tue Nov 19 10:23:30 2002]  [jk_ajp13_worker.c (635)]: Error connecting to
the Tomcat process.
[Tue Nov 19 10:23:30 2002]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 2

Here are my setup files:

httpd.conf:

Added these lines to the bottom of the file:


IfModule !mod_jk.c
  LoadModule jk_module c:/WINNT/system32/mod_jk.dll
/IfModule

JkWorkersFile D:/Apache Group/Tomcat 4.1/conf/workers.properties
JkLogFile D:/Apache Group/Tomcat 4.1/logs/mod_jk.log

JkLogLevel info

JkMount /manager ajp13
JkMount /manager/* ajp13

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /tomcat-docs ajp13
JkMount /tomcat-docs/* ajp13

JkMount /webdav ajp13
JkMount /webdav/* ajp13

JkMount /*.jsp ajp13

*
Added this line to server.xml after server port=8005... (Yes the drive
letters are correct):
  Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
modJk=C:/WINNT/system32/mod_jk.dll jkDebug=info workersConfig=D:/Apache
Group/Tomcat 4.1/conf/workers.properties jkLog=D:/Apache Group/Tomcat
4.1/logs/mod_jk.log / 

**
I am using this connector in server.xml:::

  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8009 minProcessors=5 maxProcessors=75 enableLookups=true
redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2
useURIValidationHack=false
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / 

**
Added this line after host name = localhost...
Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
append=true / 

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




RE: Please respond, I am at a roadblock, Tomcat cannot find sette r method

2002-11-19 Thread Anderson, M. Paul
I know I'm a newby but if the names work when changed it seems that in my
little world maxRows could be changed to maximumRows and lang could be
changed to language or something of the sort and still retain meaning?  Why
are you averse to changing them?

-Original Message-
From: Jim Cobban [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 10:49 AM
To: Tomcat Users List
Subject: Re: Please respond, I am at a roadblock, Tomcat cannot find
sette r method


- Original Message -
From: Wendy Smoak [EMAIL PROTECTED]
Subject: RE: Please respond, I am at a roadblock, Tomcat cannot find sette r
method


 In particular, Craig's reply on 11/14 listed some possible problems and
 asked to see the get/set methods in the base class.  The fact that this
 starts working when you use _other_ method names probably means that there
 is something wrong with the existing methods.  I don't see where you have
 posted code from the base class yet.  That might help.

I did post the code of the set methods in the base class.

Furthermore I have received a reply from another user that he encountered
the same problem with an attribute class which he had to rename to clasz
in order to get it to work.

The ONLY thing I changed between the version that failed and the version
that worked was the names of the attributes and the corresponding set
methods.  I did not change one character of the code in the methods.   If
you are not satisfied with that here is the entire base class with nothing
changed but the names of the set methods:

/**
 * QueryTag.java
 *
 * This tag implements a query of the census data database and encapsulates
 * a tabular display of the data.  This is the base class for tag classes
 * which will exploit the row tag and field tag to display the results of
 * a query.  In order to use the row tag the first two fields requested in
the
 * SELECT verb must be the district number and the subdistrict identifier
 * since the class RowTag assumes that in order to extract the county
 * identifier and subdistrict name from the subdistrict table.
 *
 * copy; 2002 James Cobban
 */

package Census.tags;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;
import java.sql.*;
import Census.ConnectionPool;


public class QueryTag extends TagSupport
{
  static protected final int ENGLISH = 0;
  static protected final int FRENCH = 1;
  private int Language;

  static private final String[] LangCode = {En, Fr};

  // LangTag.setLang
  //
  // handles an attribute which sets the language to be used in text
  // displayed to the user

  public void setLing(String lang)
  {
  if ((lang != null)  lang.equalsIgnoreCase(FR))
 Language = FRENCH;
  else
 Language = ENGLISH;
  }  // LangTag.setLang

  public int getLang()
  {
return Language;
  }

  public String getLangCode()
  {
return LangCode[Language];
  }
// local members of the class

// limit on number of rows to display

private int maxRows = 50;

// QueryTag.setMaxRows
//
// handles an attribute which sets the maximum number of rows to display
// from the database

public void setMaxRoz(String repeats)
{
 try
 {
 maxRows = Integer.parseInt(repeats);
 }
 catch(NumberFormatException nfe)
 {
 maxRows = 50;
 }
}  // QueryTag.setMaxRows

// QueryTag.getMaxRows
//
// returns the maximum number of rows to display

public int getMaxRows()
{
 return maxRows;
}

protected String where;  // the where clause of the query

protected ConnectionPool connectionPool;
protected Connection connection;

public Connection getConnection()
{
 return connection;
}

protected int  rowCount; // number of rows in the result

public int getRowCount()
{
 return rowCount;
}

protected int  row;   // starting row in the result

public int getRow()
{
 return row;
}

protected String pageName; // page this tag is on

public String getPageName()
{
 return pageName;
}

protected ResultSet resultSet; // result of query

public ResultSet getResultSet()
{
 return resultSet;
}

// QueryTag.addParmToWhere
//
// This method performs standard actions to add a search argument to
// the where clause of the query

protected void addParmToWhere(ServletRequest request,
String  parmName,
String  dbName)
{
 String value = request.getParameter(parmName);
 if ((value != null)  (value.length()  0))
 {  // parameter supplied
 if (!value.equalsIgnoreCase(Any))
 {
  if (where.length()  0)
  where +=  AND ;
  where   += dbName + =\ + value + \;
 }
 }  // parameter supplied
}  // QueryTag.addParmToWhere

// QueryTag.addIntParmToWhere
//
// This method performs standard actions to add a numeric search
argument
// to the where clause of the query
//
// Returns: numeric 

RE: Help!!

2002-11-19 Thread Anderson, M. Paul
Ok...I added the JkMount for /MyServletName/* and it is working
better...Now if I request either the MyServlet or the Hello.jsp page the
first time I start up the server I get an internal server error...possible
misconfiguration message.  After I get this message I can then go ahead and
access either page without difficulty.  Any ideas on what I might have
misconfigured?

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 10:56 AM
To: 'Tomcat Users List'
Subject: RE: Help!!



Apache has no idea that http://localhost/MyServletName/ServletMappedName is
supposed to go to Tomcat.  How could it?  The only JkMount wildcard you have
is /*.jsp, which doesn't match.

Add a JkMount for /MyServletName/* and you should be OK.

John


 -Original Message-
 From: Anderson, M. Paul [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 19, 2002 10:53 AM
 To: 'Tomcat Users List'
 Subject: Help!!
 
 
 Thanks to everyone who has helped me thus far...I think I am 
 almost there...
 
 My current setup allows me to enter
 http://localhost:8080:/MyServletName/ServletMappedName and the servlet
 displays and works as designed.  I can also type
 http://localhost:8080/Hello.jsp to test a jsp page and this 
 works fine.
 This is all when I start Tomcat as standalone.
 
 I then say cool and start up apache and enter 
 http://localhost/Hello.jsp
 and I can once again see my Hello.jsp test page!  I am 
 excited!  I then type
 in http://localhost/MyServletName/ServletMappedName believing 
 that I will
 now see my Servlet and what happens to my surprise???  I get 
 a page not
 found error!  If I type in the original
 http://localhost:8080/MyServletName/ServletMappedName my 
 servlet runs as
 expected which makes sense since Tomcat is listening on that 
 port.  I have
 changed the port that tomcat listens on to 80 but this makes 
 no difference -
 the pages display properly for standalone but only the jsp 
 page displays
 when apache is running. 
 
 I don't understand why I can see my jsp pages fine when 
 Apache is running
 but not the servlet?  Can someone PLEASS  HELP 
 ME! (Again)
 
 Also, mod_jk.log is recording these messages which might have 
 something to
 do with it but I don't know how to interpret them:
 
 [Tue Nov 19 10:23:28 2002]  [jk_ajp13_worker.c (848)]: In
 jk_endpoint_t::service, send_request failed in send loop 0
 [Tue Nov 19 10:23:29 2002]  [jk_connect.c (143)]: 
 jk_open_socket, connect()
 failed errno = 61
 [Tue Nov 19 10:23:29 2002]  [jk_ajp13_worker.c (196)]: In
 jk_endpoint_t::connect_to_tomcat, failed errno = 61
 [Tue Nov 19 10:23:29 2002]  [jk_ajp13_worker.c (635)]: Error 
 connecting to
 the Tomcat process.
 [Tue Nov 19 10:23:29 2002]  [jk_ajp13_worker.c (848)]: In
 jk_endpoint_t::service, send_request failed in send loop 1
 [Tue Nov 19 10:23:30 2002]  [jk_connect.c (143)]: 
 jk_open_socket, connect()
 failed errno = 61
 [Tue Nov 19 10:23:30 2002]  [jk_ajp13_worker.c (196)]: In
 jk_endpoint_t::connect_to_tomcat, failed errno = 61
 [Tue Nov 19 10:23:30 2002]  [jk_ajp13_worker.c (635)]: Error 
 connecting to
 the Tomcat process.
 [Tue Nov 19 10:23:30 2002]  [jk_ajp13_worker.c (848)]: In
 jk_endpoint_t::service, send_request failed in send loop 2
 
 Here are my setup files:
 
 httpd.conf:
 
 Added these lines to the bottom of the file:
 
 
 IfModule !mod_jk.c
   LoadModule jk_module c:/WINNT/system32/mod_jk.dll
 /IfModule
 
 JkWorkersFile D:/Apache Group/Tomcat 4.1/conf/workers.properties
 JkLogFile D:/Apache Group/Tomcat 4.1/logs/mod_jk.log
 
 JkLogLevel info
 
 JkMount /manager ajp13
 JkMount /manager/* ajp13
 
 JkMount /examples ajp13
 JkMount /examples/* ajp13
 
 JkMount /tomcat-docs ajp13
 JkMount /tomcat-docs/* ajp13
 
 JkMount /webdav ajp13
 JkMount /webdav/* ajp13
 
 JkMount /*.jsp ajp13
 
 *
 Added this line to server.xml after server port=8005... 
 (Yes the drive
 letters are correct):
   Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 modJk=C:/WINNT/system32/mod_jk.dll jkDebug=info 
 workersConfig=D:/Apache
 Group/Tomcat 4.1/conf/workers.properties jkLog=D:/Apache 
 Group/Tomcat
 4.1/logs/mod_jk.log / 
 
 **
 I am using this connector in server.xml:::
 
   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
 port=8009 minProcessors=5 maxProcessors=75 enableLookups=true
 redirectPort=8443 acceptCount=10 debug=0 
 connectionTimeout=2
 useURIValidationHack=false
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / 
 
 **
 Added this line after host name = localhost...
 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 append=true / 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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

display default servlet

2002-11-19 Thread Anderson, M. Paul
I tried to search the archive but wasn't even sure what to search for and
ended up with TMI...

I currently have a servlet that is, and probably will be, the only web
application on my server and I would like it to display when the user types
in the www.whatever.com email address rather then the user needing to enter
www.whatever.com/MyServlet/MyServletMappedName .  I can't find how to do
this and whether or not it is even possible.  I posed the question yesterday
but didn't get a very clear response.

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




RE: Tomcat as NT Service

2002-11-18 Thread Anderson, M. Paul
I reinstalled tomcat to have mine run as  a service...on a similar note, can
anyone tell me how to get tomcat and apache to load as services in the
appropriate order?  When I startup it appears that apache gets loaded first
and the association is not setup with tomcat properly.  When I start them
manually, starting tomcat first, everything works great.  Can anyone tell me
how to get the tomcat service to start first so that they will work properly
or am I totally barking up the wrong tree here?

-Original Message-
From: louis [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 6:21 AM
To: Tomcat Users List
Subject: Tomcat as NT Service


Hello,

When I install tomcat 4.1.12 in my w2k system, I didn't choose to
install as NT service.  And now I want to do it, is it possible to do it
without reinstall tomcat again?  Please let me know how to do it...thanks.

Regards,
Louis



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

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




welcome-file-list

2002-11-18 Thread Anderson, M. Paul
Is it possible to have a servlet be the welcome-file parameter in a
welcome-file-list?  If so, how do I invoke the servlet?

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




RE: welcome-file-list

2002-11-18 Thread Anderson, M. Paul
ok...essentially I have a url of the form
www.whatever.org/MyServlet/ServletMappedName where the servlet is titled
MyServlet and is mapped to ServletMappedName in the web.xml file so that I
can avoid the servlet/package.MyServlet portion of the url.  I'd prefer to
just call www.whatever.org/MyServlet and have it invoke the servlet that
gets invoked when /ServletMappedName is added to it.  

A little background on the site...

MyServlet is essentially a filter which handles all page requests for
the site.  This configuration allows me to monitor and authenticate all page
requests.  When MyServlet starts up it sends the user a Login.jsp page
which sends authentication parameters back to MyServlet and
allows/disallows the user access.  Every page on the entire site runs
through the MyServlet filter.  I don't know if this was the best setup but
it was my first servlet/jsp site and it seemed logical.

-Original Message-
From: Andoni [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 9:45 AM
To: Tomcat Users List
Subject: Re: welcome-file-list


Yes, it is, in as much as any .jsp file IS a servlet.

Why don't you describe more about what you want to achieve.

For example what URL do you want your users to type in and what do you want
served first?

Andoni.

- Original Message -
From: Anderson, M. Paul [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, November 18, 2002 2:35 PM
Subject: welcome-file-list


 Is it possible to have a servlet be the welcome-file parameter in a
 welcome-file-list?  If so, how do I invoke the servlet?

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




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

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




RE: welcome-file-list

2002-11-18 Thread Anderson, M. Paul
ok...bear with my skill level here...you're suggesting the Authentication
filter and monitor filter would be separate servlets?  Then when the user
typed the www.whatever.org/, which one would be invoked?  What would occur
if the user typed www.whatever.org/MyServlet directly before the
authenticator has authenticated the user?  Does the authenticator and the
monitor both recieve a request when a user types www.whatever.org?

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 10:13 AM
To: Tomcat Users List
Subject: RE: welcome-file-list


Hi,
That's not a bad initial design.

A better alternative would be to have an Authentication filter (mapped
to /*), a monitor filter (mapped to /*), and your servlet mapped to
/ServletMappedName.  That'll make things a lot simpler, decoupled,
robust, etc.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Anderson, M. Paul [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 10:10 AM
To: 'Tomcat Users List'
Subject: RE: welcome-file-list

ok...essentially I have a url of the form
www.whatever.org/MyServlet/ServletMappedName where the servlet is
titled
MyServlet and is mapped to ServletMappedName in the web.xml file so
that
I
can avoid the servlet/package.MyServlet portion of the url.  I'd prefer
to
just call www.whatever.org/MyServlet and have it invoke the servlet
that
gets invoked when /ServletMappedName is added to it.

A little background on the site...

MyServlet is essentially a filter which handles all page requests
for
the site.  This configuration allows me to monitor and authenticate all
page
requests.  When MyServlet starts up it sends the user a Login.jsp
page
which sends authentication parameters back to MyServlet and
allows/disallows the user access.  Every page on the entire site runs
through the MyServlet filter.  I don't know if this was the best
setup
but
it was my first servlet/jsp site and it seemed logical.

-Original Message-
From: Andoni [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 9:45 AM
To: Tomcat Users List
Subject: Re: welcome-file-list


Yes, it is, in as much as any .jsp file IS a servlet.

Why don't you describe more about what you want to achieve.

For example what URL do you want your users to type in and what do you
want
served first?

Andoni.

- Original Message -
From: Anderson, M. Paul [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, November 18, 2002 2:35 PM
Subject: welcome-file-list


 Is it possible to have a servlet be the welcome-file parameter in a
 welcome-file-list?  If so, how do I invoke the servlet?

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




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

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


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

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




RE: welcome-file-list

2002-11-18 Thread Anderson, M. Paul
ok...you're getting beyond my limited knowledge already...I'm am not certain
as to what you mean by creating a host element in tomcat.

As for Apache Virtual Hosting...is that when the tomcat is listening on
more then one port but all are handled as if they each called the same port?

-Original Message-
From: Andoni [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 10:26 AM
To: Tomcat Users List
Subject: Re: welcome-file-list


Have you tried to create a host element in Tomcat around your context and
thereby remove the need for anything after the www.whatever.org?

Andoni.

PS: Are you using Apache Virtual Hosting?

- Original Message -
From: Anderson, M. Paul [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, November 18, 2002 3:09 PM
Subject: RE: welcome-file-list


 ok...essentially I have a url of the form
 www.whatever.org/MyServlet/ServletMappedName where the servlet is titled
 MyServlet and is mapped to ServletMappedName in the web.xml file so that
I
 can avoid the servlet/package.MyServlet portion of the url.  I'd prefer to
 just call www.whatever.org/MyServlet and have it invoke the servlet that
 gets invoked when /ServletMappedName is added to it.

 A little background on the site...

 MyServlet is essentially a filter which handles all page requests for
 the site.  This configuration allows me to monitor and authenticate all
page
 requests.  When MyServlet starts up it sends the user a Login.jsp page
 which sends authentication parameters back to MyServlet and
 allows/disallows the user access.  Every page on the entire site runs
 through the MyServlet filter.  I don't know if this was the best setup
but
 it was my first servlet/jsp site and it seemed logical.

 -Original Message-
 From: Andoni [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 18, 2002 9:45 AM
 To: Tomcat Users List
 Subject: Re: welcome-file-list


 Yes, it is, in as much as any .jsp file IS a servlet.

 Why don't you describe more about what you want to achieve.

 For example what URL do you want your users to type in and what do you
want
 served first?

 Andoni.

 - Original Message -
 From: Anderson, M. Paul [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Monday, November 18, 2002 2:35 PM
 Subject: welcome-file-list


  Is it possible to have a servlet be the welcome-file parameter in a
  welcome-file-list?  If so, how do I invoke the servlet?
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 


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

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




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

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




RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL HAVING PROBLEMS

2002-11-18 Thread Anderson, M. Paul
So the property file that looks like this...

Here is my workers.properties file:
 workers.CATALINA_HOME=/usr/jakarta/tomcat
 workers.java_home=/usr/java/jdk1.3.1_03
 ps=/
 
 worker.list=ajp13
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 
 worker.loadbalancer.type=lb
 worker.loadbalancer.balanced_workers=ajp13
 worker.inprocess.type=jni
 worker.inprocess.class_path=$(workers.CATALINA_HOME)$(ps)lib$(
 ps)tomcat.jar
 worker.inprocess.cmd_line=start
 worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$
 (ps)classic$(ps)libjvm.so
 worker.inprocess.stdout=$(workers.CATALINA_HOME)$(ps)logs$(ps)
 inprocess.stdout
 worker.inprocess.stderr=$(workers.CATALINA_HOME)$(ps)logs$(ps)
 inprocess.stderr

Can simply look like...

 worker.list=ajp13
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13



What is all the other stuff for?
-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 10:30 AM
To: 'Tomcat Users List'
Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
HAVING PROBLEMS



Doesn't look Tomcat related. 

Remove the line from httpd.conf that says Include /my/mod_jk.conf/file.

Then try /your/path/to/apache/bin/apachectl configtest.

If you still get the same error, then there is something wrong with your
Apache.

You can also try starting Tomcat, letting it generate mod_jk.conf, then just
append that to the end of httpd.conf instead of using the Include
directive, and try the same thing.

Also, FYI, you can get rid of all of that stuff in your workers.properties
file.  The only lines you need are list, type, host, and port.

John


 -Original Message-
 From: Jaimes Blunt [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 18, 2002 10:28 AM
 To: Tomcat Users List
 Subject: RE: [CONFIG] Apache2.0.40 + Tomcat4.1.12 + mod_jk - STILL
 HAVING PROBLEMS
 
 
 I installed Apache2.0.43 and am still getting a startup 
 error.  The exact error I am getting is as follows:
 apachectl: line 87: 26252 Segmentation Fault  $HTTPD -t
 
 My httpd.conf file is including the 
 $JAKART_HOME/conf/auto/mod_jk.conf file that is automatically 
 generated by Tomcat.
 
 Here is the code for my server.xml file:
 Server port=8005 shutdown=SHUTDOWN debug=0
   Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
   modJK=/usr/local/apache2/lib/mod_jk.so
   workersConfig=/usr/jakarta/tomcat/conf/jk/workers.properties/
 
   !-- Global JNDI resources --
   GlobalNamingResources
 !-- Test entry for demonstration purposes --
 Environment name=simpleValue type=java.lang.Integer 
 value=30/
 
 !-- Editable user database that can also be used by 
 UserDatabaseRealm to authenticate users --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved
 /Resource
 ResourceParams name=UserDatabase
   parameter
 namefactory/name
 
 valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
   /parameter
   parameter
 namepathname/name
 valueconf/tomcat-users.xml/value
   /parameter
 /ResourceParams
   /GlobalNamingResources
 
   Service name=Tomcat-Standalone
 !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8080 minProcessors=5 maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=10 debug=0 connectionTimeout=2
useURIValidationHack=false /
  
 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=8009 minProcessors=5 maxProcessors=75
acceptCount=10 debug=0/
 
 !-- Define the top level container in our container hierarchy --
 Engine name=Standalone defaultHost=localhost debug=0
   !-- Global logger unless overridden at lower levels --
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=catalina_log. suffix=.txt
   timestamp=true/
 
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  debug=0 resourceName=UserDatabase/
 
   !-- Define the default virtual host --
   Host name=localhost debug=0 appBase=webapps 
unpackWARs=true autoDeploy=true
 
 Listener 
 className=org.apache.ajp.tomcat4.config.ApacheConfig
   modJk=/usr/local/apache2/modules/mod_jk.so
   
 workersConfig=/usr/jakarta/tomcat/conf/jk/workers.properties
   append=true/
 
 Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=localhost_log. 
 suffix=.txt
   timestamp=true/
 
 !-- Tomcat Examples Context --
 Context path=/examples 

RE: welcome-file-list

2002-11-18 Thread Anderson, M. Paul
That is some good information which I wish I knew before I started the site!
What do you think the learning curve is on using filters and would it be
worth the effort (dicounting the time/cost factor) to reorganize my design
using proper filters?  What would be the major benefits of making this
change?

One last newby (and possibly very stupid) question...when you write
filter-classcom.mycompany.MyAuthenticationFilter/filter-class the
com.mycompany is simply indicating the package that MyAuthenticationFilter
is in, right, or am I completely missing what that indicates.  Sorry for the
very basic questions but I sincerely appreciate your help!!

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 10:36 AM
To: Tomcat Users List
Subject: RE: welcome-file-list


Hi,

ok...bear with my skill level here...you're suggesting the
Authentication
filter and monitor filter would be separate servlets?  Then when the
user

No.  I'm suggesting they be proper filters, per the servlet spec v2.3.
Specifically, you'd have two things that implement javax.servlet.filter:

public class MyAuthenticationFilter
  implements Filter {
...
}

public class MyMonitorFilter
  implements Filter {
...
}

And then in your web.xml:

web-app
...
  filter
filter-nameMyAuthenticator/filter-name
filter-classcom.mycompany.MyAuthenticationFilter/filter-class
  /filter

  filter
filter-nameMyMonitor/filter-name
filter-classcom.mycompany.MyMonitorFilter/filter-class
  /filter
  
  filter-mapping
filter-nameMyAuthenticator/filter-name
url-pattern/*/url-pattern
  /filter-mapping
 
  filter-mapping
filter-nameMyMonitor/filter-name
url-pattern/*/url-pattern
  /filter-mapping

  ...

  servlet
servlet-nameMyMappedServlet/servlet-name
servlet-classcom.mycompany.MyServlet/servlet-class
  /servlet

  servlet-mapping
servlet-nameMyMappedServlet/servlet-name
url-pattern/MyMappedServlet/url-pattern
  /servlet-mapping
 
  ...
/web-app



typed the www.whatever.org/, which one would be invoked?  What would
occur
if the user typed www.whatever.org/MyServlet directly before the
authenticator has authenticated the user?  Does the authenticator and
the
monitor both recieve a request when a user types www.whatever.org?

Requests for your servlet would be intercepted by both filters before
(and after) the servlet gets them.  If you need help on the filter
design / implementation, post that question and we'll be glad to help ;)

Yoav Shapira
Millennium ChemInformatics

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

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




RE: welcome-file-list

2002-11-18 Thread Anderson, M. Paul
Thanks Yoav...I have some other modifications that were just giving to me
for the site and I think I may try to implement the architecture you
suggested at the same time.  I will check out some tutorials and see what I
can come up with.  Your help is much appreciated!

Any thoughts on how to implement a discussion thread?  I need to allow
users to enter  a comment and then allow other users to follow up on that
comment creating a comment thread... just like this user list does. 

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 12:00 PM
To: Tomcat Users List
Subject: RE: welcome-file-list


Howdy,

What do you think the learning curve is on using filters and would it
be

The learning curve for these types of filters (authenticators, loggers)
is short and not steep.  This is a good place to start:
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html

worth the effort (dicounting the time/cost factor) to reorganize my
design
using proper filters?  What would be the major benefits of making this
change?

The major benefits would be:
- Decoupling of authentication and logging from the business code, and
from each other.  This really opens up a lot of architecture
possibilities when you need to scale up / increase uptime/reliability
(e.g. via clustering) etc.
- The ability to selectively authenticate certain requests and not
others in a clean way.  The business code is untouched.
- The ability to selectively log different things about different
requests in a clean way.
- The ability to monitor one set of things for requests, and one
different set of things (e.g. content-length) about responses.
- You would still be container-independent.
- You will have learned about filters and have a clean, easy to
understand, easy to maintain design.

One last newby (and possibly very stupid) question...when you write
filter-classcom.mycompany.MyAuthenticationFilter/filter-class the
com.mycompany is simply indicating the package that
MyAuthenticationFilter
is in, right, or am I completely missing what that indicates.  Sorry
for

It's simply the fully-qualified class name of the servlet class.  Your
understanding is correct.

Yoav Shapira
Millennium ChemInformatics

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

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




ManagedBean is not found with Ajp13Connector

2002-11-14 Thread Anderson, M. Paul
I have just completed setting up the Apache 1.3.27 web server which will be
used with Tomcat 4.1 to serve the servlet and jsp pages.  I am also using
j2sdk1.4.0_02.  I have set up the configuration of my server.xml and
https.conf files as described in the tomcat online help for the
ajp13Connector.  When I run them, however, I get an exception stack that
looks like this (this is from my stdout.log file):

Bootstrap: Create Catalina server
Bootstrap: Starting service
ServerLifecycleListener: createMBeans: MBeanException
java.lang.Exception: ManagedBean is not found with Ajp13Connector
at
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:225)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:369)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:777)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:751)
at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:339)
at
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLife
cycleListener.java:206)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2182)
at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:271)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
)
at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
Starting service Tomcat-Standalone
Apache Tomcat/4.1.12

The server works fine and I can invoke my servlets and jsp pages through
apache without a problem.  My question concerns this error.  I have searched
the net to find an answer but I can't find what this problem is.  I am
satisfied that I have configured the servers properly since I can view my
pages but I need to know what that error is so I can be satisfied it won't
cause any future problems.

Any help would be greatly appreciated!!

Paul

--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: ManagedBean is not found with Ajp13Connector

2002-11-14 Thread Anderson, M. Paul
I tried commenting out the lines:

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

in the server.xml file but now my servlet gives me a page not found error.

Is there a simple solution to this?

-Original Message-
From: Jacob Kjome [mailto:hoju;visi.com]
Sent: Thursday, November 14, 2002 3:20 PM
To: Tomcat Users List
Subject: Re: ManagedBean is not found with Ajp13Connector


Hello M.,

The Ajp13Connector doesn't support MBeans.  You need to set up your
AJP configuration with the CoyoteConnector instead.  Or, just comment
out the MBeans that are causing the exception.  See Tomcat-4.1.12's
default server.xml for reference.

Jake

Thursday, November 14, 2002, 2:12:41 PM, you wrote:

AMP I have just completed setting up the Apache 1.3.27 web server which
will be
AMP used with Tomcat 4.1 to serve the servlet and jsp pages.  I am also
using
AMP j2sdk1.4.0_02.  I have set up the configuration of my server.xml and
AMP https.conf files as described in the tomcat online help for the
AMP ajp13Connector.  When I run them, however, I get an exception stack
that
AMP looks like this (this is from my stdout.log file):

AMP Bootstrap: Create Catalina server
AMP Bootstrap: Starting service
AMP ServerLifecycleListener: createMBeans: MBeanException
AMP java.lang.Exception: ManagedBean is not found with Ajp13Connector
AMP at
AMP org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:225)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP cleListener.java:369)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP cleListener.java:777)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP cleListener.java:751)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP cleListener.java:339)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLife
AMP cycleListener.java:206)
AMP at
AMP
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
AMP t.java:166)
AMP at
AMP org.apache.catalina.core.StandardServer.start(StandardServer.java:2182)
AMP at
AMP
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:271)
AMP at java.lang.reflect.Method.invoke(Native Method)
AMP at
AMP
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
AMP )
AMP at
AMP
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
AMP Starting service Tomcat-Standalone
AMP Apache Tomcat/4.1.12

AMP The server works fine and I can invoke my servlets and jsp pages
through
AMP apache without a problem.  My question concerns this error.  I have
searched
AMP the net to find an answer but I can't find what this problem is.  I am
AMP satisfied that I have configured the servers properly since I can view
my
AMP pages but I need to know what that error is so I can be satisfied it
won't
AMP cause any future problems.

AMP Any help would be greatly appreciated!!

AMP Paul

AMP --
AMP To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
AMP For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org



-- 
Best regards,
 Jacobmailto:hoju;visi.com


--
To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org

--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: ManagedBean is not found with Ajp13Connector

2002-11-14 Thread Anderson, M. Paul
What do you mean set up your configuration with the coyote connector?  I
followed the documenation as given and it uses the AjpConnector.  What is it
that is using MBeans?  I'm totally confused!  I am completely new to tomcat
and apache and would appreciate any clarification!  How can I comment out
the MBeans that are causing the exception?  Will this exception cause
instability or can I just ignore it without fear of further problems?

Please Help!!!  I've looked at the default server.xml and I don't see any
help there.

-Original Message-
From: Jacob Kjome [mailto:hoju;visi.com]
Sent: Thursday, November 14, 2002 3:20 PM
To: Tomcat Users List
Subject: Re: ManagedBean is not found with Ajp13Connector


Hello M.,

The Ajp13Connector doesn't support MBeans.  You need to set up your
AJP configuration with the CoyoteConnector instead.  Or, just comment
out the MBeans that are causing the exception.  See Tomcat-4.1.12's
default server.xml for reference.

Jake

Thursday, November 14, 2002, 2:12:41 PM, you wrote:

AMP I have just completed setting up the Apache 1.3.27 web server which
will be
AMP used with Tomcat 4.1 to serve the servlet and jsp pages.  I am also
using
AMP j2sdk1.4.0_02.  I have set up the configuration of my server.xml and
AMP https.conf files as described in the tomcat online help for the
AMP ajp13Connector.  When I run them, however, I get an exception stack
that
AMP looks like this (this is from my stdout.log file):

AMP Bootstrap: Create Catalina server
AMP Bootstrap: Starting service
AMP ServerLifecycleListener: createMBeans: MBeanException
AMP java.lang.Exception: ManagedBean is not found with Ajp13Connector
AMP at
AMP org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:225)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP cleListener.java:369)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP cleListener.java:777)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP cleListener.java:751)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
AMP cleListener.java:339)
AMP at
AMP
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLife
AMP cycleListener.java:206)
AMP at
AMP
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
AMP t.java:166)
AMP at
AMP org.apache.catalina.core.StandardServer.start(StandardServer.java:2182)
AMP at
AMP
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:271)
AMP at java.lang.reflect.Method.invoke(Native Method)
AMP at
AMP
org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245
AMP )
AMP at
AMP
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)
AMP Starting service Tomcat-Standalone
AMP Apache Tomcat/4.1.12

AMP The server works fine and I can invoke my servlets and jsp pages
through
AMP apache without a problem.  My question concerns this error.  I have
searched
AMP the net to find an answer but I can't find what this problem is.  I am
AMP satisfied that I have configured the servers properly since I can view
my
AMP pages but I need to know what that error is so I can be satisfied it
won't
AMP cause any future problems.

AMP Any help would be greatly appreciated!!

AMP Paul

AMP --
AMP To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
AMP For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org



-- 
Best regards,
 Jacobmailto:hoju;visi.com


--
To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org

--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org