Re: Assessing Tomcat's State

2003-06-09 Thread Francisco J. Bido
Thanks for the link.   I didn't know about Nagios; it seems like a 
pretty useful tool.  I'll have to take for a spin.

About the Tomcat state issue, I actually got them resolved.  I 
basically followed Tim Funk's tips (see prior posts).
I modified some C code to get the UNIX PIDs straight from the kernel 
and handle the polling for the "shutting down" state, and
also  found some nice URL classes within the Cocoa frameworks 
(Objective-C on Mac OS X) to handle the polling
for the "starting up" state.   I'm a happy camper.

-FB





On Sunday, June 8, 2003, at 07:10  PM, Yoav Shapira wrote:

Howdy,
I use nagios for this: www.nagios.org.
Yoav Shapira

=
Yoav Shapira
[EMAIL PROTECTED]
__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: Assessing Tomcat's State

2003-06-07 Thread Francisco J. Bido
That's a good idea.  Thanks!

Take care,
-FB
On Saturday, June 7, 2003, at 03:23  PM, Tim Funk wrote:

The easy kluge is to hack the startup scripts  (or write wrappers) 
around the startup scripts to maintain this status in some file, for 
arguements sake: cowbell.txt

In startup.sh --> echo "starting" > cowbell.txt
In startup.sh, a timer does wgets on a static asset. Once the asset is 
returned correctly: echo "started" > cowbell.txt

In shutdown.sh --> echo "stopping" > cowbell.txt
In shutdown.sh --> A timer looking for the java process id. Once the 
process ID is gone, echo "stopped" > cowbell.txt

-Tim

Francisco J. Bido wrote:
Thanks Tim,
Those suggestions work pretty well for checking the "running" and the 
"stopped" states.  The ones giving me a headache are really "starting 
up" and "shutting down".The only thing I can think of at this 
point is to monitor the size of catalina.out and trigger an event 
went it doesn't change.
This is nasty since many things can cause the file to appear idle 
i.e., a busy CPU.  Any thoughts on these assessing these remaining 
states?
-FB
On Saturday, June 7, 2003, at 02:41  PM, Tim Funk wrote:
Depending on your needs if you just need UP or down, you can use 
wget or a similar agent.

You can also set CATALINA_PID in unix before calling the startup 
scripts and the file referenced by CATALINA_PID will contain the 
process ID.

Or you can write a LifeCycle Listener to trap startup and shutdown 
events.

-Tim

Francisco J. Bido wrote:

Is there any way to assess Tomcat's state via an environment 
variable?  For example, I would like to poll an environment 
variable to see if Tomcat is:
1. starting up
2. running
3. shutting down
4. stopped
There're a bunch of other states out there but the above fulfill my 
immediate needs.
Parsing through the catalina.out log file is the only way I know 
how to do this but this is approach is way too clumsy and ugly.
Thanks!
-FB



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


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


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


Re: Assessing Tomcat's State

2003-06-07 Thread Francisco J. Bido
Thanks Tim,

Those suggestions work pretty well for checking the "running" and the 
"stopped" states.  The ones giving me a headache are really "starting 
up" and "shutting down".The only thing I can think of at this point 
is to monitor the size of catalina.out and trigger an event went it 
doesn't change.
This is nasty since many things can cause the file to appear idle i.e., 
a busy CPU.  Any thoughts on these assessing these remaining states?

-FB

On Saturday, June 7, 2003, at 02:41  PM, Tim Funk wrote:

Depending on your needs if you just need UP or down, you can use wget 
or a similar agent.

You can also set CATALINA_PID in unix before calling the startup 
scripts and the file referenced by CATALINA_PID will contain the 
process ID.

Or you can write a LifeCycle Listener to trap startup and shutdown 
events.

-Tim

Francisco J. Bido wrote:
Is there any way to assess Tomcat's state via an environment 
variable?  For example, I would like to poll an environment variable 
to see if Tomcat is:
1. starting up
2. running
3. shutting down
4. stopped
There're a bunch of other states out there but the above fulfill my 
immediate needs.
Parsing through the catalina.out log file is the only way I know how 
to do this but this is approach is way too clumsy and ugly.
Thanks!
-FB



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


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


