RE: How can we know Tomcat is running or not through Standalone Java Prog

2003-12-01 Thread Neal
Look in your Tomcat/conf/server.xml file.  Is there an uncommented
service tag like the following?

Service name=Tomcat-Standalone

This instructs Tomcat to run standalone. 

Also, you can confirm this by looking at Tomcat output when it is
stated.  When tomcat starts it will write to standard out (logs in Unix
or output window on Windows).

-N 


-Original Message-
From: dakavara [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 30, 2003 10:42 PM
To: Tomcat Users List (E-mail)
Subject: How can we know Tomcat is running or not through Standalone
Java Prog

Hi,


How can we know Tomcat is running or not through Standalone Java
Program.


Thanks in Advance,
Ashok.D

-
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]



Vedr.: Garbage Collection issues

2003-12-01 Thread Thomas Nybro Bolding
Without knowing your system setup especially JDK version, RAM and # of 
processors my guess is that it could be due to an undersized heap and a 
high call-setup rate.
If the pressure on the old collector is heavy enough, it can force the old 
collector to revert to the traditional mark-sweep collector. If the old 
collector is still unable to keep up, the system can begin to thrash, and 
finally, throw an out-of-memory exception.
Start Tomcat with verbose/xloggc to profile your applications.

/Thomas






Neal [EMAIL PROTECTED]
01-12-03 02:21
Besvar venligst til Tomcat Users List

 
Til:'Tomcat Users List' [EMAIL PROTECTED]
cc: 
Vedr.:  Garbage Collection issues

My Tomcat 4.1 (hosted on Linux) seems to have a problem in recent months
with crashing due to unavailable free RAM.  Specifically I get a
java.error.outOfMemory exception.  If check the RAM available
(Runtime.getRuntime().totalMemory()), I can see it ticking down through
the week.  If explicitly run garbage collection however my RAM totally
frees up and all is well (Runtime.getRuntime().gc();).

Why would this happen?  Surely this isn't due to a programming error on
my part, otherwise, the resources should automatically released whenever
the JRE performs periodic garbage collection. Isn't that correct?
Anyone have any theories as to what this may mean and what the best
solution would be?

Thanks.
Neal



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





FONT SIZE=1 FACE=Arial___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. Hvis du 
ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om 
fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit 
system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri for 
virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori den modtages 
og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os ikke noget ansvar 
for tab og skade, som er opstaaet i forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you have 
received this message by mistake, please inform the sender of the mistake by sending a 
reply, then delete the message from your system without making, distributing or 
retaining any copies of it.
Although we believe that the message and any attachments are free from viruses and 
other errors that might affect the computer or IT system where it is received and 
read, the recipient opens the message at his or her own risk. We assume no 
responsibility for any loss or damage arising from the receipt or use of this message.
/FONT



Re: html not working

2003-12-01 Thread Timo
As of my knowledge, I think Tomcat uses the concept of WebContext, which
initialized during tomcat startup or through the manager commands,
i.e. http://localhost:8080/manager/list
check the documentations for manager commands on the tomcat website. where
you can start/stop/restart webcontexts.. without the need of restarting
tomcat.

I know this sounds odd, but Tomcat uses the concept of webContext to refere
to a web application.

That would be my furthest I can get..
Good luck.
- Original Message - 
From: George Esperanza [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, November 30, 2003 4:03 AM
Subject: Re: html not working



 --- Timo [EMAIL PROTECTED] wrote:
  George,
  It seems that you having problems resolving relative
  references, can you
  tell me where your images are located in relative
  form to your web context,

 my images are also located together with my html
 files.

  also tell me what is your href tags that you used to
  display the images.

 here's my simple html file:

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01
 Transitional//EN
 html
 head
   titleTitle Background/title
   meta http-equiv=content-type
  content=text/html; charset=ISO-8859-1
 /head
 body
  background=./taxiback.jpg
 br
 /body
 /html

 If i saved this in an HTML file my tomcat server
 cannot find the file but if i renamed it to JSP
 Netscape or IE can open it but without the background
 image (taxiback.jpg).   If i open it directly with my
 browser (as HTML) it looks fine.

 I'm converting my CGI applications into JSP and i'm
 new to Java and Tomcat.

 Thanks

 George
 
  Timo


 __
 Do you Yahoo!?
 Free Pop-Up Blocker - Get it now
 http://companion.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]



How to install new version of application (war file)

2003-12-01 Thread Rainer Stransky
What is the common way to install a new version of a war file ?

My experience is, that I have to stop tomcat, delete the .../webapps/app_dir
copy a new app_dir.war to .../webapps and start tomcat.

But this is not appropriate on a production system.

I do not want to restart tomcat.

What will be a better solution ?


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



Re: Tomcat 4.0.x memory leak (not javac)

2003-12-01 Thread Abhijeet Selukar
Hi,
I am also facing the same problem of memory leakage. I have posted on mail about this 
on 19th Nov too... 

I had contacted to the support people where our web application is hosted. I had got 
few suggestions. According to their suggestion - 
1. I increased the heapsize in catalina.sh file.
2. I have also tried to increase the file descriptor size.

Increaing the file descriptor size helped me at some extent. It stopped the frequent 
exceptions in Tomcat - catalina but occasionaly I am still gettng same exceptions.
I would really like to have some more suggestions.

Abhijeet Selukar


  - Original Message - 
  From: Trenton D. Adams 
  To: Tomcat Users List 
  Sent: Monday, December 01, 2003 12:21 AM
  Subject: Re: Tomcat 4.0.x memory leak (not javac)


  Sven Köhler wrote:
   It's a known bug, but not fixed in 4.1.x, it still exists there.  I
   am not sure if it still exists in 5.0.x.
  
  
   Thanks Dave.  If anyone could provide some more information on this,
   that would be helpful.  I would really like to fix it because it's 
   really annoying me.  We have two CRITICAL web applications on one 
   server.  We don't want to have to continually down the entire tomcat
   server just to reload a webapp.
  
  
   Bugs have been filed for this issue against 4.1.x and they have been 
   marked as WONTFIX.  Best to try to reproduce the problem on 5.0.x and 
   if the bug still exists there, file a report in bugzilla if one does 
   not already exist.
  
  
   Where can I find this information?  Is there a bugzilla for tomcat or 
   something?  If so, I would like to go there so I can see if there's 
   any information indicating where in the code it would be.  I could go 
   searching myself, but I've never dove into the Tomcat code before! :)
   
   
   Could you post the bugid or even a link to the bug-report? i'm also 
   interested in the porblem.
   
   I would also be interested in a description of the javac-memory-leak. It 
   has become a myth and nobody can explain it. I don't find a bug-report 
   in both Sun's and Tomact's bug-databases.

  I found it once but I can't find it again.  I was pretty sure I entered 
  memory leak in the summary field and came up with results, but it 
  doesn't work now.

  Anyhow, the javac bug is referenced in the release notes of 4.0.x.  I 
  don't think it's a javac bug but a tomcat bug with the interface into 
  the javac classes.  After all, it's not referenced in the release notes 
  for the newer versions of tomcat.

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



  __ 
  This communication is intended for the use of the recipient to whom it
  is addressed, and may contain confidential, personal, and or privileged
  information. Please contact us immediately if you are not the intended
  recipient of this communication, and do not copy, distribute, or take
  action relying on it. Any communications received in error, or
  subsequent reply, should be deleted or destroyed.
  ---

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


Re: directory reference

2003-12-01 Thread Giorgio Franceschetti
Thanks,
  it solves my problems.
Bye,
  Giorgio
Tim Funk wrote:

The best way is to use ServletContext.getResourceAsStream() to load a 
file from your webapp.  This is portable (and safest) to any servlet 
container.

-Tim

Giorgio Franceschetti wrote:

Hi all,
  I'd like to create a file with some configuration details for my 
application.
I tryed to reference my file like this ./data.txt and I found it in 
my tomcat/bin directory.
Well, I should  have expected this, quite like any other java 
application points to the executable directory.
Is there any way to point to my application directory?
Should I assume a fixed path like tomcat/webapps/myapp?
Thanks in advance,
   Giorgio 


-
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]


Any Comments / Suggestions

2003-12-01 Thread Arnab Chakravarty
Hi all,

We are using the oracle connection pool (which is part of the driver) for our 
application. I wish to know what would be ideal configuration for the following 
parameters under the FIXED_WAIT_SCHEME:

CacheFixedWaitTimeout: ??
CacheFixedWaitIdleTime: ??

where connection pool size = 100 and ajp connections are = 135. (35 odd connections 
would wait by default if concurrent connections are 135)

Thanks,
Arnab Chakravarty



Re: html not working

2003-12-01 Thread Graham Reeds
 As of my knowledge, I think Tomcat uses the concept of WebContext, which
 initialized during tomcat startup or through the manager commands,
 i.e. http://localhost:8080/manager/list
 check the documentations for manager commands on the tomcat website. where
 you can start/stop/restart webcontexts.. without the need of restarting
 tomcat.

Can that work on remote servers - ie:
http://www.mysite.com:8080/manager/list ?

I have tried repeatedly this weekend to get my web.xml to accept my new
welcome file (index.jsp) but it would not accept the changes.  I fired off
an email to my webhost, but I don't expect an email until I get home
tonight.

--

Graham Reeds,
[EMAIL PROTECTED] | http://omnieng.co.uk



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



JNDIRealm question

2003-12-01 Thread Chong Yu Meng
Hi All,

I have a configuration that is not covered in the JNDIRealm HOWTO, and 
was wondering if someone else has tried this before :

I am using OpenLDAP 2.1.22 on Red Hat 9. For the DN, I am using the CN 
instead of the UID (i.e., dn: cn=Zhu De,ou=People,o=Cymulacrum instead 
of uid=zhude,ou=People,o=Cymulacrum), and the roles recognized by Tomcat 
are in the Groups OU.

My question : how do I setup a Tomcat JNDI Realm such that it looks up 
roles based on the UID instead of the DN ? In the JNDIRealm HOWTO, the 
instructions assume that the DN is using the UID instead of the CN. For 
the userSearch, I would substitute with (uid={0}), since I need to do a 
search and comparison with an attribute. But to retrieve the role ... 
I'm not so sure about how to do this. I'm thinking that the stanza below 
would not work (no, I haven't tried it yet). Does anyone know how it 
should look ?

Realm   className=org.apache.catalina.realm.JNDIRealm debug=99
connectionURL=ldap://localhost:389;
 userBase=ou=people,o=Cymulacrum
   userSearch=(uid={0})
 userRoleName=memberOf
 roleBase=ou=groups,o=Cymulacrum
 roleName=cn
   roleSearch=(uniqueMember={0})
/
Using the CN instead of the UID for the DN is actually (in my experience 
anyway) quite common -- Lotus Domino/Notes uses the CN for logging in, 
and Novell eDirectory too (though I suppose both can be configured to 
use the UID instead).

Thanks in advance,

pascal chong





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


LDAP connection problem through JSP

2003-12-01 Thread Damien Pacaud
hi list, 
I am trying to get the login for the user authentificated through LDAP in a JSP...
I tryed : request.getRemoteUser();
but that returns always null...
I am sure it can be done but am unable to find how...

Any help would be greatly appreciated ;)

Thanks in advance

Damien Pacaud

---
le présent message (ainsi que ses éventuelles pièces jointes) peut
contenir des informations confidentielles. Etant établi à l'intention de ses
destinataires, son utilisation ou diffusion non autorisée est interdite.

Tout message électronique étant susceptible d'altération, Prisma Presse
décline toute responsabilité au titre dudit message en cas de falsification.

Ce message a été traité par un anti virus et aucun virus connu n'a été détecté.



Tomcat 4 vs Tomcat 5 and MIME settings

2003-12-01 Thread Stephen Thomas
Hi,

I must apologise, I've never used these types of systems before and have
sent this email to a couple of addresses. 

I am a developer of Voice applications. I use the Tomcat servlet engine to
host my applications which are then fetched from the voice server. I am
currently having an issue with Tomcat 5 and 'content-type'. The voice server
can play .vox files and I fetch such a file from Tomcat 5 and get the
following header:

lwp-request -d -e http://10.100.1.113:8080/test/soxTest1.vox
Connection: close
Date: Mon, 01 Dec 2003 09:30:03 GMT
Server: Apache-Coyote/1.1
Content-Length: 8130
Content-Type: audio/x-vox;charset=ISO-8859-1
ETag: W/8130-1069965466970
Last-Modified: Thu, 27 Nov 2003 20:37:46 GMT
Client-Date: Mon, 01 Dec 2003 09:29:38 GMT
Client-Peer: 10.100.1.113:8080

I have added the following lines to web.xml
mime-mapping
extensionvox/extension
mime-typeaudio/x-vox/mime-type
/mime-mapping

The file fails to play because of the charset being appended to the
'content-type'. When I host the application and .vox file on Tomcat 4 I can
play the file as the content-type is returned as only 'audio/x-vox'.

Please could you help me as I'd rather use Tomcat 5 but this issue is
currently stopping me.

Thanks in advance,

Steve


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



Tomcat 4 threads

2003-12-01 Thread Walter do Valle
I have some doubts about Tomcat and his threads. If someone could help me, i will be 
very grateful.

In what moment new threads are created in Tomcat when it's running? 
Is there a thread pool? In case positive:
- What is the initial quantity of threads created? 
- What is the stagger algorithm?
- After created, when a thread terminates (end of life, release)?
- What means o large number of threads? Many users? Many sessions? Many requests?

Thanks for any help

endorsed directory

2003-12-01 Thread Basavaraju P. Banakar [SLK-India]
Hey all,

