Re: SAML Cross-Domain SSO

2009-04-29 Thread Noam Ramonet

Thanks Pid, that is a good reference.

Have anybody tried OpenSSO on Tomcat, or could give some suggestion 
about this two solutions  (Shibboleth  vs  OpenSSO).




Noam Ramonet wrote:
  

Hello,

I need to implement SAML Cross-Domain SSO on Tomcat 5.5 servers.
Initially, IdP initiated post binding with out-of-band identity linking
would be fine. Could anybody recommend me an API or, better, a base
implementation?



We often hear about Shibboleth deployments, but I have absolutely no
idea if it supports the rest of what you want.

  

Does anybody knows whether ASF has plans to incorporate SAML based SSO
in any project?



I don't.

p



  

Thanks.

Noam

-
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: Extra Threads in background

2009-04-29 Thread Pid
David.Meldrum wrote:
 Running Tomcat 6.0.18  Standalone on Windows XP.
 
 I need a background task which I implemented as a thread that I stated
 in the ContextListerner.  In the contextInitilized() method I create and
 started the background process.  I give it a name and made it a daemon. 
 All that works great!  The problem I noticed is that while I only call
 the BackGroundThread.*start()* method once.  I see at least two threads
 running in Tomcat (las seen in Thread dump and looking at it in
 Probe).  I only instantiate one instance, but Tomcat behaves like it
 is also calling start() again after I return out of the

Why not override the start method of your thread and drop a stack trace
and log message each time it's called? E.g.

some.log(Thread.currentThread().getName() +  in  +
servletContext.getContextPath() +  Stacktrace:);
new Throwable().printStackTrace();

You might even throw in an AtomicInteger count to see if how many
attempts to start are occuring.

p


 ServerContextListener.contextInitialized() method.  Now I can program my
 background  task to be thread safe and avoid conflicts with it's clones,
 but it seems wasteful, and it causes a lot of lock friction.  So my
 question is, why do I see two threads running, when I only started one
 and how can I avoid the duplicate thread?
 
 Before you say why don't you run the task as a separate OS task, I am
 managing a resource (RS232 serial line) that is owned and controlled by
 my Tomcat application, so it must run inside Tomcat.
 


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



Re: Develop Configuration of Valve

2009-04-29 Thread Pid
Dinesh Gupta wrote:
 Hi All,
 
  Have any one developed the custom Error Valve. So that if any exception 
 occurs , I can route it as I want.
 
 Please help me.

Step 1. Download latest Tomcat source from tomcat.apache.org.
Step 2. Create copy of modified Error Valve (in your own package).
Step 3. Configure your application to use new Valve.

p


 Thanks is advance
 
 Regards,
 Dinesh Gupta
 
 _
 How fun is this? IMing with Windows Live Messenger just got better.
 http://www.microsoft.com/india/windows/windowslive/messenger.aspx


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



Re: sample java application to test session replication in transparen failover cluster

2009-04-29 Thread Pid
dhanesh kk wrote:
 Hi
 
 
 Does any one have a sample  java web application to share   to test a
 transparent failover cluster in   tomcat-6.0.8  (JDK 1.5.0_15)  .
 
  I want to trouble shoot  either  my cluster or my Java application. Because
 sessions are expiring  when I shutdown a one tomcat node .
 
 So to make sure whether my java application is the culprit not doing the
 session replication , I want a working copy of a web application  in a
 transparent cluster with tomcat 6.0.08 .
 
 Is any body willing to share I appreciate it so much .
 
 Thanks in advance
 K.K Dhanesh
 

That's 3 messages you've sent in 24 hours asking the same thing.

Tip #1 people typically don't have sample web applications that test
specific functionality lying around, or if they do I've not seen people
share them.

Tip #2 people typically don't share generic configs, because they're all
changed to suit specific needs.


http://www.catb.org/~esr/faqs/smart-questions.html


p

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



Re: Using encoded slashes safely

2009-04-29 Thread Tim Funk
IIRC, HttpServletRequest.getQueryString() should provide the query 
string you desire.


-Tim

Bill Higgins wrote:

On Tue, Apr 28, 2009 at 3:19 AM, Mark Thomas ma...@apache.org wrote:

Bill Higgins wrote:

We have a servlet that acts as a proxy to other URLs from different
origins. E.g. via your web app you could get to the Google home page
via a URL like:

http://localhost/myapp/proxy/http%3A%2F%2Fwww.google.com%2F

Using this URL pattern, we immediately hit the Tomcat noSlash
restriction (Directory traversal CVE-2007-0450) and in order for our
proxy to work we have to set the environment variable
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH to true.

A better workaround might be to pass the required URL as a query parameter.


Thanks for the idea. Although this breaks our current users, we're
still in an early enough phase of development that they will probably
be able to contain it.

The only technical downside of this technique that I can see is that
there appears to be no way to get the encoded content of a request
parameter. When using the path, I could use
HttpServletRequest.html#getRequestURI to get the encoded (or
un-decoded) form of the URI but I see no similar capability for
request parameters - any ideas?




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



Re: Using encoded slashes safely

2009-04-29 Thread Bill Higgins
On Tue, Apr 28, 2009 at 3:19 AM, Mark Thomas ma...@apache.org wrote:
 Bill Higgins wrote:
 We have a servlet that acts as a proxy to other URLs from different
 origins. E.g. via your web app you could get to the Google home page
 via a URL like:

 http://localhost/myapp/proxy/http%3A%2F%2Fwww.google.com%2F

 Using this URL pattern, we immediately hit the Tomcat noSlash
 restriction (Directory traversal CVE-2007-0450) and in order for our
 proxy to work we have to set the environment variable
 org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH to true.

 A better workaround might be to pass the required URL as a query parameter.

Thanks for the idea. Although this breaks our current users, we're
still in an early enough phase of development that they will probably
be able to contain it.

The only technical downside of this technique that I can see is that
there appears to be no way to get the encoded content of a request
parameter. When using the path, I could use
HttpServletRequest.html#getRequestURI to get the encoded (or
un-decoded) form of the URI but I see no similar capability for
request parameters - any ideas?

 I have more questions on how to respond to this Tomcat behavior, but
 I'm hoping someone could provide more input on the rationale behind
 the current fix for CVE-2007-0450 to provide additional context for my
 other questions.

 I've been back over the private discussions that took place at the time. The 
 aim
 was to provide a fix without breaking the existing functionality. There was no
 debate around changing the existing functionality, nor the correctness of it.

I certainly understand the need to not break users. However, just for context:

1) Do you consider the automatic decoding of encoded slashes to be a
defect vs. the URI spec?
2) If so, do you think it would be worth it if I filed a bug report
(or does one already exist)?

Thanks again for your help.

 Mark

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





-- 

- Bill

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



Re: Having tomcat as an OSGi bundle

2009-04-29 Thread Mark Thomas
jochen wrote:
 Will tomcat 7 support OSGI?

There are no plans for this I am aware of.

Mark


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



Re: Using encoded slashes safely

2009-04-29 Thread Mark Thomas
Bill Higgins wrote:
 1) Do you consider the automatic decoding of encoded slashes to be a
 defect vs. the URI spec?
It looks like it based on my reading so far.

 2) If so, do you think it would be worth it if I filed a bug report
 (or does one already exist)?
