Re: Logging Framework

2007-11-27 Thread Leon Rosenberg
gee!
moskito.anotheria.net
exact this ready to use.

On Nov 26, 2007 1:27 PM, Andrew Hole <[EMAIL PROTECTED]> wrote:
> Hello!
>
> My java application writes relevant log of database procedures
> executions. My goal is to develop a report at intervals of 30 minutes
> with a summary, including requests slowest, and average time of
> execution,
> etc.
>
> 2007-11-26 00:00:00379 DEBUG ajp - 8009-10 RequestFilter - Request Started
> 2007-11-26 00:00:00379 DEBUG ajp - 8009-14 RequestFilter - Request Started
> 2007-11-26 00:00:00379 DEBUG ajp - 8009-10 RequestFilter - Request
> Ended: Total time: 0 s
> 2007-11-26 00:00:00379 DEBUG ajp - 8009-14 RequestFilter - Request
> Ended: Total time: 0 s
>
> Is there any framework adaptable to this?
>
> Best Regards
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



clustering iis with JK

2007-11-27 Thread Dmitry Beransky
Hi,

Is it possible to implement the following setup with JK/isapi_redirect?

  1. Two clustered IIS instances
  2. Two load-balanced Tomcat instances
  3. Each IIS uses JK to forward requests to two load-balanced Tomcat instances

I know how to do each individual item in isolation, but I can't
figure, once I put all three together, how to ensure that requests
belonging to the same session are consistently served to the
appropriate Tomcat instance.  Any pointers?

For IIS clustering I am considering NLB.  Since want IIS clustering
for mostly for reliability rather than scalability, an easy way out
would be to do a fail over setup, but this is plan B.


Thanks
Dmitry

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



Re: Tomcat Clustering Support - Without any load balancer like component in the front

2007-11-27 Thread Gary Evesson
mod_jk handles failover for you.

Clustering tomcat makes it copy sessions to all members of the clusters so
that any member of the cluster can take over the processing of a request
seamlessly from any other. If you requests have no way of getting to the
other members of the cluster, then there is not much point in clustering.

You can use something like pen or a dedicated load balancer to handle
failover (and load balancing if you like) if you do not want to set up
apache.


On Nov 27, 2007 5:01 PM, mfs <[EMAIL PROTECTED]> wrote:

>
> Thanks for the quick reply Gary..
>
> Some follow-up questions.
>
> 1) So the http server bundled with tomcat doesn't do any help ? like it
> doesnt provide any load-balancing implementation ? like e.g. mod-jk which
> has to be used in conjunction with apache...Further I presume mod-jk also
> handles the fail-over scenarios..
>
> 2) When u say "there is no huge amount of point", i wonder if there is any
> point AT ALL having that tomcat clustering enabled if we dont have
> something
> like a load-balancer/fail-over-service at the front?
>
> Thanks again
>
> Farhan.
>
>
>
>
>
> Gary Evesson-3 wrote:
> >
> > You need something to handle failover. Otherwise there is not a huge
> > amount
> > of point. Either a load balancer or mod-jk will do the job.
> >
> > On Nov 27, 2007 4:13 PM, mfs <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Guys,
> >>
> >> Pretty basic question, given this is my time experience on clustering
> >> where
> >> i am trying to use tomcat 6 clustering support.
> >> So basically i wanted to know if enabling the tomcat 6 clustering would
> >> be
> >> of any use without having a load-balancer in the front (something like
> >> mod_jk) ? well my understanding so far is that we have to have some
> >> component in the front (which tomcat i assume doesn't provide...right
> ?)
> >> for
> >> either load-balancing or fail-over scenarios...
> >>
> >> Thanks in advance and REgards,
> >>
> >> Farhan.
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Tomcat-Clustering-Support---Without-any-load-balancer-like-component-in-the-front-tf4885156.html#a13982315
> >> Sent from the Tomcat - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > Gary Evesson
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Tomcat-Clustering-Support---Without-any-load-balancer-like-component-in-the-front-tf4885156.html#a13982961
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Gary Evesson


Re: Tomcat Clustering Support - Without any load balancer like component in the front

2007-11-27 Thread mfs

Thanks for the quick reply Gary..

Some follow-up questions.

1) So the http server bundled with tomcat doesn't do any help ? like it
doesnt provide any load-balancing implementation ? like e.g. mod-jk which
has to be used in conjunction with apache...Further I presume mod-jk also
handles the fail-over scenarios..

2) When u say "there is no huge amount of point", i wonder if there is any
point AT ALL having that tomcat clustering enabled if we dont have something
like a load-balancer/fail-over-service at the front? 

Thanks again

Farhan.