I found from the tomcat users list that xalan.jar has to be placed in the
..\common\endorsed folder.

but i could'nt find reason behind that...

could someone help in understanding this please..

This might not be the right place to ask this question but might be releated
with the above reason...
Why do we need to create endorsed directory?

Thanks,
Basu.


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



Re: Tomcat 4 threads

2003-12-01 Thread Andoni
Hello,

You should not have to worry about when tomcat creates or pools threads.

It will do this in the background in whatever way it does and you should not
have to know about it.

There are rules for keeping servlets thread-safe so that you will not be
affected by the threading of servlets by the container.  You can read about
how to keep your servlets thread-safe in the servlet specification which you
can download from here:

http://java.sun.com/products/servlet/download.html

Andoni.


- Original Message -
From: Walter do Valle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:18 PM
Subject: Tomcat 4 threads


I have some doubts about Tomcat and his threads. If someone could help me, i
will be very grateful.

In what moment new threads are created in Tomcat when it's running?
Is there a thread pool? In case positive:
- What is the initial quantity of threads created?
- What is the stagger algorithm?
- After created, when a thread terminates (end of life, release)?
- What means o large number of threads? Many users? Many sessions? Many
requests?

Thanks for any help


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



Re: How to install new version of application (war file)

2003-12-01 Thread Jacob Kjome
The manager app in Tomcat5 now allows for a tag to be associated with the 
war you deploy.  You can use this from the ant manager tasks as well.  You 
can deploy an app and deploy the same app (different version) again with a 
different tag.  The old one will be undeployed and the new one will go 
in.  If you want to switch back, just specify the tag of an existing 
deployed version.

Jake

At 09:01 AM 12/1/2003 +0100, you wrote:
What is the common way to install a new version of a war file ?

My experience is, that I have to stop tomcat, delete the .../webapps/app_dir
copy a new app_dir.war to .../webapps and start tomcat.
But this is not appropriate on a production system.

I do not want to restart tomcat.

What will be a better solution ?

-
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: LDAP connection problem through JSP

2003-12-01 Thread Dean Searle
This is the simple jsp I used to test my JNDI Connection with:

%
String id = request.getRemoteUser();
out.write(User:  + id);
%

See if that helps any.

Dean


-Original Message-
From:   Damien Pacaud [mailto:[EMAIL PROTECTED]
Sent:   Mon 12/1/2003 06:00
To: [EMAIL PROTECTED]
Cc: 
Subject:LDAP connection problem through JSP
hi list, 
I am trying to get the login for the user authentificated through LDAP in a JSP...
I tryed : request.getRemoteUser();
but that returns always null...
I am sure it can be done but am unable to find how...

Any help would be greatly appreciated ;)

Thanks in advance

Damien Pacaud

---
le prsent message (ainsi que ses ventuelles pices jointes) peut
contenir des informations confidentielles. Etant tabli  l'intention de ses
destinataires, son utilisation ou diffusion non autorise est interdite.

Tout message lectronique tant susceptible d'altration, Prisma Presse
dcline toute responsabilit au titre dudit message en cas de falsification.

Ce message a t trait par un anti virus et aucun virus connu n'a t dtect.





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

Re: LDAP connection problem through JSP

2003-12-01 Thread Damien Pacaud
yes that's what i tried but the id String is always null
i am getting confused here...
do you get the LDAP  login of the current user whith this script ??
- Original Message -
From: Dean Searle [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 01, 2003 3:31 PM
Subject: RE: LDAP connection problem through JSP


This is the simple jsp I used to test my JNDI Connection with:

%
String id = request.getRemoteUser();
out.write(User:  + id);
%

See if that helps any.

Dean


-Original Message-
From: Damien Pacaud [mailto:[EMAIL PROTECTED]
Sent: Mon 12/1/2003 06:00
To: [EMAIL PROTECTED]
Cc:
Subject: LDAP connection problem through JSP
hi list,
I am trying to get the login for the user authentificated through LDAP in a
JSP...
I tryed : request.getRemoteUser();
but that returns always null...
I am sure it can be done but am unable to find how...

Any help would be greatly appreciated ;)

Thanks in advance

Damien Pacaud

---
le prsent message (ainsi que ses ventuelles pices jointes) peut
contenir des informations confidentielles. Etant tabli  l'intention de ses
destinataires, son utilisation ou diffusion non autorise est interdite.

Tout message lectronique tant susceptible d'altration, Prisma Presse
dcline toute responsabilit au titre dudit message en cas de falsification.

Ce message a t trait par un anti virus et aucun virus connu n'a t
dtect.












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



---
le prsent message (ainsi que ses ventuelles pices jointes) peut
contenir des informations confidentielles. Etant tabli  l'intention de ses
destinataires, son utilisation ou diffusion non autorise est interdite.

Tout message lectronique tant susceptible d'altration, Prisma Presse
dcline toute responsabilit au titre dudit message en cas de falsification.

Ce message a t trait par un anti virus et aucun virus connu n'a t dtect.


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



RE: endorsed directory

2003-12-01 Thread Philip Busby
Hi Basu,

I'm new to tomcat, and over the last weekend I've been poking and prodding
at Tomcat (with many problems, although none there wasn't a manual for).

As far as I can reason, xalan.jar is placed in the endorsed folder and not
the lib folder because it is endorsed by Tomcat... But they (we) didn't
write it. I figure there may be a more recent copy of the library elsewhere,
and if this is the case, you could put all of your lib directories before
your endorsed directories in your path, so the system will use the
first-hand libraries first.

Please correct me if any of this is wrong, playing with tomcat right now
feels like I'm fumbling with a bra clasp.

philihp

-Original Message-
From: Basavaraju P. Banakar [SLK-India] [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 7:19 AM
To: Tomcat Users List
Subject: endorsed directory

Hey all,

I found from the tomcat users list that xalan.jar has to be placed in the
..\common\endorsed folder.

but i could'nt find reason behind that...

could someone help in understanding this please..

This might not be the right place to ask this question but might be releated
with the above reason...
Why do we need to create endorsed directory?

Thanks,
Basu.


-
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]



Nt Service and Sax Parser

2003-12-01 Thread Altug B. Altintas
Hi,

I have got very strange problem.  Here is the problem

If i write a bat file to start Tomcat like this


set TOMCAT_HOME=C:\tomcat
set JAVA_HOME=C:\j2sdk1.4.1
set RTDIR=c:\rt
set PATH=%RTDIR%\bin;c:\tomcat\;c:\tomcat\bin;.
set CATALINA_OPTS=-Xmx1024m
set CATALINA_HOME=C:\tomcat
set CATALINA_BASE=C:\tomcat
set CLASSPATH=C:\tomcat;.
cd %RTDIR%

call %TOMCAT_HOME%\bin\shutdown.bat
call %TOMCAT_HOME%\bin\startup.bat


Tomcat starts and my application works well. In my application i used SAX
parser APIs so i put crimson.jar and jaxp.jar to
TOMCAT_HOME\common\endorsed

Anyway this is not problem, the problem is when i want to make  Tomcat NT
service, my JSP pages which are uses  SAX Parser API doesn't work.

Here is the comments which i tried to make NT Service

**
set TOMCAT_HOME=C:\tomcat
set JAVA_HOME=C:\j2sdk1.4.1
set RTDIR=c:\rt
set PATH=%RTDIR%\bin;C:\tomcat;C:\tomcat;.
set CATALINA_OPTS=-Xmx1024m
set CATALINA_HOME=C:\tomcat
set CATALINA_BASE=C:\tomcat
set CLASSPATH=C:\tomcat;.



%CATALINA_HOME%\bin\tomcat.exe  -install tomcat
%JAVA_HOME%\jre\bin\server\jvm.dll -Djava.class.path=%CATALINA_HOME%\comm
on\lib;%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar -Dcatali
na.home=%CATALINA_HOME% -djava.home=%JAVA_HOME%\jre
%CATALINA_OPTS% -Dfile.encoding=ISO-8859-9 -Xrs -start
org.apache.catalina.startup.BootstrapService -params start -config
%CATALINA_HOME%\conf\server.xml -stop
org.apache.catalina.startup.BootstrapService -params stop -out
%CATALINA_HOME%\logs\stdout.log -err
%CATALINA_HOME%\logs\stderr.log -current c:\rt -path  c:\rt
**

My code is same, crimson.jar and jaxp.jar files are same, the difference
is between normal start and NT start.  Any idea ??

Regards


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



Re: GZIP-encoding/mod_gzip and Tomcat??

2003-12-01 Thread Mike Baroukh

No need for it in the connector if you're using apache! :)  
You can get a mod_gzip module and do it from Apache which would 
probably be faster.

Are you sure ?
Has somebody already used mod_gzip with Apache  Tomcat ?

I use it with Resin, but it was not possible with tomcat because mod_jk
replied directly to the client (so I think ...).
There was many message on newsgroups about this.
We had to adapt the sample gzip filter provided with tomcat.


Mike Baroukh

Cardiweb  - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - ICQ: 105910677
http://www.cardiweb.com
--
Les ruines d'une maison
Se peuvent reparer : que n'est cet avantage
Pour les ruines du visage !
Jean de La Fontaine, La Fille
--


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



Re: endorsed directory

2003-12-01 Thread Jeanfrancois Arcand
See
http://java.sun.com/j2se/1.4.1/docs/guide/standards/
-- Jeanfrancois

Basavaraju P. Banakar [SLK-India] wrote:

Hey all,

I found from the tomcat users list that xalan.jar has to be placed in the
..\common\endorsed folder.
but i could'nt find reason behind that...

could someone help in understanding this please..

This might not be the right place to ask this question but might be releated
with the above reason...
Why do we need to create endorsed directory?
Thanks,
Basu.
-
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: How to install new version of application (war file)

2003-12-01 Thread Jeanfrancois Arcand
See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html

-- Jeanfrancois

Rainer Stransky wrote:

What is the common way to install a new version of a war file ?

My experience is, that I have to stop tomcat, delete the .../webapps/app_dir
copy a new app_dir.war to .../webapps and start tomcat.
But this is not appropriate on a production system.

I do not want to restart tomcat.

What will be a better solution ?

-
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]


new verion of Tomcat Service Manager

2003-12-01 Thread David Boyer
version 2.0.8 is out.
 
-Changed GUI to multi-tabbed panels due the space constraints of a
single-paned form, and to work better with screen resolutions less than
1024 x 768. This should also make it easier to add options without
trying to pack everything onto the same form. 

-Added service start type parameter (disabled, manual, automatic). 

-Now using Windows API (advapi32.dll) for service control and status.
This should eliminate the dependency on WMI (better NT 4
compatibility).

-Using Timer component to automatically refresh the service status
every 5 seconds. 
 
 
Additional details and free download available here:
 
http://web.bvu.edu/staff/david/tcservcfg/


Windows Serive Permissions?

2003-12-01 Thread Karl Coleman
I have a command-line utility I am running that converts files into PDF. Here is the 
line we're using to run the program:

Process proc = Runtime.getRuntime().exec(cmd.exe /c C:\\BatchPDF.exe 
+rtfFile.getAbsolutePath()+ +pdfFile.getAbsolutePath());

The problem is, it only runs if Tomcat was started from the startup.bat file. If 
Tomcat is running as a service, which is how we want it, it does not run. We set up 
Tomcat to run under administrator with no luck. We are guessing this is a file 
permissions problem, either from running it as a Windows service or with Tomcat 
itself. Any ideas would be appreciated.

Thanks,
Karl


servlet redeploy

2003-12-01 Thread Kumar, Sumit
Hello,

I am running tomcat 4.1. Can I deploy the servlet after my servlet code has
changed without restarting the server. I am running Tomcat in stand-alone
mode.

-sumit

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



Re: GZIP-encoding/mod_gzip and Tomcat??

2003-12-01 Thread Tim Funk
mod_gzip works with jk

Just make sure that you have the following:
mod_gzip_dechunk  Yes
-Tim

Mike Baroukh wrote:
No need for it in the connector if you're using apache! :)  
You can get a mod_gzip module and do it from Apache which would 
probably be faster.


Are you sure ?
Has somebody already used mod_gzip with Apache  Tomcat ?
I use it with Resin, but it was not possible with tomcat because mod_jk
replied directly to the client (so I think ...).
There was many message on newsgroups about this.
We had to adapt the sample gzip filter provided with tomcat.



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


Re: servlet redeploy

2003-12-01 Thread Jeanfrancois Arcand
See http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html

[ and search the list before asking :-) ]

-- Jeanfrancois

Kumar, Sumit wrote:

Hello,

I am running tomcat 4.1. Can I deploy the servlet after my servlet code has
changed without restarting the server. I am running Tomcat in stand-alone
mode.
-sumit

-
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: JSP Editors

2003-12-01 Thread daniel
Try netbeans.
Its free. 
And you can debug jsp's in the ide.
- Original Message - 
From: Duncan [EMAIL PROTECTED]
To: Tomcat User List [EMAIL PROTECTED]
Sent: Friday, November 28, 2003 4:54 AM
Subject: JSP Editors


 Sorry if off topic but...
 
 What do people use to edit JSPs?
 
 I'm after an editor, free if possible, to run on windows, with syntax
 colouring and possibly auto complete for java.
 
 Have tried vim for windows, but it doesn't seem as nice on windows as it
 is on linux.
 
 
 Any other suggestions?
 
 Cheers
 Duncan Smith
 Decker Telecom Ltd
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003

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



SEVERE: Error in action code

2003-12-01 Thread Rob Wichterman
I am getting this error in my Catalina.out file and I can seem to find
anything good about it.   
 