Please do. If there is a good reason for the current behaviour, this will
probably flush it out.

Mark


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



Re: sample java application to test session replication in transparen failover cluster

2009-04-29 Thread dhanesh kk
Thanks for the information.

P



On Wed, Apr 29, 2009 at 2:27 PM, Pid p...@pidster.com wrote:

 dhanesh kk wrote:
  Hi
 
 
  Does any one have a sample  java web application to share   to test a
  transparent failover cluster in   tomcat-6.0.8  (JDK 1.5.0_15)  .
 
   I want to trouble shoot  either  my cluster or my Java application.
 Because
  sessions are expiring  when I shutdown a one tomcat node .
 
  So to make sure whether my java application is the culprit not doing the
  session replication , I want a working copy of a web application  in a
  transparent cluster with tomcat 6.0.08 .
 
  Is any body willing to share I appreciate it so much .
 
  Thanks in advance
  K.K Dhanesh
 

 That's 3 messages you've sent in 24 hours asking the same thing.

 Tip #1 people typically don't have sample web applications that test
 specific functionality lying around, or if they do I've not seen people
 share them.

 Tip #2 people typically don't share generic configs, because they're all
 changed to suit specific needs.


 http://www.catb.org/~esr/faqs/smart-questions.htmlhttp://www.catb.org/%7Eesr/faqs/smart-questions.html


 p

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




GC Problem

2009-04-29 Thread S Arvind
Tomcat after running for couple of hours , somthing is getting wrong and it
is keep on doing Garbage Collection(as it dispaly in console) . And tomcat
also becoming dump slow.. and we cant able to do any, until it restarts...


JAVA_HOME=/usr/java/jdk1.5.0_13
JRE_HOME=/usr/java/jdk1.5.0_13/jre
export CATALINA_OPTS=-verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails
-XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true

server is 4 gb ram with two tomcat instance (5  6).

Thanks,
Arvind S





Many of lifes failure are people who did not realize how close they were to
success when they gave up.
-Thomas Edison


Tomcat Users Meetup: London 30th April

2009-04-29 Thread Pid
Not a great deal of enthusiasm so far, so I'm reposting this to see if
it prompts any additional interest.

Failing that, I'm up for a couple of light refreshing jars of pop if
anyone else is interested in an informal game of The Hunting of the Chuck.

Prizes may include a bar of chocolate.


p




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



Re: Tomcat Users Meetup: London 30th April

2009-04-29 Thread S Arvind
Come to india , lot lot of us here using tomcat .!!!

-Arvind s



*
Many of lifes failure are people who did not realize how close they were to
success when they gave up.
-Thomas Edison
*

On Wed, Apr 29, 2009 at 5:58 PM, Pid p...@pidster.com wrote:

 Not a great deal of enthusiasm so far, so I'm reposting this to see if
 it prompts any additional interest.

 Failing that, I'm up for a couple of light refreshing jars of pop if
 anyone else is interested in an informal game of The Hunting of the
 Chuck.

 Prizes may include a bar of chocolate.


 p




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




Re: Tomcat Users Meetup: London 30th April

2009-04-29 Thread Mark Thomas
Pid wrote:
 Not a great deal of enthusiasm so far, so I'm reposting this to see if
 it prompts any additional interest.
 
 Failing that, I'm up for a couple of light refreshing jars of pop if
 anyone else is interested in an informal game of The Hunting of the Chuck.
 
 Prizes may include a bar of chocolate.

Been meaning to post something all week. How does meeting at ~18.00 at London
Bridge sound and we'll head towards the river to find drinks/food?

Mark


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



Re: GC Problem

2009-04-29 Thread S Arvind
in console its keep on displaying this every second..

12945.607: [Full GC [PSYoungGen: 340288K-39757K(343552K)] [PSOldGen:
699071K-699071K(699072K)] 1039359K-738829K(1042624K) [PSPermGen:
346754K-346754K(346816K)], 2.6522010 secs]
sessionCreated-C63974AACCC2800C89576C0C693467CB
12948.363: [Full GC [PSYoungGen: 340288K-24050K(343552K)] [PSOldGen:
699071K-699071K(699072K)] 1039359K-723122K(1042624K) [PSPermGen:
346754K-346754K(346816K)], 2.6768820 secs]
sessionCreated-8B39EA776552C44F126958B979E36684
12951.149: [Full GC [PSYoungGen: 340288K-37166K(343552K)] [PSOldGen:
699071K-699071K(699072K)] 1039359K-736238K(1042624K) [PSPermGen:
346755K-346755K(346816K)], 2.6909590 secs]
sessionCreated-D2E9E1A9B8C77500D6BACD40A3194F1D
Apr 29, 2009 8:39:11 AM org.apache.tomcat.util.http.Parameters
processParameters
WARNING: Parameters: Invalid chunk ignored.
12953.947: [Full GC [PSYoungGen: 340288K-37218K(343552K)] [PSOldGen:
699071K-699071K(699072K)] 1039359K-736290K(1042624K) [PSPermGen:
346756K-346756K(346816K)], 2.6655880 secs]
sessionCreated-E33C0E94BB3C4AE3A767FC2F5025BDFF
12956.716: [Full GC [PSYoungGen: 340288K-37348K(343552K)] [PSOldGen:
699071K-699071K(699072K)] 1039359K-736420K(1042624K) [PSPermGen:
346756K-346756K(346816K)], 2.6625880 secs]
sessionCreated-93623EE1D595BD38ED5CE42BF15165CB
12959.483: [Full GC [PSYoungGen: 340288K-24075K(343552K)] [PSOldGen:
699071K-699071K(699072K)] 1039359K-723147K(1042624K) [PSPermGen:
346756K-346755K(346816K)], 2.6804850 secs]
sessionCreated-DC1BBF75947F0F52CDBA4461B33FD0E1
Apr 29, 2009 8:39:19 AM org.apache.tomcat.util.http.Parameters
processParameters
WARNING: Parameters: Invalid chunk ignored.
12962.272: [Full GC [PSYoungGen: 340288K-30321K(343552K)] [PSOldGen:
699071K-699071K(699072K)] 1039359K-729393K(1042624K) [PSPermGen:
346756K-346756K(346816K)], 2.6328120 secs]


Arvind




*
Many of lifes failure are people who did not realize how close they were to
success when they gave up.
-Thomas Edison
*

On Wed, Apr 29, 2009 at 5:50 PM, S Arvind arvindw...@gmail.com wrote:

 Tomcat after running for couple of hours , somthing is getting wrong and it
 is keep on doing Garbage Collection(as it dispaly in console) . And tomcat
 also becoming dump slow.. and we cant able to do any, until it restarts...


 JAVA_HOME=/usr/java/jdk1.5.0_13
 JRE_HOME=/usr/java/jdk1.5.0_13/jre
 export CATALINA_OPTS=-verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails
 -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true

 server is 4 gb ram with two tomcat instance (5  6).

 Thanks,
 Arvind S





 Many of lifes failure are people who did not realize how close they were
 to success when they gave up.
 -Thomas Edison



Re: Tomcat Users Meetup: London 30th April

