Multiple instances of Tomcat on same machine

2006-04-30 Thread keith

Hi all,

I'm wondering if anyone knows what are the advantages of running the 
same web application in multiple instances of Tomcat on the same 
machine (with a dual duo-core Intel processor).


Do having multiple instances affect performance positively or 
negatively taking in to account that the machine has multiple 
processors?


Is this a more stable configuration?

Are there other cons or pros to consider?

Thanks in advance for any responses.

Keith Campbell


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



logging the all the request/response http messages for my application

2006-12-18 Thread Keith Hawkridge
Hi, I have an application setup via a context and I want to view all the
http request/response messages that deals with this context.

 

Is there any easy way to set this up with tomcats logging?

 

Thanks in advance,

 

Keith



RE: logging the all the request/response http messages for my application

2006-12-18 Thread Keith Hawkridge
Hi, is it possible to give me an answer for both?

keith

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: 18 December 2006 14:35
To: Tomcat Users List
Subject: Re: logging the all the request/response http messages for my
application

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Keith,

Keith Hawkridge wrote:
> Hi, I have an application setup via a context and I want to view all
the
> http request/response messages that deals with this context.
> 
> Is there any easy way to set this up with tomcats logging?

Do you want to log all of the HTTP headers and parameters, or do you
want to log all of the content, too?

Logging the headers and parameters is pretty easy (including the headers
being returned in the response). The most obvious way is to write a
filter that just dumps that information wherever you want it. Some of
Tomcat's valves may help (such as the RequestDumperValve -
http://tomcat.apache.org/tomcat-5.0-doc/catalina/docs/api/org/apache/cat
alina/valves/RequestDumperValve.html).

If you want to log all of the content, then your job becomes more
difficult, because the content of a request cannot be read twice. In
order to capture and log the content, your filter will have to wrap the
request and response in specialized objects that will serve that content
out of buffers held for the purposes of allowing that data to be read
multiple times. If you don't do this, some of your code may stop
working.

Good luck,
- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFhqcm9CaO5/Lv0PARAkmiAKCa3A+CdzJ/DfdVkczWe+xjzHGTmACfToNh
ExJBjDrc3xAP0GgeciBAuSw=
=PKuv
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Manager deployment for ROOT.war not working properly.

2006-12-29 Thread Keith Bottner
I am documentation and Googled out. I am attempting to use the Tomcat
Manager so that I can script deployment to a Farm of servers. I soon found
out that deploying a ROOT web application does not work.
 
# curl -u manager:passsword -T /home/manager/ROOT.war
http://10.0.0.2/manager/deploy?path=/
 
It always deploys the application as /ROOT.war
 
Now this works perfectly if I do it from http://10.0.0.2/manager/html and
use the Web interface to upload the ROOT.war. It deploys to / with no
problems. But if I use the non HTML version it will not deploy to /
properly.
 
FYI
- I use this same technique on NON root based web applications with no
problems, works like a charm.
- The context.xml file in the WAR file is correct.
- Yes I tried renaming the file to .war as a hack to get around the problem
and that did not work, it deployed to .war.war
- Yes I tried leaving the path attribute as blank (like part of the
documentation suggests) and it returns an error "FAIL - Invalid context path
was specified" even though the documentation explicitly says to leave it
blank when deploying the root web application.
 
I do believe that this is a legitimate bug but I need some way to workaround
the issue since I can't wait to solve this until the next version of Tomcat
is released.
 
Thanks in advance for your help,
 
Keith


Manager deployment for ROOT.war not working properly.

2007-01-02 Thread Keith Bottner
I am documentation and Googled out. I am attempting to use the Tomcat
Manager so that I can script deployment to a Farm of servers. I soon found
out that deploying a ROOT web application does not work.
 
# curl -u manager:passsword -T /home/manager/ROOT.war
http://10.0.0.2/manager/deploy?path=/
 
It always deploys the application as /ROOT.war
 
Now this works perfectly if I do it from http://10.0.0.2/manager/html and
use the Web interface to upload the ROOT.war. It deploys to / with no
problems. But if I use the non HTML version it will not deploy to /
properly.
 
FYI
- I use this same technique on NON root based web applications with no
problems, works like a charm.
- The context.xml file in the WAR file is correct.
- Yes I tried renaming the file to .war as a hack to get around the problem
and that did not work, it deployed to .war.war
- Yes I tried leaving the path attribute as blank (like part of the
documentation suggests) and it returns an error "FAIL - Invalid context path
was specified" even though the documentation explicitly says to leave it
blank when deploying the root web application.
 
I do believe that this is a legitimate bug but I need some way to workaround
the issue since I can't wait to solve this until the next version of Tomcat
is released.
 
Thanks in advance for your help,
 
Keith


Classloader leak

2007-04-17 Thread Gross, Keith
I'm running Tomcat 5.5.23 on Java 1.6.0_01 on Windows. During testing I've
noticed that memory usage rises steadily with each redeploy of an
application.  After each redeploy Jconsole reports the number of loaded
classes has risen and the memory use in the PermGen has increased.  Tomcat
is the binary build of core from the Apache site.  I've added no libraries
in any of the shared lib directories.  The application war that I'm
deploying contains amoung other things log4j, commons logging and Hibernate.


Thinking I had a memory leak I used jmap to take a heap dump and then
reviewed it using jhat.  I have found a couple of problems which I resolved
by updating some libraries but I'm stuck with one remaining issue.  At least
sometimes the WebappClassLoader for the application is not being garbage
collected because of a static reference from a tomcat class to Webapp loaded
class.  I see these references coming from
org.apache.jasper.runtime.PageContextImpl, class
org.apache.tomcat.util.http.ServerCookie and others.  I've included a
portion of the jhat report below.  It seems these and other classes have a
static variable referencing a log and that this static is somehow getting
initiailzed to the commons logging loaded by the webapp classloader.  Is
there some way to prevent this?



Static reference from javax.servlet.jsp.JspFactory.deflt (from class
javax.servlet.jsp.JspFactory)   :

--> [EMAIL PROTECTED] (16 bytes)
  (field pool:)
--> [EMAIL PROTECTED] (24 bytes)
  (field pool:)
