Re: How-to-achieve-url-maxtry-filter-in-apache-tomcat

2012-08-28 Thread André Warnier

rathinasamy@snovabits.net wrote:
No, not bothering about the interuption. As of now if an order comes 
generate an url and return back with a maximum try for 2 times and time 
to live for 15 minutes.


Let`s restart this from the beginning.

1) Unless you have a specific webapp and a specific servlet configured to serve these 
URLs, Tomcat is going to serve them with its default webapp and default servlet, whose 
purpose is to serve static files stored in the filesystem.  This default webapp/servlet 
does not count the number of times the file has been served, nor take into account the age 
of the file etc..


2) if you want a different behaviour for those static files, you can either
  a) add a filter to the default webapp, so that before letting the default servlet 
return a static file, it will take into account some kind of counter or timer, and take 
some action based on that (return a not found response, delete the file, whatever), 
before the default servlet runs and returns the file
  or b) create your own webapp/servlet that will return these files (or not) depending on 
your criteria.  And then map this webapp/servlet to the appropriate URL sub-space (where 
your files are created to be downloaded).


Either way, there is no standard (Tomcat-included) servlet or servlet filter that does 
this, so you will have to write your own code.  Is that part clear ?



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



Re: How-to-achieve-url-maxtry-filter-in-apache-tomcat

2012-08-28 Thread rathinasamy....@snovabits.net

Thank you very much André Warnier for your time.

Here I would like to use default webapp/servlet.

 - add a filter to the default webapp, so that before letting the 
default servlet return a static file, it will take into account some 
kind of counter
Can you give me some examples for how to add a filter in default webapp 
so that the default servlet will take a count every time when a click 
for the url?


On 8/28/2012 12:37 PM, André Warnier wrote:

rathinasamy@snovabits.net wrote:
No, not bothering about the interuption. As of now if an order comes 
generate an url and return back with a maximum try for 2 times and 
time to live for 15 minutes.


Let`s restart this from the beginning.

1) Unless you have a specific webapp and a specific servlet configured 
to serve these URLs, Tomcat is going to serve them with its default 
webapp and default servlet, whose purpose is to serve static files 
stored in the filesystem.  This default webapp/servlet does not count 
the number of times the file has been served, nor take into account 
the age of the file etc..


2) if you want a different behaviour for those static files, you can 
either
  a) add a filter to the default webapp, so that before letting the 
default servlet return a static file, it will take into account some 
kind of counter or timer, and take some action based on that (return a 
not found response, delete the file, whatever), before the default 
servlet runs and returns the file
  or b) create your own webapp/servlet that will return these files 
(or not) depending on your criteria.  And then map this webapp/servlet 
to the appropriate URL sub-space (where your files are created to be 
downloaded).


Either way, there is no standard (Tomcat-included) servlet or servlet 
filter that does this, so you will have to write your own code.  Is 
that part clear ?



-
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: How-to-achieve-url-maxtry-filter-in-apache-tomcat

2012-08-28 Thread rathinasamy....@snovabits.net

Really sorry, missed the last line...

On 8/28/2012 12:48 PM, rathinasamy@snovabits.net wrote:

Thank you very much André Warnier for your time.

Here I would like to use default webapp/servlet.

 - add a filter to the default webapp, so that before letting the 
default servlet return a static file, it will take into account some 
kind of counter
Can you give me some examples for how to add a filter in default 
webapp so that the default servlet will take a count every time when a 
click for the url?


On 8/28/2012 12:37 PM, André Warnier wrote:

rathinasamy@snovabits.net wrote:
No, not bothering about the interuption. As of now if an order comes 
generate an url and return back with a maximum try for 2 times and 
time to live for 15 minutes.