2009-04-29 Thread Pid
Mark Thomas wrote:
 Pid wrote:
 Not a great deal of enthusiasm so far, so I'm reposting this to see if
 it prompts any additional interest.

 Failing that, I'm up for a couple of light refreshing jars of pop if
 anyone else is interested in an informal game of The Hunting of the Chuck.

 Prizes may include a bar of chocolate.
 
 Been meaning to post something all week. How does meeting at ~18.00 at London
 Bridge sound and we'll head towards the river to find drinks/food?

+1 from me.

p


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


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



RE: GC Problem

2009-04-29 Thread Peter Crowther
 From: S Arvind [mailto:arvindw...@gmail.com]
 Tomcat after running for couple of hours , somthing is
 getting wrong and it
 is keep on doing Garbage Collection(as it dispaly in console)
 . And tomcat
 also becoming dump slow.. and we cant able to do any, until
 it restarts...

I suspect your application has a memory leak somewhere - and it is almost 
always the application, not Tomcat :-).  Use a profiler to find out where all 
the memory is going.

Do you get out-of-memory errors in the Tomcat log files if you leave the 
application running even once it has become slow?

- Peter

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



Re: GC Problem

2009-04-29 Thread S Arvind
Yeah daily atleast once Out-of-memory will raise and we will restart the
tomcat.

Arvind S


*
Many of lifes failure are people who did not realize how close they were to
success when they gave up.
-Thomas Edison*


On Wed, Apr 29, 2009 at 6:19 PM, Peter Crowther peter.crowt...@melandra.com
 wrote:

  From: S Arvind [mailto:arvindw...@gmail.com]
  Tomcat after running for couple of hours , somthing is
  getting wrong and it
  is keep on doing Garbage Collection(as it dispaly in console)
  . And tomcat
  also becoming dump slow.. and we cant able to do any, until
  it restarts...

 I suspect your application has a memory leak somewhere - and it is almost
 always the application, not Tomcat :-).  Use a profiler to find out where
 all the memory is going.

 Do you get out-of-memory errors in the Tomcat log files if you leave the
 application running even once it has become slow?

- Peter

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




RE: GC Problem

2009-04-29 Thread Peter Crowther
 From: S Arvind [mailto:arvindw...@gmail.com]
 Yeah daily atleast once Out-of-memory will raise and we will
 restart the tomcat.

As the amount of free memory goes down, the JVM will have to collect garbage 
more and more frequently, until you get the symptoms you see where it is 
spending most of its time in GC.

You can prove it's a memory leak by increasing the amount of RAM available to 
the JVM.  If you still run out of memory - but a little later - it's almost 
certainly a leak.

- Peter

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



Re: GC Problem

2009-04-29 Thread S Arvind
Is there any good settings for GC for tomcat running in server with 4GB and
Quad Core processor. I bascially need GC parameter for RESOURCE HUNGRY WEB
APPLICATION

-Arvind S


*
Many of lifes failure are people who did not realize how close they were to
success when they gave up.
-Thomas Edison
*

On Wed, Apr 29, 2009 at 6:19 PM, Peter Crowther peter.crowt...@melandra.com
 wrote:

  From: S Arvind [mailto:arvindw...@gmail.com]
  Tomcat after running for couple of hours , somthing is
  getting wrong and it
  is keep on doing Garbage Collection(as it dispaly in console)
  . And tomcat
  also becoming dump slow.. and we cant able to do any, until
  it restarts...

 I suspect your application has a memory leak somewhere - and it is almost
 always the application, not Tomcat :-).  Use a profiler to find out where
 all the memory is going.

 Do you get out-of-memory errors in the Tomcat log files if you leave the
 application running even once it has become slow?

- Peter

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




RE: GC Problem

2009-04-29 Thread Peter Crowther
 From: S Arvind [mailto:arvindw...@gmail.com]
 Is there any good settings for GC for tomcat running in
 server with 4GB and Quad Core processor.

As much RAM as the OS doesn't need for other purposes.  There's no straiht 
answer for this, as it depends what else is running on the box.  You might try 
initial and maximum heap sizes of 3 Gbytes, but that's a finger-in-the-air 
guess.  Try it; measure it; and adjust it if your application spends a lot of 
time collecting garbage, or if the OS starts using its swap file.

 I bascially need GC parameter for
 RESOURCE HUNGRY WEB APPLICATION

I'm going to make a prediction: it doesn't matter how much RAM you allocate, 
you won't have enough.  You will still run out of memory and have to restart 
Tomcat.  I think this, because I think you have a memory leak in your 
application.

- Peter

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



Re: GC Problem

2009-04-29 Thread Pid
S Arvind wrote:
 Is there any good settings for GC for tomcat running in server with 4GB and
 Quad Core processor. I bascially need GC parameter for RESOURCE HUNGRY WEB
 APPLICATION

Why not try fixing the memory leak instead?

Reconfiguring the JVM params, memory or GC will only delay the
inevitable OutOfMemory error.

The YourKit profiler is frequently mentioned on this list, but there
are others.


p




 -Arvind S
 
 
 *
 Many of lifes failure are people who did not realize how close they were to
 success when they gave up.
 -Thomas Edison
 *
 
 On Wed, Apr 29, 2009 at 6:19 PM, Peter Crowther peter.crowt...@melandra.com
 wrote:
 
 From: S Arvind [mailto:arvindw...@gmail.com]
 Tomcat after running for couple of hours , somthing is
 getting wrong and it
 is keep on doing Garbage Collection(as it dispaly in console)
 . And tomcat
 also becoming dump slow.. and we cant able to do any, until
 it restarts...
 I suspect your application has a memory leak somewhere - and it is almost
 always the application, not Tomcat :-).  Use a profiler to find out where
 all the memory is going.

 Do you get out-of-memory errors in the Tomcat log files if you leave the
 application running even once it has become slow?

- Peter

 -
 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: Extra Threads in background

2009-04-29 Thread David.Meldrum
Pid, Logging the stack trace is an excellent idea!  I already have been 
counting the the number of Thread starts() (run()) and I found it is 
indeed being started again somewhere.  Looks like I need lots of 
experiments.  My least favorite activity is programming by experiment.


-d

Pid wrote:

David.Meldrum wrote:
  

Running Tomcat 6.0.18  Standalone on Windows XP.

I need a background task which I implemented as a thread that I stated
in the ContextListerner.  In the contextInitilized() method I create and
started the background process.  I give it a name and made it a daemon. 
All that works great!  The problem I noticed is that while I only call

the BackGroundThread.*start()* method once.  I see at least two threads
running in Tomcat (las seen in Thread dump and looking at it in
Probe).  I only instantiate one instance, but Tomcat behaves like it
is also calling start() again after I return out of the



Why not override the start method of your thread and drop a stack trace
and log message each time it's called? E.g.

some.log(Thread.currentThread().getName() +  in  +
servletContext.getContextPath() +  Stacktrace:);
new Throwable().printStackTrace();

You might even throw in an AtomicInteger count to see if how many
attempts to start are occuring.

p


  

ServerContextListener.contextInitialized() method.  Now I can program my
background  task to be thread safe and avoid conflicts with it's clones,
but it seems wasteful, and it causes a lot of lock friction.  So my
question is, why do I see two threads running, when I only started one
and how can I avoid the duplicate thread?