SEVERE: Error in action code 
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599)
at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:372)
at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.Response.finish(Response.java:343)
at
org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:326)
at
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.j
ava:500)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
562)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:619)
at java.lang.Thread.run(Thread.java:534)
 
Thanks,
 

Rob Wichterman
Systems Analyst
Nuventive
3996 Mount Royal Blvd.
Allison Park, PA 15101
Tel: 412-487-7424
Fax: 412-487-3355
Email: [EMAIL PROTECTED]
Website:
file:///C:\Documents%20and%20Settings\dmoriarty\Application%20Data\Micr
osoft\Signatures\www.nuventive.com www.nuventive.com 
 


SessionListener

2003-12-01 Thread Hart, Justin
My SessionListener doesn't seem to be firing, any help?

I have a SessionListener that I want to go off when a user authenticates to my web app 
(this is a correct usage, right?)

So, in the web.xml of my app, I would put the lines:

web-app
listener
listener-class
the class
/listener-class
/listener
/web-app

This should fire off when the user signs in to the page, correct?

Justin

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



RE: SessionListener

2003-12-01 Thread Hart, Justin
Ok, so, the listener in there must implement HttpSessionListener, where can I use 
SessionListeners?

Justin

-Original Message-
From: Hart, Justin 
Sent: Monday, December 01, 2003 11:34 AM
To: Tomcat Users List (E-mail)
Subject: SessionListener


My SessionListener doesn't seem to be firing, any help?

I have a SessionListener that I want to go off when a user authenticates to my web app 
(this is a correct usage, right?)

So, in the web.xml of my app, I would put the lines:

web-app
listener
listener-class
the class
/listener-class
/listener
/web-app

This should fire off when the user signs in to the page, correct?

Justin

-
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]



forward thing: tomcat 4.1

2003-12-01 Thread Kumar, Sumit
Hello,

This is more like a jsp question rather then the tomcat one but pardon me
for asking here. In my servlet, I do a 
getServletContext().getRequestDispatcher(
/reports.jsp?msg='selectEval'pid= + pid).forward( req, res ). The code is
given below. I believe this should forward it to reports.jsp[line (4)]. But
what happens is that even though it forwards it to reports.jsp, it continues
to execute the servlet even below the forward statement. When it encounters
the next forward statement[line (5)], it gives IllegalStateException. I
would think it should not go even past first forward[line (4)]. Please help
in clarifying.

if (revList.length  1)
{
req.setAttribute(revList, revList);   
   (4)getServletContext().getRequestDispatcher(
/reports.jsp?msg='selectEval'pid= + pid).forward( req, res );
}
else if (revList.length == 1)
{   

req.setAttribute(projEvalInfo, pe);
}   
(5)getServletContext().getRequestDispatcher(
/OtaceEvalFormRpt.jsp).forward( req, res );

-sumit  


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



RE: JSP Editors

2003-12-01 Thread Neal
Isn't netBeans now SunOne?  And don't they now charge an arm and a leg
for it?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 28, 2003 6:46 AM
To: Tomcat Users List
Subject: Re: JSP Editors

Try netbeans.
Its free. 
And you can debug jsp's in the ide.
- Original Message - 
From: Duncan [EMAIL PROTECTED]
To: Tomcat User List [EMAIL PROTECTED]
Sent: Friday, November 28, 2003 4:54 AM
Subject: JSP Editors


 Sorry if off topic but...
 
 What do people use to edit JSPs?
 
 I'm after an editor, free if possible, to run on windows, with syntax
 colouring and possibly auto complete for java.
 
 Have tried vim for windows, but it doesn't seem as nice on windows as
it
 is on linux.
 
 
 Any other suggestions?
 
 Cheers
 Duncan Smith
 Decker Telecom Ltd
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003

-
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]



Please Help

2003-12-01 Thread Yuval Zantkeren

why I'm getting this error :
01/12/2003 18:23:27 org.apache.jk.server.JkCoyoteHandler action
INFO: RESET

Which also causing my tomcat not to serve any more.

Regards,

Yuval Zantkeren

Domain The Net Technologies Ltd.
81 Sokolov St.
Ramat-Hasharon
Israel 47238
Tel: 972-3-7600500
Fax: 972-3-7600505
www.DomainTheNet.com

This email message and any attachments hereto are intended only for use by
the addressee(s) named above, and may contain legally privileged and/or
confidential information. If you are not the intended addressee, you are
hereby kindly notified that any dissemination, distribution or copying of
this email and any attachments hereto is strictly prohibited. If you have
received this email in error, kindly delete it from your computer system,
and notify us at the telephone number or email address appearing above.
Thank you



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



Re: JSP Editors

2003-12-01 Thread James Neville
Sun One Studio is Sun's 'extension' to NetBeans
Studio v4 was free, but v5 is not.
from Sun:-
Developers who prefer to continue using a free IDE and only require 
J2SE and Web application development capabilities should download the 
NetBeans http://www.netbeans.org open source IDE.

http://www.netbeans.org/

holywar
PS. If you have some space bucks, i'd go for IntelliJ's IDEA (or at 
least give it a spin)
They were good to us for a few licences(cheaper than what was stated on 
their site), and I believe they also offer educational discounts :)
/holywar

Otherwise, NetBeans all the way, its bearable for free. ;)

James.

Neal wrote:

Isn't netBeans now SunOne?  And don't they now charge an arm and a leg
for it?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 28, 2003 6:46 AM
To: Tomcat Users List
Subject: Re: JSP Editors

Try netbeans.
Its free. 
And you can debug jsp's in the ide.
- Original Message - 
From: Duncan [EMAIL PROTECTED]
To: Tomcat User List [EMAIL PROTECTED]
Sent: Friday, November 28, 2003 4:54 AM
Subject: JSP Editors

 

Sorry if off topic but...

What do people use to edit JSPs?

I'm after an editor, free if possible, to run on windows, with syntax
colouring and possibly auto complete for java.
Have tried vim for windows, but it doesn't seem as nice on windows as
   

it
 

is on linux.

Any other suggestions?

Cheers
Duncan Smith
Decker Telecom Ltd
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003
-
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]


Please Help

2003-12-01 Thread Yuval Zantkeren

why I'm getting this error :
01/12/2003 18:23:27 org.apache.jk.server.JkCoyoteHandler action
INFO: RESET

Which also causing my tomcat not to serve any more.

Regards,

Yuval Zantkeren

Domain The Net Technologies Ltd.
81 Sokolov St.
Ramat-Hasharon
Israel 47238
Tel: 972-3-7600500
Fax: 972-3-7600505
www.DomainTheNet.com

This email message and any attachments hereto are intended only for use by
the addressee(s) named above, and may contain legally privileged and/or
confidential information. If you are not the intended addressee, you are
hereby kindly notified that any dissemination, distribution or copying of
this email and any attachments hereto is strictly prohibited. If you have
received this email in error, kindly delete it from your computer system,
and notify us at the telephone number or email address appearing above.
Thank you



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



Re: forward thing: tomcat 4.1

2003-12-01 Thread Tim Funk
You must follow the forward() with a return inside of a servlet. forward() is 
just a plain old java method call.

-Tim

Kumar, Sumit wrote:
Hello,

This is more like a jsp question rather then the tomcat one but pardon me
for asking here. In my servlet, I do a 
getServletContext().getRequestDispatcher(
/reports.jsp?msg='selectEval'pid= + pid).forward( req, res ). The code is
given below. I believe this should forward it to reports.jsp[line (4)]. But
what happens is that even though it forwards it to reports.jsp, it continues
to execute the servlet even below the forward statement. When it encounters
the next forward statement[line (5)], it gives IllegalStateException. I
would think it should not go even past first forward[line (4)]. Please help
in clarifying.

if (revList.length  1)
{
req.setAttribute(revList, revList); 
   (4)getServletContext().getRequestDispatcher(
/reports.jsp?msg='selectEval'pid= + pid).forward( req, res );
}
else if (revList.length == 1)
{   

req.setAttribute(projEvalInfo, pe);
}   
(5)getServletContext().getRequestDispatcher(
/OtaceEvalFormRpt.jsp).forward( req, res );
-sumit	

-
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: Please Help

2003-12-01 Thread Andoni
Have you tried removing the connector line from server.xml?

then tried going direct to Tomcat on the port 8080 or whatever it is set to
in the Tomcat Connector on your machine (in server.xml)

This is a JK problem so try to remove it from the Equation and make sure the
rest works.

what did you change or what changed before this started happening?

Andoni.


- Original Message -
From: Yuval Zantkeren [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 01, 2003 5:07 PM
Subject: Please Help



why I'm getting this error :
01/12/2003 18:23:27 org.apache.jk.server.JkCoyoteHandler action
INFO: RESET

Which also causing my tomcat not to serve any more.

Regards,

Yuval Zantkeren

Domain The Net Technologies Ltd.
81 Sokolov St.
Ramat-Hasharon
Israel 47238
Tel: 972-3-7600500
Fax: 972-3-7600505
www.DomainTheNet.com

This email message and any attachments hereto are intended only for use by
the addressee(s) named above, and may contain legally privileged and/or
confidential information. If you are not the intended addressee, you are
hereby kindly notified that any dissemination, distribution or copying of
this email and any attachments hereto is strictly prohibited. If you have
received this email in error, kindly delete it from your computer system,
and notify us at the telephone number or email address appearing above.
Thank you



-
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: Tomcat 4 vs Tomcat 5 and MIME settings

2003-12-01 Thread Jeanfrancois Arcand
Bill Barker has already fixed this:

org.apache.coyote.Response
revision 1.31
date: 2003/11/16 05:20:23;  author: billbarker;  state: Exp;  lines: +10 -3
Restore the ability to explicitly set the charset to iso-latin-1.
Download the latest Tomcat 5 source and try it.

-- Jeanfrancois

Stephen Thomas wrote:

Hi,

I must apologise, I've never used these types of systems before and have
sent this email to a couple of addresses. 

I am a developer of Voice applications. I use the Tomcat servlet engine to
host my applications which are then fetched from the voice server. I am
currently having an issue with Tomcat 5 and 'content-type'. The voice server
can play .vox files and I fetch such a file from Tomcat 5 and get the
following header:
lwp-request -d -e http://10.100.1.113:8080/test/soxTest1.vox
Connection: close
Date: Mon, 01 Dec 2003 09:30:03 GMT
Server: Apache-Coyote/1.1
Content-Length: 8130
Content-Type: audio/x-vox;charset=ISO-8859-1
ETag: W/8130-1069965466970
Last-Modified: Thu, 27 Nov 2003 20:37:46 GMT
Client-Date: Mon, 01 Dec 2003 09:29:38 GMT
Client-Peer: 10.100.1.113:8080
I have added the following lines to web.xml
mime-mapping
extensionvox/extension
mime-typeaudio/x-vox/mime-type
/mime-mapping
The file fails to play because of the charset being appended to the
'content-type'. When I host the application and .vox file on Tomcat 4 I can
play the file as the content-type is returned as only 'audio/x-vox'.
Please could you help me as I'd rather use Tomcat 5 but this issue is
currently stopping me.
Thanks in advance,

Steve

-
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: GZIP-encoding/mod_gzip and Tomcat??

2003-12-01 Thread Subir Sengupta
If you're using Apache 2.x then you need mod_deflate

http://httpd.apache.org/docs-2.0/mod/mod_deflate.html

Subir

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2003 8:12 AM
To: Tomcat Users List
Subject: Re: GZIP-encoding/mod_gzip and Tomcat??


mod_gzip works with jk

Just make sure that you have the following:
mod_gzip_dechunk  Yes

-Tim

Mike Baroukh wrote:
No need for it in the connector if you're using apache! :)
You can get a mod_gzip module and do it from Apache which would 
probably be faster.
 
 
 Are you sure ?
 Has somebody already used mod_gzip with Apache  Tomcat ?
 
 I use it with Resin, but it was not possible with tomcat because 
 mod_jk replied directly to the client (so I think ...). There was many

 message on newsgroups about this. We had to adapt the sample gzip 
 filter provided with tomcat.
 
 


-
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: Intermittent failures using DataSources

2003-12-01 Thread Liem Do
I just had another thought about this, where do you have the jdbc driver
jars? You may also need a copy of the driver jars in the common/lib
directory in order for the container to see it at start up time. The stack
trace indicates that it not able to find the jdbc driver class.

HTH
Liem

- Original Message - 
From: Chris Ward [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 1:09 AM
Subject: RE: Intermittent failures using DataSources


  I'm not sure if it makes a difference but try putting the
 ResourceLinks before the Realm definition in server.xml.
 
  Liem



 Thanks for the suggestion Liem - doesn't seem to make any
 difference.  I'm still getting the same response in
 my browesr...


 org.apache.jasper.JasperException: Unable to get connection, DataSource
 invalid: Cannot load JDBC driver class 'null'
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
 va:254)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

 Any further suggestions would be great.

 Best regards
 Chris

 -
 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: Tomcat 4 threads

2003-12-01 Thread Filip Hanik
take a look at the coyote connector source code, all your questions will be
answered!

Filip

-Original Message-
From: Walter do Valle [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 5:19 AM
To: [EMAIL PROTECTED]
Subject: Tomcat 4 threads


I have some doubts about Tomcat and his threads. If someone could
help me, i will be very grateful.

In what moment new threads are created in Tomcat when it's running?
Is there a thread pool? In case positive:
- What is the initial quantity of threads created?
- What is the stagger algorithm?
- After created, when a thread terminates (end of life, release)?
- What means o large number of threads? Many users? Many sessions?
Many requests?

Thanks for any help


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



Perhaps a thread problem

2003-12-01 Thread Luc Foisy

Tomcat 4.1.18-LE with Java 1.4.0_03
RedHat 9
Tomcat is serving through https

from catalina.out
Dec 1, 2003 11:09:55 AM org.apache.tomcat.util.log.CommonLogHandler log
INFO: All threads are busy, waiting. Please increase maxThreads or check the servlet 
status75 75 
some application output (which looks like its functioning properly)
lastURL === 
/icrm/content.jsp?title=Introductiontoken=fb8c00f54cf5bb7288d5f89e83f78b7a
lastURL === 
/icrm/content.jsp?title=Web%20Application%20Navigationtoken=b33cd4c0ad12d504e56328c4ee355ec5
lastURL === 
/icrm/content.jsp?title=Web%20Application%20Navigationtoken=c26e29992ae8a564480b1bae5337bca0
 
Then a bunch of the following (maybe 50 times, same time too) 
Stopping service Tomcat-Standalone
Dec 1, 2003 1:08:15 PM org.apache.tomcat.util.log.CommonLogHandler log
SEVERE: Caught exception executing [EMAIL PROTECTED] mailto:[EMAIL PROTECTED], 
terminating thread
java.lang.IllegalStateException
at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:245)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:503)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536)