Gary Evesson-3 wrote:
> 
> You need something to handle failover. Otherwise there is not a huge
> amount
> of point. Either a load balancer or mod-jk will do the job.
> 
> On Nov 27, 2007 4:13 PM, mfs <[EMAIL PROTECTED]> wrote:
> 
>>
>> Guys,
>>
>> Pretty basic question, given this is my time experience on clustering
>> where
>> i am trying to use tomcat 6 clustering support.
>> So basically i wanted to know if enabling the tomcat 6 clustering would
>> be
>> of any use without having a load-balancer in the front (something like
>> mod_jk) ? well my understanding so far is that we have to have some
>> component in the front (which tomcat i assume doesn't provide...right ?)
>> for
>> either load-balancing or fail-over scenarios...
>>
>> Thanks in advance and REgards,
>>
>> Farhan.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Tomcat-Clustering-Support---Without-any-load-balancer-like-component-in-the-front-tf4885156.html#a13982315
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Gary Evesson
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-Clustering-Support---Without-any-load-balancer-like-component-in-the-front-tf4885156.html#a13982961
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat Clustering Support - Without any load balancer like component in the front

2007-11-27 Thread Gary Evesson
You need something to handle failover. Otherwise there is not a huge amount
of point. Either a load balancer or mod-jk will do the job.

On Nov 27, 2007 4:13 PM, mfs <[EMAIL PROTECTED]> wrote:

>
> Guys,
>
> Pretty basic question, given this is my time experience on clustering
> where
> i am trying to use tomcat 6 clustering support.
> So basically i wanted to know if enabling the tomcat 6 clustering would be
> of any use without having a load-balancer in the front (something like
> mod_jk) ? well my understanding so far is that we have to have some
> component in the front (which tomcat i assume doesn't provide...right ?)
> for
> either load-balancing or fail-over scenarios...
>
> Thanks in advance and REgards,
>
> Farhan.
>
>
> --
> View this message in context:
> http://www.nabble.com/Tomcat-Clustering-Support---Without-any-load-balancer-like-component-in-the-front-tf4885156.html#a13982315
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Gary Evesson


Tomcat's container architecture - Authenticator

2007-11-27 Thread Bárbara Vieira
 

Hi there!

This question is about Authenticator package. I appreciate if anyone can
help me. 

 

I’m implementing a Valve and a Realm to provides authentication and
authorization using two authentications methods at the same time : FORM and
CERT-CLIENT. Obviously, I’m looking to authenticator package code, more
precisely to AuthenticatorBase.class and FormAuthenticator.class, and
analyzing that. In this analyze has emerged some questions about what the
author are doing in invoke method in AuthenticatiorBase class.  In other
words, what I would like to know is, why the author are putting the
Principal on the request, and the next step is authenticate the request?!
I don’t understand the reason why we have to pass the request to
authenticate method in FormAuthenticator class, because that method isn’t
doing anything if the request has a principal. This doesn’t make any sense,
because first we put the principal on the request and next, in the
authenticate method, we just test if the request has a principal. Why we
have to put the principal on the request?! Why we cannot just authenticate
the user if the request has a principal, or if the principal is in internal
session?! 

I’m a little bit confused about that J

 

Thanks for everything,

Regards from Braga, Portugal,

Bárbara Vieira

 



Tomcat Clustering Support - Without any load balancer like component in the front

2007-11-27 Thread mfs

Guys,

Pretty basic question, given this is my time experience on clustering where
i am trying to use tomcat 6 clustering support. 
So basically i wanted to know if enabling the tomcat 6 clustering would be
of any use without having a load-balancer in the front (something like
mod_jk) ? well my understanding so far is that we have to have some
component in the front (which tomcat i assume doesn't provide...right ?) for
either load-balancing or fail-over scenarios...

Thanks in advance and REgards,

Farhan.


-- 
View this message in context: 
http://www.nabble.com/Tomcat-Clustering-Support---Without-any-load-balancer-like-component-in-the-front-tf4885156.html#a13982315
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: compiling APR/tcnative on Win32

2007-11-27 Thread Martin Gainty
Hi Bruno
its supposed to be located in %SystemRoot%\system32\Rpcrt4.dll
M--
- Original Message -
From: "Bruno Altobelli" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, November 27, 2007 5:45 PM
Subject: compiling APR/tcnative on Win32


Hello,

I am trying to compile APR on Win32 without OpenSSL using the sources at
http://tomcat.heanet.ie/native/ - manually removing references to any ssl
library as I don't have autoconf (yet).
I was able to compile the project called "libtcnative" without problems, but
when trying to compile the one named "tcnative" I get the following error:
tcnative error LNK2019: unresolved external symbol [EMAIL PROTECTED]
referenced in function [EMAIL PROTECTED]

I get the same error above with tcnative versions 1.1.10, 1.1.9, 1.1.8, with
APR versions 1.2.12 (that just came out), 1.2.11 and 1.2.9, using VS2005 and
VS2003.

Trying to figure out what was the reason, I tried to add rpcdce.lib (or
Rpcrt4.lib) to the linker in the tcnative project.
The tcnative-1.dll gets compiled properly, though the linker itself warns
that rpcdce is not needed (lol).

Questions:
1 - Is this the right way to do it or should I change something different in
the project?
2 - May I use the separate dlls generate by the libtcnative project instead?

Thank you in advance,
b.










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


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



compiling APR/tcnative on Win32

2007-11-27 Thread Bruno Altobelli
Hello,

I am trying to compile APR on Win32 without OpenSSL using the sources at 
http://tomcat.heanet.ie/native/ - manually removing references to any ssl 
library as I don't have autoconf (yet). 
I was able to compile the project called "libtcnative" without problems, but 
when trying to compile the one named "tcnative" I get the following error: 
tcnative error LNK2019: unresolved external symbol [EMAIL PROTECTED] referenced 
in function [EMAIL PROTECTED]

I get the same error above with tcnative versions 1.1.10, 1.1.9, 1.1.8, with 
APR versions 1.2.12 (that just came out), 1.2.11 and 1.2.9, using VS2005 and 
VS2003.

Trying to figure out what was the reason, I tried to add rpcdce.lib (or 
Rpcrt4.lib) to the linker in the tcnative project. 
The tcnative-1.dll gets compiled properly, though the linker itself warns that 
rpcdce is not needed (lol).

Questions:
1 - Is this the right way to do it or should I change something different in 
the project?
2 - May I use the separate dlls generate by the libtcnative project instead?

Thank you in advance,
b.



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

Re: [Windows service] how to update with new procrun (doc is deprecated)

2007-11-27 Thread galevsky
Mark Thomas  apache.org> writes:
 
> The procrun docs are:
> http://commons.apache.org/daemon/procrun.html
> 
> At first glance what you are doing looks right to me. What tells you it
> isn't working?
> 
> Mark
> 

I 've just done another try: it is okay. In fact, I was mixing up --JAVA_HOME
option and --Jvm. I though that I had to update --JavaHome to make the service
get  the \bin\client\jvm.dll, but I have to use --Jvm instead. Sorry to be so
asleep.

Can you explain me what is the job of the JavaHome since the jvm.dll is
specified by another option ?

Many thanks,

Gal'





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



Re: Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread Jim Cox
On Nov 27, 2007 3:30 PM, jnedzel <[EMAIL PROTECTED]> wrote:
>
> Thanks, I'll look at maxing out the logging.
>

A simple thing to do would be to grab a stack dump with a "kill -QUIT
" during one of these "slow periods" and see if anything
jumps out at you, compare it to one from a "normal period", etc.

Shouldn't require any modifications to the running system.

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



Re: Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread Hassan Schroeder
On Nov 27, 2007 12:25 PM, jnedzel <[EMAIL PROTECTED]> wrote:

> We are adding more monitoring to see if could be caused by auto-mounter
> problems.

You're NFS-mounting resources that Tomcat uses via automounter??

I'd think that would be, er, problematic from the get-go :-)

-- 
Hassan Schroeder  [EMAIL PROTECTED]

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



RE: Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread Caldarale, Charles R
> From: jnedzel [mailto:[EMAIL PROTECTED] 
> Subject: Re: Tomcat becomes non-response for ~30 seconds
> 
> Are there any cases where everything is working at the OS and 
> network level but Tomcat itself hangs for 30 seconds or so?

What JVM are you using?  Older ones have been known to have long pauses
for garbage collection, but even then 30 seconds would be quite unusual.

Regarding the logging: additional logging may make the problem worse,
depending on what's actually causing the problem.  Strongly suggest
poking around with JConsole first to see what's going on, paying close
attention to the state of the heap and looking at stack traces of the
worker threads.

 - Chuck


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

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



Re: Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread jnedzel

Thanks, I'll look at maxing out the logging.

There's only one webapp per Tomcat instance and none of them are heavily
loaded.  In the case of one system, the only webapp does hardly any updating
(only tracks usage) and is basically query-only type of app that currently
has very light usage.

We are will be looking into our system monitoring tools to check if the
machines are getting overloaded (memory, i/o, cpu, etc.), but our suspicion
is that the machines are lightly loaded.


mgainty wrote:
> 
> you'll want to max your logging to understand whats going on
> http://tomcat.apache.org/tomcat-5.5-doc/logging.html
> I concur with using JConsole *and logging*
> JMX is good for point in time System wide configuration snapshots
> If you are doing something like rendering giant PDF's or updating 1000's
> of
> records in a DB then you're exhausting resources
> Try a new TC install and add on one webapp each day..
> this way you can at least determine that the last loaded webapp caused the
> slowdown

-- 
View this message in context: 
http://www.nabble.com/Tomcat-becomes-non-response-for-%7E30-seconds-tf4883561.html#a13979134
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread jnedzel

Our systems group is adding additional monitoring, but based on the
monitoring currently in place we don't think it is due to network problems. 
We are adding more monitoring to see if could be caused by auto-mounter
problems.

Are there any cases where everything is working at the OS and network level
but Tomcat itself hangs for 30 seconds or so?
-- 
View this message in context: 
http://www.nabble.com/Tomcat-becomes-non-response-for-%7E30-seconds-tf4883561.html#a13979112
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread Martin Gainty
you'll want to max your logging to understand whats going on
http://tomcat.apache.org/tomcat-5.5-doc/logging.html
I concur with using JConsole *and logging*
JMX is good for point in time System wide configuration snapshots
If you are doing something like rendering giant PDF's or updating 1000's of
records in a DB then you're exhausting resources
Try a new TC install and add on one webapp each day..
this way you can at least determine that the last loaded webapp caused the
slowdown

Tough to say without more info...

M--
- Original Message -
From: "Delian Krustev" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, November 27, 2007 2:08 PM
Subject: Re: Tomcat becomes non-response for ~30 seconds


> On Tue, 27 Nov 2007 10:58:24 -0800 (PST) jnedzel wrote:
> > We're having an intermittent problem with Tomcat becoming non-responsive
> > for a while (between 30 seconds and several minutes) and then recovering
> > without any intervention.  There are no error messages in the Tomcat
logs.
> >
> > Any ideas what might be causing this or where to look?
> >
> > We're running Tomcat 5.5.20 on linux.
>
> Try running the VM with the -verbosegc option.
> May be the garbage collector and the memory settings need some tuning.
>
> You can also read about JMX and jconsole. They might prove to be helpful.
>
> Cheers
> --
> Delian
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Re: Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread Delian Krustev
On Tue, 27 Nov 2007 10:58:24 -0800 (PST) jnedzel wrote:
> We're having an intermittent problem with Tomcat becoming non-responsive
> for a while (between 30 seconds and several minutes) and then recovering
> without any intervention.  There are no error messages in the Tomcat logs.
>
> Any ideas what might be causing this or where to look?
>
> We're running Tomcat 5.5.20 on linux.

Try running the VM with the -verbosegc option. 
May be the garbage collector and the memory settings need some tuning.

You can also read about JMX and jconsole. They might prove to be helpful.

Cheers
--
Delian

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



Re: Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread Alexey Solofnenko
Theoretically, the behaviour can be caused by network problems - 
[reverse] DNS could not be resolved (maybe for logging), file share 
becomes unavailable, etc.


- Alexey.

jnedzel wrote:

Folks:

We're having an intermittent problem with Tomcat becoming non-responsive for
a while (between 30 seconds and several minutes) and then recovering without
any intervention.  There are no error messages in the Tomcat logs.

Any ideas what might be causing this or where to look?

We're running Tomcat 5.5.20 on linux.

Thanks,

Jared
  


--

Alexey N. Solofnenko 
Pleasant Hill, CA (GMT-8 usually)


smime.p7s
Description: S/MIME Cryptographic Signature


Tomcat becomes non-response for ~30 seconds

2007-11-27 Thread jnedzel

Folks:

We're having an intermittent problem with Tomcat becoming non-responsive for
a while (between 30 seconds and several minutes) and then recovering without
any intervention.  There are no error messages in the Tomcat logs.

Any ideas what might be causing this or where to look?

We're running Tomcat 5.5.20 on linux.

Thanks,

Jared
-- 
View this message in context: 
http://www.nabble.com/Tomcat-becomes-non-response-for-%7E30-seconds-tf4883561.html#a13976711
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat 5.5 server.xml populating a context section by itself

2007-11-27 Thread Mark Thomas
Eddie Yee wrote:
> One thing I noticed is that our server.xml continually populates it's own 
> context section for each application, even if I have it specified globally in 
> the conf/context.xml.
Could you expand on "server.xml continually populates it's own context
section for each application". I am not sure what you mean by this.

If you mean that every context is automatically added to server.xml then
that might be a side-effect of using the admin application.

Mark



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



Re: [Windows service] how to update with new procrun (doc is deprecated)

2007-11-27 Thread Mark Thomas
galevsky wrote:
> I can't do it with the GUI bin\tomcat5w.exe, but I would like to run
> something like:
> -> bin\tomcat5.exe //US//Tomcat5 --JavaHome="C:\Program 
> Files\Java\JRE\1.5.0_11"
> 
> I read it in the documentation at
> http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html,
> but it doesn't work and I am not surprised:
> 
> "This section of the documentation applies to procrun 1.0, and is now 
> obsolete."
> 
> So, I would be most grateful if someone could tell the way to update
> my JavaHome, or give me a link to learn it.

The procrun docs are:
http://commons.apache.org/daemon/procrun.html

At first glance what you are doing looks right to me. What tells you it
isn't working?

Mark



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



Re: AccessControlException in Coyote Http11Processor (Tomcat 6.0.14). Bug in Coyote ?

2007-11-27 Thread Mark Thomas
Delian Krustev wrote:
> My guess is that either this is a bug in the Coyote HTTP connector or
> the security policy is not strict enough and one of the 
> installed applications (third party, I don't have access to the source)
> modifies the security manager somehow. My modifications
> to the policy do not appear to grant such permissions to the webapps, so if
> the assumption is right it's a bug in the distributed catalina.policy.

Webapps do have some default permissions (files and JNDI) so it is possible
that these are all the app requires to run.

The policy file as is should mean the code has access to the class. Not
sure why it fails.

Can you run the faulty instance with:
-Djava.security.debug=access,failure
and report the failure message.

If you can reproduce this at will then
-Djava.security.debug=all
would be better but it will generate lots of log data

I have also seen problems with policy files where I have had to use
${file.separator} rather than / but that was with java.io.FilePermission on
Windows rather than in the codebase.

Mark



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



Tomcat 5.5 server.xml populating a context section by itself

2007-11-27 Thread Eddie Yee
Hi,
 
I'm running Tomcat 5.5.25 on Solaris, and we are using a lot of environment 
entries in our applications.  I have the environment entry specified in the 
conf/server.xml and also declared in the conf/context.xml.One thing I 
noticed is that our server.xml continually populates it's own context section 
for each application, even if I have it specified globally in the 
conf/context.xml.   
 
This population of the context for our app in the server.xml is preventing us 
from undeploying our application hence requiring a restart every time we need 
to deploy.
 
I know our developers are putting the environment resource list in their app 
under WEB-INF/web.xmlIs there something else we need to do to prevent the 
server.xml from populating it's own context section per app?
 
Thanks,
Eddie
 
 
_
Put your friends on the big screen with Windows Vista® + Windows Live™.
http://www.microsoft.com/windows/shop/specialoffers.mspx?ocid=TXT_TAGLM_CPC_MediaCtr_bigscreen_102007

Re: Java file name is displayed when the JSP file is accessed.

2007-11-27 Thread david delbecq
You are probably trying to display a value in you jsp coming from a 
class that does not overrride 'toString', as the result java's default 
value for toString is .@


example:

[EMAIL PROTECTED]

Ognjen Blagojevic a écrit :

Pavan Singaraju wrote:

i have a web application which is deployed on Tomcat 5.0.18.
Sometimes when i am navigating to a page using menu of my application,
it is displaying a java file name with full package name. The java
file is a business logic processing location on the application. Why
is that happening. Could anybody guide me why its happening?


Could you give an example of the generated page?

Regards,
Ognjen

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



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



Re: mod_proxy_html setup

2007-11-27 Thread Pid
Rocco Scappatura wrote:
> I have some problem after reversing proxy a web app.
>  
> After many research I inferred that mod_proxy_html could solve the
> problem of accessing my web app through reverse proxy.
>  
> My big clue is to:
>  
> 1) find the exact instructions to setup mod_proxy_html
> 2) find all the binaries needed
>  
> For 1) I should be able to compile modules by myself. But at this
> porpouse, I would like to know is I could  use a C compiler under Cygwin
> environment under Windows platform.

You'll probably find the Apache HTTPD list more useful on this
particular problem.  You may even find the module author on that list.

p


> Thanks,
>  
> rocsca
> 


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



RE: mod_proxy_html setup

2007-11-27 Thread Rocco Scappatura
> > I have some problem after reversing proxy a web app.
> >  
> > After many research I inferred that mod_proxy_html could solve the 
> > problem of accessing my web app through reverse proxy.
> >  
> > My big clue is to:
> >  
> > 1) find the exact instructions to setup mod_proxy_html
> > 2) find all the binaries needed
> >  
> > For 1) I should be able to compile modules by myself. But at this 
> > porpouse, I would like to know is I could  use a C compiler under 
> > Cygwin environment under Windows platform.
> >  
> > Thanks,
> >  
> > rocsca
> 
> The module is provided by Nick Kew, one of the Apache httpd 
> committers.