Before you say why don't you run the task as a separate OS task, I am
managing a resource (RS232 serial line) that is owned and controlled by
my Tomcat application, so it must run inside Tomcat.





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


  


RE: Extra Threads in background

2009-04-29 Thread Peter Crowther
 From: David.Meldrum [mailto:david.meld...@verizon.net]
 My least favorite activity is programming by experiment.

Try Morris dancing sometime ;-).*  Alternatively, enable debugging, connect a 
suitable debugger and set a breakpoint in the code you want to prevent being 
called twice?  Depends on the toolset you have available.

- Peter

* Before I get descended upon by a side of stick-wielding real ale enthusiasts 
wearing bells, I should probably point out that I've played for, run sound for 
and danced Morris.

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



Re: Scheduling tasks in Tomcat

2009-04-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Martin,

On 4/27/2009 9:39 PM, Martin Gainty wrote:
 javac .\org\quartz\ee\servlet\QuartzInitializerServlet.java
 place .\org\quartz\ee\servlet\QuartzInitializerServlet.class to 
 WEB-INF/classes
 
 your web.xml will need to associate the Servlet class with url-pattern as in 
 this configuration:

This is bad advice. It would be better to use a ServletContextListener
than a Servlet.

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

iEYEARECAAYFAkn4g3sACgkQ9CaO5/Lv0PDgLgCfRu0eC8K8xdz4rSfL0vIUc8Cc
/2YAn0cv9p7OYBKSi+UfyVPTbxY0+8Di
=T4Lk
-END PGP SIGNATURE-

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



Apache Tribes: does anything actually use securePort

2009-04-29 Thread william . m . smith
I am trying to figure out whether it is possible to have Apache 6.0.18 use  
an encrypted connection to replicate sessions within a cluster. There  
appears to be a way to specify a securePort on a ChannelReceiver but it  
does not looks as if Tomcat actually uses that setting.


Has anyone had any experience using the ChannelReceiver securePort setting?

Bill Smith
Austin, TX


Re: Scheduling tasks in Tomcat

2009-04-29 Thread supareno

Hi,

if it is possible, you could use Spring and the scheduling Quartz 
implementation

check out this
http://static.springframework.org/spring/docs/2.5.x/reference/scheduling.html

regards

supareno

Hi

I would suggest u to use the Listener tag instead of Load on startup

listener
listener-class
  org.quartz.ee.servlet.QuartzInitializerListener
/listener-class
/listener

As per Quartz Enterprise Job Scheduler API (1.6.2)

org.quartz.ee.servlet.QuartzInitializerServlet  is deprecated




with regards
Karthik


-Original Message-
From: Aden Jones [mailto:adenjo...@gmail.com]
Sent: Tuesday, April 28, 2009 9:35 AM
To: users@tomcat.apache.org
Subject: RE: Scheduling tasks in Tomcat




mgainty wrote:
  

javac .\org\quartz\ee\servlet\QuartzInitializerServlet.java
place .\org\quartz\ee\servlet\QuartzInitializerServlet.class to
WEB-INF/classes

Okay so QuatzInitializerServlet.java is the class that I create for
scheduling the events.

your web.xml will need to associate the Servlet class with url-pattern as
in this configuration:
 servlet
 servlet-nameServlet/servlet-name

servlet-classorg.quartz.ee.servlet.QuartzInitializerServlet/servlet-class

 It would be okay I suppose if I use my existing structure and reference
servlet-classcom.timekeeper.util.QuartzInitializerServlet/servlet-class
?


  load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
  servlet-nameServlet/servlet-name
  url-pattern*/url-pattern

Why would I need to add a url pattern if it only needs to be run on
startup?
 /servlet-mapping

you will also need an startup display page index.jsp and configure
index.jsp as welcome-file e.g.

  welcome-file-list
welcome-fileindex.jsp/welcome-file
  /welcome-file-list

HTH
Martin
__
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung /
Note de déni et de confidentialité
This message is confidential. If you should not be the intended receiver,
then we ask politely to report. Each unauthorized forwarding or
manufacturing of a copy is inadmissible. This message serves only for the
exchange of information and has no legal binding effect. Due to the easy
manipulation of emails we cannot take responsibility over the the
contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
copie de ceci est interdite. Ce message sert à l'information seulement et
n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
les email peuvent facilement être sujets à la manipulation, nous ne
pouvons accepter aucune responsabilité pour le contenu fourni.








Date: Mon, 27 Apr 2009 17:52:16 -0700
From: adenjo...@gmail.com
To: users@tomcat.apache.org
Subject: Re: Scheduling tasks in Tomcat


I will probably use quartz to schedule the actual task and add it to my
webapp as my teacher would prefer that the servlet contains everything.

What I don't understand is how or if (after I create my class that
contains
the scheduling code) Tomcat actually runs the code. Do I need to add
something to web.xml to tell Tomcat to run it. Does Tomcat run every
class
in the servlet automatically.




--
View this message in context:
http://www.nabble.com/Scheduling-tasks-in-Tomcat-tp23251939p23268143.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

  

_
Rediscover Hotmail®: Now available on your iPhone or BlackBerry
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile2_042009




--
View this message in context: 
http://www.nabble.com/Scheduling-tasks-in-Tomcat-tp23251939p23269777.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



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



  




-
To unsubscribe, e-mail: 

Migrating website from own server to hosting company

2009-04-29 Thread dfobox

I got mochahost Tomcat plan and moving website to remote server. My server
ran Tomcat 4.0.4-50 and now website has to work under 5.5.26.
What should be done to make this process smooth?
Thanks!


-- 
View this message in context: 
http://www.nabble.com/Migrating-website-from-own-server-to-hosting-company-tp23298137p23298137.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: Migrating website from own server to hosting company

2009-04-29 Thread dfobox

This is weird. I have copied website but it works randomly - I click on a
link to one of jsp pages and sometimes it shows what it's supposed to show,
but every other time it comes up with error - the same for any page.

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP: 
JSP FileName:null
Java
FileName:/usr/local/jakarta/apache-tomcat-5.5.25/work/Catalina/jerhel.com/_//org/apache/jsp/product_005flines_005fhome_jsp.java


An error occurred at line: 125 in the generated java file
Syntax error on token static, @ expected after this token
JSP FileName:null
Java
FileName:/usr/local/jakarta/apache-tomcat-5.5.25/work/Catalina/jerhel.com/_//org/apache/jsp/product_005flines_005fhome_jsp.java


An error occurred at line: 125 in the generated java file
Syntax error, insert enum Identifier to complete EnumHeader
JSP FileName:null
Java
FileName:/usr/local/jakarta/apache-tomcat-5.5.25/work/Catalina/jerhel.com/_//org/apache/jsp/product_005flines_005fhome_jsp.java


An error occurred at line: 131 in the generated java file
Syntax error on token }, ; expected

Stacktrace:

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:98)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.25 logs.

-- 
View this message in context: 
http://www.nabble.com/Migrating-website-from-own-server-to-hosting-company-tp23298137p23298528.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: Migrating website from own server to hosting company

2009-04-29 Thread dfobox

Error comes out only on first click, if you go back and click it again page
loads normally.
any clues?
-- 
View this message in context: 
http://www.nabble.com/Migrating-website-from-own-server-to-hosting-company-tp23298137p23299201.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