What is this telling me? Where do I set maxThreads?

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



RE: Perhaps a thread problem

2003-12-01 Thread Filip Hanik
in server.xml for each connector

-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 10:58 AM
To: Tomcat User List (E-mail)
Subject: Perhaps a thread problem



Tomcat 4.1.18-LE with Java 1.4.0_03
RedHat 9
Tomcat is serving through https

from catalina.out
Dec 1, 2003 11:09:55 AM org.apache.tomcat.util.log.CommonLogHandler log
INFO: All threads are busy, waiting. Please increase maxThreads or 
check the servlet status75 75 
some application output (which looks like its functioning properly)
lastURL === 
/icrm/content.jsp?title=Introductiontoken=fb8c00f54cf5bb7288d5f89e83f78b7a
lastURL === 
/icrm/content.jsp?title=Web%20Application%20Navigationtoken=b33cd4c
0ad12d504e56328c4ee355ec5
lastURL === 
/icrm/content.jsp?title=Web%20Application%20Navigationtoken=c26e299
92ae8a564480b1bae5337bca0 
Then a bunch of the following (maybe 50 times, same time too) 
Stopping service Tomcat-Standalone
Dec 1, 2003 1:08:15 PM org.apache.tomcat.util.log.CommonLogHandler log
SEVERE: Caught exception executing 
[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED], 
terminating thread
java.lang.IllegalStateException
at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:245)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:503)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread
Pool.java:530)
at java.lang.Thread.run(Thread.java:536)


What is this telling me? Where do I set maxThreads?

-
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]



Listening to Session Creation... Need Access to Session

2003-12-01 Thread Hart, Justin
Ok, here's what I've tried.

1)  Implement SessionListener, put in web.xml file in listener tags.
This never seems to run.
2)  Implement HttpSessionListener, put in web.xml file in listener tags.
This runs, but doesn't seem to have access to the Session (I need the username 
and pass off the Session to authenticate to a database).
3)  Implement a Valve to do the same.
I saw that SingleSignOn uses a valve implementation, and is a SessionListener. 
 I see that it sets itself up to listen to its sessions, but now how this code is ever 
called!

So, my question is:
1)  Can I use SessionListener in any meaningful way?  Is there a way to add 
this to my xml files that I am unaware of?
2)  Can I get to the Session (or at least the data I need) from 
HttpSessionListener?
3)  Why isn't my valve running?  It's just valve className=theClass in my 
server.xml, right?

Justin

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



RE: Tomcat 4 vs Tomcat 5 and MIME settings

2003-12-01 Thread Stephen Thomas
Does this mean it will still return a charset? I don't need any charset
returned.

I will continue using Tomcat 4.1.27 until the fixed release of 5 is stable.

Thanks,
Steve

-Original Message-
From: Jeanfrancois Arcand [mailto:[EMAIL PROTECTED]
Sent: 01 December 2003 17:54
To: Tomcat Users List
Subject: Re: Tomcat 4 vs Tomcat 5 and MIME settings


Bill Barker has already fixed this:

org.apache.coyote.Response
revision 1.31
date: 2003/11/16 05:20:23;  author: billbarker;  state: Exp;  lines: +10 -3
Restore the ability to explicitly set the charset to iso-latin-1.

Download the latest Tomcat 5 source and try it.

-- Jeanfrancois

Stephen Thomas wrote:

Hi,

I must apologise, I've never used these types of systems before and have
sent this email to a couple of addresses. 

I am a developer of Voice applications. I use the Tomcat servlet engine to
host my applications which are then fetched from the voice server. I am
currently having an issue with Tomcat 5 and 'content-type'. The voice
server
can play .vox files and I fetch such a file from Tomcat 5 and get the
following header:

lwp-request -d -e http://10.100.1.113:8080/test/soxTest1.vox
Connection: close
Date: Mon, 01 Dec 2003 09:30:03 GMT
Server: Apache-Coyote/1.1
Content-Length: 8130
Content-Type: audio/x-vox;charset=ISO-8859-1
ETag: W/8130-1069965466970
Last-Modified: Thu, 27 Nov 2003 20:37:46 GMT
Client-Date: Mon, 01 Dec 2003 09:29:38 GMT
Client-Peer: 10.100.1.113:8080

I have added the following lines to web.xml
mime-mapping
extensionvox/extension
mime-typeaudio/x-vox/mime-type
/mime-mapping

The file fails to play because of the charset being appended to the
'content-type'. When I host the application and .vox file on Tomcat 4 I can
play the file as the content-type is returned as only 'audio/x-vox'.

Please could you help me as I'd rather use Tomcat 5 but this issue is
currently stopping me.

Thanks in advance,

Steve


-
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: Tomcat 4 vs Tomcat 5 and MIME settings

2003-12-01 Thread Jeanfrancois Arcand


Stephen Thomas wrote:

Does this mean it will still return a charset? I don't need any charset
returned.
 

Now, you won't get the charset unless you ask for it (so no more 
Content-Type: image/gif; charset=iso-8859-1
).  However, if you call response.setCharacterEncoding(iso-9959-1), 
you now get it in the response.

I will continue using Tomcat 4.1.27 until the fixed release of 5 is stable.
 

Will be released soon.

-- Jeanfrancois