Let`s restart this from the beginning.

1) Unless you have a specific webapp and a specific servlet 
configured to serve these URLs, Tomcat is going to serve them with 
its default webapp and default servlet, whose purpose is to serve 
static files stored in the filesystem.  This default webapp/servlet 
does not count the number of times the file has been served, nor take 
into account the age of the file etc..


2) if you want a different behaviour for those static files, you can 
either
  a) add a filter to the default webapp, so that before letting the 
default servlet return a static file, it will take into account some 
kind of counter or timer, and take some action based on that (return 
a not found response, delete the file, whatever), before the 
default servlet runs and returns the file
  or b) create your own webapp/servlet that will return these files 
(or not) depending on your criteria.  And then map this 
webapp/servlet to the appropriate URL sub-space (where your files are 
created to be downloaded).


Either way, there is no standard (Tomcat-included) servlet or servlet 
filter that does this, so you will have to write your own code.  Is 
that part clear ?



-
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




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



Re: Issue starting catalina.sh on Windows for tomcat 7 version

2012-08-28 Thread Joseph
Make script to print sys pros before final call to java exe,compare printed 
info with previous working one,probably issue with java lib path,class path 
etc., which makes classloader not able to load ,just a guess,hope it helps

在 2012-8-28,15:18,irfan pasha irfan17...@gmail.com 写道:

 Hi,
 
 I have recently installed tomcat7 version and tried to start
 catalina.sh from my bash on my windows machine after setting the JAVA
 path.
 
 I get the following error when i start in my console
 
 Exception in thread main java.lang.NoClassDefFoundError:
 org/apache/catalina/s
 tartup/Bootstrap
 Caused by: java.lang.ClassNotFoundException:
 org.apache.catalina.startup.Bootstr
 ap
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 Could not find the main class: org.apache.catalina.startup.Bootstrap. Program 
 w
 ill exit.
 
 It was working fine for earlier versions of tomcat.
 
 Any help is appreciated.
 
 -- 
 irfan..
 
 -
 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: Issue starting catalina.sh on Windows for tomcat 7 version

2012-08-28 Thread André Warnier

irfan pasha wrote:

Hi,

I have recently installed tomcat7 version and tried to start
catalina.sh from my bash on my windows machine after setting the JAVA
path.



The above is a bit confusing (and incomplete).  On which machine with which OS is which 
precise (7.x.y) version of Tomcat installed, and where did you get this Tomcat from ?

And which machine has a bash and where is that console running ?



I get the following error when i start in my console

Exception in thread main java.lang.NoClassDefFoundError:
org/apache/catalina/s
tartup/Bootstrap
Caused by: java.lang.ClassNotFoundException:
org.apache.catalina.startup.Bootstr
ap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program w
ill exit.

It was working fine for earlier versions of tomcat.

Any help is appreciated.




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



Re: Issue starting catalina.sh on Windows for tomcat 7 version

2012-08-28 Thread irfan pasha
Hi,

I have installed tomcat 7.0.29 on windows7. I have download .tar.gz
file from http://tomcat.apache.org/download-70.cgi.

My bash and the console both are in same machine. I have installed MKS
tool kit that enables me to run bash on Windows.

Let me know if you need more information.

Regards,
Irfan




On Tue, Aug 28, 2012 at 2:25 PM, André Warnier a...@ice-sa.com wrote:
 irfan pasha wrote:

 Hi,

 I have recently installed tomcat7 version and tried to start
 catalina.sh from my bash on my windows machine after setting the JAVA
 path.


 The above is a bit confusing (and incomplete).  On which machine with which
 OS is which precise (7.x.y) version of Tomcat installed, and where did you
 get this Tomcat from ?
 And which machine has a bash and where is that console running ?



 I get the following error when i start in my console

 Exception in thread main java.lang.NoClassDefFoundError:
 org/apache/catalina/s
 tartup/Bootstrap
 Caused by: java.lang.ClassNotFoundException:
 org.apache.catalina.startup.Bootstr
 ap
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 Could not find the main class: org.apache.catalina.startup.Bootstrap.
 Program w
 ill exit.

 It was working fine for earlier versions of tomcat.

 Any help is appreciated.



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




-- 
irfan..

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



Re: Issue starting catalina.sh on Windows for tomcat 7 version

2012-08-28 Thread André Warnier

irfan pasha wrote:

Hi,

I have installed tomcat 7.0.29 on windows7. I have download .tar.gz
file from http://tomcat.apache.org/download-70.cgi.

My bash and the console both are in same machine. I have installed MKS
tool kit that enables me to run bash on Windows.

Let me know if you need more information.



That is what I kind of suspected.
And, with respect, unless you have very specific needs to go along this route, I believe 
that you are setting yourself up for a lot of complications.


Think that the executable program that will really be running on that machine is the Java 
JVM.  Tomcat is just a Java application that will run inside this JVM.
So unless you have also installed a Linux-kind of Java JVM that runs also under the MKS 
toolkit, you are probably on the wrong track.


Another way of saying this :
The Tomcat code is always the same, because it always runs inside the same environment : a 
Java JVM.  But the Java JVM itself is very specific (and different) for each OS platform. 
 And running Java (and a Java application) as a Unix daemon is quite different from 
running Java (and a Java application) as a Windows Service.  And running Java under an MKS 
environment is still different, and you would probably need an MKS-specific version of the 
JVM to do that (if it exists).


What you should probably be doing is
- install a Java JVM for Windows
- download and install the Tomcat distribution for Windows (the service installer or the 
 normal Tomcat)

- use the Windows Service or the Windows command-line interface to run your 
Tomcat
and then, if you want, use your MKS environment to interact with Tomcat, as a 
client.


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



Re: Issue starting catalina.sh on Windows for tomcat 7 version

2012-08-28 Thread irfan pasha
Well i have alternative of starting tomcat based on the OS. But i
specifically want to use catalina.sh for both windows and unix
operating systems. For the past 4 years i am able to use it, but not
only with this version. What is the major change that was done with
this version. why does catalina.sh does'nt get started with this
version on windows.


Regards,
Irfan


On Tue, Aug 28, 2012 at 3:58 PM, André Warnier a...@ice-sa.com wrote:
 irfan pasha wrote:

 Hi,

 I have installed tomcat 7.0.29 on windows7. I have download .tar.gz
 file from http://tomcat.apache.org/download-70.cgi.

 My bash and the console both are in same machine. I have installed MKS
 tool kit that enables me to run bash on Windows.

 Let me know if you need more information.


 That is what I kind of suspected.
 And, with respect, unless you have very specific needs to go along this
 route, I believe that you are setting yourself up for a lot of
 complications.

 Think that the executable program that will really be running on that
 machine is the Java JVM.  Tomcat is just a Java application that will run
 inside this JVM.
 So unless you have also installed a Linux-kind of Java JVM that runs also
 under the MKS toolkit, you are probably on the wrong track.

 Another way of saying this :
 The Tomcat code is always the same, because it always runs inside the same
 environment : a Java JVM.  But the Java JVM itself is very specific (and
 different) for each OS platform.  And running Java (and a Java application)
 as a Unix daemon is quite different from running Java (and a Java
 application) as a Windows Service.  And running Java under an MKS
 environment is still different, and you would probably need an MKS-specific
 version of the JVM to do that (if it exists).

 What you should probably be doing is
 - install a Java JVM for Windows
 - download and install the Tomcat distribution for Windows (the service
 installer or the  normal Tomcat)
 - use the Windows Service or the Windows command-line interface to run your
 Tomcat
 and then, if you want, use your MKS environment to interact with Tomcat, as
 a client.



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




-- 
irfan..

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



Re: Issue starting catalina.sh on Windows for tomcat 7 version

2012-08-28 Thread André Warnier

irfan pasha wrote:

Well i have alternative of starting tomcat based on the OS. But i
specifically want to use catalina.sh for both windows and unix
operating systems.


What you want, and what is possible and/or supported, may be different things.

 For the past 4 years i am able to use it, but not

only with this version. What is the major change that was done with
this version. why does catalina.sh does'nt get started with this
version on windows.



I don't know.
But just look at catalina.sh, lines 100-108 fo example.  I am not sure what will result 
there when running this from a MKS bash shell console under Windows.

(On my XP laptop under the MKS sh, uname returns Windows_NT).
Probably not many people on this list would be sure either, as this is definitely not a 
common environment to run Tomcat, and probably not something that is ever tested.

Maybe the fact that it was running with previous versions was just a lucky 
coincidence.

By the way, if (from a MKS shell command window) I run bin/startup.sh I get the same 
result as you, but if I run bin/startup.bat, Tomcat starts up fine. (That is with Tomcat 
7.0.21, Windows full version).



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



Re: Issue starting catalina.sh on Windows for tomcat 7 version

2012-08-28 Thread Martin Knoblauch
On Tue, Aug 28, 2012 at 1:17 PM, André Warnier a...@ice-sa.com wrote:
 irfan pasha wrote:

 Well i have alternative of starting tomcat based on the OS. But i
 specifically want to use catalina.sh for both windows and unix
 operating systems.


 What you want, and what is possible and/or supported, may be different
 things.


  For the past 4 years i am able to use it, but not

 only with this version. What is the major change that was done with
 this version. why does catalina.sh does'nt get started with this
 version on windows.


 I don't know.
 But just look at catalina.sh, lines 100-108 fo example.  I am not sure what
 will result there when running this from a MKS bash shell console under
 Windows.
 (On my XP laptop under the MKS sh, uname returns Windows_NT).
 Probably not many people on this list would be sure either, as this is
 definitely not a common environment to run Tomcat, and probably not
 something that is ever tested.
 Maybe the fact that it was running with previous versions was just a lucky
 coincidence.

 By the way, if (from a MKS shell command window) I run bin/startup.sh I
 get the same result as you, but if I run bin/startup.bat, Tomcat starts up
 fine. (That is with Tomcat 7.0.21, Windows full version).



regardless whether the request makes any sense - I would do a diff
between the working and non working shell scripts and see where it
leads me to :-)

Cheers
Martin

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



Test - please ignore

2012-08-28 Thread Martin Knoblauch
Just a test after moving from googlemail to gmail. I am kind of afraid
that I broke my subscription ...

Thanks
Martin

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



Re: getRealPath returns null

2012-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 8/27/12 6:07 PM, Mark Eggers wrote:
 On 8/27/2012 1:24 PM, Christopher Schultz wrote:
 
 Hmm... that's ... not supposed to happen. The AppContext 
 leak-prevention has been in Tomcat since back in 2009. Can you
 confirm that the JreMemoryLeakProtectionListener is actually
 being loaded?
 
 A heap dump (jvisualvm) on the following environments show one
 instance of the class being loaded.

That's good!

 1. Windows 7, JRE 1.7.0_05, Tomcat 6.0.35 2. Windows 7, JRE
 1.7.0_05, Tomcat 7.0.27 3. Windows 7, JRE 1.6.0_32, Tomcat 6.0.35 
 4. Windows 7, JRE 1.6.0_32, Tomcat 7.0.27 5. CentOS 6.3, JRE
 1.6.0_32, Tomcat 6.0.35, -Djava.awt.headless=true this is actually
 running X Windows though 6. CentOS 5.8, JRE 1.6.0_32, Tomcat
 6.0.35, -Djava.awt.headless=true not running X Windows (dump via
 jmap)
 
 Hmm - looking at Tomcat 6.0.35 on the CentOS 5.8 system, I see the 
 following when looking at the instance of
 JreMemoryProtectionListener.
 
 appContextProtection (Z) : true awtThreadProtection (Z) : true

appContextProtection=true is the default and awtThreadProtection=true
is *not* the default. I would say that this is the proper
configuration for what you are trying to solve. In that case, can you
check the ClassLoader used for the AppContext and AWT threads?

 And I do have the attribute set to manage the AWT thread (at least
 on the Tomcat I dumped).
 
 On the Windows (Tomcat 6.0.35, JRE 1.6.0_32), I see the following:
 
 appContextProtection (Z) : true awtThreadProtection (Z) : false 
 classesToInitialize (L) : null driverManagerProtection (Z) :
 true gcDaemonProtection (Z) : true ldapPoolProtection (Z) : true 
 securityLoginConfigurationProtection (Z) : true 
 securityPolicyProtection (Z) : true tokenPollerProtection (Z) :
 true urlCacheProtection (Z) : true xmlParsingProtection (Z) : true
 
 which is what I expect from server.xml.

So the server.xml has awtThreadProtection=false (or just uses the
default)?

 Commenting out the listener (actually it doesn't matter either way
 since I'm running in a windowed environment) and adding the AWT
 Event thread protection produces on Windows:
 
 appContextProtection (Z) : true awtThreadProtection (Z) : true 
 classesToInitialize (L) : null driverManagerProtection (Z) :
 true gcDaemonProtection (Z) : true ldapPoolProtection (Z) : true 
 securityLoginConfigurationProtection (Z) : true 
 securityPolicyProtection (Z) : true tokenPollerProtection (Z) :
 true urlCacheProtection (Z) : true xmlParsingProtection (Z) : true

If you comment-out the listener, they why is the class loaded at all?
Are you sure everything in your environment is sane?

 And I still see the exact same permgen memory leak upon unloading
 the application.
 
 The problem looks to be in an internal use of MediaTracker. I
 suspect that the library uses this to speed image recovery should
 there be repeated calls.

IIRC MediaTracker is a concurrent component that loads stuff (like
images) in the background and sends update-events to interested
components. Perhaps there is yet another thread that needs to be
managed on top of the AWT thread. Can you take a thread dump and
possibly indicate the ClassLoader for each thread?

 Unfortunately, these images are dynamically generated, so any use
 of MediaTracker is pretty worthless in this use case.

I've found that use of the MediaTracker is entirely worthless except
when using GUIs that need to display images within components (like
buttons, etc.). Anyone using MediaTracker in a client-side library is
making a mistake (that is, your 3rd-party library is either not
targeted towards a server-side application, or the devs don't know
what they are doing).

 There's a way to purge the library caches, and I've experimented
 with that as well. Unfortunately, it doesn't unregister the images
 it stored in the MediaTracker. In short, flushing the library's
 cache in this use case does not address the problem.

Fantastic.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA84XEACgkQ9CaO5/Lv0PDHoACeLrDXPbfkqeLBoaIy8My8gmGA
ZgwAniWtkEP3WSk47Mxjg36flndbbJ0U
=Abus
-END PGP SIGNATURE-

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



Windows Path Not Found for urandom

2012-08-28 Thread Jeffrey Janner
 apologize for the lack of details in advance, but I don't have the specifics 
yet.

I have a customer that is using Tomcat (6.0.33?) on Windows and are monitoring 
the process with SysInternals Process Monitor.
About every 5 seconds, they are seeing Tomcat.exe generate a Path Not Found 
error on a QueryOpen operation for the path D:\dev\urandom with a duration of 
around 0.2.
Since the path contains urandom, I assume it has something to do with the SSL 
routines.
If they followed our standard install instructions, they should be using Tomcat 
6.0.33 with the native/APR libraries that come with the installer.

I'm thinking it's nothing to worry about.
__

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


Re: Issue starting catalina.sh on Windows for tomcat 7 version

2012-08-28 Thread Mark Eggers

On 8/28/2012 2:39 AM, irfan pasha wrote:

Hi,

I have installed tomcat 7.0.29 on windows7. I have download .tar.gz
file from http://tomcat.apache.org/download-70.cgi.

My bash and the console both are in same machine. I have installed MKS
tool kit that enables me to run bash on Windows.

Let me know if you need more information.

Regards,
Irfan




On Tue, Aug 28, 2012 at 2:25 PM, André Warnier a...@ice-sa.com wrote:

irfan pasha wrote:


Hi,

I have recently installed tomcat7 version and tried to start
catalina.sh from my bash on my windows machine after setting the JAVA
path.



The above is a bit confusing (and incomplete).  On which machine with which
OS is which precise (7.x.y) version of Tomcat installed, and where did you
get this Tomcat from ?
And which machine has a bash and where is that console running ?




I get the following error when i start in my console

Exception in thread main java.lang.NoClassDefFoundError:
org/apache/catalina/s
tartup/Bootstrap
Caused by: java.lang.ClassNotFoundException:
org.apache.catalina.startup.Bootstr
ap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: org.apache.catalina.startup.Bootstrap.
Program w
ill exit.

It was working fine for earlier versions of tomcat.

Any help is appreciated.


Irfan,

Why not download the appropriate zip file? This way you get the native 
dll as a bonus (plus other stuff) so you can use the APR connector if 
you wish.


I just did the following for 7.0.29, which works fine. I'm using Cygwin 
on Windows 7 64 bit.


1. Download the windows zip file
2. Unzip it in the bash shell
3. cd to apache-tomcat-7.0.29/bin
4. chmod 755 *.sh
5. ./catatlina.sh start

Works fine.

I normally use startup.sh and shutdown.sh when I launch from Cygwin. I 
also have a setenv.sh script that enables JMX, sets a Derby database 
home, and a default log4j home for applications I test.


All works as expected.

My JRE_HOME and JAVA_HOME are set as follows:

JRE_HOME = C:\Program Files\Java\jre7
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_05

I also use the .bat files to launch Tomcat from Windows Explorer, and 
NetBeans uses the .bat files (on Windows, .sh obviously on Linux) to 
manage the Tomcat instances.


I find it a little easier to control which JRE I use to run Tomcat with 
when I'm running it from a bash shell (or NetBeans, which has a Platform 
option) than with a DOS command shell.


I suppose I could use the .tar.gz download, but it's useful to test APR 
connectors as well so I use the .zip download.


. . . . just my two cents.
/mde/

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



Re: How-to-achieve-url-maxtry-filter-in-apache-tomcat

2012-08-28 Thread Pid *
On 28 Aug 2012, at 05:00, rathinasamy@snovabits.net
rathinasamy@snovabits.net wrote:

 No It can't be responsible for removing the url, since the url path will
 not come through my application it is directly hitting the tomcat port.

That makes no sense.
If it's your app then you can intercept it and do as you please.


 I deployed my application as a war file in server  through that app
 created a folder in:

 tomcat_server_home/webapps/root/club/dely/ios/..

Do you mean root or ROOT?


 So how can I control it through app, My app's work is to generate a
 folder like structure in tomcat home path  build the url  return the
 url to user.

By adding a Servlet Filter with a path that maps to the same URL space
as the resource URLs.

If the Filter has access to the URL and counter, again as previously
described, then it can pass requests through transparently, increment
the counter and then refuse access by returning a 404 instead of a
response after the expiry time or counter is exceeded.

Look at the Tomcat examples and read the Servlet Spec - don't just
rely on Google and people on the list doing your work for you if you
want to understand this.


p


 On 8/27/2012 6:38 PM, Pid wrote:
 On 27/08/2012 08:17, rathinasamy@snovabits.net wrote:
 Hi,

 Many thanks for your reply.

 I am asking something which should be done in apache tomcat configurations, 
 Since I have not able to control that maxtry concept through my application
 (it is out of my app control)
 There's no Tomcat or Servlet config to do this.

 Through my app just generate a url to access a video file at run time,  
 may be the user can copy that url and paste it in outside browsers - here I 
 have to control
 the usage of using my url which I have given to the user.
 If your app is generating the URL, why can't it also be responsible for
 removing it?

 That url is something looks like 
 (http://localhost:8080/Club/dely/ios/item/42/23/cc.mp4)  it should 
 accessed via apache tomcat, so I am asking here for anyway to
 expire the url path in apache tomcat using filters

 like:

  init-param
 param-nameExpiresByType image/param-name
 param-valueaccess plus 2 minutes/param-value
  /init-param
  init-param

 But it expires image  after 2 minutes, I need to expires some url pattern 
 after 2 access.

 Thank you again for spending your time in this.
 Write a filter that blocks that URL after 3 accesses or 2 minutes
 (perhaps using the suggestion by Joseph).


 p


 Regards,
 Rathinasamy.


 On 8/27/2012 12:34 PM, Joseph wrote:
 Have u tried to use regex to filter URL ,use concurrent hash map and 
 atomic int to count?

 在 2012-8-27,13:30,rathinasamy@snovabits.net 
 rathinasamy@snovabits.net 写道:

 Hi everyone,

 Please give me some ideas to achieve maxtry concept.

 I want to destroy the url path after some amount of access.

 For eg., if I give maxtry = 2 for the run time generated url 
 (http://localhost:8080/Club/dely/ios/item/42/23/cc.mp4), After the two 
 times access of the above url for the third time that url path will not 
 be able to access for anyone.

 _My environment is:_

 Apache-tomcat-7.0.25*
 *Windows 7
 32 bit Operating system

 How to achieve this using apache filter?

 Thanks in advance,
 Rathinasamy.
 -
 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




 -
 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: Custom Header Fields are Missing after SiteMinder Redirect (UNCLASSIFIED)

2012-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John,

On 8/27/12 7:25 PM, Lowman, John Mr CTR USA AMC wrote:
 I hope someone out there has some insight regarding the problem
 that I'm about to describe. All custom request header fields that
 are added via the SiteMinder policy server are being stripped
 (intentionally or accidentally) from the request header after
 passing through the Apache Tomcat isapi_redirect.dll ISAPI
 filter.
 
 We have a website running on IIS and ColdFusion 10 that is
 protected using SiteMinder. When a web request comes in, SiteMinder
 intercepts the request and performs a HTTP 302 redirect to the
 policy servers for authentication. After successful authentication,
 the policy server adds some custom fields, such as userid and
 mail, to the request header and fires it back to our web server.

When you say fires it back ... how does it do that? Is it proxying
or doing another redirect (which sounds like it wouldn't work).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA87iIACgkQ9CaO5/Lv0PCzBQCfUDdZV0png3PzwWoba5ZognXt
Cp8AoLm+WYPFKNMthpEw4lWibyyAdjQ6
=YM3y
-END PGP SIGNATURE-

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



Re: Initial memory pool field is left empty

2012-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ruud,

On 8/28/12 11:34 AM, Ruud Boekenoogen wrote:
 We are running a business objects application in Apache tomcat
 5.5..20 and it seems to give errors from time to time. This result
 is that application no longer being available.

What errors do you actually get?

 The application runs in java. The apache tomcat service runs in the
 tray of a windows 2003 server with sp2. When I look at the
 properties of the Apache Tomcat service and go to the Java tab I
 noticed that the Initial memory pool field seems to be empty.

That probably means that you are getting the default minimum heap
size, which depends a lot of your environment.

 We have a similar application running on another server , that is
 not experiencing these errors, and the Initial memory pool field
 of that application is set at 254 mb. Could it be that not defining
 a value for the Initial memory pool field can cause errors memory
 problems in java apps?
 
 What exactly does the Initial memory pool field do?

It sets the initial heap size and shouldn't really be able to
adversely affect your application -- other than to decrease
performance as the heap is re-sized as necessary.

Without knowing what kinds of errors you are getting, we really can't
help.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA87zcACgkQ9CaO5/Lv0PAOsgCfeAuyYEOf+Cq6a/c8frncP0yc
hkIAni2tYfv5MP9uzoyUHuFwL4IzswSl
=wcCZ
-END PGP SIGNATURE-

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



Re: Unable to change version of Apache Tomcat

2012-08-28 Thread John Byrne
We call a script that sets variables (See below) and then this script calls 
...tomcat/startup.sh 
(See below)


John Byrne
System Administrator, IST
john_by...@apple.com



AppName=Service
INST=$1
export SPLUNK_ACCESS_LOGS=/ngs/app/`whoami`/var/`hostname`/accessLogs/$AppName
export CATALINA_LOGS=/ngs/app/`whoami`/var/log/$AppName

if [ $INST ==  ]; then
echo assuming you meant instance 1 since none was given
INST=1
fi

if [ $INST == 1 ]; then
export CATALINA_BASE_PORT=7802
export CATALINA_SHUTDOWN_PORT=7804
export JAVA_OPTS=-Xms1024m -Xmx2048m -XX:MaxPermSize=1024m 
-Dport.http.nonssl=$CATALINA_BASE_PORT 
-Dport.http.shutdown=$CATALINA_SHUTDOWN_PORT -Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=5802 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false -Denv=qa -Duser.timezone=GMT 
-Dfile.encoding=UTF-8 -Dorg.apache.cocoon.mode=qa 
-Dtangosol.coherence.cacheconfig=$CATALINA_BASE/conf/coherence-cache-config.xml 
-Dsplunk.accesslogs=$SPLUNK_ACCESS_LOGS -DAppName=$AppName
fi
export CATALINA_BASE=/ngs/app/`whoami`/Tomcat/$AppName
export CATALINA_PID=$CATALINA_BASE/tomcat_$CATALINA_BASE_PORT.pid
export 
CATALINA_OUT=$CATALINA_BASE/logs/catalina_${AppName}_$CATALINA_BASE_PORT.out
export JAVA_HOME=/ngs/app/`whoami`/java_home
/ngs/app/`whoami`/Tomcat/tomcat/bin/startup.sh



On Aug 27, 2012, at 8:49 PM, Igor Cicimov wrote:

 On Aug 28, 2012 1:39 PM, John Byrne john_by...@apple.com wrote:
 
 Hello all,
 
 I'm trying to upgrade to 7.0.29 from 7.0.8 and I've switched the soft
 link under Tomcat/ (our setup).  However, this is not upgrading the server.
 I've looked for environment variables but can't find any that would seem
 to point to the old version. (see environment variables set below)
 
 I was wondering whether there is a way to tell what version is in the jar
 files.  I've expanded StandardEngine.class in catalina.jar and tried
 strings and that didn't work.
 
 By the way...
 I know it's still 7.0.8 when I look at the catalina out file:
 .
 .
 .
 Aug 28, 2012 3:26:31 AM org.apache.catalina.core.StandardEngine
 startInternal
 INFO: Starting Servlet Engine: Apache Tomcat/7.0.8
 .
 .
 .
 
 Thank you for any help.
 
 John Byrne
 System Administrator, IST
 john_by...@apple.com
 
 
 
 -
 environment variables below
 -
 BASH=/bin/sh
 BASH_ARGC=()
 BASH_ARGV=()
 BASH_LINENO=([0]=0)
 BASH_SOURCE=([0]=/ngs/app/oto2t/Tomcat/tomcat/bin/startup.sh)
 BASH_VERSINFO=([0]=3 [1]=2 [2]=25 [3]=1 [4]=release
 [5]=x86_64-redhat-linux-gnu)
 BASH_VERSION='3.2.25(1)-release'
 CATALINA_BASE=/ngs/app/oto2t/Tomcat/Service
 CATALINA_BASE_PORT=7802
 CATALINA_LOGS=/ngs/app/oto2t/var/log/Service
 CATALINA_OUT=/ngs/app/oto2t/Tomcat/Service/logs/catalina_Service_7802.out
 CATALINA_PID=/ngs/app/oto2t/Tomcat/Service/tomcat_7802.pid
 CATALINA_SHUTDOWN_PORT=7804
 DIRSTACK=()
 EUID=9674
 EXECUTABLE=catalina.sh
 GROUPS=()
 G_BROKEN_FILENAMES=1
 HISTSIZE=1000
 HOME=/ngs/app/oto2t
 HOSTNAME=roadfever.corp.apple.com
 HOSTTYPE=x86_64
 IFS='
 '
 INPUTRC=/etc/inputrc
 JAVA_HOME=/ngs/app/oto2t/java_home
 JAVA_OPTS='-Xms1024m -Xmx2048m -XX:MaxPermSize=1024m
 -Dport.http.nonssl=7802 -Dport.http.shutdown=7804
 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=5802
 -Dcom.sun.management.jmxremote.ssl=false
 -Dcom.sun.management.jmxremote.authenticate=false -Denv=qa
 -Duser.timezone=GMT -Dfile.encoding=UTF-8 -Dorg.apache.cocoon.mode=qa
 -Dtangosol.coherence.cacheconfig=/conf/coherence-cache-config.xml
 -Dsplunk.accesslogs=/ngs/app/oto2t/var/
 roadfever.corp.apple.com/accessLogs/Service -DAppName=Service'
 LANG=en_US.UTF-8
 LESSOPEN='|/usr/bin/lesspipe.sh %s'
 LOGNAME=oto2t
 LS_COLORS=
 MACHTYPE=x86_64-redhat-linux-gnu
 MAIL=/var/spool/mail/oto2t
 OPTERR=1
 OPTIND=1
 OSTYPE=linux-gnu
 
 PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/java/jdk1.6.0_19/bin
 PIPESTATUS=([0]=0)
 POSIXLY_CORRECT=y
 PPID=3524
 PRG=/ngs/app/oto2t/Tomcat/tomcat/bin/startup.sh
 PRGDIR=/ngs/app/oto2t/Tomcat/tomcat/bin
 PS4='+ '
 PWD=/ngs/app/oto2t/Tomcat/bin
 SHELL=/bin/bash
 SHELLOPTS=braceexpand:hashall:interactive-comments:posix
 SHLVL=3
 SPLUNK_ACCESS_LOGS=/ngs/app/oto2t/var/
 roadfever.corp.apple.com/accessLogs/Service
 TERM=xterm-256color
 TMOUT=900
 UID=9674
 USER=oto2t
 _=-
 os400=false
 Using CATALINA_BASE:   /ngs/app/oto2t/Tomcat/Service
 Using CATALINA_HOME:   /ngs/app/oto2t/Tomcat/tomcat
 Using CATALINA_TMPDIR: /ngs/app/oto2t/Tomcat/Service/temp
 Using JRE_HOME:/ngs/app/oto2t/java_home
 Using CLASSPATH:
 /ngs/app/oto2t/Tomcat/tomcat/bin/bootstrap.jar:/ngs/app/oto2t/Tomcat/tomcat/bin/tomcat-juli.jar
 Using CATALINA_PID:/ngs/app/oto2t/Tomcat/Service/tomcat_7802.pid
 Existing PID file found during start.
 Removing/clearing stale PID file.
 
 And you are starting the server how?



Re: Unable to change version of Apache Tomcat

2012-08-28 Thread John Byrne
I figured it out.  It was a library issue.

Thank you for your help.


John Byrne
System Administrator, IST
john_by...@apple.com




On Aug 28, 2012, at 9:42 AM, John Byrne wrote:

 We call a script that sets variables (See below) and then this script calls 
 ...tomcat/startup.sh 
 (See below)
 
 
 John Byrne
 System Administrator, IST
 john_by...@apple.com
 
 
 
 AppName=Service
 INST=$1
 export SPLUNK_ACCESS_LOGS=/ngs/app/`whoami`/var/`hostname`/accessLogs/$AppName
 export CATALINA_LOGS=/ngs/app/`whoami`/var/log/$AppName
 
 if [ $INST ==  ]; then
   echo assuming you meant instance 1 since none was given
   INST=1
 fi
 
 if [ $INST == 1 ]; then
 export CATALINA_BASE_PORT=7802
 export CATALINA_SHUTDOWN_PORT=7804
 export JAVA_OPTS=-Xms1024m -Xmx2048m -XX:MaxPermSize=1024m 
 -Dport.http.nonssl=$CATALINA_BASE_PORT 
 -Dport.http.shutdown=$CATALINA_SHUTDOWN_PORT -Dcom.sun.management.jmxremote 
 -Dcom.sun.management.jmxremote.port=5802 
 -Dcom.sun.management.jmxremote.ssl=false 
 -Dcom.sun.management.jmxremote.authenticate=false -Denv=qa 
 -Duser.timezone=GMT -Dfile.encoding=UTF-8 -Dorg.apache.cocoon.mode=qa 
 -Dtangosol.coherence.cacheconfig=$CATALINA_BASE/conf/coherence-cache-config.xml
  -Dsplunk.accesslogs=$SPLUNK_ACCESS_LOGS -DAppName=$AppName
 fi
 export CATALINA_BASE=/ngs/app/`whoami`/Tomcat/$AppName
 export CATALINA_PID=$CATALINA_BASE/tomcat_$CATALINA_BASE_PORT.pid
 export 
 CATALINA_OUT=$CATALINA_BASE/logs/catalina_${AppName}_$CATALINA_BASE_PORT.out
 export JAVA_HOME=/ngs/app/`whoami`/java_home
 /ngs/app/`whoami`/Tomcat/tomcat/bin/startup.sh
 
 
 
 On Aug 27, 2012, at 8:49 PM, Igor Cicimov wrote:
 
 On Aug 28, 2012 1:39 PM, John Byrne john_by...@apple.com wrote:
 
 Hello all,
 
 I'm trying to upgrade to 7.0.29 from 7.0.8 and I've switched the soft
 link under Tomcat/ (our setup).  However, this is not upgrading the server.
 I've looked for environment variables but can't find any that would seem
 to point to the old version. (see environment variables set below)
 
 I was wondering whether there is a way to tell what version is in the jar
 files.  I've expanded StandardEngine.class in catalina.jar and tried
 strings and that didn't work.
 
 By the way...
 I know it's still 7.0.8 when I look at the catalina out file:
 .
 .
 .
 Aug 28, 2012 3:26:31 AM org.apache.catalina.core.StandardEngine
 startInternal
 INFO: Starting Servlet Engine: Apache Tomcat/7.0.8
 .
 .
 .
 
 Thank you for any help.
 
 John Byrne
 System Administrator, IST
 john_by...@apple.com
 
 
 
 -
 environment variables below
 -
 BASH=/bin/sh
 BASH_ARGC=()
 BASH_ARGV=()
 BASH_LINENO=([0]=0)
 BASH_SOURCE=([0]=/ngs/app/oto2t/Tomcat/tomcat/bin/startup.sh)
 BASH_VERSINFO=([0]=3 [1]=2 [2]=25 [3]=1 [4]=release
 [5]=x86_64-redhat-linux-gnu)
 BASH_VERSION='3.2.25(1)-release'
 CATALINA_BASE=/ngs/app/oto2t/Tomcat/Service
 CATALINA_BASE_PORT=7802
 CATALINA_LOGS=/ngs/app/oto2t/var/log/Service
 CATALINA_OUT=/ngs/app/oto2t/Tomcat/Service/logs/catalina_Service_7802.out
 CATALINA_PID=/ngs/app/oto2t/Tomcat/Service/tomcat_7802.pid
 CATALINA_SHUTDOWN_PORT=7804
 DIRSTACK=()
 EUID=9674
 EXECUTABLE=catalina.sh
 GROUPS=()
 G_BROKEN_FILENAMES=1
 HISTSIZE=1000
 HOME=/ngs/app/oto2t
 HOSTNAME=roadfever.corp.apple.com
 HOSTTYPE=x86_64
 IFS='
 '
 INPUTRC=/etc/inputrc
 JAVA_HOME=/ngs/app/oto2t/java_home
 JAVA_OPTS='-Xms1024m -Xmx2048m -XX:MaxPermSize=1024m
 -Dport.http.nonssl=7802 -Dport.http.shutdown=7804
 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=5802
 -Dcom.sun.management.jmxremote.ssl=false
 -Dcom.sun.management.jmxremote.authenticate=false -Denv=qa
 -Duser.timezone=GMT -Dfile.encoding=UTF-8 -Dorg.apache.cocoon.mode=qa
 -Dtangosol.coherence.cacheconfig=/conf/coherence-cache-config.xml
 -Dsplunk.accesslogs=/ngs/app/oto2t/var/
 roadfever.corp.apple.com/accessLogs/Service -DAppName=Service'
 LANG=en_US.UTF-8
 LESSOPEN='|/usr/bin/lesspipe.sh %s'
 LOGNAME=oto2t
 LS_COLORS=
 MACHTYPE=x86_64-redhat-linux-gnu
 MAIL=/var/spool/mail/oto2t
 OPTERR=1
 OPTIND=1
 OSTYPE=linux-gnu
 
 PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/java/jdk1.6.0_19/bin
 PIPESTATUS=([0]=0)
 POSIXLY_CORRECT=y
 PPID=3524
 PRG=/ngs/app/oto2t/Tomcat/tomcat/bin/startup.sh
 PRGDIR=/ngs/app/oto2t/Tomcat/tomcat/bin
 PS4='+ '
 PWD=/ngs/app/oto2t/Tomcat/bin
 SHELL=/bin/bash
 SHELLOPTS=braceexpand:hashall:interactive-comments:posix
 SHLVL=3
 SPLUNK_ACCESS_LOGS=/ngs/app/oto2t/var/
 roadfever.corp.apple.com/accessLogs/Service
 TERM=xterm-256color
 TMOUT=900
 UID=9674
 USER=oto2t
 _=-
 os400=false
 Using CATALINA_BASE:   /ngs/app/oto2t/Tomcat/Service
 Using CATALINA_HOME:   /ngs/app/oto2t/Tomcat/tomcat
 Using CATALINA_TMPDIR: /ngs/app/oto2t/Tomcat/Service/temp
 Using JRE_HOME:/ngs/app/oto2t/java_home
 Using CLASSPATH:
 /ngs/app/oto2t/Tomcat/tomcat/bin/bootstrap.jar:/ngs/app/oto2t/Tomcat/tomcat/bin/tomcat-juli.jar
 Using CATALINA_PID:

RE: Custom Header Fields are Missing after SiteMinder Redirect (UNCLASSIFIED)

2012-08-28 Thread Lowman, John Mr CTR USA AMC
Classification:  UNCLASSIFIED
Caveats: NONE

Chris,

   It looks to me like the policy server is sending an HTTP request using the 
GET method.

John



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, August 28, 2012 12:13 PM
To: Tomcat Users List
Subject: Re: Custom Header Fields are Missing after SiteMinder Redirect 
(UNCLASSIFIED)

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John,

On 8/27/12 7:25 PM, Lowman, John Mr CTR USA AMC wrote:
 I hope someone out there has some insight regarding the problem that
 I'm about to describe. All custom request header fields that are added
 via the SiteMinder policy server are being stripped (intentionally or
 accidentally) from the request header after passing through the Apache
 Tomcat isapi_redirect.dll ISAPI filter.

 We have a website running on IIS and ColdFusion 10 that is protected
 using SiteMinder. When a web request comes in, SiteMinder intercepts
 the request and performs a HTTP 302 redirect to the policy servers for
 authentication. After successful authentication, the policy server
 adds some custom fields, such as userid and mail, to the request
 header and fires it back to our web server.

When you say fires it back ... how does it do that? Is it proxying or doing 
another redirect (which sounds like it wouldn't work).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA87iIACgkQ9CaO5/Lv0PCzBQCfUDdZV0png3PzwWoba5ZognXt
Cp8AoLm+WYPFKNMthpEw4lWibyyAdjQ6
=YM3y
-END PGP SIGNATURE-

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

Classification:  UNCLASSIFIED
Caveats: NONE



tomcat7-maven-plugin doesn't understand Maven filtering of context files?

2012-08-28 Thread Knute Snortum
If this is the wrong mailing list for tomcat7-maven-plugin, could someone 
direct me to the right place?

I'm developing a Vaadin web app in Eclipse Juno on Windows 7 and I'm using the 
tomcat7-maven-plugin 2.0-beta-1 to help in development by running the app in 
Tomcat inside of the IDE -- or I'm trying.  The error I'm getting is: 

org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean 
definition with name 'dataSource' defined in ServletContext resource 
[/WEB-INF/applicationContext.xml]: Could not resolve placeholder 
'db.driverClassName' in string value [${db.driverClassName}]

applicationContext.xml is my Spring context file.  I have placeholders in it 
to point to the correct database based on Maven profiles and filtering.  So a 
piece of applicationContext.xml looks like this:

bean id=dataSource class=org.apache.commons.dbcp.BasicDataSource 
destroy-method=close
property name=driverClassName value=${db.driverClassName} 
/
property name=url value=${db.url} /
property name=usernamevalue=${db.username} /
property name=passwordvalue=${db.password} /
property name=maxActive   value=10 /
property name=maxIdle value=1 /
/bean

As you can see, Tomcat (or Spring?) is finding the dataSource bean that does 
not have the placeholders replaced yet.

The odd thing is that in the war file and the directory under target that the 
war file is created from, all the place holders have been correctly 
substituted.  I can see them in an editor.  The context file with the 
placeholders is the one still sitting in my development folder.

So my question is, why isn't the Tomcat plugin seeing the context file in the 
war file or folder?  And if it looks in the development folder for the file, 
can Maven filtering work with the plugin?.

Below is part of the messages created by Maven et al in my IDE console.  I've 
left out the clean and testing messages and most of the stacktrace, which I 
think is from Spring anyway:

[INFO] 
[INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ dpt ---
[INFO] auto discovered modules 
[com.catalystitservices.nike.dpt.widgetset.DptWidgetset]
[INFO] com.catalystitservices.nike.dpt.widgetset.DptWidgetset is up to date. 
GWT compilation skipped
[INFO] 
[INFO] --- maven-war-plugin:2.2:war (default-war) @ dpt ---
[INFO] Packaging webapp
[INFO] Assembling webapp [dpt] in [C:\Projects\DPT\target\dpt]
[INFO] Processing war project
[INFO] Copying webapp webResources [C:\Projects\DPT\src/main/webapp/] to 
[C:\Projects\DPT\target\dpt]
[INFO] Copying webapp resources [C:\Projects\DPT\src\main\webapp]
[INFO] Webapp assembled in [1442 msecs]
[INFO] Building war: C:\Projects\DPT\target\dpt.war
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.0-beta-1:exec-war-only (tomcat-run) @ dpt ---
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ dpt ---
[INFO] Installing C:\Projects\DPT\target\dpt.war to 
C:\Users\ksnortum\.m2\repository\com\nike\dpt\dpt\1.1-SNAPSHOT\dpt-1.1-SNAPSHOT.war
[INFO] Installing C:\Projects\DPT\pom.xml to 
C:\Users\ksnortum\.m2\repository\com\nike\dpt\dpt\1.1-SNAPSHOT\dpt-1.1-SNAPSHOT.pom
[INFO] Installing C:\Projects\DPT\target\dpt-1.1-SNAPSHOT-war-exec.jar to 
C:\Users\ksnortum\.m2\repository\com\nike\dpt\dpt\1.1-SNAPSHOT\dpt-1.1-SNAPSHOT-exec-war.jar
[INFO] 
[INFO]  tomcat-maven-plugin:1.1:run (default-cli) @ dpt 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ dpt ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ dpt ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO]  tomcat-maven-plugin:1.1:run (default-cli) @ dpt 
[INFO] 
[INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ dpt ---
[INFO] Running war on http://localhost:8080/dpt
[INFO] Creating Tomcat server configuration at C:\Projects\DPT\target\tomcat
Aug 28, 2012 10:13:59 AM org.apache.catalina.startup.Embedded start
INFO: Starting tomcat server
Aug 28, 2012 10:14:00 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Aug 28, 2012 10:14:00 AM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'webapp.root' = 
[C:\Projects\DPT\src\main\webapp\]
Aug 28, 2012 10:14:00 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [classpath:log4j.properties]
Aug 28, 2012 10:14:00 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
28.08.2012 10:14:00 INFO  (ContextLoader.java:272) - Root 
WebApplicationContext: initialization started
28.08.2012 10:14:00 INFO  (AbstractApplicationContext.java:500) - Refreshing 
Root WebApplicationContext: startup date [Tue Aug 28 

Re: tomcat7-maven-plugin doesn't understand Maven filtering of context files?

2012-08-28 Thread Konstantin Kolinko
2012/8/28 Knute Snortum ksnor...@catalystitservices.com:
 If this is the wrong mailing list for tomcat7-maven-plugin, could someone 
 direct me to the right place?

Yes, this is the list.

 I'm developing a Vaadin web app in Eclipse Juno on Windows 7 and I'm using 
 the tomcat7-maven-plugin 2.0-beta-1 to help in development by running the app 
 in Tomcat inside of the IDE -- or I'm trying.  The error I'm getting is:

 org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean 
 definition with name 'dataSource' defined in ServletContext resource 
 [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 
 'db.driverClassName' in string value [${db.driverClassName}]

 applicationContext.xml is my Spring context file.  I have placeholders in 
 it to point to the correct database based on Maven profiles and filtering.  
 So a piece of applicationContext.xml looks like this:

 bean id=dataSource class=org.apache.commons.dbcp.BasicDataSource 
 destroy-method=close
 property name=driverClassName 
 value=${db.driverClassName} /
 property name=url value=${db.url} /
 property name=usernamevalue=${db.username} /
 property name=passwordvalue=${db.password} /
 property name=maxActive   value=10 /
 property name=maxIdle value=1 /
 /bean

 As you can see, Tomcat (or Spring?) is finding the dataSource bean that does 
 not have the placeholders replaced yet.

Usually it is Spring job to resolve those.
 (It has nothing to to with Tomcat or Maven).

See org.springframework.beans.factory.config.PropertyPlaceholderConfigurer


 The odd thing is that in the war file and the directory under target that the 
 war file is created from, all the place holders have been correctly 
 substituted.  I can see them in an editor.  The context file with the 
 placeholders is the one still sitting in my development folder.

 So my question is, why isn't the Tomcat plugin seeing the context file in the 
 war file or folder?  And if it looks in the development folder for the file, 
 can Maven filtering work with the plugin?.

 Below is part of the messages created by Maven et al in my IDE console.  I've 
 left out the clean and testing messages and most of the stacktrace, which I 
 think is from Spring anyway:

 (...)
 28.08.2012 10:14:01 ERROR (ContextLoader.java:307) - Context initialization 
 failed
 org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean 
 definition with name 'dataSource' defined in ServletContext resource 
 [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 
 'db.driverClassName' in string value [${db.driverClassName}]


Best regards,
Konstantin Kolinko

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



Re: getRealPath returns null

2012-08-28 Thread Mark Eggers

Comments inline with  COMMENT 

On 8/28/2012 8:19 AM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

On 8/27/12 6:07 PM, Mark Eggers wrote:

On 8/27/2012 1:24 PM, Christopher Schultz wrote:


Hmm... that's ... not supposed to happen. The AppContext
leak-prevention has been in Tomcat since back in 2009. Can you
confirm that the JreMemoryLeakProtectionListener is actually
being loaded?


A heap dump (jvisualvm) on the following environments show one
instance of the class being loaded.

That's good!


1. Windows 7, JRE 1.7.0_05, Tomcat 6.0.35 2. Windows 7, JRE
1.7.0_05, Tomcat 7.0.27 3. Windows 7, JRE 1.6.0_32, Tomcat 6.0.35
4. Windows 7, JRE 1.6.0_32, Tomcat 7.0.27 5. CentOS 6.3, JRE
1.6.0_32, Tomcat 6.0.35, -Djava.awt.headless=true this is actually
running X Windows though 6. CentOS 5.8, JRE 1.6.0_32, Tomcat
6.0.35, -Djava.awt.headless=true not running X Windows (dump via
jmap)

Hmm - looking at Tomcat 6.0.35 on the CentOS 5.8 system, I see the
following when looking at the instance of
JreMemoryProtectionListener.

appContextProtection (Z) : true awtThreadProtection (Z) : true

appContextProtection=true is the default and awtThreadProtection=true
is*not*  the default. I would say that this is the proper
configuration for what you are trying to solve. In that case, can you
check the ClassLoader used for the AppContext and AWT threads?

 COMMENT 

Interesting thought. So you suspect that even with the 
JreMemoryLeakPreventionListener loaded, it's not taking care of the 
AppContext?


I just took a look at one of my heap dumps.

AppContext has one instance loaded. The contextClassLoader field is set 
to Launcher$AppClassLoader, which is what you would expect.


EventQueue has one instance loaded. The contextClassLoader field is set 
to Launcher$AppClassLoader, which is what you would expect.


 COMMENT 



And I do have the attribute set to manage the AWT thread (at least
on the Tomcat I dumped).

On the Windows (Tomcat 6.0.35, JRE 1.6.0_32), I see the following:

appContextProtection (Z) : true awtThreadProtection (Z) : false
classesToInitialize (L) : null driverManagerProtection (Z) :
true gcDaemonProtection (Z) : true ldapPoolProtection (Z) : true
securityLoginConfigurationProtection (Z) : true
securityPolicyProtection (Z) : true tokenPollerProtection (Z) :
true urlCacheProtection (Z) : true xmlParsingProtection (Z) : true

which is what I expect from server.xml.

So the server.xml has awtThreadProtection=false (or just uses the
default)?


Commenting out the listener (actually it doesn't matter either way
since I'm running in a windowed environment) and adding the AWT
Event thread protection produces on Windows:

appContextProtection (Z) : true awtThreadProtection (Z) : true
classesToInitialize (L) : null driverManagerProtection (Z) :
true gcDaemonProtection (Z) : true ldapPoolProtection (Z) : true
securityLoginConfigurationProtection (Z) : true
securityPolicyProtection (Z) : true tokenPollerProtection (Z) :
true urlCacheProtection (Z) : true xmlParsingProtection (Z) : true

If you comment-out the listener, they why is the class loaded at all?
Are you sure everything in your environment is sane?


 COMMENT 

Sorry, this is probably one of the few times I was less than careful 
with my writing. I meant to say that I removed the listener with the 
attribute (AWTThreadProtection=true) and used the default configuration.


I actually have both in server.xml. I just comment out whichever one I'm 
not testing at the moment.


Hopefully that's a bit clearer :-p.

 COMMENT 

And I still see the exact same permgen memory leak upon unloading
the application.

The problem looks to be in an internal use of MediaTracker. I
suspect that the library uses this to speed image recovery should
there be repeated calls.

IIRC MediaTracker is a concurrent component that loads stuff (like
images) in the background and sends update-events to interested
components. Perhaps there is yet another thread that needs to be
managed on top of the AWT thread. Can you take a thread dump and
possibly indicate the ClassLoader for each thread?


 COMMENT 

I'll go poke around the heap dump and see what I find. Possibly look at 
each thread and find the classloader ? Sigh, that's a pain.


I'll also do a thread dump while the application is running to see if 
any strange threads appear.


My immediate guess (from reading the AWT model) is that there will not 
be another thread.


 COMMENT 

Unfortunately, these images are dynamically generated, so any use
of MediaTracker is pretty worthless in this use case.

I've found that use of the MediaTracker is entirely worthless except
when using GUIs that need to display images within components (like
buttons, etc.). Anyone using MediaTracker in a client-side library is
making a mistake (that is, your 3rd-party library is either not
targeted towards a server-side application, or the devs don't know
what they 

RE: tomcat7-maven-plugin doesn't understand Maven filtering of context files?

2012-08-28 Thread Knute Snortum


 -Original Message-
 From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
 Sent: Tuesday, August 28, 2012 11:15 AM
 To: Tomcat Users List
 Subject: Re: tomcat7-maven-plugin doesn't understand Maven filtering of
 context files?
 
 2012/8/28 Knute Snortum ksnor...@catalystitservices.com:
  If this is the wrong mailing list for tomcat7-maven-plugin, could
 someone direct me to the right place?
 
 Yes, this is the list.

Thanks

  I'm developing a Vaadin web app in Eclipse Juno on Windows 7 and I'm
 using the tomcat7-maven-plugin 2.0-beta-1 to help in development by
 running the app in Tomcat inside of the IDE -- or I'm trying.  The error
 I'm getting is:
 
  org.springframework.beans.factory.BeanDefinitionStoreException:
 Invalid bean definition with name 'dataSource' defined in ServletContext
 resource [/WEB-INF/applicationContext.xml]: Could not resolve
 placeholder 'db.driverClassName' in string value [${db.driverClassName}]
 
  applicationContext.xml is my Spring context file.  I have
 placeholders in it to point to the correct database based on Maven
 profiles and filtering.  So a piece of applicationContext.xml looks like
 this:
 
  bean id=dataSource
 class=org.apache.commons.dbcp.BasicDataSource destroy-method=close
  property name=driverClassName
 value=${db.driverClassName} /
  property name=url value=${db.url} /
  property name=username
 value=${db.username} /
  property name=password
 value=${db.password} /
  property name=maxActive   value=10 /
  property name=maxIdle value=1 /
  /bean
 
  As you can see, Tomcat (or Spring?) is finding the dataSource bean
 that does not have the placeholders replaced yet.
 
 Usually it is Spring job to resolve those.
  (It has nothing to to with Tomcat or Maven).
 
 See
 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

Well, I'm using Maven filtering, but regardless, I thought the whole point of 
the tomcat7-maven-plugin was to run the *war* file, not the development 
(project) files.  If it doesn't, it's useless to me.  Or maybe I should ask, 
How does one run the war file created with mvn clean install in the IDE 
(Eclipse)?

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



Re: tomcat7-maven-plugin doesn't understand Maven filtering of context files?

2012-08-28 Thread Konstantin Kolinko
2012/8/28 Knute Snortum ksnor...@catalystitservices.com:
 
  applicationContext.xml is my Spring context file.  I have
 placeholders in it to point to the correct database based on Maven
 profiles and filtering.  So a piece of applicationContext.xml looks like
 this:
 
  bean id=dataSource
 class=org.apache.commons.dbcp.BasicDataSource destroy-method=close
  property name=driverClassName
 value=${db.driverClassName} /
  property name=url value=${db.url} /
  property name=username
 value=${db.username} /
  property name=password
 value=${db.password} /
  property name=maxActive   value=10 /
  property name=maxIdle value=1 /
  /bean
 
  As you can see, Tomcat (or Spring?) is finding the dataSource bean
 that does not have the placeholders replaced yet.

 Usually it is Spring job to resolve those.
  (It has nothing to to with Tomcat or Maven).

 See
 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

 Well, I'm using Maven filtering, but regardless, I thought the whole point of 
 the tomcat7-maven-plugin was to run the *war* file, not the development 
 (project) files.

Your question was about applicationContext.xml. That is an essential
part of a Spring web application. It is not just a project file.
Now you are changing the topic...

Tomcat knows nothing about Spring, and context has different meaning
in Tomcat (referring to the META-INF/context.xml file in a web
application, see Tomcat Configuration Reference in Tomcat 7
documentation).

If you need apply filtering to your data file (that
applicationContext.xml one), shouldn't you configure so explicitly
somewhere?

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



Re: getRealPath returns null

2012-08-28 Thread Mark Eggers

On 8/28/2012 11:39 AM, Mark Eggers wrote:

 COMMENT 

Well, fantastic isn't quite the word I'd use . . . .

I wonder what would happen if I used the classesToInitialize attribute
of the JreMemoryLeakPreventionListner, and gave it java.awt.MediaTracker?



Just to update - same memory leak as shown by VisualVM. In retrospect 
this is reasonable, since concrete implementations of the Image class 
retain references as to how they're loaded.


Only an Image.flush() releases these resources.

Since I don't have access to those resources, I cannot execute the method.

. . . . rats
/mde/

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



Re: Custom Header Fields are Missing after SiteMinder Redirect (UNCLASSIFIED)

2012-08-28 Thread Rainer Jung

Hi John,

On 28.08.2012 01:25, Lowman, John Mr CTR USA AMC wrote:

I hope someone out there has some insight regarding the problem that I'm about to 
describe.  All custom request header fields that are added via the SiteMinder policy 
server are being stripped (intentionally or accidentally) from the request header after 
passing through the Apache Tomcat isapi_redirect.dll ISAPI filter.


Can you give an example of such a header, i.e. its name and a typical value?

You might want to check

https://issues.apache.org/bugzilla/show_bug.cgi?id=47679

though it should be fixed in 1.2.32.

If you increase the redirector log level to debug, you will get 
additional output of the form:


Forwarding request header HEADER_NAME : HEADER_VALUE

for each header.


We have a website running on IIS and ColdFusion 10 that is protected using SiteMinder.  When a 
web request comes in, SiteMinder intercepts the request and performs a HTTP 302 redirect to the 
policy servers for authentication.  After successful authentication, the policy server adds some 
custom fields, such as userid and mail, to the request header and fires it 
back to our web server.  When using an ASP script below, I can see that these custom header fields 
appear in IIS, so I have proof that they are arriving intact in the header.  However, the problem 
is that the custom request header fields get stripped out when viewing a ColdFusion page, which 
goes through the Apache Tomcat ISAPI filter.


As Chris already asked: we need to understand the communication between 
Client/Browser, SiteMinder and your IIS/Redirector


Client - IIS (HTTP Request)

Now ?? SiteMinder ??? (what does intercept mean)?
Then ?? Fire Back ??

I suggest a quick check against the debug log first.


Here is the showheaders.asp page that I used to view the custom header 
fields:

--- BEGIN showheaders.asp ---

...


 %
 ' Iterate through the server variables collection and display each 
header along with its value
 for each header in Request.ServerVariables
 response.write header   =   Request.ServerVariables(header)
brbr 
 next
 %

...


--- END showheaders.asp ---

Here is the showheaders.cfm page that I used to view the custom header fields:

--- BEGIN showheaders.cfm ---

...


 cfoutputALL_HTTP = #cgi.ALL_HTTP#/cfoutput


See below


 cfdump var=#cgi# label=cgi expand=yes /
 cfdump var=#getHTTPRequestData()# /

...


--- END showheaders.cfm ---

The missing headers problem started after upgrading our server from ColdFusion MX 7 
to ColdFusion 10.  ColdFusion MX 7 ran on JRun; ColdFusion 10 runs on a modified version 
of Apache Tomcat.  I suspect that the header fields are being stripped out by the ISAPI 
filter, because the custom fields are missing whether I use ColdFusion's built-in 
getHTTPRequestData() function, or from a Java equivalent on the ColdFusion 
page.

--- BEGIN GetCredentialsFromHeader() ---

...


 cfset pageRequest = getPageContext().getRequest() /
 cfset pageRequestHeaderNames = pageRequest.getHeaderNames() /
 cfloop condition=#pageRequestHeaderNames.hasMoreElements()#
 cfset thisName = pageRequestHeaderNames.nextElement() /
 cfoutput
 #thisName#='#pageRequest.getHeader(thisName)#'br /
 /cfoutput
 /cfloop
 cfdump var=#pageRequest# label=Java Page Request /

 !--- This is the ColdFusion way of getting request headers. ---
 cfdump var=#GetHTTPRequestData()# label=HTTP Request Headers /

 cfabort /
/cffunction
--- END GetCredentialsFromHeader() ---

Another quirk that I noticed is that the ALL_HTTP CGI field exists after 
passing through the ISAPI filter, but it's blank.  In contrast, the ALL_HTTP field is 
populated when viewing in IIS via the ASP script.


Since CGI does more unwanted things to the HTTP headers (replacing 
underscores with dashes, lowercasing names etc.) the ISAPI redirector 
uses ALL_RAW.



Now the specs:

 ColdFusion: version 10,282462
 CF-Tomcat:  N/A (It's integrated into ColdFusion 
10)
 isapi_direct.dll:   version 1.2.32.0
 OS: Windows 2003
 Java:   JDK 1.6.0_33
 VM Version: 20.8-b03
 IIS:6

I can't think of anything else at the moment.  If anyone knows what's 
causing this, please help me.  I'd be very grateful.


Regards,

Rainer


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



Re: How-to-achieve-url-maxtry-filter-in-apache-tomcat

2012-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



On 8/28/12 3:18 AM, rathinasamy@snovabits.net wrote:
 Thank you very much André Warnier for your time.
 
 Here I would like to use default webapp/servlet.

- From reading many many posts to this list, modifying the file system
out from under the DefaultServlet tends to cause all kinds of chaos.
You are going to be creating new files (which may lead to 404s if the
DefaultServlet thinks they don't exist) and removing files (which may
invalidate DefaultServlet's cache).

I would highly recommend that you write your own servlet that does
everything, here.

 - add a filter to the default webapp, so that before letting the 
 default servlet return a static file, it will take into account
 some kind of counter Can you give me some examples for how to add a
 filter in default webapp so that the default servlet will take a
 count every time when a click for the url?

You can't count clicks: you can only count requests for a particular
resource.

You will have to write your own code. Attaching a filter to a URL
pattern is trivial: Google for it if you want to know how to configure it.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA9IykACgkQ9CaO5/Lv0PBnJgCfUzJmtJT+dsA1Oj2p8O5i3MgX
KdkAoMIXu0eoZy18DU6Y53RkUPYIZlZI
=fzkW
-END PGP SIGNATURE-

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



Re: Custom Header Fields are Missing after SiteMinder Redirect (UNCLASSIFIED)

2012-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John,

On 8/28/12 2:03 PM, Lowman, John Mr CTR USA AMC wrote:
 It looks to me like the policy server is sending an HTTP request 
 using the GET method.

Can you watch with eg. Wireshark to see if the headers are being
included in that request? If SiteMinder is excluding those headers,
there's nothing Tomcat/ISAPI_redirecter can do about it.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA9K5sACgkQ9CaO5/Lv0PC1nQCeMs2lhJxp52uhYnfoNBq5Y9fZ
UlIAoMOGwP0sLIdE4fvWZGOUGjbuj+r9
=tTgj
-END PGP SIGNATURE-

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




RE: tomcat7-maven-plugin doesn't understand Maven filtering of context files?

2012-08-28 Thread Knute Snortum


 -Original Message-
 From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
 Sent: Tuesday, August 28, 2012 12:02 PM
 To: Tomcat Users List
 Subject: Re: tomcat7-maven-plugin doesn't understand Maven filtering of
 context files?
 
 2012/8/28 Knute Snortum ksnor...@catalystitservices.com:
  
   applicationContext.xml is my Spring context file.  I have
  placeholders in it to point to the correct database based on Maven
  profiles and filtering.  So a piece of applicationContext.xml looks
  like
  this:
  
   bean id=dataSource
  class=org.apache.commons.dbcp.BasicDataSource
  destroy-method=close
   property name=driverClassName
  value=${db.driverClassName} /
   property name=url value=${db.url}
 /
   property name=username
  value=${db.username} /
   property name=password
  value=${db.password} /
   property name=maxActive   value=10 /
   property name=maxIdle value=1 /
   /bean
  
   As you can see, Tomcat (or Spring?) is finding the dataSource bean
  that does not have the placeholders replaced yet.
 
  Usually it is Spring job to resolve those.
   (It has nothing to to with Tomcat or Maven).
 
  See
  org.springframework.beans.factory.config.PropertyPlaceholderConfigure
  r
 
  Well, I'm using Maven filtering, but regardless, I thought the whole
 point of the tomcat7-maven-plugin was to run the *war* file, not the
 development (project) files.
 
 Your question was about applicationContext.xml. That is an essential
 part of a Spring web application. It is not just a project file.
 Now you are changing the topic...

I'm not trying to.  It's the applicationContext.xml file that gets changed by 
Maven filtering, then it gets put into the war file by the tomcat plugin.  I 
want the plugin to run the war run, not the still in the project with the 
placeholders.  That's what I thought it did.
 
 Tomcat knows nothing about Spring, and context has different meaning
 in Tomcat (referring to the META-INF/context.xml file in a web
 application, see Tomcat Configuration Reference in Tomcat 7
 documentation).
 
 If you need apply filtering to your data file (that
 applicationContext.xml one), shouldn't you configure so explicitly
 somewhere?

I do, and it works perfectly.  It creates my context files with the database 
data in them as it should.  These files are built into a war file.  I want the 
Tomcat plugin to run the war file.  

When I manually deploy the war file that is created, it works perfectly.  I 
thought the point of the Tomcat plugin was that I didn't have to manually 
deploy the war file.

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



RE: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

2012-08-28 Thread Dale Ogilvie
-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 

Not quite. My point was the loading of the EL implementation is likely to be 
triggered by user code. If the webapp class loader is the TCCL loader than 
classes from the web app will be loaded before those from the container. If 
the web app contains container classes then it is possible that they get 
loaded from the webapp rather than from Tomcat.
(Enabling the security manager enables additional class loading checks that 
would stop this). Those classes from the webapp then have references held to 
them. They will work right up unto the point Tomcat tries to access the class 
outside of the webapp they were loaded from.

Mark

I'm still not quite sure what you are saying matches exactly what I'm seeing 
Mark. The webapp classloader IS the TCCL loader. No problem at all that the app 
containing the  container classes will load those in preference to the actual 
Tomcat ones. Ok.

However, what I see is this, in time order:

1. App2 (containing container classes) is deployed by TC at TC startup

2. App1 (not containing container classes) is deployed by TC at TC startup

3. A web request is made of App1 to load a JSP that uses EL

4. The vm (-verbose:class) reports class LOAD from app2:

[Loaded javax.el.ExpressionFactory from 
file:/C:/apache-tomcat-7.0.27/lib/el-api.jar]
[Loaded org.apache.jasper.runtime.JspApplicationContextImpl from 
file:/C:/sandpit-28/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/app2/WEB-INF/lib/jsp-2.1-6.1.14.jar]

5. Class cast exception occurs somewhat later

So, it appears to me that the class *loading* is occurring from app1 in step 
4. I'm only pushing this because it kind looks buggy to me.

Dale


Re: Customize from and to address for emails that come from tomcat

2012-08-28 Thread bwedd...@sbcglobal.net
I ended up fixing this at the smtp server.  I added an entry in
/etc/postfix/generic with the undesired address desired address

Re-ran the postmap command and reloaded postfix.

It is somewhat of a hack, but customers won't see a tomcat at
some.local.server.org address.

They now see donot-reply at corporate.com.




--
View this message in context: 
http://tomcat.10.n6.nabble.com/Customize-from-and-to-address-for-emails-that-come-from-tomcat-tp4985625p4985926.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: tomcat7-maven-plugin doesn't understand Maven filtering of context files?

2012-08-28 Thread Olivier Lamy
Hi,
Inline

2012/8/28 Knute Snortum ksnor...@catalystitservices.com:
 If this is the wrong mailing list for tomcat7-maven-plugin, could someone 
 direct me to the right place?

 I'm developing a Vaadin web app in Eclipse Juno on Windows 7 and I'm using 
 the tomcat7-maven-plugin 2.0-beta-1 to help in development by running the app 
 in Tomcat inside of the IDE -- or I'm trying.  The error I'm getting is:

 org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean 
 definition with name 'dataSource' defined in ServletContext resource 
 [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 
 'db.driverClassName' in string value [${db.driverClassName}]

 applicationContext.xml is my Spring context file.  I have placeholders in 
 it to point to the correct database based on Maven profiles and filtering.  
 So a piece of applicationContext.xml looks like this:

 bean id=dataSource class=org.apache.commons.dbcp.BasicDataSource 
 destroy-method=close
 property name=driverClassName 
 value=${db.driverClassName} /
 property name=url value=${db.url} /
 property name=usernamevalue=${db.username} /
 property name=passwordvalue=${db.password} /
 property name=maxActive   value=10 /
 property name=maxIdle value=1 /
 /bean

 As you can see, Tomcat (or Spring?) is finding the dataSource bean that does 
 not have the placeholders replaced yet.

 The odd thing is that in the war file and the directory under target that the 
 war file is created from, all the place holders have been correctly 
 substituted.  I can see them in an editor.  The context file with the 
 placeholders is the one still sitting in my development folder.

 So my question is, why isn't the Tomcat plugin seeing the context file in the 
 war file or folder?  And if it looks in the development folder for the file, 
 can Maven filtering work with the plugin?.

as you are using gwt maven plugin, I'm not sure that works.
Something you can do is using sys properties in tomcat7/6-maven-plugin
(spring placeholder resolves against sys props too).
Add you sys props as it:
http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat6-maven-plugin/examples/add-system-properties.html

 Below is part of the messages created by Maven et al in my IDE console.  I've 
 left out the clean and testing messages and most of the stacktrace, which I 
 think is from Spring anyway:

 [INFO]
 [INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ dpt ---
 [INFO] auto discovered modules 
 [com.catalystitservices.nike.dpt.widgetset.DptWidgetset]
 [INFO] com.catalystitservices.nike.dpt.widgetset.DptWidgetset is up to date. 
 GWT compilation skipped
 [INFO]
 [INFO] --- maven-war-plugin:2.2:war (default-war) @ dpt ---
 [INFO] Packaging webapp
 [INFO] Assembling webapp [dpt] in [C:\Projects\DPT\target\dpt]
 [INFO] Processing war project
 [INFO] Copying webapp webResources [C:\Projects\DPT\src/main/webapp/] to 
 [C:\Projects\DPT\target\dpt]
 [INFO] Copying webapp resources [C:\Projects\DPT\src\main\webapp]
 [INFO] Webapp assembled in [1442 msecs]
 [INFO] Building war: C:\Projects\DPT\target\dpt.war
 [INFO]
 [INFO] --- tomcat7-maven-plugin:2.0-beta-1:exec-war-only (tomcat-run) @ dpt 
 ---
 [INFO]
 [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ dpt ---
 [INFO] Installing C:\Projects\DPT\target\dpt.war to 
 C:\Users\ksnortum\.m2\repository\com\nike\dpt\dpt\1.1-SNAPSHOT\dpt-1.1-SNAPSHOT.war
 [INFO] Installing C:\Projects\DPT\pom.xml to 
 C:\Users\ksnortum\.m2\repository\com\nike\dpt\dpt\1.1-SNAPSHOT\dpt-1.1-SNAPSHOT.pom
 [INFO] Installing C:\Projects\DPT\target\dpt-1.1-SNAPSHOT-war-exec.jar to 
 C:\Users\ksnortum\.m2\repository\com\nike\dpt\dpt\1.1-SNAPSHOT\dpt-1.1-SNAPSHOT-exec-war.jar
 [INFO]
 [INFO]  tomcat-maven-plugin:1.1:run (default-cli) @ dpt 

you are using an old version here ? Don't you have duplicate entries
in your pom ?

 [INFO]
 [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ dpt ---
 [debug] execute contextualize
 [INFO] Using 'UTF-8' encoding to copy filtered resources.
 [INFO] Copying 3 resources
 [INFO] Copying 3 resources
 [INFO]
 [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ dpt ---
 [INFO] Nothing to compile - all classes are up to date
 [INFO]
 [INFO]  tomcat-maven-plugin:1.1:run (default-cli) @ dpt 
 [INFO]
 [INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ dpt ---
 [INFO] Running war on http://localhost:8080/dpt
 [INFO] Creating Tomcat server configuration at C:\Projects\DPT\target\tomcat
 Aug 28, 2012 10:13:59 AM org.apache.catalina.startup.Embedded start
 INFO: Starting tomcat server
 Aug 28, 2012 10:14:00 AM org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
 Aug 28, 2012 10:14:00 AM org.apache.catalina.core.ApplicationContext log
 INFO: Set web app root system property: 

Re: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl

2012-08-28 Thread Konstantin Kolinko
2012/8/29 Dale Ogilvie dale_ogil...@trimble.com:
 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]

Not quite. My point was the loading of the EL implementation is likely to be 
triggered by user code. If the webapp class loader is the TCCL loader than 
classes from the web app will be loaded before those from the container. If 
the web app contains container classes then it is possible that they get 
loaded from the webapp rather than from Tomcat.
(Enabling the security manager enables additional class loading checks that 
would stop this). Those classes from the webapp then have references held to 
them. They will work right up unto the point Tomcat tries to access the 
class outside of the webapp they were loaded from.

Mark

 I'm still not quite sure what you are saying matches exactly what I'm seeing 
 Mark.


Have you ever tried to run with SecurityManager being enabled?


 So, it appears to me that the class *loading* is occurring from app1 in 
 step 4. I'm only pushing this because it kind looks buggy to me.

Class loading does not always use TCCL.  Sometimes it uses
otherclass.getClassLoader(). See e.g. javadoc of
java.lang.Class#forName(String).


So it is quite valid for it to load a class from app1 even if current
TCCL belongs to app2.

Best regards,
Konstantin Kolinko

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



Re: Custom Header Fields are Missing after SiteMinder Redirect (UNCLASSIFIED)

2012-08-28 Thread Bilal S
On Tue, Aug 28, 2012 at 3:55 PM, Rainer Jung rainer.j...@kippdata.dewrote:

 Hi John,

 On 28.08.2012 01:25, Lowman, John Mr CTR USA AMC wrote:

 I hope someone out there has some insight regarding the problem that
 I'm about to describe.  All custom request header fields that are added via
 the SiteMinder policy server are being stripped (intentionally or
 accidentally) from the request header after passing through the Apache
 Tomcat isapi_redirect.dll ISAPI filter.


 Can you give an example of such a header, i.e. its name and a typical
 value?

 You might want to check

 https://issues.apache.org/**bugzilla/show_bug.cgi?id=47679https://issues.apache.org/bugzilla/show_bug.cgi?id=47679

 though it should be fixed in 1.2.32.

 If you increase the redirector log level to debug, you will get additional
 output of the form:

 Forwarding request header HEADER_NAME : HEADER_VALUE

 for each header.

  We have a website running on IIS and ColdFusion 10 that is protected
 using SiteMinder.  When a web request comes in, SiteMinder intercepts the
 request and performs a HTTP 302 redirect to the policy servers for
 authentication.  After successful authentication, the policy server adds
 some custom fields, such as userid and mail, to the request header and
 fires it back to our web server.  When using an ASP script below, I can see
 that these custom header fields appear in IIS, so I have proof that they
 are arriving intact in the header.  However, the problem is that the custom
 request header fields get stripped out when viewing a ColdFusion page,
 which goes through the Apache Tomcat ISAPI filter.


 As Chris already asked: we need to understand the communication between
 Client/Browser, SiteMinder and your IIS/Redirector

 Client - IIS (HTTP Request)

 Now ?? SiteMinder ??? (what does intercept mean)?
 Then ?? Fire Back ??

 I suggest a quick check against the debug log first.

  Here is the showheaders.asp page that I used to view the custom
 header fields:

 --- BEGIN showheaders.asp ---

 ...

   %
  ' Iterate through the server variables collection and display
 each header along with its value
  for each header in Request.ServerVariables
  response.write header   =   Request.ServerVariables(
 **header)brbr 
  next
  %

 ...

  --- END showheaders.asp ---

 Here is the showheaders.cfm page that I used to view the custom header
 fields:

 --- BEGIN showheaders.cfm ---

 ...

   cfoutputALL_HTTP = #cgi.ALL_HTTP#/cfoutput


 See below

   cfdump var=#cgi# label=cgi expand=yes /
  cfdump var=#getHTTPRequestData()# /

 ...

  --- END showheaders.cfm ---

 The missing headers problem started after upgrading our server from
 ColdFusion MX 7 to ColdFusion 10.  ColdFusion MX 7 ran on JRun; ColdFusion
 10 runs on a modified version of Apache Tomcat.  I suspect that the header
 fields are being stripped out by the ISAPI filter, because the custom
 fields are missing whether I use ColdFusion's built-in
 getHTTPRequestData() function, or from a Java equivalent on the
 ColdFusion page.

 --- BEGIN GetCredentialsFromHeader() ---

 ...

   cfset pageRequest = getPageContext().getRequest() /
  cfset pageRequestHeaderNames = pageRequest.getHeaderNames() /
  cfloop condition=#**pageRequestHeaderNames.**
 hasMoreElements()#
  cfset thisName = pageRequestHeaderNames.**nextElement()
 /
  cfoutput
  #thisName#='#pageRequest.**getHeader(thisName)#'br
 /
  /cfoutput
  /cfloop
  cfdump var=#pageRequest# label=Java Page Request /

  !--- This is the ColdFusion way of getting request headers. ---
  cfdump var=#GetHTTPRequestData()# label=HTTP Request
 Headers /

  cfabort /
 /cffunction
 --- END GetCredentialsFromHeader() ---

 Another quirk that I noticed is that the ALL_HTTP CGI field exists
 after passing through the ISAPI filter, but it's blank.  In contrast, the
 ALL_HTTP field is populated when viewing in IIS via the ASP script.


 Since CGI does more unwanted things to the HTTP headers (replacing
 underscores with dashes, lowercasing names etc.) the ISAPI redirector uses
 ALL_RAW.

  Now the specs:

  ColdFusion: version 10,282462
  CF-Tomcat:  N/A (It's integrated into
 ColdFusion 10)
  isapi_direct.dll:   version 1.2.32.0
  OS: Windows 2003
  Java:   JDK 1.6.0_33
  VM Version: 20.8-b03
  IIS:6

 I can't think of anything else at the moment.  If anyone knows what's
 causing this, please help me.  I'd be very grateful.


 Regards,

 Rainer


 --**--**-
 To unsubscribe, e-mail: 
 

RE: tomcat7-maven-plugin doesn't understand Maven filtering of context files?

2012-08-28 Thread Knute Snortum


 -Original Message-
 From: Olivier Lamy [mailto:ol...@apache.org]
 Sent: Tuesday, August 28, 2012 2:17 PM
 To: Tomcat Users List
 Subject: Re: tomcat7-maven-plugin doesn't understand Maven filtering of
 context files?
 
 Hi,
 Inline
 
 2012/8/28 Knute Snortum ksnor...@catalystitservices.com:
  If this is the wrong mailing list for tomcat7-maven-plugin, could
 someone direct me to the right place?
 
  I'm developing a Vaadin web app in Eclipse Juno on Windows 7 and I'm
 using the tomcat7-maven-plugin 2.0-beta-1 to help in development by
 running the app in Tomcat inside of the IDE -- or I'm trying.  The error
 I'm getting is:
 
  org.springframework.beans.factory.BeanDefinitionStoreException:
  Invalid bean definition with name 'dataSource' defined in
  ServletContext resource [/WEB-INF/applicationContext.xml]: Could not
  resolve placeholder 'db.driverClassName' in string value
  [${db.driverClassName}]
 
  applicationContext.xml is my Spring context file.  I have
 placeholders in it to point to the correct database based on Maven
 profiles and filtering.  So a piece of applicationContext.xml looks like
 this:
 
  bean id=dataSource
 class=org.apache.commons.dbcp.BasicDataSource destroy-method=close
  property name=driverClassName
 value=${db.driverClassName} /
  property name=url value=${db.url} /
  property name=username
 value=${db.username} /
  property name=password
 value=${db.password} /
  property name=maxActive   value=10 /
  property name=maxIdle value=1 /
  /bean
 
  As you can see, Tomcat (or Spring?) is finding the dataSource bean
 that does not have the placeholders replaced yet.
 
  The odd thing is that in the war file and the directory under target
 that the war file is created from, all the place holders have been
 correctly substituted.  I can see them in an editor.  The context file
 with the placeholders is the one still sitting in my development folder.
 
  So my question is, why isn't the Tomcat plugin seeing the context file
 in the war file or folder?  And if it looks in the development folder
 for the file, can Maven filtering work with the plugin?.
 
 as you are using gwt maven plugin, I'm not sure that works.
 Something you can do is using sys properties in tomcat7/6-maven-plugin
 (spring placeholder resolves against sys props too).
 Add you sys props as it:
 http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat6-maven-
 plugin/examples/add-system-properties.html

Well, I'm using Maven filtering, and the reason for that is my client requires 
that I use Maven profiling to set the development and the production 
environments.  So I'd have to a Maven Tomcat plugin in each profile -- which 
maybe I'll do.

I need the GWT plugin because this is a Vaadin project and Vaadin uses GWT.
 
  Below is part of the messages created by Maven et al in my IDE
 console.  I've left out the clean and testing messages and most of the
 stacktrace, which I think is from Spring anyway:
 
  [INFO]
  [INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ dpt --- [INFO]
  auto discovered modules
  [com.catalystitservices.nike.dpt.widgetset.DptWidgetset]
  [INFO] com.catalystitservices.nike.dpt.widgetset.DptWidgetset is up to
  date. GWT compilation skipped [INFO] [INFO] ---
  maven-war-plugin:2.2:war (default-war) @ dpt --- [INFO] Packaging
  webapp [INFO] Assembling webapp [dpt] in [C:\Projects\DPT\target\dpt]
  [INFO] Processing war project [INFO] Copying webapp webResources
  [C:\Projects\DPT\src/main/webapp/] to [C:\Projects\DPT\target\dpt]
  [INFO] Copying webapp resources [C:\Projects\DPT\src\main\webapp]
  [INFO] Webapp assembled in [1442 msecs] [INFO] Building war:
  C:\Projects\DPT\target\dpt.war [INFO] [INFO] ---
  tomcat7-maven-plugin:2.0-beta-1:exec-war-only (tomcat-run) @ dpt ---
  [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install)
  @ dpt --- [INFO] Installing C:\Projects\DPT\target\dpt.war to
  C:\Users\ksnortum\.m2\repository\com\nike\dpt\dpt\1.1-SNAPSHOT\dpt-1.1
  -SNAPSHOT.war [INFO] Installing C:\Projects\DPT\pom.xml to
  C:\Users\ksnortum\.m2\repository\com\nike\dpt\dpt\1.1-SNAPSHOT\dpt-1.1
  -SNAPSHOT.pom [INFO] Installing
  C:\Projects\DPT\target\dpt-1.1-SNAPSHOT-war-exec.jar to
  C:\Users\ksnortum\.m2\repository\com\nike\dpt\dpt\1.1-SNAPSHOT\dpt-1.1
  -SNAPSHOT-exec-war.jar
  [INFO]
  [INFO]  tomcat-maven-plugin:1.1:run (default-cli) @ dpt 
 
 you are using an old version here ? Don't you have duplicate entries in
 your pom ?

There's no duplicate.  The one I have looks like this:

plugin
groupIdorg.apache.tomcat.maven/groupId
artifactIdtomcat7-maven-plugin/artifactId
version${tomcat7MavenPlugin}/version
...

And my properties look like:

tomcat7MavenPlugin2.0-beta-1/tomcat7MavenPlugin

 
  [INFO]
  [INFO] --- 

Re: Customize from and to address for emails that come from tomcat

2012-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brian,

On 8/28/12 5:16 PM, bwedd...@sbcglobal.net wrote:
 I ended up fixing this at the smtp server.  I added an entry in 
 /etc/postfix/generic with the undesired address desired
 address
 
 Re-ran the postmap command and reloaded postfix.
 
 It is somewhat of a hack, but customers won't see a tomcat at 
 some.local.server.org address.
 
 They now see donot-reply at corporate.com.

That's an awful hack and I'm sure you will find that when moving this
software to another machine you'll never figure out why Tomcat is
suddenly reverting to sending email messages from a different email
address.

Read the documentation for your email component (which surely uses
JavaMail under the hood) and how to set the from header. You can
also look at the JavaMail docs to see what system properties can
affect that kind of thing even if the email component doesn't expose it.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlA9Y/AACgkQ9CaO5/Lv0PBxmQCfQFXzRHhXMDvsFALe+ZUY7yUd
nOsAn1RBr0Mo/DuwZ0lDr5jKMjwA1CJj
=9dlA
-END PGP SIGNATURE-

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