EJB Application development with tomcat 5.5 ?

2009-04-29 Thread Sridhar n
Hello,
I want to do EJB applications using tomcat 5.5 .Is it possible to do with
tomcat?Could you suggest me in this concern...

thanks  regards
Sridhar


Re: GC Problem

2009-04-29 Thread Juha Laiho
S Arvind wrote:
 Yeah daily atleast once Out-of-memory will raise and we will restart the
 tomcat.

As others have already said, this has all the symptoms of a memory leak.

It could be Tomcat, but more likely is your application. The continuous
GC is a sign of the Java VM running out of memory assigned for it, and
desperately attempting to find something to throw away.

In an ideal case you'll have almost linear correlation of amount of
Java heap memory assigned and amount of time your application remains
working properly.

And I second the notion that YourKit is a good tool for finding out which
objects are eating up the memory (and also, what is the reference chain
through different objects to the ones accumulating -- so you'll have
easier time to find out where the references could and should be cleaned up).

-- 
..Juha

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



Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-04-29 Thread Dave Cherkassky

A long question:

First, I have a Servlet that writes to response.getOutputStream().  Here's a 
snippet:
 public class AuditTrailServlet extends HttpServlet {
   public void doGet( HttpServletRequest request, HttpServletResponse response )
 response.setContentType( application/vnd.ms-excel );
 response.setHeader( Content-Disposition, attachment; filename= + 
fileName );

 ResultSet rs = ...;
 for ( int row = 0 ; rs.next(); row++ ) {
   // iterate over each row in the ResultSet
   for( int col = 0; fieldNameIt.hasNext(); col++ ) {
 // iterate over each column in the results, write to spreadsheet
 
 // custom code.
 // let us assume this block has a bug that occasionally throws a NullPointerException, 
 // but only after a bunch of cells are written first.
 
 response.getOutputStream().write( /* excel byte[] */ );
 
 // more custom code.

   }
 }
 rs.close();
 
 response.setStatus( HttpServletResponse.SC_OK );

   }
 }

Second, I have the following in the web.xml file, to tell tomcat to use a 
custom error page:
 error-page
   exception-typejava.lang.Throwable/exception-type
   location/myError.jsp/location
 /error-page

Last, here's myError.jsp:
 %@ page isErrorPage='true' %
 html
 body
 h1System Error/h1
 p
 You have encountered a system error.
 /p
 
 %-- custom error processing that can't be done in a static .html page --%
 
 /body

 /html


So, it all seems standard and straight-forward, right?



However, instead of seeing a nice custom error page when the NPE happens, I get the 
ugly Tomcat error page, and
the following in the Tomcat logs:
 java.lang.IllegalStateException: getOutputStream() has already been called for 
this response
 at org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java:709)
 at 
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:127)
 at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:128)
 at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:121)
 at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:137)
 at 
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:153)
 at 
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:148)
 at org.apache.jsp.error_jsp._jspService(error_jsp.java:284)


Yes, I know -- I *am* using Tomcat 4.1 (rather than the latest and greatest) 
for various legacy and political reasons.


But my question is this:
- Is this a known bug?  Or am I doing something wrong with either the servlet, 
the web.xml or with the jsp page?

Thanks,
--
Dave Cherkassky
 VP of Software Development
 DJiNN Software Inc.
 416.504.1354

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



Re: Migrating website from own server to hosting company

2009-04-29 Thread dfobox

ok, those errors are gone, seems like I just needed to restart my mac :)
I have another error, but if I try to change JSP file source, nothing
happens. Seems like java files need to be regenerated. Support says I need
to restart Tomcat - even this doesn't help.

-- 
View this message in context: 
http://www.nabble.com/Migrating-website-from-own-server-to-hosting-company-tp23298137p23301911.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: Migrating website from own server to hosting company

2009-04-29 Thread Pid
dfobox wrote:
 ok, those errors are gone, seems like I just needed to restart my mac :)
 I have another error, but if I try to change JSP file source, nothing
 happens. Seems like java files need to be regenerated. Support says I need
 to restart Tomcat - even this doesn't help.
 

try compiling your app before deploying it.

 http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html


p

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



GZIP Comrpession Problem

2009-04-29 Thread Glen R. Goodwin
Using Tomcat 6.0.18 I have configured GZIP compression by adding the
following lines to my connector.  

 

compression=force

compressableMimeType=text/html,text/xml,text/plain,text/css,text/javascript
,text/json,application/json

noCompressionUserAgents=gozilla, traviata

 

I am not using APR or anything other than tomcat.

 

The question is this: Is there any reason why some .js files are getting
gzip compression and some are not?

 

I have checked to make sure the mime type is correct.  I have verified the
problem using multiple connection agents (Firefox, curl, etc).  

 

My .JS file that is not getting compressed is 222k.  Smaller files seem to
get compressed, but larger ones don't.  I haven't found reports via an
internet search that imply there is some upper limit setting.

 

Anyone have any thoughts?

 

Glen



Re: GZIP Comrpession Problem

2009-04-29 Thread Pid
Glen R. Goodwin wrote:
 Using Tomcat 6.0.18 I have configured GZIP compression by adding the
 following lines to my connector.  
 
 compression=force
 
 compressableMimeType=text/html,text/xml,text/plain,text/css,text/javascript
 ,text/json,application/json
 
 noCompressionUserAgents=gozilla, traviata
 
 I am not using APR or anything other than tomcat.
 
 The question is this: Is there any reason why some .js files are getting
 gzip compression and some are not?
 
 I have checked to make sure the mime type is correct.  I have verified the
 problem using multiple connection agents (Firefox, curl, etc).  
 
 My .JS file that is not getting compressed is 222k.  Smaller files seem to
 get compressed, but larger ones don't.  I haven't found reports via an
 internet search that imply there is some upper limit setting.
 
 Anyone have any thoughts?

Minify your javascript?

p


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



PSYoungGen on Tomcat 6