Thanks,
Steve
-Original Message-
From: Jeanfrancois Arcand [mailto:[EMAIL PROTECTED]
Sent: 01 December 2003 17:54
To: Tomcat Users List
Subject: Re: Tomcat 4 vs Tomcat 5 and MIME settings
Bill Barker has already fixed this:

org.apache.coyote.Response
revision 1.31
date: 2003/11/16 05:20:23;  author: billbarker;  state: Exp;  lines: +10 -3
Restore the ability to explicitly set the charset to iso-latin-1.
Download the latest Tomcat 5 source and try it.

-- Jeanfrancois

Stephen Thomas wrote:

 

Hi,

I must apologise, I've never used these types of systems before and have
sent this email to a couple of addresses. 

I am a developer of Voice applications. I use the Tomcat servlet engine to
host my applications which are then fetched from the voice server. I am
currently having an issue with Tomcat 5 and 'content-type'. The voice
   

server
 

can play .vox files and I fetch such a file from Tomcat 5 and get the
following header:
lwp-request -d -e http://10.100.1.113:8080/test/soxTest1.vox
Connection: close
Date: Mon, 01 Dec 2003 09:30:03 GMT
Server: Apache-Coyote/1.1
Content-Length: 8130
Content-Type: audio/x-vox;charset=ISO-8859-1
ETag: W/8130-1069965466970
Last-Modified: Thu, 27 Nov 2003 20:37:46 GMT
Client-Date: Mon, 01 Dec 2003 09:29:38 GMT
Client-Peer: 10.100.1.113:8080
I have added the following lines to web.xml
mime-mapping
extensionvox/extension
mime-typeaudio/x-vox/mime-type
/mime-mapping
The file fails to play because of the charset being appended to the
'content-type'. When I host the application and .vox file on Tomcat 4 I can
play the file as the content-type is returned as only 'audio/x-vox'.
Please could you help me as I'd rather use Tomcat 5 but this issue is
currently stopping me.
Thanks in advance,

Steve

-
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: Doubt Reg. Servlet Contex

2003-12-01 Thread Shapira, Yoav

Howdy,
You are mostly correct.  The context will also be destroyed and a new
one created when the application is restated (which can be done without
restarting the server itself).


Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: dakavara [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 4:59 AM
To: [EMAIL PROTECTED]
Subject: Doubt Reg. Servlet Contex

Hi,

   When the Servlet Contrext Initilized and when will be destroyed.

   I am thinking that, it will be initilized when ever the
application
server
starts, and destroyes when ever the application server stops.

   I am correct ? or not ?



Thanks in Advance,
Ashok.D


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Forwarding

2003-12-01 Thread Shapira, Yoav

Howdy,
You can also do this with a filter (mapped to url-pattern /*, looks for request URL 
ending in /something.jsp/, redirects accordingly.

I understand your desire NOT to use Apache (even though mod_rewrite would work here) 
in order to keep the environment simpler and pure java.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Holger Klawitter [mailto:[EMAIL PROTECTED]
Sent: Friday, November 28, 2003 2:24 AM
To: Tomcat Users List
Subject: Re: Forwarding

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am Thursday 27 November 2003 16:49 schrieb Stuart Stephen:
 Why not use apache mod_rewrite ?

You need to have apache (and jkwhatever) up and running for this ;-)

Mit freundlichem Gruß / With kind regards
   Holger Klawitter
- --
lists at klawitter dot de
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/xvgM1Xdt0HKSwgYRAmj0AJ9gbXIiXPuAF9p8gmdC2xPcF/uXNwCaA5/A
yHMLQABP8Ky+ljKqC4wlJ9M=
=h2Bd
-END PGP SIGNATURE-


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Garbage Collection issues

2003-12-01 Thread Shapira, Yoav

Howdy,
Perhaps you are experiencing higher load, which requires more memory.
Or perhaps your application does have a memory leak: those are possible
and occur in java, so yes that would a programming error on your part.
The garbage collector does much magic, but it can't save you all the
time.  You may wish to read up on java memory leaks, as they've been
discussed at length on this list and on the net in general.

Note that when you call Runtime#gc that's only a suggestion to the JVM:
many times when you call that the garbage collector may not run at all.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Neal [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 30, 2003 8:21 PM
To: 'Tomcat Users List'
Subject: Garbage Collection issues

My Tomcat 4.1 (hosted on Linux) seems to have a problem in recent
months
with crashing due to unavailable free RAM.  Specifically I get a
java.error.outOfMemory exception.  If check the RAM available
(Runtime.getRuntime().totalMemory()), I can see it ticking down through
the week.  If explicitly run garbage collection however my RAM totally
frees up and all is well (Runtime.getRuntime().gc();).

Why would this happen?  Surely this isn't due to a programming error on
my part, otherwise, the resources should automatically released
whenever
the JRE performs periodic garbage collection. Isn't that correct?
Anyone have any theories as to what this may mean and what the best
solution would be?

Thanks.
Neal



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: How can we know Tomcat is running or not through Standalone Java Prog

2003-12-01 Thread Shapira, Yoav

Howdy,
You have options that check slightly different things:
- Ping tomcat's port: checks the server is up, accepting request on the
port you check
- Specify a CATALINA_PID file, have your standalone program check for
presence of this file
- Write out your own file from your webapp, have your standalone program
check for presence of this file.
- Use a tool like Nagios

etc. etc.  This is a basic operational question.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: dakavara [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:42 AM
To: Tomcat Users List (E-mail)
Subject: How can we know Tomcat is running or not through Standalone
Java
Prog

Hi,


How can we know Tomcat is running or not through Standalone Java
Program.


Thanks in Advance,
Ashok.D

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: jakarta Slide

2003-12-01 Thread Shapira, Yoav

Howdy,
You mean beyond its users guide on its site?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Vaneet Sharma [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 5:07 AM
To: Tomcat Users List
Subject: jakarta Slide

Hi All,
  Is there any place where i can find examples on jakarta slide.
The idea that i got from slide is that it is a frameworkd for document
and
content management systems.
 Am i getting right ?
is there anyone who can let me know about jakarta slide/...
 Tahnkx
 Vaneet

 -Original Message-
From: Leonardo Lopez [mailto:[EMAIL PROTECTED]
Sent: Sun 23/11/2003 20:35
To: Tomcat Users List
Cc:
Subject: Hot Reload



   Hi gurus, I`m using tomcat 4.0.6 and I need to know how to
configure,
a hot reload of an application.
   I mean if a put a recompiled class, because it suffered any
change,
on the directory webapps/Aplication/WEB-INF/classes/... , how could I
make Tomcat detect that change and reload that application without
using
the manager tools. (/manager/reload?path=/Application, for instance)

   Thanks in advance





This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Listening to Session Creation... Need Access to Session

2003-12-01 Thread Shapira, Yoav

Howdy,

1)  Implement SessionListener, put in web.xml file in listener tags.
   This never seems to run.
2)  Implement HttpSessionListener, put in web.xml file in listener
tags.
   This runs, but doesn't seem to have access to the Session (I
need the
username and pass off the Session to authenticate to a database).
3)  Implement a Valve to do the same.

I'm not going to waste time on approaches 1 and 3, as they're
tomcat-specific.  #2 will work: you will get the event, with access to
the session, once the session is created.  It has no attributes at that
time, so any getAttribute call will return null.

Perhaps you are really looking for a session attribute listener?

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Listening to Session Creation... Need Access to Session

2003-12-01 Thread Hart, Justin
What am I looking for in order to get the username/password out of this?  I'm using 
BASIC authentication.  Are these credentials dumped somewhere that I could find them?  
I haven't been able to find that data in HttpSession?

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:39 PM
To: Tomcat Users List
Subject: RE: Listening to Session Creation... Need Access to Session



Howdy,

1)  Implement SessionListener, put in web.xml file in listener tags.
   This never seems to run.
2)  Implement HttpSessionListener, put in web.xml file in listener
tags.
   This runs, but doesn't seem to have access to the Session (I
need the
username and pass off the Session to authenticate to a database).
3)  Implement a Valve to do the same.

I'm not going to waste time on approaches 1 and 3, as they're
tomcat-specific.  #2 will work: you will get the event, with access to
the session, once the session is created.  It has no attributes at that
time, so any getAttribute call will return null.

Perhaps you are really looking for a session attribute listener?

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
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: Listening to Session Creation... Need Access to Session

2003-12-01 Thread Karl Coleman
Why would that be wasting time? Isn't this a tomcat list?

Karl

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:39 PM
To: Tomcat Users List
Subject: RE: Listening to Session Creation... Need Access to Session

I'm not going to waste time on approaches 1 and 3, as they're
tomcat-specific.  #2 will work: you will get the event, with access to
the session, once the session is created.  It has no attributes at that
time, so any getAttribute call will return null.

Perhaps you are really looking for a session attribute listener?

Yoav Shapira

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



RE: Propeties file

2003-12-01 Thread Shapira, Yoav

Howdy,
I'd like to know why so few people bother to do a bit of research prior
to posting ;(

You can search the archives of this list, and you'll see that you have
two main choices, summarized as:
- Put it under your webapp root, and use ServletContext#getResource(...)
- Put it on the classpath, and use ClassLoader#getResource(...)

- You have other choices, but they're more complex, e.g. JNDI
env-entry-refs
- You should NOT use a File-based approach, as it won't work in a packed
WAR distribution

- Since these are connection properties for a DB, you may wish to let
tomcat setup your datasource for you: see the JNDI DataSources How-To
document.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: laurent marot [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 12:25 PM
To: Tomcat Users List
Subject: Propeties file

Hi all,

i have a web application running on Tomcat 4.1.24/win2k that connect
Oracle
database.

connection properties are in file and i'd  like to know where could be
the
better way to store that properties files

thanks


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: org.apache.catalina.valves.RemoteHostValve

2003-12-01 Thread Shapira, Yoav

Howdy,
I already answered this question, FCOL.  Put just the subnet without a *
as the attribute value.  Senor Ruiz's suggestion would also work but
it's not what the original poster asked.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 4:44 AM
To: Tomcat Users List
Subject: Re: org.apache.catalina.valves.RemoteHostValve

Instead of denying access, try to allow it. I think the valve should
accept this syntax:

Valve className=... allow=localhost,127.0.0.1,other IPs/

If you only deny access from other intranet computers, you are allowing
access from internet

HTH,
Rodrigo Ruiz

Drinkwater, GJ (Glen) wrote:

Hi


I have tried to put


Valve className=org.apache.catalina.valves.RemoteHostValve
deny=*.subnet.ac.uk/ in my context but it keeps on throwing an
exception

Catalina.start: java.lang.IllegalArgumentException: Syntax error in
request
filter pattern *.subnet.ac.uk

Can wild cards be used in this context?

Does anybosy know how to only allow the localhost to access the server
/context???

Glen

-
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]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Sending to Printer?

2003-12-01 Thread Shapira, Yoav

Howdy,
I hear you, I'm not a big javascript fan either.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 3:41 PM
To: Tomcat Users List
Subject: RE: Sending to Printer?

That's it eh. I always try to do things without JavaScript (or at least
functions that do not need the javascript to work), it may be some kind
of
industry standard, but there are people that still do not trust the
scripting languages, therefore thier javascript is turned off.

Oh well, will have to go the route of reformatting my page in a
printer
friendly way and let the user do the printing themselves.

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 9:17 AM
To: Tomcat Users List
Subject: RE: Sending to Printer?



Howdy,
You can use the JavaScript window.print() function ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 9:10 AM
To: Tomcat User List (E-mail)
Subject: Sending to Printer?


Is there any code I could use to send something to a printer? Via the
print
writer I suppose would be needed. Is there some kind of jsp tag
library
to
do this, or some particular way I can send a page that would be pushed
to
thier browsers printing functions?

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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an)
intended
recipient, please immediately delete this e-mail from your computer
system
and notify the sender.  Thank you.


-
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]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Where is the HowTo FAQ section?

2003-12-01 Thread Shapira, Yoav

Hi,
What's up with
http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Howto

(linked from the HowTo section of the tomcat FAQ at
http://jakarta.apache.org/tomcat/faq) ?

I could swear we had a bunch of questions and answers there.  Please
tell me the clueless user who posted the WinXP setup question did not
erase the page?  Or alternatively that someone has the previous version
of the page somewhere? ;)

Yoav Shapira
Millennium ChemInformatics





This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Listening to Session Creation... Need Access to Session

2003-12-01 Thread Shapira, Yoav

Howdy,

Why would that be wasting time? Isn't this a tomcat list?

Yup, tomcat list.  But as I said his approaches #1 and #3 are
tomcat-specific, and I'm not going to waste my personal time working for
myself, much less explaining to others, how to use server-specific
non-portable non-spec functionality when there is a portable standard
alternative.  That's a big when condition, but it's definitely true in
this case.  Other people may choose otherwise of course...

Yoav Shapira


Karl

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:39 PM
To: Tomcat Users List
Subject: RE: Listening to Session Creation... Need Access to Session

I'm not going to waste time on approaches 1 and 3, as they're
tomcat-specific.  #2 will work: you will get the event, with access to
the session, once the session is created.  It has no attributes at that
time, so any getAttribute call will return null.

Perhaps you are really looking for a session attribute listener?

Yoav Shapira

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: SessionListener

2003-12-01 Thread Shapira, Yoav

Howdy,
A SessionListener of the org.apache.catalina variety would go in the
same place as all tomcat-specific features:
$CATALINA_HOME/conf/server.xml.  That means the class specified there
must be accessible to the server classloaders, i.e. must reside in
common/lib or higher on the classloader hierarchy.

The above is true for Valves, Realms, Listeners, etc, that are
proprietary to tomcat.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Hart, Justin [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 11:53 AM
To: Tomcat Users List
Subject: RE: SessionListener

Ok, so, the listener in there must implement HttpSessionListener, where
can
I use SessionListeners?

Justin

-Original Message-
From: Hart, Justin
Sent: Monday, December 01, 2003 11:34 AM
To: Tomcat Users List (E-mail)
Subject: SessionListener


My SessionListener doesn't seem to be firing, any help?

I have a SessionListener that I want to go off when a user
authenticates to
my web app (this is a correct usage, right?)

So, in the web.xml of my app, I would put the lines:

web-app
   listener
   listener-class
   the class
   /listener-class
   /listener
/web-app

This should fire off when the user signs in to the page, correct?

Justin

-
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]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: tomcat session invalidate

2003-12-01 Thread Shapira, Yoav

Howdy,
Senor Souther is exactly right.  It is dangerous and bad practice to
depend on destroy events for memory reclamation.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, November 28, 2003 6:47 AM
To: Tomcat Users List
Subject: Re: tomcat  session invalidate

The memory won't be released until the Garbage Collector (GC) is run.
The JVM determines when to run GC based on the available memory.



On Friday 28 November 2003 05:38 am, you wrote:
 Hi,
 I've notice that Tomcat (v.4.1.29) does not release memory on session
 invalidate event...
 I try to create many session (with a stress tool like grinder) and
i've
set
 session life time to 1 minute.
 Tomcat memory occupation stretch to increase ... inexplicably, in my
 opinion.
 When destroy session event occurs memory does not recycle...

 Thanks for help

 ---
 giluka

 Questa e-mail e' stata verificata dal sistema di antivirus della Siva
 S.P.A.


 -
 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]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Tomcat 4 threads

2003-12-01 Thread Shapira, Yoav

Howdy,

In what moment new threads are created in Tomcat when it's running?

Under many possible circumstances: new webapp deployed, new request
arrived and current # processors on the receiving connector less than
max and all processors busy, some new JNDI resources (e.g. 3rd party
datasource reaper thread), some app code (e.g. log4j's configureAndWatch
call), many many.

Is there a thread pool? In case positive:

For some things, notably request processors, there's a pool.

- What is the initial quantity of threads created?

You specify it, see server.xml.

- What is the stagger algorithm?

You didn't really mean to ask that in this context, did you?

- After created, when a thread terminates (end of life, release)?

For request processors in current coyote, answer is when the server
dies.  But again there are many possible permutations.

- What means o large number of threads? Many users? Many sessions? Many
requests?

Any and all of the above as well as none of the above.  Consider for
example a server configured with ten connectors, each with 100 min spare
processors, one webapp per connector calling log4j's configureAndWatch
- 10*100 + 10 = 1010 threads.  And that's just on startup, before
receiving any requests or creating any sessions ;)

Yoav Shapira




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Perhaps a thread problem

2003-12-01 Thread Luc Foisy
And by chance could you grant me a guess as to why this would happen?
And should maxThreads be in any way related to how much traffic is expected to go 
through the site?

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:22 PM
To: Tomcat Users List
Subject: RE: Perhaps a thread problem


in server.xml for each connector

-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 10:58 AM
To: Tomcat User List (E-mail)
Subject: Perhaps a thread problem



Tomcat 4.1.18-LE with Java 1.4.0_03
RedHat 9
Tomcat is serving through https

from catalina.out
Dec 1, 2003 11:09:55 AM org.apache.tomcat.util.log.CommonLogHandler log
INFO: All threads are busy, waiting. Please increase maxThreads or 
check the servlet status75 75 
some application output (which looks like its functioning properly)
lastURL === 
/icrm/content.jsp?title=Introductiontoken=fb8c00f54cf5bb7288d5f89e83f78b7a
lastURL === 
/icrm/content.jsp?title=Web%20Application%20Navigationtoken=b33cd4c
0ad12d504e56328c4ee355ec5
lastURL === 
/icrm/content.jsp?title=Web%20Application%20Navigationtoken=c26e299
92ae8a564480b1bae5337bca0 
Then a bunch of the following (maybe 50 times, same time too) 
Stopping service Tomcat-Standalone
Dec 1, 2003 1:08:15 PM org.apache.tomcat.util.log.CommonLogHandler log
SEVERE: Caught exception executing 
[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED], 
terminating thread
java.lang.IllegalStateException
at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:245)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:503)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread
Pool.java:530)
at java.lang.Thread.run(Thread.java:536)


What is this telling me? Where do I set maxThreads?

-
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: Perhaps a thread problem

2003-12-01 Thread Luc Foisy
Could several null pointer exceptions occuring because of some bad code in the 
application cause a thread problem?

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:22 PM
To: Tomcat Users List
Subject: RE: Perhaps a thread problem


in server.xml for each connector

-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 10:58 AM
To: Tomcat User List (E-mail)
Subject: Perhaps a thread problem



Tomcat 4.1.18-LE with Java 1.4.0_03
RedHat 9
Tomcat is serving through https

from catalina.out
Dec 1, 2003 11:09:55 AM org.apache.tomcat.util.log.CommonLogHandler log
INFO: All threads are busy, waiting. Please increase maxThreads or 
check the servlet status75 75 
some application output (which looks like its functioning properly)
lastURL === 
/icrm/content.jsp?title=Introductiontoken=fb8c00f54cf5bb7288d5f89e83f78b7a
lastURL === 
/icrm/content.jsp?title=Web%20Application%20Navigationtoken=b33cd4c
0ad12d504e56328c4ee355ec5
lastURL === 
/icrm/content.jsp?title=Web%20Application%20Navigationtoken=c26e299
92ae8a564480b1bae5337bca0 
Then a bunch of the following (maybe 50 times, same time too) 
Stopping service Tomcat-Standalone
Dec 1, 2003 1:08:15 PM org.apache.tomcat.util.log.CommonLogHandler log
SEVERE: Caught exception executing 
[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED], 
terminating thread
java.lang.IllegalStateException
at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:245)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:503)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread
Pool.java:530)
at java.lang.Thread.run(Thread.java:536)


What is this telling me? Where do I set maxThreads?

-
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: Propeties file

2003-12-01 Thread Marot Laurent
sorry guys, i did have a look at tomcat archives and googled that query too but 
couldn't find anything for my need

as a run tomcat on win2k platform and i don't want the file to be acceesed for 
security reasons, i can't cant put it under my webapp root, ( of course i can't use 
tomcat realm authentication to protect it in this webapp)

as this property file does not only contains database parameters i think i can't use 
either JNDI DATASOURCE

so ... would it be a safe and common way to pu it under WEB-INF directory ?

thanks for your help


-Message d'origine-
De : Shapira, Yoav [mailto:[EMAIL PROTECTED]
Envoyé : lundi 1 décembre 2003 20:45
À : Tomcat Users List
Objet : RE: Propeties file



Howdy,
I'd like to know why so few people bother to do a bit of research prior
to posting ;(

You can search the archives of this list, and you'll see that you have
two main choices, summarized as:
- Put it under your webapp root, and use ServletContext#getResource(...)
- Put it on the classpath, and use ClassLoader#getResource(...)

- You have other choices, but they're more complex, e.g. JNDI
env-entry-refs
- You should NOT use a File-based approach, as it won't work in a packed
WAR distribution

- Since these are connection properties for a DB, you may wish to let
tomcat setup your datasource for you: see the JNDI DataSources How-To
document.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: laurent marot [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 12:25 PM
To: Tomcat Users List
Subject: Propeties file

Hi all,

i have a web application running on Tomcat 4.1.24/win2k that connect
Oracle
database.

connection properties are in file and i'd  like to know where could be
the
better way to store that properties files

thanks


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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
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: SessionListener

2003-12-01 Thread Hart, Justin
Ok, still, I haven't found any documentation on how to add a SessionListener in the 
server.xml file, and adding one using the listener tags defined for web.xml files 
doesn't seem to work.

I also haven't seen how to get a user's credentials from a HttpSession, or how to get 
a Session from an HttpSessionListener.  Could you throw me a bone?

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:52 PM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,
A SessionListener of the org.apache.catalina variety would go in the
same place as all tomcat-specific features:
$CATALINA_HOME/conf/server.xml.  That means the class specified there
must be accessible to the server classloaders, i.e. must reside in
common/lib or higher on the classloader hierarchy.

The above is true for Valves, Realms, Listeners, etc, that are
proprietary to tomcat.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Hart, Justin [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 11:53 AM
To: Tomcat Users List
Subject: RE: SessionListener

Ok, so, the listener in there must implement HttpSessionListener, where
can
I use SessionListeners?

Justin

-Original Message-
From: Hart, Justin
Sent: Monday, December 01, 2003 11:34 AM
To: Tomcat Users List (E-mail)
Subject: SessionListener


My SessionListener doesn't seem to be firing, any help?

I have a SessionListener that I want to go off when a user
authenticates to
my web app (this is a correct usage, right?)

So, in the web.xml of my app, I would put the lines:

web-app
   listener
   listener-class
   the class
   /listener-class
   /listener
/web-app

This should fire off when the user signs in to the page, correct?

Justin

-
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]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
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: Propeties file

2003-12-01 Thread Shapira, Yoav

Howdy,

sorry guys, i did have a look at tomcat archives and googled that query
too
but couldn't find anything for my need

Really?  Wow...  A search like this has many threads that answer your
question:
http://marc.theaimsgroup.com/?l=tomcat-userw=2r=2s=property+file+loca
tionq=b

as a run tomcat on win2k platform and i don't want the file to be
acceesed
for security reasons, i can't cant put it under my webapp root, ( of
course
i can't use tomcat realm authentication to protect it in this webapp)

You do want it accessed by your webapp, right?  Under the webapp root
includes as a special option under WEB-INF, where users cannot see the
file in their browser but you can access it programmatically.  This is a
safe an common use-case.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: SessionListener

2003-12-01 Thread Shapira, Yoav

Howdy,

Ok, still, I haven't found any documentation on how to add a
SessionListener in the server.xml file, and adding one using the
listener
tags defined for web.xml files doesn't seem to work.

The XML is the similar but not quite the same to the portable one:
listener className=mypackage.myclass ... /  There is a generic
example in the Engine configuration reference, and another more specific
example in the Host configuration reference.  Neither, however, is a
SessionListener example.

There IS one specific, full-features SessionListener example: the
SingleSignOn valve.  It's present (but commented out) in server.xml by
default, and you can take a look at the source code.  It's a more
complicated and confusing example because it's also a Valve ;(  But then
again, I wouldn't even bother with this whole approach when you have the
HttpSessionListener as part of the servlet specification.

where ... are attributes specific to your listener.  (The astute reader
would recognize the above as a commons Digester bean-based
initialization pattern).

I also haven't seen how to get a user's credentials from a HttpSession,
or
how to get a Session from an HttpSessionListener.  Could you throw me a
bone?

If the user is authenticated by the server, typically the information is
not in the session, it's in the request:
HttpServletRequest#getUserPrincipal.  A common use-case is to stuff this
in the session via a filter.

If you had an attribute called username that something was stuffing into
the session, i.e. something like a filter calling
session.setAttribute(username, something), then an
HttpSessionAttributeListener's attributeAdded would be called with the
attribute name and latest value.

Yoav




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: forward thing: tomcat 4.1

2003-12-01 Thread Doug Parsons
Kumar,

Why not? There is nothing in the code to stop it from proceeding. Think in
the terms of a servlet. If you called a servlet instead of placing this code
in the jsp, how would you write it. Also do you mean for the (5) statement
to be outside your else bracket? Or did you mean for it to look like this:

if (revList.length  1)
{
req.setAttribute(revList, revList);
   (4)getServletContext().getRequestDispatcher(
/reports.jsp?msg='selectEval'pid= + pid).forward( req, res );
}
else if (revList.length == 1)
{
req.setAttribute(projEvalInfo, pe);
(5)getServletContext().getRequestDispatcher(
/OtaceEvalFormRpt.jsp).forward( req, res );
}

Doug

- Original Message - 
From: Kumar, Sumit [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, December 01, 2003 11:58 AM
Subject: forward thing: tomcat 4.1


 Hello,

 This is more like a jsp question rather then the tomcat one but pardon me
 for asking here. In my servlet, I do a
 getServletContext().getRequestDispatcher(
 /reports.jsp?msg='selectEval'pid= + pid).forward( req, res ). The code
is
 given below. I believe this should forward it to reports.jsp[line (4)].
But
 what happens is that even though it forwards it to reports.jsp, it
continues
 to execute the servlet even below the forward statement. When it
encounters
 the next forward statement[line (5)], it gives IllegalStateException. I
 would think it should not go even past first forward[line (4)]. Please
help
 in clarifying.

 if (revList.length  1)
 {
 req.setAttribute(revList, revList);
(4)getServletContext().getRequestDispatcher(
 /reports.jsp?msg='selectEval'pid= + pid).forward( req, res );
 }
 else if (revList.length == 1)
 {

 req.setAttribute(projEvalInfo, pe);
 }
 (5)getServletContext().getRequestDispatcher(
 /OtaceEvalFormRpt.jsp).forward( req, res );

 -sumit


 -
 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: forward thing: tomcat 4.1

2003-12-01 Thread Doug Parsons
Sorry I read to fast. You are in a servlet. Unless you return or escape out
or try catch it is going to execute to the end or until you do something to
exit.

- Original Message - 
From: Kumar, Sumit [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, December 01, 2003 11:58 AM
Subject: forward thing: tomcat 4.1


 Hello,

 This is more like a jsp question rather then the tomcat one but pardon me
 for asking here. In my servlet, I do a
 getServletContext().getRequestDispatcher(
 /reports.jsp?msg='selectEval'pid= + pid).forward( req, res ). The code
is
 given below. I believe this should forward it to reports.jsp[line (4)].
But
 what happens is that even though it forwards it to reports.jsp, it
continues
 to execute the servlet even below the forward statement. When it
encounters
 the next forward statement[line (5)], it gives IllegalStateException. I
 would think it should not go even past first forward[line (4)]. Please
help
 in clarifying.

 if (revList.length  1)
 {
 req.setAttribute(revList, revList);
(4)getServletContext().getRequestDispatcher(
 /reports.jsp?msg='selectEval'pid= + pid).forward( req, res );
 }
 else if (revList.length == 1)
 {

 req.setAttribute(projEvalInfo, pe);
 }
 (5)getServletContext().getRequestDispatcher(
 /OtaceEvalFormRpt.jsp).forward( req, res );

 -sumit


 -
 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]



tomcat on kaffe

2003-12-01 Thread kalyan ram
Hai 
  How to run tomcat on kaffe virtual machine?During
setup or installation,what exactly do i need to
modify?
Any pointers would be helpful.

Thanks
-Ram

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



RE: Strange GET error with recent linux upgrade.

2003-12-01 Thread Brian Menke
I didn't get a response on this, but I did solve the problem and thought I
would pass it on just in case someone else runs into something similar.

I found out that the web.xml file was an older version that used an older
DTD (2.2). It was tied to an older version of tomcat. I think around tomcat
2.something. 

When they upgraded to the latest red hat enterprise linux, they were using
tomcat 4.1.29. The 2.3 DTD that is used by 4.1.29 includes the
servlet-mapping/servlet-mapping tags that let you specify the
url-pattern for your servlets. As soon as I upgraded the web.xml file to the
new version, and included the servlet-mapping, everything worked perfectly. 

I still don't understand why I got the original error message:

HTTP Status 405 - HTTP method GET is not supported by this URL

I would have expected a servlet not available message if tomcat couldn't
find it because the web.xml file was wrong?

-Brian 

-Original Message-
From: Brian Menke [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 26, 2003 10:47 AM
To: 'Tomcat Users List'
Subject: Strange GET error with recent linux upgrade.

Hi Everyone,

I have a client that just upgraded their Linux to the latest redhat
enterprise linux. They had a bunch of servlets that all worked with the
previous version just fine. Those servlets handled both post and get
request. After the update, all the servlets now display the following
message:

HTTP Status 405 - HTTP method GET is not supported by this URL

I think they just used what ever versions of java, tomcat etc. that came
with linux. I'm not real familiar with linux, or if this is even a linux
problem. Just wonder if there is something obvious that may have caused this
that someone may be aware of? Any insight is greatly appreciated.

Happy Thanksgiving everyone.

-Brian


-
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]



jk-1.2.5 not working

2003-12-01 Thread Michael Valentiner
I have apache 2.0.48, tomcat 4.1.29, and jk-1.2.5 on the latest Mac OSX 
(Panther).  Apache and tomcat are working, but not jk.  jk is 
apparently failing to find a match when attempting to map the requested 
URI.

I configured server.xml, workers.properties, and httpd.conf according 
to the instructions on John Turner's site 
http://www.johnturner.com/howto/apache2-tomcat4127-jk-rh9-howto.html. 
 http://localhost:8080/examples works, but 
http://localhost/examples returns:
	Not Found
	The requested URL /examples/ was not found on this server.
and /usr/local/jakarta-tomcat-4.1.29/logs/mod_jk.log has these lines 
(I've got JkLogLevel set to debug):
[Mon Dec 01 12:15:29 2003]  [jk_uri_worker_map.c (486)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Mon Dec 01 12:15:29 2003]  [jk_uri_worker_map.c (500)]: Attempting to 
map URI '/examples/'
[Mon Dec 01 12:15:29 2003]  [jk_uri_worker_map.c (618)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Mon Dec 01 12:15:29 2003]  [jk_uri_worker_map.c (486)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Mon Dec 01 12:15:29 2003]  [jk_uri_worker_map.c (500)]: Attempting to 
map URI '/examples/'
[Mon Dec 01 12:15:29 2003]  [jk_uri_worker_map.c (618)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match

As far as I can tell, auto/mod_jk.conf looks right (it's about that 
same as the sample at 
http://www.johnturner.com/howto/rh9-mod_jk-conf.txt).

Any solutions, suggestions, diagnostics are greatly appreciated.

---
Mike Valentiner, Minneapolis, Minnesota
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat 4.0.x memory leak (not javac)

2003-12-01 Thread Shapira, Yoav

Howdy,
First, prove to us it's the same bug.  I say bug in quotes when referring to the 
original issue because I have no clue what's being discussed unless someone posts a 
bugzilla ID for it.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Abhijeet Selukar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 2:49 AM
To: Tomcat Users List
Subject: Re: Tomcat 4.0.x memory leak (not javac)

Hi,
I am also facing the same problem of memory leakage. I have posted on mail
about this on 19th Nov too...

I had contacted to the support people where our web application is hosted.
I had got few suggestions. According to their suggestion -
1. I increased the heapsize in catalina.sh file.
2. I have also tried to increase the file descriptor size.

Increaing the file descriptor size helped me at some extent. It stopped the
frequent exceptions in Tomcat - catalina but occasionaly I am still gettng
same exceptions.
I would really like to have some more suggestions.

Abhijeet Selukar


  - Original Message -
  From: Trenton D. Adams
  To: Tomcat Users List
  Sent: Monday, December 01, 2003 12:21 AM
  Subject: Re: Tomcat 4.0.x memory leak (not javac)


  Sven Köhler wrote:
   It's a known bug, but not fixed in 4.1.x, it still exists there.  I
   am not sure if it still exists in 5.0.x.
  
  
   Thanks Dave.  If anyone could provide some more information on this,
   that would be helpful.  I would really like to fix it because it's
   really annoying me.  We have two CRITICAL web applications on one
   server.  We don't want to have to continually down the entire tomcat
   server just to reload a webapp.
  
  
   Bugs have been filed for this issue against 4.1.x and they have been
   marked as WONTFIX.  Best to try to reproduce the problem on 5.0.x and
   if the bug still exists there, file a report in bugzilla if one does
   not already exist.
  
  
   Where can I find this information?  Is there a bugzilla for tomcat or
   something?  If so, I would like to go there so I can see if there's
   any information indicating where in the code it would be.  I could go
   searching myself, but I've never dove into the Tomcat code before! :)
  
  
   Could you post the bugid or even a link to the bug-report? i'm also
   interested in the porblem.
  
   I would also be interested in a description of the javac-memory-leak.
It
   has become a myth and nobody can explain it. I don't find a bug-
report
   in both Sun's and Tomact's bug-databases.

  I found it once but I can't find it again.  I was pretty sure I entered
  memory leak in the summary field and came up with results, but it
  doesn't work now.

  Anyhow, the javac bug is referenced in the release notes of 4.0.x.  I
  don't think it's a javac bug but a tomcat bug with the interface into
  the javac classes.  After all, it's not referenced in the release notes
  for the newer versions of tomcat.

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



  __
  This communication is intended for the use of the recipient to whom
it
  is addressed, and may contain confidential, personal, and or
privileged
  information. Please contact us immediately if you are not the
intended
  recipient of this communication, and do not copy, distribute, or take
  action relying on it. Any communications received in error, or
  subsequent reply, should be deleted or destroyed.
  ---

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



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: tomcat on kaffe

2003-12-01 Thread Shapira, Yoav

Howdy,
Please don't cross-post.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: kalyan ram [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 1:17 PM
To: [EMAIL PROTECTED]
Subject: tomcat on kaffe

Hai
  How to run tomcat on kaffe virtual machine?During
setup or installation,what exactly do i need to
modify?
Any pointers would be helpful.

Thanks
-Ram

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Where is the HowTo FAQ section?

2003-12-01 Thread Tim Funk
The HowTo is in the Wiki. I was hoping the power of Wiki would allow more in 
depth instructions. So far it hasn't turned out that way.

I did notice over the weekend the current revision is really bad, unless 
someone else beats me - I'll try to revert to an older one  - or put some 
better content up. Or just kill the link from the FAQ altogether since it was 
a failed idea. :(

-Tim

Shapira, Yoav wrote:

Hi,
What's up with 
http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Howto

(linked from the HowTo section of the tomcat FAQ at
http://jakarta.apache.org/tomcat/faq) ?  

I could swear we had a bunch of questions and answers there.  Please
tell me the clueless user who posted the WinXP setup question did not
erase the page?  Or alternatively that someone has the previous version
of the page somewhere? ;)
 


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


Re: Where is the HowTo FAQ section?

2003-12-01 Thread Mark Eggers
I'm putting some stuff in the Wiki right now.  I
should be done in another hour or so.

I am describing the following:

Tomcat 4.1.x / Apache 2.0.x / mod_jk2 IP sockets /
Linux
Tomcat 4.1.x / Apache 2.0.x / mod_jk IP sockets /
Linux

Tomcat 4.1.x / Apache 2.0.x / mod_jk2 IP sockets /
Win2K
Tomcat 4.1.x / Apache 2.0.x / mod_jk IP sockets /
Win2K

Tomcat 4.1.x / IIS 5 / mod_jk2 IP sockets / Win2K
Tomcat 4.1.x / IIS 5 / mod_jk IP sockets / Win2K

They are step-by-step instructions, which means they
are necessarily short on detail.

I hope this helps someone.

/mde/
just my two cents . . . .

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



RE: SessionListener

2003-12-01 Thread Hart, Justin
I still don't see how one gets a session from HttpSession or user credentials?  I see 
how to get a UserPrincipal, but without the password, I still can't authenticate the 
user :-/  Am I missing something?

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 3:18 PM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,

Ok, still, I haven't found any documentation on how to add a
SessionListener in the server.xml file, and adding one using the
listener
tags defined for web.xml files doesn't seem to work.

The XML is the similar but not quite the same to the portable one:
listener className=mypackage.myclass ... /  There is a generic
example in the Engine configuration reference, and another more specific
example in the Host configuration reference.  Neither, however, is a
SessionListener example.

There IS one specific, full-features SessionListener example: the
SingleSignOn valve.  It's present (but commented out) in server.xml by
default, and you can take a look at the source code.  It's a more
complicated and confusing example because it's also a Valve ;(  But then
again, I wouldn't even bother with this whole approach when you have the
HttpSessionListener as part of the servlet specification.

where ... are attributes specific to your listener.  (The astute reader
would recognize the above as a commons Digester bean-based
initialization pattern).

I also haven't seen how to get a user's credentials from a HttpSession,
or
how to get a Session from an HttpSessionListener.  Could you throw me a
bone?

If the user is authenticated by the server, typically the information is
not in the session, it's in the request:
HttpServletRequest#getUserPrincipal.  A common use-case is to stuff this
in the session via a filter.

If you had an attribute called username that something was stuffing into
the session, i.e. something like a filter calling
session.setAttribute(username, something), then an
HttpSessionAttributeListener's attributeAdded would be called with the
attribute name and latest value.

Yoav




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
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]



Load Balancing Factor Tomcat-mod-jk2

2003-12-01 Thread Asif Chowdhary
Which instance will get more requests?
First or Second


#First instance of tomcat in workers2.properties

lb_factor = 10

#Second instance of tomcat in workers2.properties

lb_factor = 20


Thanks


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



Re: SessionListener

2003-12-01 Thread Atreya Basu
Sorry,

I should have added to this earlier, but I thought that SessionListener 
should go in the web.xml document under the Listener element.  Or am I 
thinking about HttpSessionListener which is different

Anyways if it is HttpSessionListener that you are talking about I can 
provide some examples.

Cheers,

Shapira, Yoav wrote:

Howdy,

 

Ok, still, I haven't found any documentation on how to add a
SessionListener in the server.xml file, and adding one using the
   

listener
 

tags defined for web.xml files doesn't seem to work.
   

The XML is the similar but not quite the same to the portable one:
listener className=mypackage.myclass ... /  There is a generic
example in the Engine configuration reference, and another more specific
example in the Host configuration reference.  Neither, however, is a
SessionListener example.
There IS one specific, full-features SessionListener example: the
SingleSignOn valve.  It's present (but commented out) in server.xml by
default, and you can take a look at the source code.  It's a more
complicated and confusing example because it's also a Valve ;(  But then
again, I wouldn't even bother with this whole approach when you have the
HttpSessionListener as part of the servlet specification.
where ... are attributes specific to your listener.  (The astute reader
would recognize the above as a commons Digester bean-based
initialization pattern).
 

I also haven't seen how to get a user's credentials from a HttpSession,
   

or
 

how to get a Session from an HttpSessionListener.  Could you throw me a
bone?
   

If the user is authenticated by the server, typically the information is
not in the session, it's in the request:
HttpServletRequest#getUserPrincipal.  A common use-case is to stuff this
in the session via a filter.
If you had an attribute called username that something was stuffing into
the session, i.e. something like a filter calling
session.setAttribute(username, something), then an
HttpSessionAttributeListener's attributeAdded would be called with the
attribute name and latest value.
Yoav



This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.

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

--

Developer
Greenfield Research Inc.
atreya(AT)greenfieldresearch(DOT)ca
(902)422-9426


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


RE: SessionListener

2003-12-01 Thread Hart, Justin
If this can be done with HttpSessionListener, than I am game.

What I want to do, is get the username and password when the user signs on, so I can 
then use this data to authenticate the user to other programs as themselves.

I'm using BASIC authentication, and trying to avoid having them sign on a second time, 
any way to get the username and password using HttpSessionListener without having them 
retype the data?

Justin

-Original Message-
From: Atreya Basu [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 4:07 PM
To: Tomcat Users List
Subject: Re: SessionListener


Sorry,

I should have added to this earlier, but I thought that SessionListener 
should go in the web.xml document under the Listener element.  Or am I 
thinking about HttpSessionListener which is different

Anyways if it is HttpSessionListener that you are talking about I can 
provide some examples.

Cheers,

Shapira, Yoav wrote:

Howdy,

  

Ok, still, I haven't found any documentation on how to add a
SessionListener in the server.xml file, and adding one using the


listener
  

tags defined for web.xml files doesn't seem to work.



The XML is the similar but not quite the same to the portable one:
listener className=mypackage.myclass ... /  There is a generic
example in the Engine configuration reference, and another more specific
example in the Host configuration reference.  Neither, however, is a
SessionListener example.

There IS one specific, full-features SessionListener example: the
SingleSignOn valve.  It's present (but commented out) in server.xml by
default, and you can take a look at the source code.  It's a more
complicated and confusing example because it's also a Valve ;(  But then
again, I wouldn't even bother with this whole approach when you have the
HttpSessionListener as part of the servlet specification.

where ... are attributes specific to your listener.  (The astute reader
would recognize the above as a commons Digester bean-based
initialization pattern).

  

I also haven't seen how to get a user's credentials from a HttpSession,


or
  

how to get a Session from an HttpSessionListener.  Could you throw me a
bone?



If the user is authenticated by the server, typically the information is
not in the session, it's in the request:
HttpServletRequest#getUserPrincipal.  A common use-case is to stuff this
in the session via a filter.

If you had an attribute called username that something was stuffing into
the session, i.e. something like a filter calling
session.setAttribute(username, something), then an
HttpSessionAttributeListener's attributeAdded would be called with the
attribute name and latest value.

Yoav




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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


  


-- 

Developer
Greenfield Research Inc.
atreya(AT)greenfieldresearch(DOT)ca
(902)422-9426



-
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]



Sticky sessions - How to configure Apache?

2003-12-01 Thread Antonio Fiol Bonnín
Hello,

I have TWO Apache and THREE Tomcat servers. I tried to configure them to 
use mod_jk and sticky sessions.

Namely, I simply added jvmRoute=something to every server. A different 
something for each, as explained on the docs. I see it at the end of 
JSESSIONID cookie, so I must believe it is working.

However, sessions do not seem to be sticky. I am quite puzzled. Does 
one have to configure something on the Apacle workers.properties? I have 
not found anything...

Thank you very much.

Antonio Fiol

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


Tomcat FAQs on Wiki

2003-12-01 Thread Mark Eggers
Folks,

I have put some of my documentation on the Tomcat Wiki
at:

http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb

These are sort of bare-bones documents about some ways
to connect Tomcat/Apache on Linux, Tomcat/Apache on
Windows/2000, and Tomcat/IIS 5 on Windows/2000.

Hopefully this will be of some use.

/mde/
just my two cents . . . .

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



Re: SessionListener

2003-12-01 Thread Atreya Basu
Hi,

Here is how I use the HttpSessionListener.

First I create a Class that implements HttpSessionListener:
package com.gri.web;
import javax.servlet.http.*;
public MySessionListener implements HttpSessionListener
{
  private static int num_sessions = 0;
  private HttpSession session = null;
  public void sessionCreated(HttpSessionEvent se)
   {
   num_sessions++;
   session = se.getSession();
   }
   public void sessionDestroyed(HttpSessionEvent se)
   { num_session--;}
   public static int getNumSessions() {return num_sessions; }
public static HttpSession getLastSession() { return session;}
}
Now include this in the web.xml for your context (directly after 
filterfilter-mapping but before Servlet element):

|listener|
|||  listener-classcom.gri.web.MySessionListener/listener-class
/listener||
now all you have to do is create a JSP:
jsp:root xmlns:jsp=http://java.sun.com/JSP/Page;
jsp:directive.page import=com.gri.web.* /
jsp:text
html
body
|Last user in session:
/jsp:text
jsp:expression
MySessionListener.getLastSession().getAttribute(j_username)
/jsp:expression
|jsp:text
|Username of current person
/jsp:text
jsp:expression
session.getAttribute(j_username)
/jsp:expression
|/jsp:root
|/body
/html
/jsp:root
Hart, Justin wrote:
Ok, still, I haven't found any documentation on how to add a SessionListener in the server.xml file, and adding one using the listener tags defined for web.xml files doesn't seem to work.

I also haven't seen how to get a user's credentials from a HttpSession, or how to get a Session from an HttpSessionListener.  Could you throw me a bone?

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:52 PM
To: Tomcat Users List
Subject: RE: SessionListener


Howdy,
A SessionListener of the org.apache.catalina variety would go in the
same place as all tomcat-specific features:
$CATALINA_HOME/conf/server.xml.  That means the class specified there
must be accessible to the server classloaders, i.e. must reside in
common/lib or higher on the classloader hierarchy.
The above is true for Valves, Realms, Listeners, etc, that are
proprietary to tomcat.
Yoav Shapira
Millennium ChemInformatics
 

-Original Message-
From: Hart, Justin [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 11:53 AM
To: Tomcat Users List
Subject: RE: SessionListener
Ok, so, the listener in there must implement HttpSessionListener, where
   

can
 

I use SessionListeners?

Justin

-Original Message-
From: Hart, Justin
Sent: Monday, December 01, 2003 11:34 AM
To: Tomcat Users List (E-mail)
Subject: SessionListener
My SessionListener doesn't seem to be firing, any help?

I have a SessionListener that I want to go off when a user
   

authenticates to
 

my web app (this is a correct usage, right?)

So, in the web.xml of my app, I would put the lines:

web-app
listener
listener-class
the class
/listener-class
/listener
/web-app
This should fire off when the user signs in to the page, correct?

Justin

-
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]
   





This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.

-
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]
 

--

Developer
Greenfield Research Inc.
atreya(AT)greenfieldresearch(DOT)ca
(902)422-9426


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


Include tag, dynamic param

2003-12-01 Thread Peter Maas
In the documentation for the include tag I read that something like:

   jsp:include page=slideEvents.jsp flush=true 
   jsp:param name=BroadcastId value={parameterValue | 
%=BroadcastId%}/   
   /jsp:include

Should work...

This compiles / and runs... but the expression is never evaluated

how does this work??

gr,

Peter

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


Re: Problems Deploying web application

2003-12-01 Thread Rainer Stransky
Late (but better late than never) acknowledge of my problem solution:

To solve the problem you have to add a new task defintion:
  taskdef name=install   classname=org.apache.catalina.ant.InstallTask/

and replace the deploy task within the install target with the new above 
defined install task.

That's it. 

Afterwards ant install will be successful

But attention, this build.xml has more bugs/typos !

(mkdir tag with todir attribute)

On Friday 07 November 2003 11:00, Rainer Stransky wrote:
 When trying to follow the instructions in the documentation of tomcat
 (tomcat-docs/appdev/processes.html)
 a simple sample of a development process is described.

 When trying to intall the application to tomcat from my src-directory
 (without the need to restart tomcat, the following error appears.
 --

  ant install

 Buildfile: build.xml

 prepare:

 compile:

 install:
[deploy] FAIL - Encountered exception java.util.zip.ZipException: error
 in opening zip file


 BUILD FAILED
 /phys/netdata/home/stransky/src/java/apo/build.xml:364: FAIL - Encountered
 exception java.util.zip.ZipException: error in opening zip file

 Total time: 4 seconds
 ---

 After this attempt a war-file with only two lines is installed in
 $CATALINA_HOME/webapps

  cat $CATALINA_HOME/webapps/mysample.war

 calculator.jsp
 WEB-INF


 In the catalina.out the is the message:
 
 Nov 7, 2003 10:50:09 AM org.apache.catalina.startup.HostConfig deployWARs
 WARNING: Exception while expanding web application archive mysample.war

 In the localhost_log.2003-11-07.txt the following line can be found:
 --
 2003-11-07 10:48:21 Manager: deploy: Deploying web application at
 '/mysample' 2003-11-07 10:48:21 Manager: Uploading WAR file to
 /opt/jakarta/jakarta-tomcat-5.0.12/webapps/mysample.war
 2003-11-07 10:48:21 Manager: Extracting XML file to
 /opt/jakarta/jakarta-tomcat-5.0.12/conf/Catalina/localhost/mysample.xml
 2003-11-07 10:48:21 Manager: managerServlet.extract[/mysample]
 java.util.zip.ZipException: error in opening zip file
 at java.util.zip.ZipFile.open(Native Method)
 at java.util.zip.ZipFile.init(ZipFile.java:112)
 ...




 I was not able to find anything in the archive that helps.


 Enviroment is:
 ---
 I'am using
 - Tomcat/5.0.12
 - Ant/1.6beta2
 - java/1.4.0_03-b04
 - OS/Linux-2.4.19-4GB


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

-- 
--
Software Factory GmbH  mailto:[EMAIL PROTECTED]
Panoramastr. 47, 73084 Salach  phone  : +49 7162 460592
 o technical software development  fax: +49 7162 460593
 o system engineering  mobile : +49 172 6714084
 o consulting  www: http://www.so-fa.de
--


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



Re: How to install new version of application (war file)

2003-12-01 Thread Rainer Stransky
Sorry Jake, I do not understand your suggestion.
In my manager/html there is no tag field in the deployment form.

 
Jeanfrancois link to the 5.0 documentation gave me the hint to 
put the autoDeploy=true to the server.xml :
  Host appBase=webapps name=myhost.mydomain autoDeploy=true
 ^

So now, when I copy my app.war to $CATALINA_HOME/webapps tomcat removes the 
corresponding directory app and redeploys the new app.war.

Rainer


On Monday 01 December 2003 14:43, Jacob Kjome wrote:
 The manager app in Tomcat5 now allows for a tag to be associated with the
 war you deploy.  You can use this from the ant manager tasks as well.  You
 can deploy an app and deploy the same app (different version) again with a
 different tag.  The old one will be undeployed and the new one will go
 in.  If you want to switch back, just specify the tag of an existing
 deployed version.

 Jake

 At 09:01 AM 12/1/2003 +0100, you wrote:
 What is the common way to install a new version of a war file ?
 
 My experience is, that I have to stop tomcat, delete the
  .../webapps/app_dir copy a new app_dir.war to .../webapps and start
  tomcat.
 
 But this is not appropriate on a production system.
 
 I do not want to restart tomcat.
 
 What will be a better solution ?
 
 
 -
 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]

-- 
--
Software Factory GmbH  mailto:[EMAIL PROTECTED]
Panoramastr. 47, 73084 Salach  phone  : +49 7162 460592
 o technical software development  fax: +49 7162 460593
 o system engineering  mobile : +49 172 6714084
 o consulting  www: http://www.so-fa.de
--


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



RE: Garbage Collection issues

2003-12-01 Thread neal cabage
When I said that surely it can't be a memory leak in my app I was operating under 
the assumption that the JRE runs garbage collection periodically anywayis this not 
true?
 
If I was waisting resources and not releasing them in a way that the GC could take 
them back when it runs automatically then why would it take them back when I call 
garbage collection explicitly?  To me, this suggested more of a systemic issue.  It 
was suggested by someone last night that I may want to look at some config lines to 
make sure GC is active and this seemed in line with my assumption.  Is there something 
else here that I may be missing however?  Can you see a possible explanation as to why 
my app's waisted resources would not get cleaned up until I explicitly ran GC?
 
Thanks.
Neal


Shapira, Yoav [EMAIL PROTECTED] wrote:

Howdy,
Perhaps you are experiencing higher load, which requires more memory.
Or perhaps your application does have a memory leak: those are possible
and occur in java, so yes that would a programming error on your part.
The garbage collector does much magic, but it can't save you all the
time. You may wish to read up on java memory leaks, as they've been
discussed at length on this list and on the net in general.

Note that when you call Runtime#gc that's only a suggestion to the JVM:
many times when you call that the garbage collector may not run at all.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Neal [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 30, 2003 8:21 PM
To: 'Tomcat Users List'
Subject: Garbage Collection issues

My Tomcat 4.1 (hosted on Linux) seems to have a problem in recent
months
with crashing due to unavailable free RAM. Specifically I get a
java.error.outOfMemory exception. If check the RAM available
(Runtime.getRuntime().totalMemory()), I can see it ticking down through
the week. If explicitly run garbage collection however my RAM totally
frees up and all is well (Runtime.getRuntime().gc();).

Why would this happen? Surely this isn't due to a programming error on
my part, otherwise, the resources should automatically released
whenever
the JRE performs periodic garbage collection. Isn't that correct?
Anyone have any theories as to what this may mean and what the best
solution would be?

Thanks.
Neal



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged. This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else. If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender. Thank you.


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


-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

Argument Type Mismatch

2003-12-01 Thread Hart, Justin

Listener className=class inheriting from SessionListener/

I get an argument type mismatch error parsing my server.xml...  Is there something 
wrong with this line?

Justin

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



Tag Handler pool eating up Memory (and enablePooling is set to false)

2003-12-01 Thread Neil Aggarwal
Hello:

We have several tomcat servers running an application.  The servers
slow down after a few hours of uptime.

Looking at the memory usage on the servers, we noticed that the servers
seem to be accumulating memory and finally they slow down when
the memory utilization becomes high.

We are using the IBM JDK 1.4.1 SR1 with Tomcat 4.1.24 on RedHat 9.

Using the heapdump utility from the IBM JDK, I generated a heap dump
from one of the servers after it had been up for a while.

From that output, I see these pieces of infromation:

There were a total of 509,235 objects in memory 
taking up 67,992,688 bytes.

There were 436 instances of org/apache/jasper/runtime/TagHandlerPool.
Tracing all of the references from these TagHandlerPool object,
they reference a total of 65,010,600 bytes.

This means that almost 97% of the memory usage of Tomcat is being 
referenced from the TagHandlerPool objects.

I have enablePooling set to false in the Tomcat's web.xml in the conf 
directory.

It seems that the enablePooling setting is not preventing Tomcat from
pooling the tag handlers and they are referencing a lot of memory.

Does that setting work in Tomcat 4.1.24?

Is there any other reason why Tomcat would behave this way?

Thanks,
Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by 
17% or more in 6 months or less! = http://newsletter.JAMMConsulting.com


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



Shell script to check if Tomcat is running?

2003-12-01 Thread Tom Ly
I plan on using cron to automatically run a script to check if Tomcat is running.  How 
would I write one?
 
-Tom


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Servlet as Welcome File doesn't work

2003-12-01 Thread SH Solutions
Hello.

I'm using tomcat 4.1.29 on debian and I have the following problem:
I need to get / handled by my Servlet myPackage.Root, but I do not want
to change the mapping of ordinary files.
Just as a welcome file would, but welcome-file does not apply to servlets,
right?

My solutions so far is to map / to my servlet an map any other folder with
distinct context's, what surely is'nt what it was meant to be.

I did search the web and the usenet for a long time, since I assumed not to
be the first to run into this problem. But I didn't find anything.
Be aware that I did not enable the jsp-servlet, since I am not using jsps at
all.

If anyone can help me, I would appreciate it very much.

Thanks,

Steffen


PS: No native English speaker here - sorry.


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



Re: building mod_jk - exportable?

2003-12-01 Thread Christopher Schultz
Jon,

 Is it possible to modify the
settings for mod_jk *after* building it so I can export it to this
server from an internal build machine?
I don't think that mod_jk keeps any settings compiled-in, so you should 
be okay. Just to be extra-sure, you should compile it on a machine which 
is configured identically to your prod server.

-chris

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


Re: Servlet as Welcome File doesn't work

2003-12-01 Thread Rainer Stransky
edit the $CATALINA_HOME/ROOT/WEB-INF/web.xml if you want the root 
application to show an custom welcome-file

and put 
  welcome-file-list
welcome-filemyFile.jsp/welcome-file
  /welcome-file-list
to the web-app tag.


This works on my tomcat 5.0

Rainer
-- 
--
Software Factory GmbH  mailto:[EMAIL PROTECTED]
Panoramastr. 47, 73084 Salach  phone  : +49 7162 460592
 o technical software development  fax: +49 7162 460593
 o system engineering  mobile : +49 172 6714084
 o consulting  www: http://www.so-fa.de
--


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



Re: Argument Type Mismatch

2003-12-01 Thread Tim Funk
In server.xml, Listeners are LifeCycleListeners
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/LifecycleListener.html
-Tim

Hart, Justin wrote:

	Listener className=class inheriting from SessionListener/

I get an argument type mismatch error parsing my server.xml...  Is there something wrong with this line?
 


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


RE: Argument Type Mismatch

2003-12-01 Thread Hart, Justin
I thought that there was something related to that, is it that it must implement 
LifeCycleListener  SessionListener, or is SessionListener just not happening?  How is 
it possible, if at all, to add my own SessionListener?

Justin

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 7:29 PM
To: Tomcat Users List
Subject: Re: Argument Type Mismatch


In server.xml, Listeners are LifeCycleListeners
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/LifecycleListener.html

-Tim


Hart, Justin wrote:

   Listener className=class inheriting from SessionListener/
 
 I get an argument type mismatch error parsing my server.xml...  Is there something 
 wrong with this line?
  


-
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: Tag Handler pool eating up Memory (and enablePooling is set to false)

2003-12-01 Thread Filip Hanik
are you sure this is a tomcat reference holding on to it?
it could be one of your classes as well, you need to run it through a memory
profile in order to find out

Filip

-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 2:53 PM
To: 'Tomcat-User'
Subject: Tag Handler pool eating up Memory (and enablePooling is set to
false)


Hello:

We have several tomcat servers running an application.  The servers
slow down after a few hours of uptime.

Looking at the memory usage on the servers, we noticed that the servers
seem to be accumulating memory and finally they slow down when
the memory utilization becomes high.

We are using the IBM JDK 1.4.1 SR1 with Tomcat 4.1.24 on RedHat 9.

Using the heapdump utility from the IBM JDK, I generated a heap dump
from one of the servers after it had been up for a while.

From that output, I see these pieces of infromation:

There were a total of 509,235 objects in memory
taking up 67,992,688 bytes.

There were 436 instances of org/apache/jasper/runtime/TagHandlerPool.
Tracing all of the references from these TagHandlerPool object,
they reference a total of 65,010,600 bytes.

This means that almost 97% of the memory usage of Tomcat is being
referenced from the TagHandlerPool objects.

I have enablePooling set to false in the Tomcat's web.xml in the conf
directory.

It seems that the enablePooling setting is not preventing Tomcat from
pooling the tag handlers and they are referencing a lot of memory.

Does that setting work in Tomcat 4.1.24?

Is there any other reason why Tomcat would behave this way?

Thanks,
Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! = http://newsletter.JAMMConsulting.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: Shell script to check if Tomcat is running?

2003-12-01 Thread Tim Funk
2 really simple ways

-
# Assume tomcat is the only java process
COWBELL=`ps -ef | grep java| grep -v grep | wc -l`
if [ $COWBELL  0 ]; then
  echo Woohoo - the process is there;
fi
-
OR

-
# Assume glodenfile should be result from url below
rm dest_file.html
wget http://more/cowbell.txt --output-document=dest_file.html
COWBELL=`diff dest_file.html goldenfile.html  | wc -l`
if [ $COWBELL == 0 ]; then
  echo Woohoo - the site is up (and not hacked);
else
  echo The downloaded page is diff from the golden file
fi
-
-Tim

Tom Ly wrote:

I plan on using cron to automatically run a script to check if Tomcat is running.  How would I write one?
 
-Tom


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


Re: Shell script to check if Tomcat is running?

2003-12-01 Thread Oscar Carrillo
On Mon, 1 Dec 2003, Tim Funk wrote:

 2 really simple ways
 
 
 -
 # Assume tomcat is the only java process
 COWBELL=`ps -ef | grep java| grep -v grep | wc -l`
 if [ $COWBELL  0 ]; then
echo Woohoo - the process is there;
 fi
 -

This might depend on the shell used, but I think  should be -gt.

Here's another option in case you have java programs running that aren't 
Tomcat:

#this is all one line
COWBELL=`ps ax --width=1000 | grep \
[o]rg.apache.catalina.startup.Bootstrap \
start | awk '{printf $1  }' | wc | awk '{print $2}'`
#end of one line
if [ $COWBELL -gt 0 ]; then
echo Woohoo - Tomcat is there;
fi

Cheers,
Oscar


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



  1   2   >