Good!

> Some info is at
> 
> http://apache.webthing.com/mod_proxy_html/

I already read it, but I don't find anything of what I'm looking for..

> I'm not sure, if you could compile it with Cygwin and then 
> actually load it into Apache httpd. It might depend on how 
> your httpd was compiled.

I have installed Apache 2.2 binaries.

rocsca

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



Re: mod_proxy_html setup

2007-11-27 Thread Rainer Jung

Rocco Scappatura wrote:

I have some problem after reversing proxy a web app.
 
After many research I inferred that mod_proxy_html could solve the

problem of accessing my web app through reverse proxy.
 
My big clue is to:
 
1) find the exact instructions to setup mod_proxy_html

2) find all the binaries needed
 
For 1) I should be able to compile modules by myself. But at this

porpouse, I would like to know is I could  use a C compiler under Cygwin
environment under Windows platform.
 
Thanks,
 
rocsca


The module is provided by Nick Kew, one of the Apache httpd committers.

Some info is at

http://apache.webthing.com/mod_proxy_html/

I'm not sure, if you could compile it with Cygwin and then actually load 
it into Apache httpd. It might depend on how your httpd was compiled.


Regards,

Rainer

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



Re: Tomcat 6.0.14 startup on Windows

2007-11-27 Thread Bruce