2009-04-29 Thread S Arvind
If tomcat is started and in idle state without any request handling, whether
the PSYoungGen will keep on increasing in tomcat 6?
(due to any listener or any tomcat's own process)

Thanks,
Arvind S


*
Many of lifes failure are people who did not realize how close they were to
success when they gave up.
-Thomas Edison*


RE: GZIP Comrpession Problem

2009-04-29 Thread Glen Goodwin
Minfy does not seem to impact the success of compression one way or another.
And I do not want to do just minify alone, but rather want compression and
minify together, as the compression saving are more significant than the
minify savings.

Glen

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Wednesday, April 29, 2009 4:33 PM
To: Tomcat Users List
Subject: Re: GZIP Comrpession Problem

Glen R. Goodwin wrote:
 Using Tomcat 6.0.18 I have configured GZIP compression by adding the
 following lines to my connector.  
 
 compression=force
 

compressableMimeType=text/html,text/xml,text/plain,text/css,text/javascript
 ,text/json,application/json
 
 noCompressionUserAgents=gozilla, traviata
 
 I am not using APR or anything other than tomcat.
 
 The question is this: Is there any reason why some .js files are getting
 gzip compression and some are not?
 
 I have checked to make sure the mime type is correct.  I have verified the
 problem using multiple connection agents (Firefox, curl, etc).  
 
 My .JS file that is not getting compressed is 222k.  Smaller files seem to
 get compressed, but larger ones don't.  I haven't found reports via an
 internet search that imply there is some upper limit setting.
 
 Anyone have any thoughts?

Minify your javascript?

p


-
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



looking for a web usesage / analytics package

2009-04-29 Thread Andrew Davidson
Hi 

 

Does anyone know of a good web site analytics / usage reporting package? I
do not need anything real fancy, just basic info about # unique visitors,
page views, .

 

Ideally this would be implemented as a war file I can just drop on my server

 

Sorry If this has been asked a million times. I scoured the tomcat website,
but could not find anything. 

 

Maybe I am asking the question the wrong way?

 

Thanks

 

Andy

 

 

  _  

Music Trainer  makes it easy  to learn new songs by slowing down or speeding
up play back without changing the pitch! 

 

Learn more at www.SantaCruzIntegration.com 

 



Re: looking for a web usesage / analytics package

2009-04-29 Thread steve rieger
um google analytics is free
or awstats

On Wed, Apr 29, 2009 at 2:59 PM, Andrew Davidson
a...@santacruzintegration.com wrote:
 Hi



 Does anyone know of a good web site analytics / usage reporting package? I
 do not need anything real fancy, just basic info about # unique visitors,
 page views, .



 Ideally this would be implemented as a war file I can just drop on my server



 Sorry If this has been asked a million times. I scoured the tomcat website,
 but could not find anything.



 Maybe I am asking the question the wrong way?



 Thanks



 Andy





  _

 Music Trainer  makes it easy  to learn new songs by slowing down or speeding
 up play back without changing the pitch!



 Learn more at www.SantaCruzIntegration.com





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



Re: looking for a web usesage / analytics package

2009-04-29 Thread Hassan Schroeder
On Wed, Apr 29, 2009 at 2:59 PM, Andrew Davidson
a...@santacruzintegration.com wrote:

 Does anyone know of a good web site analytics / usage reporting package? I
 do not need anything real fancy, just basic info about # unique visitors,
 page views, .

 Ideally this would be implemented as a war file I can just drop on my server

Have you looked at Google Analytics? Just a snippet of JS in each
page and you're done; could even be injected via a Filter for minimal
dev impact.

FWIW,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com

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



RE: looking for a web usesage / analytics package

2009-04-29 Thread Andrew Davidson
Hi Hassan

Thanks for the suggestions

I already use Google Analytics. It is really good. 

My problem is that I need to create a tracking jpg. I need a way to count
the number of times this image is loaded. As far as I know google analytics
can only track at the page level and requires Java script.

I am in the process of doing a lot of SEO. Much of my activity is posting on
various blogs. Most of these sites will let me add an img but not run java
script or use frames . So basically I need an easy to way to track how many
times my img is loaded

If I could use frames, I could create a html file Google could track for me

Any suggestions?

Thanks

Andy

 -Original Message-
 From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com]
 Sent: Wednesday, April 29, 2009 3:09 PM
 To: Tomcat Users List
 Subject: Re: looking for a web usesage / analytics package
 
 On Wed, Apr 29, 2009 at 2:59 PM, Andrew Davidson
 a...@santacruzintegration.com wrote:
 
  Does anyone know of a good web site analytics / usage reporting package?
 I
  do not need anything real fancy, just basic info about # unique
 visitors,
  page views, .
 
  Ideally this would be implemented as a war file I can just drop on my
 server
 
 Have you looked at Google Analytics? Just a snippet of JS in each
 page and you're done; could even be injected via a Filter for minimal
 dev impact.
 
 FWIW,
 --
 Hassan Schroeder  hassan.schroe...@gmail.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




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



Re: looking for a web usesage / analytics package

2009-04-29 Thread Pid
Andrew Davidson wrote:
 Hi Hassan
 
 Thanks for the suggestions
 
 I already use Google Analytics. It is really good. 
 
 My problem is that I need to create a tracking jpg. I need a way to count
 the number of times this image is loaded. As far as I know google analytics
 can only track at the page level and requires Java script.
 
 I am in the process of doing a lot of SEO.[EVIL] Much of my activity is 
 posting on
 various blogs. Most of these sites will let me add an img but not run java
 script or use frames . So basically I need an easy to way to track how many
 times my img is loaded

So you us to help you find a way to embed tracking in other peoples
websites?


p


 If I could use frames, I could create a html file Google could track for me
 
 Any suggestions?
 
 Thanks
 
 Andy
 
 -Original Message-
 From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com]
 Sent: Wednesday, April 29, 2009 3:09 PM
 To: Tomcat Users List
 Subject: Re: looking for a web usesage / analytics package

 On Wed, Apr 29, 2009 at 2:59 PM, Andrew Davidson
 a...@santacruzintegration.com wrote:

 Does anyone know of a good web site analytics / usage reporting package?
 I
 do not need anything real fancy, just basic info about # unique
 visitors,
 page views, .
 Ideally this would be implemented as a war file I can just drop on my
 server

 Have you looked at Google Analytics? Just a snippet of JS in each
 page and you're done; could even be injected via a Filter for minimal
 dev impact.

 FWIW,
 --
 Hassan Schroeder  hassan.schroe...@gmail.com

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


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



Re: looking for a web usesage / analytics package

2009-04-29 Thread Razi Khaja
Webalizer is very good and I believe it does exactly what need.   I dont
think it is available as war file though.
http://www.mrunix.net/webalizer/


RE: looking for a web usesage / analytics package

2009-04-29 Thread John Moore
Webalizer.   It's not java based but simple to use.   It works with tomcat
as well as apache and IIS should you ever have to go down one of those
roads.

-Original Message-
From: Andrew Davidson [mailto:a...@santacruzintegration.com] 
Sent: Wednesday, April 29, 2009 3:00 PM
To: users@tomcat.apache.org
Subject: looking for a web usesage / analytics package

Hi 

 

Does anyone know of a good web site analytics / usage reporting package? I
do not need anything real fancy, just basic info about # unique visitors,
page views, .

 

Ideally this would be implemented as a war file I can just drop on my server

 

Sorry If this has been asked a million times. I scoured the tomcat website,
but could not find anything. 

 

Maybe I am asking the question the wrong way?

 

Thanks

 

Andy

 

 

  _  

Music Trainer  makes it easy  to learn new songs by slowing down or speeding
up play back without changing the pitch! 

 

Learn more at www.SantaCruzIntegration.com 

 



smime.p7s
Description: S/MIME cryptographic signature


Re: looking for a web usesage / analytics package

2009-04-29 Thread Hassan Schroeder
On Wed, Apr 29, 2009 at 3:24 PM, Andrew Davidson
a...@santacruzintegration.com wrote:

 My problem is that I need to create a tracking jpg. I need a way to count
 the number of times this image is loaded.

If that's all, why not just write a Filter to grab each request and stuff
the relevant data in a DB? Or alternatively, why isn't the image just
a servlet that returns the graphic part and records the request?

Either one would give you records you could post-process in a variety
of ways...

FWIW,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com

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



RE: looking for a web usesage / analytics package

2009-04-29 Thread Anthony J. Biacco
Try Awffull instead, it's a webalizer spinoff that's actually still
worked on.