--> [Ljava.lang.Object;@0x64bbed0 (408 bytes)
  (Element 0 of
[Ljava.lang.Object;@0x64bbed0:)
--> [EMAIL PROTECTED] (65 bytes)
  (field log:)
--> [EMAIL PROTECTED] (16 bytes)
  (??:)
--> class org.apache.commons.logging.impl.Log4JLogger (84 bytes)
  (??:)
--> [EMAIL PROTECTED] (152 bytes)
  


Static reference from
org.apache.tomcat.util.IntrospectionUtils.class$org$apache$tomcat$util$Intro
spectionUtils (from class org.apache.tomcat.util.IntrospectionUtils)
  :

--> class org.apache.tomcat.util.IntrospectionUtils (84 bytes)
  (??:)
--> [EMAIL PROTECTED] (63 bytes)
  (field classes:)
--> [EMAIL PROTECTED] (24 bytes)
  (field elementData:)
--> [Ljava.lang.Object;@0x64b4fb0 (1288 bytes)
  (Element 220 of
[Ljava.lang.Object;@0x64b4fb0:)
--> class org.apache.tomcat.util.http.ServerCookie (84 bytes)
  (static field log:)
--> [EMAIL PROTECTED] (16 bytes)
  (??:)
--> class org.apache.commons.logging.impl.Log4JLogger (84 bytes)
  (??:)
--> [EMAIL PROTECTED] (152 bytes)
  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Classloader leak

2007-04-19 Thread Gross, Keith
I'll need to strip the application of some confidential bits but since my
test case only required the menu page that shouldn't be a problem.  Once I
have a test case were would you like it placed?

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 17, 2007 6:05 PM
To: Tomcat Users List
Subject: Re: Classloader leak

Gross, Keith wrote:
> Is there some way to prevent this?

It could be application error or it could be a Tomcat bug. Can you create a
simple war that demonstrates the issue I can use for debugging?

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Classloader leak

2007-04-19 Thread Gross, Keith
Ok the problem has been created and the example war attached.

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



-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 7:18 AM
To: Tomcat Users List
Subject: Re: Classloader leak

Gross, Keith wrote:
> I'll need to strip the application of some confidential bits but since 
> my test case only required the menu page that shouldn't be a problem.  
> Once I have a test case were would you like it placed?

Please create a bugzilla entry for it and add the war as an attachment.

http://tomcat.apache.org/bugreport.html

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Building from source

2007-04-25 Thread Gross, Keith
I was trying to follow the direction from the web site for building Tomcat
5.5 from source.  I was wondering if anybody has done a from scratch build
using those instructions?  I found right off the build.xml
(http://tomcat.apache.org/tomcat-5.5-doc/build.xml) linked from that page
(http://tomcat.apache.org/tomcat-5.5-doc/building.html) failed for me when
checking out the source. To get the check out to work I had to change the
ant exec from :


  
  
  


To 


  
  
  


The change is in the 3rd  tag.  The original caused the checkout to
create a sub-directory named tc5.5.x which had the build directory in it.
So you got something like this

\tomcat-build
\build.xml
\tc5.5.x
\.svn
\build
\connectors
\container
\jasper
\servletapi

It seemed the script was expecting 

\tomcat-build
\build.xml
\.svn
\build
\connectors
\container
\jasper
\servletapi

By changing the 3rd arg I got this structure and the build proceeded for
quite some time.  It then finally failed with the following:

build-static:
 [copy] Copying 4 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs
 [copy] Copying 1 file to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\WEB-INF
 [copy] Copying 2 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\appdev
 [copy] Copying 6 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\appdev\sample
 [copy] Copying 1 file to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\appdev\sample
[mkdir] Created dir: D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\catalina\funcspecs
 [copy] Copying 4 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\architecture
[mkdir] Created dir: D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\images
 [copy] Copying 10 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\images
[mkdir] Created dir: D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\printer
[style] Transforming into D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\printer
[style] Processing D:\Tomcat\New Folder\container\webapps\docs\apr.xml
to D:\Tomcat\New Folder\build\build\webapps\tomcat-docs
\printer\apr.html
[style] Loading stylesheet D:\Tomcat\New
Folder\container\webapps\docs\tomcat-docs.xsl
[style] : Fatal Error! Failure reading
file:///D:/Tomcat/New%20Folder/container/webapps/docs/apr.xml Cause:
java.net.Malformed
URLException: no protocol: project.xml
[style] Failed to process D:\Tomcat\New
Folder\container\webapps\docs\apr.xml

BUILD FAILED
D:\Tomcat\New Folder\build.xml:51: The following error occurred while
executing this line:
D:\Tomcat\New Folder\build\build.xml:793: The following error occurred while
executing this line:
D:\Tomcat\New Folder\container\webapps\docs\build.xml:88: Fatal error during
transformation

Total time: 11 minutes 51 seconds

Here I'm stuck at the moment.  It would appear to be complaining about the
doctype in this file not being correct but that's the way it's declared in
all the files.  Any ideas how to correct this?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Building from source

2007-04-26 Thread Gross, Keith
In case anyones interested I did finally get the build working.  The issue
with the build.xml remains.  If I want to follow the build instructions on
the web site I have to make the change I mentioned below.  The
MalformedURLException was a result of a recently installed program adding a
XML parsing package to my system classpath.  Once I got rid of it the build
completed.  

I also tried to follow the Eclipse setup instruction which on the whole
worked pretty well except that the .classpath files for connectors and
container referenced commons-modeler-1.1 but Tomcat now uses 2.0.  The
.classpath for Jasper references org.eclipse.jdt.core_3.1.1 but Tomcat now
uses 3.1.2.  

I probably shouldn't declare complete success yet as I haven't actually run
what was built.

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 25, 2007 1:18 PM
To: Tomcat Users List
Subject: Re: Building from source

1. dont use folders with spaces, in theory they should work, in practice,
who knows 2. building is easier than that, follow these steps
   a) svn co http://svn.apache.org/repos/asf/tomcat/current/tc5.5.x
   b) cd tc5.5.x
   c) edit build.properties.default (the base.path parameter is where it
will download dependencies too)
   d) ant download
   e) ant (or ant release, but this requires additional stuff)


Filip
Gross, Keith wrote:
> I was trying to follow the direction from the web site for building 
> Tomcat
> 5.5 from source.  I was wondering if anybody has done a from scratch 
> build using those instructions?  I found right off the build.xml
> (http://tomcat.apache.org/tomcat-5.5-doc/build.xml) linked from that 
> page
> (http://tomcat.apache.org/tomcat-5.5-doc/building.html) failed for me 
> when checking out the source. To get the check out to work I had to 
> change the ant exec from :
>
>executable="svn"
>   inputstring="t${line.separator}"
>   failonerror="true">
>   
>   
>   
> 
>
> To
>
>executable="svn"
>   inputstring="t${line.separator}"
>   failonerror="true">
>   
>   
>   
> 
>
> The change is in the 3rd  tag.  The original caused the 
> checkout to create a sub-directory named tc5.5.x which had the build
directory in it.
> So you got something like this
>
> \tomcat-build
>   \build.xml
>   \tc5.5.x
>   \.svn
>   \build
>   \connectors
>   \container
>   \jasper
>   \servletapi
>
> It seemed the script was expecting
>
> \tomcat-build
>   \build.xml
>   \.svn
>   \build
>   \connectors
>   \container
>   \jasper
>   \servletapi
>
> By changing the 3rd arg I got this structure and the build proceeded 
> for quite some time.  It then finally failed with the following:
>
> build-static:
>  [copy] Copying 4 files to D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs
>  [copy] Copying 1 file to D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\WEB-INF
>  [copy] Copying 2 files to D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\appdev
>  [copy] Copying 6 files to D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\appdev\sample
>  [copy] Copying 1 file to D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\appdev\sample
> [mkdir] Created dir: D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\catalina\funcspecs
>  [copy] Copying 4 files to D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\architecture
> [mkdir] Created dir: D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\images
>  [copy] Copying 10 files to D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\images
> [mkdir] Created dir: D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\printer
> [style] Transforming into D:\Tomcat\New 
> Folder\build\build\webapps\tomcat-docs\printer
> [style] Processing D:\Tomcat\New 
> Folder\container\webapps\docs\apr.xml
> to D:\Tomcat\New Folder\build\build\webapps\tomcat-docs
> \printer\apr.html
> [style] Loading stylesheet D:\Tomcat\New 
> Folder\container\webapps\docs\tomcat-docs.xsl
> [style] : Fatal Error! Failure reading 
> file:///D:/Tomcat/New%20Folder/container/webapps/docs/apr.xml Cause:
> java.net.Malformed
> URLException: no protocol: project.xml
> [style] Failed to process D:\Tomcat\New 
> Folder\container\webapps\docs\apr.xml
>
> BUILD FAILED
> D:\Tomcat\New Folder\build.xml:51: The following error occurred while 
> executing this line:
> D:\Tomcat\New Folder\build\build.xml:79

Tomcat 5.5 clustering

2007-05-10 Thread Gross, Keith
I was wondering what people use for cluster monitoring and administration.
I have my test cluster set up with the farm deployer so
deployment/undeployment across the cluster are easy enough. What I'm looking
for is something like what the admin and manager appliactions can do but on
a cluster basis.  Or can these applications be made cluster aware and just
haven't noticed.

I'm also looking fo rmonitoring applications.  This would be something
perhaps like Jconsole.  But Tomcat and cluster aware.


I've been trying to unsubscribe from this list for years.

2007-05-17 Thread Keith Adams
No matter how many times I send a blank email to: [EMAIL PROTECTED], like the 
one I sent at 11.19 Eastern this morning, nothing happens. I use a rule to 
delete them permanently when I'm in Outlook, but when I use my company's web 
outlook, it can only move them to the deleted-items folder, which rapidly fills 
up, making it very hard for me to find things in there if I need to.
 
Please help. Thanks,
 
Keith
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JkSetEnv and Servlet Filters

2008-05-02 Thread Keith Ealanta
Can anyone advise me how to access the attributes set in an http request 
using JkSetEnv?


Specifically I'm using JkSetEnv on Apache2.0 to set a number of 
attributes in the request.
I have captured the mod_jk packets (on port 8009) and they contain the 
items I've set in the attributes section as req_attribute type (code 0x0A)
When I access the ServletRequest object I cannot find this data anywhere. 
I've downloaded a number of ServletRequest display filters and none of 
them show the data either.
Are these attributes only useful for setting specific values the system 
understands, is there some other way for me to access these values from 
the ServletRequest object in Tomcat, or alternately is it possible there 
is some error in mod_jk or Tomcat such that the data is never extracted 
(if it even should be).


I'm guessing I'm just looking for it in all the wrong places, so I'm 
hoping someone can point me in the right direction.


Regards,
Keith Ealanta


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JkSetEnv and Servlet Filters

2008-05-04 Thread Keith Ealanta

Rainer Jung wrote:

Hi Keith,

Keith Ealanta schrieb:
Can anyone advise me how to access the attributes set in an http 
request using JkSetEnv?


I just tried it again, it works for me.

Specifically I'm using JkSetEnv on Apache2.0 to set a number of 
attributes in the request.
I have captured the mod_jk packets (on port 8009) and they contain 
the items I've set in the attributes section as req_attribute type 
(code 0x0A)
When I access the ServletRequest object I cannot find this data 
anywhere. I've downloaded a number of ServletRequest display filters 
and none of them show the data either.


I simply retrieve any attribute via
  request.getAttribute(nameOfTheAttribute)
from the ServletRequest.

Are these attributes only useful for setting specific values the 
system understands, is there some other way for me to access these 
values from the ServletRequest object in Tomcat, or alternately is it 
possible there is some error in mod_jk or Tomcat such that the data 
is never extracted (if it even should be).


It works for me. Which versions of mod_jk and Tomcat are you using?

Mod_jk: 1:1.2.18-3
Apache2: Apache/2.0.54

/opt/tomcat/bin/version.sh
Server version: Apache Tomcat/5.5.17
Server built:   Apr 14 2006 02:08:29
Server number:  5.5.17.0
OS Name:Linux
OS Version: 2.6.18-4-xen-vserver-amd64
Architecture:   i386
JVM Version:1.6.0_03-b05
JVM Vendor: Sun Microsystems Inc.

How does your JK config look like (yes, I know you already wrote you 
can see the attribute set in the debug log, but let's make sure)?

Extract from file /etc/apache2/conf.d/player.conf
# JK
JkEnvVar AUTH_TYPE ""
JkEnvVar REMOTE_USER ""
JkEnvVar SINA_CUSTOMER ""
JkEnvVar SINA_EA ""
JkEnvVar SINA_USER_GROUP_NAME ""
JkWorkersFile   /etc/libapache2-mod-jk/workers.properties.mycms-scorm
JkLogFile   /var/log/apache2/mod_jk.log
JkLogLevel  info
JkMount /my_player* icodeon

# this is a hack to redirect this


   AuthName SINA
   AuthType Basic
   Auth_SINAuser on
   Auth_SINAextras off
   Auth_SINAexpire on
   Auth_SINAproxys 1.1.1.1/255.255.255.255
   ErrorDocument 401 /utils/auth/admin/
   ErrorDocument 503 /utils/error/resolver/
   SINA_Load_Max 100
   ErrorDocument 416 /utils/load/admin/
JkMount icodeon
   
   order deny,allow
   allow from all
   require valid-user
   





file: /etc/libapache2-mod-jk/workers.properties.mycms-scorm
# Define some properties
 workers.apache_log=/var/log/tomcat
#  worker.list=scorm,olat,icodeon
 worker.list=icodeon
 ps=/

# Set properties for worker1 (ajp13)
 worker.icodeon.type=ajp13
# FIXME use host name "scorm"?
# worker.icodeon.host=scorm
 worker.icodeon.host=debian
 worker.icodeon.port=8009
 worker.icodeon.connection_pool_size=10
 worker.icodeon.connection_pool_timeout=600
 worker.icodeon.socket_keepalive=1
 worker.icodeon.socket_timeout=60
#  worker.icodeon.mount=/my_player*



There have been no changes to that code recently. I'm using TC 5.5.26 
in my test.


Hmm, I'm guessing I may need to find more recent versions (probably 
back-ports)
I'm guessing I'm just looking for it in all the wrong places, so I'm 
hoping someone can point me in the right direction.


How do you retrieve the env var on the Tomcat side?
public void doFilter(ServletRequest servletRequest, ServletResponse 
servletResponse, FilterChain filterChain) throws IOException, 
ServletException {

   log.debug("\nAttributes ... begin.\n");
   Enumeration attributeNames = servletRequest.getAttributeNames();
   while(attributeNames.hasMoreElements()) {
 String attributeName = (String) attributeNames.nextElement();
 log.debug(attributeName + " " + 
servletRequest.getAttribute(attributeName));

   }
   log.debug("\nAttributes ... end.\n");
etc.
}

Thanks for looking at this.
I'm now suspecting I need a more recent version of Tomcat.
Just in case though, your test code was run as a filter?  I've been 
wondering if the filter saw something different from what the servlet sees?


Regards,
Keith


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JkSetEnv and Servlet Filters

2008-05-04 Thread Keith Ealanta

Rainer Jung wrote:

Keith Ealanta schrieb:
public void doFilter(ServletRequest servletRequest, ServletResponse 
servletResponse, FilterChain filterChain) throws IOException, 
ServletException {

   log.debug("\nAttributes ... begin.\n");
   Enumeration attributeNames = servletRequest.getAttributeNames();
   while(attributeNames.hasMoreElements()) {
 String attributeName = (String) attributeNames.nextElement();
 log.debug(attributeName + " " + 
servletRequest.getAttribute(attributeName));

   }
   log.debug("\nAttributes ... end.\n");
etc.
}


Aha! This unfortunately doesn't work. The attributes coming in via the 
AJP protocol can be retrieved via request.getAttribute(), but are not 
(!) shown in getAttributeNames().

Bingo.
Thank-you.  That fixed it.
Do you know if this is for some good and clever reason?  If it is we 
should probably note this limitation in the doco.  If it's not, then 
should I raise it as a bug on tomcat?


Regards (and further thanks)

Keith



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to turn off JNDI datasource connection pooling

2009-01-15 Thread Keith Thomas

I have an application that runs against a legacy database. For reasons I
won't go into here I need to turn off jndi datasource connection pooling. I
have been unsuccessful finding documentation or mailing list entries on how
to do this.

I am running Tomcat 6.0.18 as a service on Win XP against a 10gR2 database.
I attach my server.xml file in case this helps.


http://www.nabble.com/file/p21490681/server.xml server.xml 
-- 
View this message in context: 
http://www.nabble.com/How-to-turn-off-JNDI-datasource-connection-pooling-tp21490681p21490681.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to turn off JNDI datasource connection pooling

2009-01-15 Thread Keith Thomas
Thanks Chuck. I've uploaded it again, this time as a text file. It seems ok
this time.

On Thu, Jan 15, 2009 at 7:02 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Keith Thomas [mailto:keith.tho...@gmail.com]
> > Subject: How to turn off JNDI datasource connection pooling
> >
> > I attach my server.xml file in case this helps.
>
> Your attachment failed to materialize.
>
>  - 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: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: How to turn off JNDI datasource connection pooling

2009-01-16 Thread Keith Thomas

Apologies if I don't understand how a jndi datasource should work or if I've
not provided enough explanation but what I want is for Tomcat to keep out of
connection creation. Even if I have maxactive set to 1 I still get a
stacktrace like this,

at
org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
... 16 more


Everything works fine if I don't use JNDI and I really don't understand why
these dbcp classes with Pool or Pooling in the name are getting involved. 

-- 
View this message in context: 
http://www.nabble.com/How-to-turn-off-JNDI-datasource-connection-pooling-tp21490681p21506964.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: How to turn off JNDI datasource connection pooling

2009-01-16 Thread Keith Thomas

>> It's not clear what you want to do (as opposed to what you don't want to
do).  Is your goal to use a >> new DB connection for every DB access your
webapp makes, or do you want to do DB connection >> 
>> pooling inside your webapp, or ???

>> Not using connection pooling at all is a real performance killer.

>>  - Chuck

The security for the data within the database is entirely baked into the
restriction that every user has their own database connection. As far as I
can tell it is not possible to use connection pooling a retain secure access
to the data without an awful lot of re-work. 

At the moment I am using a new DB connection for every DB access my app
makes. Later I may implement my own database polling but either way it will
be my code initiating connection requests not Tomcat's. 

Setting maxactive to zero stops exceptions but the app just seems to be
hanging.


-- 
View this message in context: 
http://www.nabble.com/How-to-turn-off-JNDI-datasource-connection-pooling-tp21490681p21507284.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: How to turn off JNDI datasource connection pooling

2009-01-16 Thread Keith Thomas

I am managing the database connection credentials because this is the only
way to access this legacy database. Otherwise I have very little code
because Hibernate takes care of all the heavy lifting. As part of the
deployment I just need a way of defining the datasource in a manner that is
external to my code and configurable by administrators. I am trying JNDI as
my standard because this has various levels of security of db uid/pw from
web server to web server. If I fallback to using spring/hibernate xml to
configure the datasource then my customers will always have to decide if
they can live with the uid/pw being stored in a clear text xml file before
taking my app.
-- 
View this message in context: 
http://www.nabble.com/How-to-turn-off-JNDI-datasource-connection-pooling-tp21490681p21507739.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to turn off JNDI datasource connection pooling

2009-01-16 Thread Keith Thomas

Thanks Jan. I don't want to use Tomcat's database pool, I just want to be
able to define the datasource using JNDI so it is external to my
application. I am doing this for various web servers and I'm beginning to
think I will have to tell my customers Tomcat does not support JNDI
datasource definition without also bringing along database connection
pooling so they cannot use Tomcat.
-- 
View this message in context: 
http://www.nabble.com/How-to-turn-off-JNDI-datasource-connection-pooling-tp21490681p21507767.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Securing A Directory Listing

2010-10-20 Thread Keith Masten
I would like to know how to secure a directory listing for read-only access.
I have tried many variations in the web.xml using file based realms and none
of these have worked.  I attempted the BASIC and DIGEST method
configurations.  Any assistance provided would be greatly appreciated.

Tomcat Ver. 5.5.25
OS Solaris 9.


Re: Securing A Directory Listing

2010-10-20 Thread Keith Masten
I left out something Mark, so I am glad to chose to comment on this.  I want
to password protect the directory, so that consumers will be required to
login for viewing of this data.

On Wed, Oct 20, 2010 at 2:29 PM, Mark Thomas  wrote:

> On 20/10/2010 11:50, Keith Masten wrote:
> > I would like to know how to secure a directory listing for read-only
> access.
>
> OK, I'll bite. How is a directory listing anything other than read-only?
>
> Mark
>
> > I have tried many variations in the web.xml using file based realms and
> none
> > of these have worked.  I attempted the BASIC and DIGEST method
> > configurations.  Any assistance provided would be greatly appreciated.
> >
> > Tomcat Ver. 5.5.25
> > OS Solaris 9.
> >
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Securing A Directory Listing

2010-10-21 Thread Keith Masten
This is the web.xml that I am using.  This does not work.


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">
  Vision Application Logs


  
applogs
/applogs/*
  
  
tomcat
  



  BASIC
  applogs



  tomcat




On Wed, Oct 20, 2010 at 4:23 PM, Prastein, Rebeccah H <
rebeccah.h.prast...@questdiagnostics.com> wrote:

> For the benefit of the original poster:
>
> If you don't specify any http-methods for the web-resource-collection,
> the default behavior is that all methods are protected.
> If you specify one or more http-methods, the behavior is that those
> specified are protected, and any that are not specified are not
> protected.
>
> Rebeccah
>
>
>
> -Original Message-
> From: Edson Carlos Ericksson Richter [mailto:edsonrich...@hotmail.com]
> Sent: Wednesday, October 20, 2010 2:15 PM
> To: users@tomcat.apache.org
> Subject: Re: Securing A Directory Listing
>
> Sure, there are more HTTP methods that someone would want to protect
> from.
>
> Thanks for pointing out.
>
> Regards,
>
> Edson.
>
> Em 20/10/2010 18:51, Mark Thomas escreveu:
> > On 20/10/2010 15:09, Edson Carlos Ericksson Richter wrote:
> >> 
> >> Secure Area 
> >> /mysecurearea
> >> GET
> >> 
> > Bad advice. Don't put the http-method in there.
> >
> > Mark
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
> --
> The contents of this message, together with any attachments, are
> intended only for the use of the person(s) to which they are
> addressed and may contain confidential and/or privileged
> information. Further, any medical information herein is
> confidential and protected by law. It is unlawful for unauthorized
> persons to use, review, copy, disclose, or disseminate confidential
> medical information. If you are not the intended recipient,
> immediately advise the sender and delete this message and any
> attachments. Any distribution, or copying of this message, or any
> attachment, is prohibited.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Securing A Directory Listing

2010-10-21 Thread Keith Masten
HTTP-404 error, resource not available.  This error has been consistent with
all of the variations that I have tried.  Tomcat starts just fine.  Realm is
defined in the server.xml.
This is the realm entry in the server.xml.


  
  
  


and this is resource entry that I thought would make this work.






On Thu, Oct 21, 2010 at 9:12 AM, Edson Carlos Ericksson Richter <
edsonrich...@hotmail.com> wrote:

> Please clarify what do you mean by "does not work":
>
> 0) Did you created the realm in Server.xml or in your context xml file?
> 1) Error on Tomcat (Tomcat wont start anymore)
> 2) HTTP Error 500 (or other HTTP error)?
> 3) Directory is not secured (you can still access without login request)?
> 4) Login request window is shown, but you can't authenticate?
> 5) Login request window is shown, you can authenticate, but then you get an
> HTTP error?
> 6) Tomcat starts, but there are lots of error messages in tomcat log?
> 7) Something else?
>
> Regards,
>
> Edson
>
>
> Em 21/10/2010 12:05, Keith Masten escreveu:
>
>  This is the web.xml that I am using.  This does not work.
>>
>> 
>> http://java.sun.com/xml/ns/j2ee";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
>> version="2.4">
>>   Vision Application Logs
>> 
>> 
>>   
>> applogs
>> /applogs/*
>>   
>>   
>> tomcat
>>   
>> 
>> 
>> 
>>   BASIC
>>   applogs
>> 
>> 
>> 
>>   tomcat
>> 
>> 
>>
>>
>> On Wed, Oct 20, 2010 at 4:23 PM, Prastein, Rebeccah H<
>> rebeccah.h.prast...@questdiagnostics.com>  wrote:
>>
>>  For the benefit of the original poster:
>>>
>>> If you don't specify any http-methods for the web-resource-collection,
>>> the default behavior is that all methods are protected.
>>> If you specify one or more http-methods, the behavior is that those
>>> specified are protected, and any that are not specified are not
>>> protected.
>>>
>>> Rebeccah
>>>
>>>
>>>
>>> -Original Message-
>>> From: Edson Carlos Ericksson Richter [mailto:edsonrich...@hotmail.com]
>>> Sent: Wednesday, October 20, 2010 2:15 PM
>>> To: users@tomcat.apache.org
>>> Subject: Re: Securing A Directory Listing
>>>
>>> Sure, there are more HTTP methods that someone would want to protect
>>> from.
>>>
>>> Thanks for pointing out.
>>>
>>> Regards,
>>>
>>> Edson.
>>>
>>> Em 20/10/2010 18:51, Mark Thomas escreveu:
>>>
>>>> On 20/10/2010 15:09, Edson Carlos Ericksson Richter wrote:
>>>>
>>>>> 
>>>>> Secure Area  
>>>>> /mysecurearea
>>>>> GET
>>>>> 
>>>>>
>>>> Bad advice. Don't put the http-method in there.
>>>>
>>>> Mark
>>>>
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>> --
>>> The contents of this message, together with any attachments, are
>>> intended only for the use of the person(s) to which they are
>>> addressed and may contain confidential and/or privileged
>>> information. Further, any medical information herein is
>>> confidential and protected by law. It is unlawful for unauthorized
>>> persons to use, review, copy, disclose, or disseminate confidential
>>> medical information. If you are not the intended recipient,
>>> immediately advise the sender and delete this message and any
>>> attachments. Any distribution, or copying of this message, or any
>>> attachment, is prohibited.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>>
>>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Securing A Directory Listing

2010-10-21 Thread Keith Masten
Thank you for pointing that out Chuck, I will make that adjustment.

On Thu, Oct 21, 2010 at 9:16 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Keith Masten [mailto:spmdt...@gmail.com]
> > Subject: Re: Securing A Directory Listing
>
> > This does not work.
>
> Be more specific.
>
> > /applogs/*
>
> I suspect you erroneously included the path to the webapp in the above.  I
> you specify just "/*", the entire webapp will be protected; what you have
> protects only /applogs underneath the webapp.
>
>  - 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: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Securing A Directory Listing

2010-10-21 Thread Keith Masten
I made the change Chuck suggested and it now prompts me for userid/pw.  I
now have to setup the proper user access to make the setup complete.

On Thu, Oct 21, 2010 at 9:34 AM, Keith Masten  wrote:

> Thank you for pointing that out Chuck, I will make that adjustment.
>
>
> On Thu, Oct 21, 2010 at 9:16 AM, Caldarale, Charles R <
> chuck.caldar...@unisys.com> wrote:
>
>> > From: Keith Masten [mailto:spmdt...@gmail.com]
>> > Subject: Re: Securing A Directory Listing
>>
>> > This does not work.
>>
>> Be more specific.
>>
>> > /applogs/*
>>
>> I suspect you erroneously included the path to the webapp in the above.  I
>> you specify just "/*", the entire webapp will be protected; what you have
>> protects only /applogs underneath the webapp.
>>
>>  - 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: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>


Re: Securing A Directory Listing

2010-10-21 Thread Keith Masten
login dialog is presented, but no matter what Id/pw I provide I cannot
login.
Here is the web.xml that I am using and the tomcat-users.xml



  
  
  
  
  
  
  
  
  
  



http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">
  Vision Application Logs


  
applogs
/*
  
  
vsn-offsh
  



  DIGEST
  applogs



  vsn-offsh






On Thu, Oct 21, 2010 at 9:43 AM, Keith Masten  wrote:

> I made the change Chuck suggested and it now prompts me for userid/pw.  I
> now have to setup the proper user access to make the setup complete.
>
>
> On Thu, Oct 21, 2010 at 9:34 AM, Keith Masten  wrote:
>
>> Thank you for pointing that out Chuck, I will make that adjustment.
>>
>>
>> On Thu, Oct 21, 2010 at 9:16 AM, Caldarale, Charles R <
>> chuck.caldar...@unisys.com> wrote:
>>
>>> > From: Keith Masten [mailto:spmdt...@gmail.com]
>>> > Subject: Re: Securing A Directory Listing
>>>
>>> > This does not work.
>>>
>>> Be more specific.
>>>
>>> > /applogs/*
>>>
>>> I suspect you erroneously included the path to the webapp in the above.
>>>  I you specify just "/*", the entire webapp will be protected; what you have
>>> protects only /applogs underneath the webapp.
>>>
>>>  - 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: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>>
>>
>


Re: Securing A Directory Listing

2010-10-21 Thread Keith Masten
Not sure how to answer your Realm question.  The realm in the web.xml is not
referenced anywhere.  The realm definition for this tomcat instance is in
the server.xml.  Should the realm defined in the web.xml be
defined/referenced somewhere?

Just tried the basic setup again and no luck.  When prompted, I should enter
id - bob, pw - bob according to my tomcat-users.xml, correct???

  

On Thu, Oct 21, 2010 at 2:18 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Keith Masten [mailto:spmdt...@gmail.com]
> > Subject: Re: Securing A Directory Listing
>
> > login dialog is presented, but no matter what Id/pw I
> > provide I cannot login.
>
> For initial testing purposes, try BASIC for the  and put
> unencrypted passwords in the  list.  Once that's working, then
> move on to DIGEST mode.
>
> Where is your  element located?
>
>  - 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: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Securing A Directory Listing

2010-10-22 Thread Keith Masten
Configured the web.xml for BASIC authentication.


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">
  Vision Application Logs


  
applogs
/*
  
  
vsndev-offshore
  



  BASIC
  myrealm



  vsndev-offshore



When prompted for username/password, I use what has been defined in the
tomcat-users.xml file and that does not work.  It would appear that it is
not even referencing the
list.

  
  


On Thu, Oct 21, 2010 at 3:23 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Keith Masten [mailto:spmdt...@gmail.com]
> > Subject: Re: Securing A Directory Listing
>
> > The realm definition for this tomcat instance is in
> > the server.xml.
>
> That partially answers the question.  As the doc says: "You may nest a
> Realm inside any Catalina container Engine, Host, or Context."  Where's
> yours?
>
> > Should the realm defined in the web.xml be
> > defined/referenced somewhere?
>
> Probably not, as long as you're comfortable with using the same  for
> all webapps that require authentication.
>
> > Just tried the basic setup again and no luck.
>
> What is meant by "no luck"?  I don't recall any Tomcat error message with
> that phrasing...
>
> > When prompted, I should enter id - bob, pw - bob according
> > to my tomcat-users.xml, correct???
>
> Correct, as long as the  is BASIC.  Might want to post your
> current WEB-INF/web.xml file.
>
>  - 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: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Securing A Directory Listing

2010-10-25 Thread Keith Masten
I am prevented from accessing the application if I use admin and tomcat user
accounts.  I receive an HTTP-403 error.  But, when I attempt to access the
application with the fictitious 'bob' user account, the standard login
dialog is presented to me over and over.  Any ideas???

On Fri, Oct 22, 2010 at 9:36 AM, Keith Masten  wrote:

> Configured the web.xml for BASIC authentication.
>
>
> 
> http://java.sun.com/xml/ns/j2ee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
> version="2.4">
>   Vision Application Logs
> 
> 
>   
> applogs
> /*
>   
>   
> vsndev-offshore
>
>   
> 
> 
> 
>   BASIC
>   myrealm
>
> 
> 
> 
>   vsndev-offshore
> 
> 
>
> When prompted for username/password, I use what has been defined in the
> tomcat-users.xml file and that does not work.  It would appear that it is
> not even referencing the
> list.
>
>   
>   
>
>
>
> On Thu, Oct 21, 2010 at 3:23 PM, Caldarale, Charles R <
> chuck.caldar...@unisys.com> wrote:
>
>> > From: Keith Masten [mailto:spmdt...@gmail.com]
>> > Subject: Re: Securing A Directory Listing
>>
>> > The realm definition for this tomcat instance is in
>> > the server.xml.
>>
>> That partially answers the question.  As the doc says: "You may nest a
>> Realm inside any Catalina container Engine, Host, or Context."  Where's
>> yours?
>>
>> > Should the realm defined in the web.xml be
>> > defined/referenced somewhere?
>>
>> Probably not, as long as you're comfortable with using the same 
>> for all webapps that require authentication.
>>
>> > Just tried the basic setup again and no luck.
>>
>> What is meant by "no luck"?  I don't recall any Tomcat error message with
>> that phrasing...
>>
>> > When prompted, I should enter id - bob, pw - bob according
>> > to my tomcat-users.xml, correct???
>>
>> Correct, as long as the  is BASIC.  Might want to post your
>> current WEB-INF/web.xml file.
>>
>>  - 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: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>


Re: Securing A Directory Listing

2010-10-25 Thread Keith Masten
Great observations Chuck, I will take a look these items.

On Mon, Oct 25, 2010 at 11:22 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Keith Masten [mailto:spmdt...@gmail.com]
> > Subject: Re: Securing A Directory Listing
>
> > when I attempt to access the application with the
> > fictitious 'bob' user account, the standard login
> > dialog is presented to me over and over.
>
> Is your webapp discarding the session object?  If so, stop that.
>
> Does your client disable cookies?  If so, you'll need to use
> HttpServletResponse.encodeURL() to pass the session id as a parameter on the
> URL.
>
> Use Wireshark or a browser plug-in to see the real traffic being passed
> back and forth.
>
>  - 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: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Heartbeat Bug Update - Installation?

2014-04-18 Thread Keith Davis
https://issues.apache.org/bugzilla/show_bug.cgi?id=56363

 

I'm somewhat new to Tomcat. What do I need to do obtain this patch / update?
I'm running Apache Tomcat 7 on Windows.

 

Keith Davis - (214) 906-5183 - http://laurinkeithdavis.com
<http://laurinkeithdavis.com/> 

 



RE: Heartbeat Bug Update - Installation?

2014-04-18 Thread Keith Davis
Funny, stupid autocorrect...I know it's Heartbleed, not Heartbeat. :)

-Original Message-
From: Daniel Mikusa [mailto:dmik...@gopivotal.com] 
Sent: Friday, April 18, 2014 8:24 AM
To: Tomcat Users List
Subject: Re: Heartbeat Bug Update - Installation?

On Apr 18, 2014, at 9:02 AM, Keith Davis  wrote:

> https://issues.apache.org/bugzilla/show_bug.cgi?id=56363
> 
> 
> 
> I'm somewhat new to Tomcat. What do I need to do obtain this patch /
update?
> I'm running Apache Tomcat 7 on Windows.

This is a good starting point.

  https://wiki.apache.org/tomcat/Security/Heartbleed

Dan


> 
> 
> 
> Keith Davis - (214) 906-5183 - http://laurinkeithdavis.com 
> <http://laurinkeithdavis.com/>
> 
> 
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomct DriverManager initial load issue

2017-08-17 Thread Sun, Keith
Hello ,

I met mysql jdbc load issue in Tomcat servlet , I also pasted the content in 
this stackoverflow 
<https://stackoverflow.com/questions/45725610/tomcat-jdbc-drivermanager-initial-load-issue>
 .



I finally found this code snippet in the tomcat70 
code<https://github.com/apache/tomcat70/blob/c1a62522e9a6cd6625f026e4197b490ef1beaa78/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java>
 and did the debug in eclipse. The classloader to load DriverManager is always 
the AppClassLoader which contains only the bootstrap.jar and tomcat-juli.jar on 
the CLASSPATH only (under ${catalina.home}/bin .
So my servlet has to manually call Class.forName("com.mysql.jdbc.Driver") , 
otherwise the call to DriverManager.getConnection("jdbc:mysql://xxx") will 
throw "no suitable driver found" exception.
My questions:
1.  is my understanding true ?
2.  The manual or the stackoverflow said put the mysql-connector.jar under 
${catalina.home}/lib which will be initialized once and should work for the 
DriverManager case. Is it not correct now ?
try
{
// Use the system classloader as the victim for all this
// ClassLoader pinning we're about to do.
Thread.currentThread().setContextClassLoader(
ClassLoader.getSystemClassLoader());

/*
 * First call to this loads all drivers in the current class
 * loader
 */
if (driverManagerProtection) {
DriverManager.getDrivers();
}
My enviroment:

C:\Users\\Desktop\Tools\apache-tomcat-7.0.78-windows-x64\apache-tomcat-7.0.78\bin>version.bat
Using CATALINA_BASE:   
"C:\Users\aisun\Desktop\Tools\apache-tomcat-7.0.78-windows-x64\apache-tomcat-7.0.78"
Using CATALINA_HOME:   
"C:\Users\aisun\Desktop\Tools\apache-tomcat-7.0.78-windows-x64\apache-tomcat-7.0.78"
Using CATALINA_TMPDIR: 
"C:\Users\aisun\Desktop\Tools\apache-tomcat-7.0.78-windows-x64\apache-tomcat-7.0.78\temp"
Using JRE_HOME:"C:\Program Files\Java\jdk1.8.0_131"
Using CLASSPATH:   
"C:\Users\aisun\Desktop\Tools\apache-tomcat-7.0.78-windows-x64\apache-tomcat-7.0.78\bin\bootstrap.jar;C:\Users\aisun\Desktop\Tools\apache-tomcat-7.0.78-windows-x64\ap
Server version: Apache Tomcat/7.0.78
Server built:   May 10 2017 15:02:19 UTC
Server number:  7.0.78.0
OS Name:Windows 7
OS Version: 6.1
Architecture:   amd64
JVM Version:1.8.0_131-b11
JVM Vendor: Oracle Corporation
C:\Users\aisun\Desktop\Tools\apache-tomcat-7.0.78-windows-x64\apache-tomcat-7.0.78\bin>


Thanks very much.
Keith





catalina.authentication

2017-10-26 Thread Keith Brown
In my log file, I keep seeing Unable to login as service principal. (kerberos).
I followed these instructions:
https://tomcat.apache.org/tomcat-8.0-doc/windows-auth-howto.html

here is what I did:
I created a DNS entry for my intranet server. "pluto"
Ask my NT admin to create me a domain user (web_user)
Have the Admin create a service principal name HTTP/pluto.site.org
She created a keytab file for me.

in ../Catalina/localhost/app.xml

I put

  



In my  WEB-INF/web.xml

Added  SPNEGO 

And put some security-constraints.

I restrated tomccat (version 8). And i see this message.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Changing the webapp classpath

2008-02-11 Thread Dalia,Keith A - TO-DITT1
I was wondering if there was a way to alter the default webapps
classpath.  We use several different .jars in our deployments and would
like to create a directory structure under the web_inf/lib directory.
By default the webapps classloader only looks in web_inf/classes and
web_inf/lib.  Any help is appreciated.

Keith


RE: Changing the webapp classpath

2008-02-11 Thread Dalia,Keith A - TO-DITT1
So, I would place the  in the web.xml that ships with my webapp?
In the past I've only used the  in the server.xml when defining
virtual sites.

Thanks.

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 11, 2008 2:58 PM
To: Tomcat Users List
Subject: RE: Changing the webapp classpath

> From: "Dalia,Keith A - TO-DITT1" <[EMAIL PROTECTED]>
> Subject: Changing the webapp classpath
> 
> I was wondering if there was a way to alter the default
> webapps classpath.

There's an undocumented capability within Tomcat that provides what
you're asking for.  (Since it's undocumented, I would assume it's also
unsupported, but it may suffice for your needs.)

Inside each  element that needs it, specify a  element
with the following attributes:
  className="org.apache.catalina.loader.VirtualWebappLoader"
  virtualClasspath="[extraLibraryPaths]"
where [extraLibraryPaths] are a series of path tokens separated by
semicolons (regarless of platform).  Each path token is either absolute
or relative to Tomcat's working directory.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Conditional logging

2014-07-22 Thread Pendergrass, Keith D CIV SPAWARSYSCEN-ATLANTIC, 54350
Chris,

Quick question, I upgraded to 7.0.54 with new user/pass. My issue is that these 
credentials will not log me in to ANY management function going through the 
GUI??? If I append the WEBAPP 
Tho the url http://localhost\web app name this launches the app - but still I 
need to access all CmcApps via the GUI. Any ideas?

Thanks,

Keith Pendergrass (CIV) MS/ MBA/ Network+
IT Specialist (APPSW) Software/Data Engineer
Space & Naval Warfare Systems Command-Atlantic
2251 Lakeshore Drive
New Orleans, La 70122
Work: (504) 697-5549
DSN: 647-5549
Fax:  (504) 697-5628
keith.pendergr...@navy.mil


-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Tuesday, July 22, 2014 9:09 AM
To: Tomcat Users List
Subject: Re: Conditional logging

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Kris,

On 7/21/14, 6:43 PM, Dames, Kristopher J wrote:
> Can anyone point me to an example of conditional logging in Tomcat  6? 
> Here is what I have tried to no avail. I want requests that match 
> /*/iaahb to not be logged.
> 
> In my server.xml:
> 
>  condition="DoNotLog" directory="logs" fileDateFormat="-MM-dd" 
> pattern="%{X-Forwarded-For}i %h %l %u %t "%r" %s %b 
> "%{Referer}i" "%{User-Agent}i""
> 
> prefix="access_log"/>
> 
> in my web.xml:
> 
>  
>  Set Do Not Log Attribute 
> SetDoNotLogFilter  
> DoNotLog true 
>Set Do Not Log 
> Attribute /*/iaahb
> 

On the face of it, this looks like it should work. What does your 
"SetDoNoLogFilter" code look like?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTznCUAAoJEBzwKT+lPKRYlKQQAKFrkhuDlohUc71mm0iBQXRl
jOcU4LD1Coq2m+dtQscGdgbwJ7vvr3wCGLFjJ+k6SPGkDDon1N0xQ/RsXApFFvme
KqR3B851de9TtZlAiCgRJsWnvoXNMsSp8aeQxcwV1hSj/s9agDd8hHQj9ffw+Hnu
E9wcw4uFlM0+cDvqc6lMlP2P1lgj9F0UWmzcQFw1p3iUxUiiOsXXXBls5KlLtT7D
Si/69y/Ul0FOy9kvNl/W1EPVZcKEE6c3r4/UAYaLoZmxtKFIa6FkKVJGW3oK16PH
F2mTPnYLwNN3fSEwaJEMlmAUg58UfSkTdMtIaARbMD0SC34zeHqipVOMJ5mwtSuJ
XYAgD1euYzGmwewQL1Xi/pqdWngplFuJNnBeMgxUaQdw3p6WwWgdl2CN/FPfYkjo
R/VW01flR+UlkavQjcKi/uv9fDy0Y2Hn+q1wFtOVqwxcDIa8bdKm00KllYNRClhz
Ddu+xMg55LkZi/qeMUan8YNidNH1RiXa74A5i4BR7VLf5jtO+j0FHxx9H1WDbkNp
O887mfSrU75zgr1ACg8yoPpw5lVfqBYfhkfa2Clf6eNQWgBs3Ki6KZzH/f1dEM4S
YVo7T+1yESMvLTb2fK5J5wJv/WIuZWUfNY6n7r9vOjxj61lo7q6UjutYeNO746N1
hSIMjlfwoc0IeqGMB0M3
=k8cT
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



smime.p7s
Description: S/MIME cryptographic signature


un-subscribe

2014-08-11 Thread Pendergrass, Keith D CIV SPAWARSYSCEN-ATLANTIC, 54350


Regards,

Keith Pendergrass (CIV) MS/ MBA/ Network+
IT Specialist (APPSW) Software/Data Engineer
Space & Naval Warfare Systems Command-Atlantic
2251 Lakeshore Drive
New Orleans, La 70122
Work: (504) 697-5549
DSN: 647-5549
Fax: (504) 697-5628
keith.pendergr...@navy.mil




smime.p7s
Description: S/MIME cryptographic signature


un-subscribe

2014-08-11 Thread Pendergrass, Keith D CIV SPAWARSYSCEN-ATLANTIC, 54350


Regards,

Keith Pendergrass (CIV) MS/ MBA/ Network+
IT Specialist (APPSW) Software/Data Engineer
Space & Naval Warfare Systems Command-Atlantic
2251 Lakeshore Drive
New Orleans, La 70122
Work: (504) 697-5549
DSN: 647-5549
Fax: (504) 697-5628
keith.pendergr...@navy.mil




smime.p7s
Description: S/MIME cryptographic signature


RE: un-subscribe

2014-08-11 Thread Pendergrass, Keith D CIV SPAWARSYSCEN-ATLANTIC, 54350
I have done all the above to no avail. 

Thanks,

Keith Pendergrass (CIV) MS/ MBA/ Network+
IT Specialist (APPSW) Software/Data Engineer
Space & Naval Warfare Systems Command-Atlantic
2251 Lakeshore Drive
New Orleans, La 70122
Work: (504) 697-5549
DSN: 647-5549
Fax:  (504) 697-5628
keith.pendergr...@navy.mil


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Monday, August 11, 2014 9:02 AM
To: Tomcat Users List
Subject: Re: un-subscribe

On 11/08/2014 14:15, Pendergrass, Keith D CIV SPAWARSYSCEN-ATLANTIC,
54350 wrote:
> 
> 
> Regards,
> 
> Keith Pendergrass (CIV) MS/ MBA/ Network+ IT Specialist (APPSW) 
> Software/Data Engineer Space & Naval Warfare Systems Command-Atlantic
> 2251 Lakeshore Drive
> New Orleans, La 70122
> Work: (504) 697-5549
> DSN: 647-5549
> Fax: (504) 697-5628
> keith.pendergr...@navy.mil

As you have already been told twice off list when you mailed the list owner, 
you need to send you unsubscription request to the list you are subscribed to, 
not some random other Tomcat list.

The complete list of mailing lists (including with unsubscription
addresses) is here:
http://tomcat.apache.org/lists.html

And, also for the third time, once you have sent your unsubscription request to 
the correct address and if it still fails, send a copy of that failure to the 
list owners.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



smime.p7s
Description: S/MIME cryptographic signature


RE: un-subscribe

2014-08-11 Thread Pendergrass, Keith D CIV SPAWARSYSCEN-ATLANTIC, 54350
I have un-subscribed from every list and still get all postings so there is a 
reference somewhere that is not being un-subscribed from these services?

Thanks,

Keith Pendergrass (CIV) MS/ MBA/ Network+
IT Specialist (APPSW) Software/Data Engineer
Space & Naval Warfare Systems Command-Atlantic
2251 Lakeshore Drive
New Orleans, La 70122
Work: (504) 697-5549
DSN: 647-5549
Fax:  (504) 697-5628
keith.pendergr...@navy.mil


-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Monday, August 11, 2014 9:02 AM
To: Tomcat Users List
Subject: Re: un-subscribe

On 11/08/2014 14:15, Pendergrass, Keith D CIV SPAWARSYSCEN-ATLANTIC,
54350 wrote:
> 
> 
> Regards,
> 
> Keith Pendergrass (CIV) MS/ MBA/ Network+ IT Specialist (APPSW) 
> Software/Data Engineer Space & Naval Warfare Systems Command-Atlantic
> 2251 Lakeshore Drive
> New Orleans, La 70122
> Work: (504) 697-5549
> DSN: 647-5549
> Fax: (504) 697-5628
> keith.pendergr...@navy.mil

As you have already been told twice off list when you mailed the list owner, 
you need to send you unsubscription request to the list you are subscribed to, 
not some random other Tomcat list.

The complete list of mailing lists (including with unsubscription
addresses) is here:
http://tomcat.apache.org/lists.html

And, also for the third time, once you have sent your unsubscription request to 
the correct address and if it still fails, send a copy of that failure to the 
list owners.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



smime.p7s
Description: S/MIME cryptographic signature