Thank you. That might be what I am looking for.



zhongliang zhang wrote:

C:\apache-tomcat-6.0.14\bin>tomcat6 //IS//Tomcat6 --DisplayName="Apache Tomcat 6
" --Install="c:\apache-tomcat-6.0.14\bin\tomcat6.exe" --Jvm=auto --StartMode=jvm
 --StopMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams
=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop

You can add other params with the format "--option" that listed at 
http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html




_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

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


  


mod_proxy_html setup

2007-11-27 Thread Rocco Scappatura
I have some problem after reversing proxy a web app.
 
After many research I inferred that mod_proxy_html could solve the
problem of accessing my web app through reverse proxy.
 
My big clue is to:
 
1) find the exact instructions to setup mod_proxy_html
2) find all the binaries needed
 
For 1) I should be able to compile modules by myself. But at this
porpouse, I would like to know is I could  use a C compiler under Cygwin
environment under Windows platform.
 
Thanks,
 
rocsca


Re: Logging Framework

2007-11-27 Thread Marcin Waldowski

Meybe this one will help you:

http://jamonapi.sourceforge.net/

Marcin

Andrew Hole wrote:

Hello!

My java application writes relevant log of database procedures
executions. My goal is to develop a report at intervals of 30 minutes
with a summary, including requests slowest, and average time of
execution,
etc.