-Tony
---
Manager, IT Operations
Format Dynamics, Inc.
303-573-1800x27
abia...@formatdynamics.com
http://www.formatdynamics.com

 -Original Message-
 From: John Moore [mailto:johnmo...@pdsi-software.com]
 Sent: Wednesday, April 29, 2009 4:47 PM
 To: Tomcat Users List
 Cc: a...@santacruzintegration.com
 Subject: RE: looking for a web usesage / analytics package
 
 Webalizer.   It's not java based but simple to use.   It works with
 tomcat
 as well as apache and IIS should you ever have to go down one of those
 roads.
 
 -Original Message-
 From: Andrew Davidson [mailto:a...@santacruzintegration.com]
 Sent: Wednesday, April 29, 2009 3:00 PM
 To: users@tomcat.apache.org
 Subject: looking for a web usesage / analytics package
 
 Hi
 
 
 
 Does anyone know of a good web site analytics / usage reporting
 package? I
 do not need anything real fancy, just basic info about # unique
 visitors,
 page views, .
 
 
 
 Ideally this would be implemented as a war file I can just drop on my
 server
 
 
 
 Sorry If this has been asked a million times. I scoured the tomcat
 website,
 but could not find anything.
 
 
 
 Maybe I am asking the question the wrong way?
 
 
 
 Thanks
 
 
 
 Andy
 
 
 
 
 
   _
 
 Music Trainer  makes it easy  to learn new songs by slowing down or
 speeding
 up play back without changing the pitch!
 
 
 
 Learn more at www.SantaCruzIntegration.com
 
 


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



Re: looking for a web usesage / analytics package

2009-04-29 Thread Razi Khaja
Wikipedia has a list of web analytics software
http://en.wikipedia.org/wiki/List_of_web_analytics_software


Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-04-29 Thread Mark Thomas
Dave Cherkassky wrote:
 Yes, I know -- I *am* using Tomcat 4.1 (rather than the latest and
 greatest) for various legacy and political reasons.
 
 
 But my question is this:
 - Is this a known bug?  Or am I doing something wrong with either the
 servlet, the web.xml or with the jsp page?

That looks like https://issues.apache.org/bugzilla/show_bug.cgi?id=42409

This was fixed in 6.0.x but not any earlier version.

It is unlikely it would get backported to 4.1.x. If you wanted to patch it
yourself, the 6.0.x patch is http://svn.apache.org/viewvc?rev=721921view=rev

HTH,

Mark

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



Re: SAML Cross-Domain SSO

2009-04-29 Thread Anoop kumar V
I have tried OpenSSO on Sun glassfish, weblogic and Oracle application
server. It rocks! Although I have not tried it on tomcat, I am almost
certain that it would be well supported and well documented.

The agents link may help:
https://opensso.dev.java.net/public/use/agents.html

Thanks,
Anoop


On Wed, Apr 29, 2009 at 3:55 AM, Noam Ramonet noamramo...@gmail.com wrote:

 Thanks Pid, that is a good reference.

 Have anybody tried OpenSSO on Tomcat, or could give some suggestion about
 this two solutions  (Shibboleth  vs  OpenSSO).



  Noam Ramonet wrote:


 Hello,

 I need to implement SAML Cross-Domain SSO on Tomcat 5.5 servers.
 Initially, IdP initiated post binding with out-of-band identity linking
 would be fine. Could anybody recommend me an API or, better, a base
 implementation?



 We often hear about Shibboleth deployments, but I have absolutely no
 idea if it supports the rest of what you want.



 Does anybody knows whether ASF has plans to incorporate SAML based SSO
 in any project?



 I don't.

 p





 Thanks.

 Noam

 -
 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: Apache Tribes: does anything actually use securePort

2009-04-29 Thread Filip Hanik - Dev Lists

Hi Bill, it's not yet implemented.
So having the setting in the API, lets us do the implementation. But 
NIO/SSL is generally a pain in the neck, so I haven't gotten around to 
it yet

if you wish to contribute, please let us know
Filip

william.m.sm...@gmail.com wrote:
I am trying to figure out whether it is possible to have Apache 6.0.18 
use an encrypted connection to replicate sessions within a cluster. 
There appears to be a way to specify a securePort on a 
ChannelReceiver but it does not looks as if Tomcat actually uses that 
setting.


Has anyone had any experience using the ChannelReceiver securePort 
setting?


Bill Smith
Austin, TX




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



Re: sample java application to test session replication in transparen failover cluster

2009-04-29 Thread Filip Hanik - Dev Lists

Googling Tomcat cluster will yield plenty of examples

Filip

dhanesh kk wrote:

Thanks for the information.

P



On Wed, Apr 29, 2009 at 2:27 PM, Pid p...@pidster.com wrote:

  

dhanesh kk wrote:


Hi


Does any one have a sample  java web application to share   to test a
transparent failover cluster in   tomcat-6.0.8  (JDK 1.5.0_15)  .

 I want to trouble shoot  either  my cluster or my Java application.
  

Because


sessions are expiring  when I shutdown a one tomcat node .

So to make sure whether my java application is the culprit not doing the
session replication , I want a working copy of a web application  in a
transparent cluster with tomcat 6.0.08 .

Is any body willing to share I appreciate it so much .

Thanks in advance
K.K Dhanesh

  

That's 3 messages you've sent in 24 hours asking the same thing.

Tip #1 people typically don't have sample web applications that test
specific functionality lying around, or if they do I've not seen people
share them.

Tip #2 people typically don't share generic configs, because they're all
changed to suit specific needs.


http://www.catb.org/~esr/faqs/smart-questions.htmlhttp://www.catb.org/%7Eesr/faqs/smart-questions.html


p

-
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



Application-specific jar files with Tomcat v6.0

2009-04-29 Thread Shiping.Chen
Hi,

I am deploying an axis2 web service with Tomcat v6.0.

The web service required a third-part jar file, say x.jar
I can make the work service working with Axis2 standalone server by putting 
x.jar into [axis2_home]/lib.

According to Tomcat documents and corresponding discussion, I put x.jar into 
[Tomcat 6.0_home]\webapps\axis2\WEB-INF\lib, as deploying with Tomcat 
6.However, it does NOT work!

Then, I tried to put x.jar onto [Tomcat 6.0_home]\lib, although I understand it 
is not a good idea.
It still does NOT work!

At end, I add x.jar to the java classpath using the Tomcat 6 configure GUI (the 
small icon).
It works this time!

So I wonder if it is a bug of Tomcat 6, or I did something wrong.
I suppose that it be a very common issue and have been heavily discussed.
Why it is still there?

I would be very grateful if I can get an answer. In addition, other users may 
also have experienced the same issue.


Thanks,
--
shiping.c...@csiro.aumailto:shiping.c...@csiro.au







Re: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-04-29 Thread Dave Cherkassky

PID, thanks for your insight.


Two comments about that:

1) I agree with you for includes and forwards, but for errors?  I would have thought that 
the definition of error is that something went wrong, and Tomcat should start 
from scratch and just render the error page.  I didn't think of it as really a forward...

2) So you are suggesting that writing out to the response.getOutputStream() as 
I go is wrong?  Instead, I need to:
a. buffer my output locally
b. once I am sure that it can all be created correctly, *then* I write out the 
buffer to the response?

Am I understanding you correctly?