Assessing Tomcat's State

2003-06-07 Thread Francisco J. Bido
Is there any way to assess Tomcat's state via an environment variable?  
For example, I would like to poll an environment variable to see if 
Tomcat is:

1. starting up
2. running
3. shutting down
4. stopped
There're a bunch of other states out there but the above fulfill my 
immediate needs.

Parsing through the catalina.out log file is the only way I know how to 
do this but this is approach is way too clumsy and ugly.

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


Re: Session Snooper

2003-06-03 Thread Francisco J. Bido
The link is broken.

On Friday, May 30, 2003, at 07:35  AM, bedetrob wrote:

Try this one:
http://www.krasu.ru/server/examples/jsp/snoop.html
Rob
-Original Message-
From: Francisco J. Bido [mailto:[EMAIL PROTECTED]
Sent: Monday, April 21, 2003 8:54 AM
To: Tomcat Users List
Subject: Re: Session Snooper
I see... Any equivalents or close approximations to what Snooper is to
provide?
Thanks,
-FB
On Monday, April 21, 2003, at 07:48  AM, [EMAIL PROTECTED] wrote:

Sun took the API off because of security concern.  I guess that is 
why
it is no longer there anymore.

Chao

---Original Message---
From: "Francisco J. Bido" <[EMAIL PROTECTED]>
Sent: 04/20/03 02:42 AM
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Session Snooper
About a two years ago I was on a project were I used a JSP utility
called Snooper to inspect HttpSession objects.  I figured it was 
widely
available but I couldn't find a Google hit for it.   Can anyone 
provide
an URL or email a copy?   It's not hard to create one  from scratch 
but
Snooper did some very nice rendering of the inspection results and I
don't have too much time at this moment.

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

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


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


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


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


Re: Reading an XML File From a Servlet

2003-03-12 Thread Francisco J. Bido
Thanks for the tip.  I found a very good article at:

http://www.javaworld.com/javaworld/jw-05-2000/jw-0518-jdom.htm

Best,
-FB
On Wednesday, March 12, 2003, at 12:53  AM, Dan Tran wrote:

Sorry I dont have an example for you, but all you need is a 
InputStream to
your xml file in your war file.  Here is the interface to get it

InputStream is =
servlet.getServletContext().getResourceAsStream(pathName);
Hope it helps

-Dan

- Original Message -
From: "Francisco J. Bido" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 11, 2003 10:45 PM
Subject: Reading an XML File From a Servlet

Hi,

I have a controller servlet which reads its configuration information
from an xml file.  I can do this relative to my local file system.
My question is how to get the servlet to read the xml file from the
WEB-INF directory once packaged in a typical WAR file.
I'm lost regarding what the steps to follow or where to find a good
example on how to achieve this.  For example, do I need to
declare a resource in the webapp's web.xml? Any help appreciated.
Thanks!
-FB
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Reading an XML File From a Servlet

2003-03-11 Thread Francisco J. Bido
Hi,

I have a controller servlet which reads its configuration information 
from an xml file.  I can do this relative to my local file system.
My question is how to get the servlet to read the xml file from the 
WEB-INF directory once packaged in a typical WAR file.

I'm lost regarding what the steps to follow or where to find a good 
example on how to achieve this.  For example, do I need to
declare a resource in the webapp's web.xml? Any help appreciated.

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


Re: HTTTP Status 404 Tomcat on MAC os X

2003-02-28 Thread Francisco J. Bido
1. Did you try restarting Tomcat?
2. Double check your web.xml file since It doesn't look like your  
servlet is deploying correctly.
3. Also check your catalina.out log for any startup errors.
4. Find a complete example that works and make sure you understand what  
the web.xml entries mean.

Best of Luck,
-FB




On Friday, February 28, 2003, at 05:31  AM, apratim sharma wrote:

hi !!1

i'm getting following error on running servlet created
by me
HTTP Status 404 - /exp/servlet/first
--- 
-

type Status report

message /exp/servlet/first

description The requested resource
(/exp/servlet/first) is not available.
--- 
-

Apache Tomcat/4.1.18

Anybody plz help me

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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