2007-11-26 00:00:00379 DEBUG ajp - 8009-10 RequestFilter - Request Started
2007-11-26 00:00:00379 DEBUG ajp - 8009-14 RequestFilter - Request Started
2007-11-26 00:00:00379 DEBUG ajp - 8009-10 RequestFilter - Request
Ended: Total time: 0 s
2007-11-26 00:00:00379 DEBUG ajp - 8009-14 RequestFilter - Request
Ended: Total time: 0 s

Is there any framework adaptable to this?

Best Regards

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





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



No logging done when clientAuth=true

2007-11-27 Thread Aaron Shettleroe
I'm trying to configure Tomcat 5.5.25 to log failed requests to a
Connector that has enabled mutual authentication.  When I try to request
a page from the secured port and fail to send the client certificate,
Tomcat doesn't log this request!  What do I need to do in order to have
the failed request (no client cert sent) logged in Tomcat?  I've enabled
log4j.
 
I've tried the request from a browser (Firefox and IE) and from an
application calling a web service.  No luck.
 
Thanks


Re: multithreaded with taglibs

2007-11-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yair,

Yair Ben-Meir wrote:
> Btw - i thought of something: maybe the img tag will run a thread, return an
> outout to the page with some new image name, and release the jsp to
> continue. The thread will do the work and save the new image under the name
> the tag returned to the page. At the end of the page, a "wait" tag will be
> for waiting to whole of the threads to finish. That's the best thing I
> thought of till now.

That's exactly what I was suggesting.

- -chris

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

iD8DBQFHTELo9CaO5/Lv0PARAg3oAJ45nSggqD5/U92iGMUX8ZqexbMhNACgv3lD
Oun0j/lB3Xa2CmnTVrC14BM=
=uTJw
-END PGP SIGNATURE-

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



Logging and debugging j_security_check problems

2007-11-27 Thread Ognjen Blagojevic

Hi all,

I have problems using j_security_check, and I'm not sure is it DB access 
problem or something else. I would like to make Tomcat log all the 
messages regarding this, but I don't know how to configure it.


I read /tomcat-6.0-doc/logging.html, but I can't rebuild tomcat extras, 
since I'm using Java 1.6. Can someone, please, explain why do I need to 
rebuild tomcat extras just to turn the logging on?


Is there any other, simpler way to trace what j_security_check is doing?

Regards,
Ognjen

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



Re: Tomcat 5.5, Apache 2.0.XX and mod_proxy

2007-11-27 Thread mip

I have two apps which I am trying to proxy through Apache.

How do I set up the servers.conf if I have two apps I need to proxy?

I'm using Apache 2.0.52 and httpd.conf looks like:


ServerName app1.mydomain.com
ProxyPass  /  http://localhost:8082/app1/
ProxyPassReverse  /  http://localhost:8082/app1/



ServerName app2.mydomain.com
ProxyPass  /  http://localhost:8082/app2/
ProxyPassReverse  /  http://localhost:8082/app2/


I'm using Tomcat 5.5 and server.xml looks like this:



  
  
  
  
  

  
  







  

  
  

















  
  

  
  
  

  






Peter Stavrinides wrote:
> 
> It is just the port your Tomcat is running on, which could be any port, 
> so if you are using 8082 that will be your port... it's better though 
> not to be on port 80.
> 
> 
> mip wrote:
>> Thanks Peter.
>>
>> Should that be:
>>
>> --
>> servers.conf
>> --
>> T1  tomcat.server.com:8082
>> ALL   tomcat.server.com:8082
>>
>> ?
>>
>> If not what is port 8081 being used for?
>>
>>
>>
>> Peter Stavrinides wrote:
>>   
>>> Thats because your configuration is incomplete, in order for Apache to 
>>> pass the cookie to the correct context you need to do some additional 
>>> configuration (or alternatively use a connector like mod_jk)
>>>
>>> You may need to configure the jvmRoute parameter in server.xml, this 
>>> allows Apache to map to the correct Tomcat context, otherwise deploy 
>>> your web app in the Tomcat root context.
>>>
>>> >>maxThreads="150" minSpareThreads="25"
>>> maxSpareThreads="75"
>>>enableLookups="false"
>>>acceptCount="100" debug="0" connectionTimeout="2"
>>>proxyPort="80" disableUploadTimeout="true" 
>>>jvmRoute=T1/>
>>>
>>>
>>> You also need to add a server mapping in Apache, one way to do this 
>>> easily is with a RewriteMap. (If you use Apache 2.2 then you could use 
>>> the in-built mod_proxy_balancer module). I also use Apache 2.0 so I just 
>>> make a static mapping, which looks something like this:
>>>
>>>
>>> RewriteMap SERVERS rnd:/etc/apache2/servers.conf
>>>
>>> --
>>> servers.conf
>>> --
>>> T1  tomcat.server.com:8081
>>> ALL   tomcat.server.com:8081 
>>>
>>>
>>> #configure more instances for load balancing if you wish
>>>
>>> Peter
>>>
>>>
>>>
>>> mip wrote:
>>> 
 I'm trying to proxy my Tomcat web application through Apache 2.0 using
 mod_proxy.

 I have uncommented the following in my server.xml:

 
 
 >>>maxThreads="150" minSpareThreads="25"
 maxSpareThreads="75"