Thanks,
--
Dave Cherkassky
 VP of Software Development
 DJiNN Software Inc.
 416.504.1354


Pid wrote:

Dave Cherkassky wrote:

A long question:

First, I have a Servlet that writes to response.getOutputStream(). 
Here's a snippet:

 public class AuditTrailServlet extends HttpServlet {
   public void doGet( HttpServletRequest request, HttpServletResponse
response )
 response.setContentType( application/vnd.ms-excel );
 response.setHeader( Content-Disposition, attachment; filename=
+ fileName );

 ResultSet rs = ...;
 for ( int row = 0 ; rs.next(); row++ ) {
   // iterate over each row in the ResultSet
   for( int col = 0; fieldNameIt.hasNext(); col++ ) {
 // iterate over each column in the results, write to spreadsheet
  // custom code.
 // let us assume this block has a bug that occasionally throws
a NullPointerException,  // but only after a bunch of cells are
written first.
  response.getOutputStream().write( /* excel byte[] */ );
  // more custom code.
   }
 }
 rs.close();
 
 response.setStatus( HttpServletResponse.SC_OK );

   }
 }

Second, I have the following in the web.xml file, to tell tomcat to use
a custom error page:
 error-page
   exception-typejava.lang.Throwable/exception-type
   location/myError.jsp/location
 /error-page

Last, here's myError.jsp:
 %@ page isErrorPage='true' %
 html
 body
 h1System Error/h1
 p
 You have encountered a system error.
 /p
 
 %-- custom error processing that can't be done in a static .html page

--%
 
 /body

 /html


So, it all seems standard and straight-forward, right?



However, instead of seeing a nice custom error page when the NPE
happens, I get the ugly Tomcat error page, and
the following in the Tomcat logs:
 java.lang.IllegalStateException: getOutputStream() has already been
called for this response
 at
org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java:709)
 at
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:127)

 at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:128)
 at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:121)
 at
org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:137)
 at
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:153)

 at
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:148)

 at org.apache.jsp.error_jsp._jspService(error_jsp.java:284)


Yes, I know -- I *am* using Tomcat 4.1 (rather than the latest and
greatest) for various legacy and political reasons.


But my question is this:
- Is this a known bug?  Or am I doing something wrong with either the
servlet, the web.xml or with the jsp page?


I'm not sure it's a bug; logically, if you've sent a chunk of the
response (and therefore committed the response, sent headers etc)
*before* an exception happens how is Tomcat then supposed to tell the
client to stop and then display a different page?

p




Thanks,






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



Re: Deploying a WAR file in tomcat 6

2009-04-29 Thread Maciek Rakowski
you don't need netbeans to deploy the .war file. You simply put it in your .war 
file in the webapps directory of the tomcat folder, or use tomcat manager.

 - Maciek





From: astra123 sandhya.jayachand...@tcs.com
To: users@tomcat.apache.org
Sent: Monday, April 27, 2009 2:40:24 AM
Subject: Deploying a WAR file in tomcat 6


Hi,

I have downloaded one WAR file from net.
I need to deploy that in Tomcat 6 which is inside NetBeans 6 IDE.

Can you please help me to resolve this.
-- 
View this message in context: 
http://www.nabble.com/Deploying-a-WAR-file-in-tomcat-6-tp23250903p23250903.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: Servlets that use response.getOutputStream(): do they play nicely with Tomcat's error pages?

2009-04-29 Thread Len Popp
There's no possible way for Tomcat to start from scratch. If some
data has already been sent to the client, it can't be called back to
the server. What's sent is sent.

Typically, the HTTP response is buffered because the JSP handler does
that automatically. So if an error occurs before the response headers
are sent to the client, the error page can be sent instead.

I write my servlets so that they do whatever they need to do, gather
the output data, and then write the output page. If errors occur they
generally happen before any output is written.

Another way this is often handled is to just write an error message in
the middle of the web page if an error occurs. But I guess that won't
work for you because you're writing an Excel file, not a web page.
-- 
Len



On Wed, Apr 29, 2009 at 22:41, Dave Cherkassky dch...@djinnsoft.com wrote:
 PID, thanks for your insight.


 Two comments about that:

 1) I agree with you for includes and forwards, but for errors?  I would have
 thought that the definition of error is that something went wrong, and
 Tomcat should start from scratch and just render the error page.  I didn't
 think of it as really a forward...

 2) So you are suggesting that writing out to the response.getOutputStream()
 as I go is wrong?  Instead, I need to:
 a. buffer my output locally
 b. once I am sure that it can all be created correctly, *then* I write out
 the buffer to the response?

 Am I understanding you correctly?

 Thanks,
 --
 Dave Cherkassky
  VP of Software Development
  DJiNN Software Inc.
  416.504.1354


 Pid wrote:

 Dave Cherkassky wrote:

 A long question:

 First, I have a Servlet that writes to response.getOutputStream(). Here's
 a snippet:
  public class AuditTrailServlet extends HttpServlet {
   public void doGet( HttpServletRequest request, HttpServletResponse
 response )
     response.setContentType( application/vnd.ms-excel );
     response.setHeader( Content-Disposition, attachment; filename=
 + fileName );

     ResultSet rs = ...;
     for ( int row = 0 ; rs.next(); row++ ) {
       // iterate over each row in the ResultSet
       for( int col = 0; fieldNameIt.hasNext(); col++ ) {
         // iterate over each column in the results, write to spreadsheet
                  // custom code.
         // let us assume this block has a bug that occasionally throws
 a NullPointerException,          // but only after a bunch of cells are
 written first.
                  response.getOutputStream().write( /* excel byte[] */ );
                  // more custom code.
       }
     }
     rs.close();
       response.setStatus( HttpServletResponse.SC_OK );
   }
  }

 Second, I have the following in the web.xml file, to tell tomcat to use
 a custom error page:
  error-page
   exception-typejava.lang.Throwable/exception-type
   location/myError.jsp/location
  /error-page

 Last, here's myError.jsp:
  %@ page isErrorPage='true' %
  html
  body
  h1System Error/h1
  p
  You have encountered a system error.
  /p
   %-- custom error processing that can't be done in a static .html page
 --%
   /body
  /html


 So, it all seems standard and straight-forward, right?



 However, instead of seeing a nice custom error page when the NPE
 happens, I get the ugly Tomcat error page, and
 the following in the Tomcat logs:
  java.lang.IllegalStateException: getOutputStream() has already been
 called for this response
  at

 org.apache.catalina.connector.ResponseBase.getWriter(ResponseBase.java:709)
  at

 org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:127)

  at
 org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:128)
  at

 org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:121)
  at

 org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:137)
  at

 org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:153)

  at

 org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:148)

  at org.apache.jsp.error_jsp._jspService(error_jsp.java:284)


 Yes, I know -- I *am* using Tomcat 4.1 (rather than the latest and
 greatest) for various legacy and political reasons.


 But my question is this:
 - Is this a known bug?  Or am I doing something wrong with either the
 servlet, the web.xml or with the jsp page?

 I'm not sure it's a bug; logically, if you've sent a chunk of the
 response (and therefore committed the response, sent headers etc)
 *before* an exception happens how is Tomcat then supposed to tell the
 client to stop and then display a different page?

 p



 Thanks,




 -
 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