enableLookups="false"
acceptCount="100" debug="0" connectionTimeout="2"
proxyPort="80" disableUploadTimeout="true" />

 and I've added the following to my httpd.conf:

   
   ServerName foo.bar.com
   ProxyPass  /  http://foobar.com:8082/app/
   ProxyPassReverse  /  http://foobar.com:8082/app/
   

 The pages are being passed without any problems but the sessions are
 being
 lost as cookies are not being passed. I'm guessing I need to add
 something
 to the above stanza which rewrite the cookies. But what?
   
   
>>>
>>> 
>>
>>   
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-5.5%2C-Apache-2.0.XX-and-mod_proxy-tf4881521.html#a13972723
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: make error : during apache install.

2007-11-27 Thread Shekhar . Dhotre
Mark, 
I did not know that. I apologize . I will start a new thread next time .

Thanks for the info. 
Shekhar 




Mark Thomas <[EMAIL PROTECTED]> 
11/19/2007 01:43 PM
Please respond to
"Tomcat Users List" 


To
Tomcat Users List 
cc

Subject
Re: make error : during apache install.






[EMAIL PROTECTED] wrote:
> Hello , 
> I`m trying to install and configure apache http server on AIX . Running 
> into error below . Please advise .

When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. This is known as thread hijacking and to many of the
list archiving services and mail clients used by list subscribers this
makes your new message appear as part of the old thread. This makes it
harder for other users to find relevant information when searching the
lists.

It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.

The correct procedure is to create a new message with a new subject.
This will start a new thread.

Thanks,

Mark



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




Re: Tomcat 5.5, Apache 2.0.XX and mod_proxy

2007-11-27 Thread Peter Stavrinides
It is just the port your Tomcat is running on, which could be any port, 
so if you are using 8082 that will be your port... it's better though 
not to be on port 80.



mip wrote:

Thanks Peter.

Should that be:

--
servers.conf
--
T1  tomcat.server.com:8082
ALL   tomcat.server.com:8082

?

If not what is port 8081 being used for?



Peter Stavrinides wrote:
  
Thats because your configuration is incomplete, in order for Apache to 
pass the cookie to the correct context you need to do some additional 
configuration (or alternatively use a connector like mod_jk)


You may need to configure the jvmRoute parameter in server.xml, this 
allows Apache to map to the correct Tomcat context, otherwise deploy 
your web app in the Tomcat root context.


   proxyPort="80" disableUploadTimeout="true" 
	   jvmRoute=T1/>



You also need to add a server mapping in Apache, one way to do this 
easily is with a RewriteMap. (If you use Apache 2.2 then you could use 
the in-built mod_proxy_balancer module). I also use Apache 2.0 so I just 
make a static mapping, which looks something like this:



RewriteMap SERVERS rnd:/etc/apache2/servers.conf

--
servers.conf
--
T1  tomcat.server.com:8081
ALL   tomcat.server.com:8081 



#configure more instances for load balancing if you wish

Peter



mip wrote:


I'm trying to proxy my Tomcat web application through Apache 2.0 using
mod_proxy.

I have uncommented the following in my server.xml:





and I've added the following to my httpd.conf:

  
  ServerName foo.bar.com
  ProxyPass  /  http://foobar.com:8082/app/
  ProxyPassReverse  /  http://foobar.com:8082/app/
  

The pages are being passed without any problems but the sessions are
being
lost as cookies are not being passed. I'm guessing I need to add
something
to the above stanza which rewrite the cookies. But what?
  
  





  



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



Re: Tomcat 5.5, Apache 2.0.XX and mod_proxy

2007-11-27 Thread mip

Thanks Peter.

Should that be:

--
servers.conf
--
T1  tomcat.server.com:8082
ALL   tomcat.server.com:8082

?

If not what is port 8081 being used for?



Peter Stavrinides wrote:
> 
> Thats because your configuration is incomplete, in order for Apache to 
> pass the cookie to the correct context you need to do some additional 
> configuration (or alternatively use a connector like mod_jk)
> 
> You may need to configure the jvmRoute parameter in server.xml, this 
> allows Apache to map to the correct Tomcat context, otherwise deploy 
> your web app in the Tomcat root context.
> 
> maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>enableLookups="false"
>acceptCount="100" debug="0" connectionTimeout="2"
>proxyPort="80" disableUploadTimeout="true" 
>  jvmRoute=T1/>
> 
> 
> You also need to add a server mapping in Apache, one way to do this 
> easily is with a RewriteMap. (If you use Apache 2.2 then you could use 
> the in-built mod_proxy_balancer module). I also use Apache 2.0 so I just 
> make a static mapping, which looks something like this:
> 
> 
> RewriteMap SERVERS rnd:/etc/apache2/servers.conf
> 
> --
> servers.conf
> --
> T1  tomcat.server.com:8081
> ALL   tomcat.server.com:8081 
> 
> 
> #configure more instances for load balancing if you wish
> 
> Peter
> 
> 
> 
> mip wrote:
>> I'm trying to proxy my Tomcat web application through Apache 2.0 using
>> mod_proxy.
>>
>> I have uncommented the following in my server.xml:
>>
>> 
>> 
>> >maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>>enableLookups="false"
>>acceptCount="100" debug="0" connectionTimeout="2"
>>proxyPort="80" disableUploadTimeout="true" />
>>
>> and I've added the following to my httpd.conf:
>>
>>   
>>   ServerName foo.bar.com
>>   ProxyPass  /  http://foobar.com:8082/app/
>>   ProxyPassReverse  /  http://foobar.com:8082/app/
>>   
>>
>> The pages are being passed without any problems but the sessions are
>> being
>> lost as cookies are not being passed. I'm guessing I need to add
>> something
>> to the above stanza which rewrite the cookies. But what?
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-5.5%2C-Apache-2.0.XX-and-mod_proxy-tf4881521.html#a13971776
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat 5.5, Apache 2.0.XX and mod_proxy

2007-11-27 Thread Peter Stavrinides
Thats because your configuration is incomplete, in order for Apache to 
pass the cookie to the correct context you need to do some additional 
configuration (or alternatively use a connector like mod_jk)


You may need to configure the jvmRoute parameter in server.xml, this 
allows Apache to map to the correct Tomcat context, otherwise deploy 
your web app in the Tomcat root context.


  proxyPort="80" disableUploadTimeout="true" 
	   jvmRoute=T1/>



You also need to add a server mapping in Apache, one way to do this 
easily is with a RewriteMap. (If you use Apache 2.2 then you could use 
the in-built mod_proxy_balancer module). I also use Apache 2.0 so I just 
make a static mapping, which looks something like this:



RewriteMap SERVERS rnd:/etc/apache2/servers.conf

--
servers.conf
--
T1  tomcat.server.com:8081
ALL   tomcat.server.com:8081 



#configure more instances for load balancing if you wish

Peter



mip wrote:

I'm trying to proxy my Tomcat web application through Apache 2.0 using
mod_proxy.

I have uncommented the following in my server.xml:





and I've added the following to my httpd.conf:

  
  ServerName foo.bar.com
  ProxyPass  /  http://foobar.com:8082/app/
  ProxyPassReverse  /  http://foobar.com:8082/app/
  

The pages are being passed without any problems but the sessions are being
lost as cookies are not being passed. I'm guessing I need to add something
to the above stanza which rewrite the cookies. But what?
  




Re: *SPAM* Re: How to initialize variables when tomcat load a webservice?

2007-11-27 Thread Tomás Tormo

Delian Krustev wrote:

On Tue, 27 Nov 2007 13:18:47 +0100 Tomás Tormo wrote:
  

I'm developing a webservice wich has to initialize some variables
when it is loaded by tomcat (just because otherwise it is too slow). Can
this be done? Has the client to initialize the class by means of the
constructor or is tomcat the one that will initialize it?



You need to define a listener and handle the context initialized event.

This should give you enough tips for searching :-)


P.S. this looks like a general java web apps programming question, not a 
tomcat one.



Cheers
Delian

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


  

Thank you!!!

Yes, it's enough for searching. Well, it is a general question about 
java web programming, but i didn't know if i could apply this to tomcat 
environment, and i didn't find anything useful on the web... With this 
is enough to start :)


Thank you again!!

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



Re: How to initialize variables when tomcat load a webservice?

2007-11-27 Thread Delian Krustev
On Tue, 27 Nov 2007 13:18:47 +0100 Tomás Tormo wrote:
> I'm developing a webservice wich has to initialize some variables
> when it is loaded by tomcat (just because otherwise it is too slow). Can
> this be done? Has the client to initialize the class by means of the
> constructor or is tomcat the one that will initialize it?

You need to define a listener and handle the context initialized event.

This should give you enough tips for searching :-)


P.S. this looks like a general java web apps programming question, not a 
tomcat one.


Cheers
Delian

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



[Windows service] how to update with new procrun (doc is deprecated)

2007-11-27 Thread galevsky
Hi all,

I made a silent install of Tomcat 5.5 that generates a Tomcat5 Windows
service, with JavaHome set reading my HKLM\SOFTWARE\JavaSoft\Java
Runtime Environment\CurrentVersion key. But this key is false (still a
1.4 JRE) and I want to update the service during my install process to
make JavaHome target the right JRE path (a 1.5 one). I precise that it
is normal that my key is still pointing to an old JRE version, since I
install the 1.5 taking extra care not to change the global system
version (don't want to break other apps running on 1.4).

I can't do it with the GUI bin\tomcat5w.exe, but I would like to run
something like:
-> bin\tomcat5.exe //US//Tomcat5 --JavaHome="C:\Program Files\Java\JRE\1.5.0_11"

I read it in the documentation at
http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html,
but it doesn't work and I am not surprised:

"This section of the documentation applies to procrun 1.0, and is now obsolete."

So, I would be most grateful if someone could tell the way to update
my JavaHome, or give me a link to learn it.


Many thanks,

Gal'


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



Tomcat 5.5, Apache 2.0.XX and mod_proxy

2007-11-27 Thread mip

I'm trying to proxy my Tomcat web application through Apache 2.0 using
mod_proxy.

I have uncommented the following in my server.xml:





and I've added the following to my httpd.conf:

  
  ServerName foo.bar.com
  ProxyPass  /  http://foobar.com:8082/app/
  ProxyPassReverse  /  http://foobar.com:8082/app/
  

The pages are being passed without any problems but the sessions are being
lost as cookies are not being passed. I'm guessing I need to add something
to the above stanza which rewrite the cookies. But what?
-- 
View this message in context: 
http://www.nabble.com/Tomcat-5.5%2C-Apache-2.0.XX-and-mod_proxy-tf4881521.html#a13970134
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



How to initialize variables when tomcat load a webservice?

2007-11-27 Thread Tomás Tormo

Hi

   I'm developing a webservice wich has to initialize some variables 
when it is loaded by tomcat (just because otherwise it is too slow). Can 
this be done? Has the client to initialize the class by means of the 
constructor or is tomcat the one that will initialize it?


Thank you!

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



AccessControlException in Coyote Http11Processor (Tomcat 6.0.14). Bug in Coyote ?

2007-11-27 Thread Delian Krustev

Hi all,

I'm running several similarly configured Tomcat containers all using
security manager. 

On one of the instances I'm getting the following exception from the HTTP 
connector:

Nov 26, 2007 7:42:19 PM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request 
processing
java.security.AccessControlException: org/apache/coyote/Constants
  at 
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1557)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:934)
  at org.apache.coyote.Response.action(Response.java:183)
  at org.apache.coyote.Response.sendHeaders(Response.java:379)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305)
  at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:273)
  at org.apache.catalina.connector.Response.finishResponse(Response.java:486)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:287)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  at java.lang.Thread.run(Thread.java:619)
Nov 26, 2007 7:42:19 PM org.apache.coyote.http11.Http11Processor process
SEVERE: Error finishing response
java.security.AccessControlException: org/apache/coyote/Constants
  at 
org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1557)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:934)
  at org.apache.coyote.Response.action(Response.java:181)
  at 
org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:379)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
  at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  at java.lang.Thread.run(Thread.java:619)

At the same time the AJP connector works fine.

The security policy is a bit looser than the one distributed with tomcat 6.0.14:

 start catalina.policy 
grant codeBase "file:${java.home}/lib/-" {
  permission java.security.AllPermission;
};
grant codeBase "file:${java.home}/jre/lib/ext/-" {
  permission java.security.AllPermission;
};
grant codeBase "file:${java.home}/../lib/-" {
  permission java.security.AllPermission;
};
grant codeBase "file:${java.home}/lib/ext/-" {
  permission java.security.AllPermission;
};
grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
  permission java.security.AllPermission;
};
grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
  permission java.security.AllPermission;
};
grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
  permission java.security.AllPermission;
};
grant codeBase "file:${catalina.home}/lib/-" {
  permission java.security.AllPermission;
};
grant {
  permission java.util.PropertyPermission "*", "read";
  permission java.lang.RuntimePermission "getAttribute";
  permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.jasper.runtime";
  permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.jasper.runtime.*";
  permission java.net.SocketPermission "*:1-", "connect";
  permission java.net.SocketPermission "localhost:1-", "connect";
  permission java.io.FilePermission "${catalina.home}/lib/-", "read";
  permission java.io.FilePermission "${java.home}/-", "read";
  permission java.lang.RuntimePermission "accessDeclaredMembers";
  permission java.lang.RuntimePermission "getClassLoader";
  permission java.lang.RuntimePermission "getProtectionDomain";
  permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
  permission ognl.OgnlInvokePermission "*";
  permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.tomcat.dbcp.collections";
  permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.tomcat.dbcp.pool.impl";
  permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.tomcat.dbcp.dbcp";
  permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.tomcat.dbcp.pool";
};
 end catalina.policy 

catalina.properties is unmodified .

The connectors are configured like this:






My guess is that either this is a bug in the Coyote HTTP connector or
the security policy is not strict enough and one of the 
installed applications (third party, I don't have access to the source)
modifies the security manager somehow. My modifications
to the policy do not appear to grant such permissions to the webapps, so if
the assumption is right it's a bug in the distributed catalina.policy.

Any ideas ?


Thanks
--
Delian

--

SV: additional ROOT folder

2007-11-27 Thread Wilhelmsen Tor Iver
> Is it possible that I have more than one root folder?

Yes, in the senses that 

* the same Tomcat install can be used to run multiple, separate
instances on different ports, using different catalina.base folders

* a Context in an instance can declare its own docBase folder elsewhere
on the machine, instead of being under the "automatic" location like
'webapps'

But a particular URL needs to map to one resource, so you cannot have
two web applications both be the default/root web application.

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



additional ROOT folder

2007-11-27 Thread kz
Hi,

Is it possible that I have more than one root folder?


Regards,

Khurram.


RE: Tomcat implementation: please help

2007-11-27 Thread Patrick2901

Hi,
the log file is empty!
Then i've reinstalled everything: JDK and Tomcat. I've set the JAVA_HOME &
TOMCAT_HOME variables.
I've changed the Tomcat port from 8080 to 1977; no change, logfile still
empty and "cannot find server".

Caldarale, Charles R wrote:
> 
>> From: Patrick2901 [mailto:[EMAIL PROTECTED] 
>> Subject: Re: Tomcat implementation: please help
>> 
>> Then i start Tomcat by launching tomcat/bin/startup.bat. A 
>> command prompt window briefly appears.
> 
> Look in the logs to see what the problem is.  If you haven't shut down
> the previous Tomcat instance that was running as a service, it may be
> holding the ports, not allowing the new installation to use them.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-implementation%3A-please-help-tf4875257.html#a13968200
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Java file name is displayed when the JSP file is accessed.

2007-11-27 Thread Ognjen Blagojevic

Pavan Singaraju wrote:

i have a web application which is deployed on Tomcat 5.0.18.
Sometimes when i am navigating to a page using menu of my application,
it is displaying a java file name with full package name. The java
file is a business logic processing location on the application. Why
is that happening. Could anybody guide me why its happening?


Could you give an example of the generated page?

Regards,
Ognjen

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



RE: Passing JVM parameters through the GUI in Tomcat 5.0.28

2007-11-27 Thread Karim Zaki
Hi Chuck,

Great idea! :) I changed the service to log on as a domain user and it worked. 
Thanks a million. I don't know how that could have slipped my mind.

Thanks again.

Karim

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Monday, November 26, 2007 6:14 PM
To: Tomcat Users List
Subject: RE: Passing JVM parameters through the GUI in Tomcat 5.0.28

> From: Karim Zaki [mailto:[EMAIL PROTECTED]
> Subject: RE: Passing JVM parameters through the GUI in Tomcat 5.0.28
>
> -Dcom.vignette.workingDir=\\vgn-cma-vm\Vignette\vcm\inst-shared

Try moving this to a local file and see if the problem disappears.  Also
try running this from a command prompt under a known account to see if
the UNC reference will work at all.  The account Tomcat is running under
as a service may not be able to establish the SMB connection to the
remote file system.

 - Chuck


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

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


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