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

2003-12-02 Thread David Rees
Christopher Schultz wrote:
We're having a problem with tomcat 4.0.4.  Every time a context is 
reloaded it
leaks memory.
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.
Can you provide a bug number or a link? I'd like to take a look at it.
Come on people, a simple search of the release notes an another of 
bugzilla quickly turns up the relevant information.

http://www.apache.org/dist/jakarta/tomcat-4/v4.1.29/RELEASE-NOTES
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20758
-Dave

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


Error -The requested service (Servlet TkTld is currently unavailable) is not currently available.

2003-12-02 Thread Yuval Zantkeren

Hi

I'm trying to run a servlet and I get this error in the access log:
[02/Dec/2003:12:11:49 +0200] GET /newer/Titled HTTP/1.1 503 788

and in the browser I get:
The requested service (Servlet TkTld is currently unavailable) is not
currently available.

please advise,


Regards,

Yuval Zantkeren

Domain The Net Technologies Ltd.
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: Tomcat FAQs on Wiki

2003-12-02 Thread Adam Hardy
On 12/02/2003 07:55 AM Nikola Milutinovic wrote:
Mark Eggers wrote:
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.
How does one contribute? I know Wiki is supposed to be free for everyone 
to edit, but I've never done it. Any quick pointers, links,...?

I have managed to setup mod_jk2 over UNIX socket.
Check out http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheWiki

Adam

PS perhaps you should stick this link somewhere central in wiki as well.
--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Please Help to compile mod_jk2 on AIX

2003-12-02 Thread jose
What is resources dir ? I don't find that directory.

- Original Message - 
From: Ben Souther [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 4:33 AM
Subject: Re: Please Help to compile mod_jk2 on AIX


 I just ran into the same problem.
 I had to cd into the resources dir and run ant from there first.
 Once that build completed, I CDed back up and ran ant again. It finished 
 sucessfully.
 
 -Ben
 
 
 On Monday 01 December 2003 10:28 pm, you wrote:
  Jose,
 
   Please, i have tried to compile hundred of times
   jakarta-tomcat-connectors-4.1.29-src and
   jakarta-tomcat-connectors-jk2-2.0.2-src, but it's impossible. There
   are a lot of errors during compilation.
 
  These all seem to be warnings, not errors. Does the build succed in
  creating an object file?
 
  -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]
 

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



Re: Please Help to compile mod_jk2 on AIX

2003-12-02 Thread jose
Yes object file is created.


- Original Message - 
From: Christopher Schultz [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 4:28 AM
Subject: Re: Please Help to compile mod_jk2 on AIX


 Jose,
 
  Please, i have tried to compile hundred of times
  jakarta-tomcat-connectors-4.1.29-src and
  jakarta-tomcat-connectors-jk2-2.0.2-src, but it's impossible. There
  are a lot of errors during compilation.
 
 These all seem to be warnings, not errors. Does the build succed in
 creating an object file?
 
 -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 FAQs on Wiki

2003-12-02 Thread Tim Funk
Google for Wiki. Most of the links are great and you'll learn more about Wiki 
than you wish to know.

The best page about Wikis is this one: http://c2.com/cgi/wiki

-Tim

Adam Hardy wrote:
On 12/02/2003 07:55 AM Nikola Milutinovic wrote:

Mark Eggers wrote:

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.


How does one contribute? I know Wiki is supposed to be free for 
everyone to edit, but I've never done it. Any quick pointers, links,...?

I have managed to setup mod_jk2 over UNIX socket.


Check out http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheWiki

Adam

PS perhaps you should stick this link somewhere central in wiki as well.


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


Re: application reloads on web.xml change

2003-12-02 Thread Tim Funk
Please submit a documentation change.

Historically, only reloadable was being done. This caused a lot of questions 
as to why changes in web.xml were not being picked up. As some refactorings 
came, it became easier to perform a stop, then start on the webapp instead of 
classloader reload.

-Tim

Bill Stilwell wrote:

Hello,

I was unsure if this or -dev was the best place to send this, so I
decided to go with user first.
I recently spent some time tracking down why we would get application
restarts when code changes were pushed to our production environment,
despite having reloadable=false in the DefaultContext. Via some
digging around in the source, it turns out that if you have
liveDeploy=true and web.xml is modified, the application will be
stopped and started.
Personally, I find this behavior unexpected (and, as far as I can tell,
it's not in the user documentation). I can achieve what I expect with
liveDeploy=false and reloadable=false, but I think it would be much
clearer for users if only the reloadable setting was required to achieve
no reloading unless done explicitly via the manager or at restarts.
The relevant code is here:
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java
And the method checkWebXmlLastModified() is what controls this behavior.
The original version of this code respected the reloadable setting.
Is this worth filing a bug w/patch to request a code change? Or am I
better off submitting a documentation change - i.e., are my expectations
here out to lunch? :-)
Thanks
Bill
-
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: Include tag, dynamic param

2003-12-02 Thread Tim Funk
2 things
1) Are you trying to use el? If so you need a $ in front of {. You also need 
your web.xml to state that you are using el.
2) For the RT expression - make sure you tag lib declaration allows runtime 
expressions.

For both of the above - there are plenty of net articles on the specifics of 
how this is done.

-Tim

Peter Maas wrote:


What do you get in the page source when it runs?

Do you get jsp:param name=BroadcastId value={parameterValue | %= 
BroadcastId %} /

??

If so, then something is terribly wrong. If you get the include okay, 
but the value of BroadcastId is
{parameterValue | %= BroadcastId %}, then something else is wrong :(


This is exactly what I get..

BTW, I'm running tomcat 5.0.12 and am able to replicate this on a winxp 
and a redhat 9.0 box...

Peter

-
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: Compression and server.xml file 5.0.14??

2003-12-02 Thread Tim Funk
1) If you have compression turned off, then your don't need any of the other 
attributes. One would say bug, but personally I think its ok.
2) I don't use the admin console. If these values can't be set - then it 
might be a bug since those attributes can't be set. (But I don't know since I 
don't use the admin console)

-Tim

Ron Andersen wrote:

 
 
The sample server.xml includes the followng attributes for the Connector XML tag:
 
compression=on 
   compressionMinSize=2048 
			   noCompressionUserAgents=gozilla, traviata 
			   compressableMimeType=text/html,text/xml

 
In the admin console, I set the compression setting to no. After reviewing the server.xml file, it did not include any compression properties. 
 
Questions:
 
1) Is this a bug; that is, after using the admin console to update the compression setiing, should the server.xml file include the (above) compression attributes.
2) If not, where do you set these setting(i.e. compressionMinSize) via the admin console?

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


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


Re: Tomcat FAQs on Wiki

2003-12-02 Thread Nikola Milutinovic
Tim Funk wrote:

Google for Wiki. Most of the links are great and you'll learn more about 
Wiki than you wish to know.

The best page about Wikis is this one: http://c2.com/cgi/wiki
I still haven't figured out how to publish to Wiki and frankly, I don't have the 
time. I'm up to my ass in crocodiles. After having setup Linux + PostgreSQL + 
Apache + Tomcat, I have to move the server into the open Internet.

I can write the brief article on setting it up tot he list. Would someone post 
it to WiKi?

Nix.

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


Re: Tomcat FAQs on Wiki

2003-12-02 Thread Tim Funk
Writing anything like that for the list is a good thing since we can always 
link to it in the archives ;)

Each Wiki has its quirks and can be a PITA.

-Tim

Nikola Milutinovic wrote:

Tim Funk wrote:

Google for Wiki. Most of the links are great and you'll learn more 
about Wiki than you wish to know.

The best page about Wikis is this one: http://c2.com/cgi/wiki


I still haven't figured out how to publish to Wiki and frankly, I don't 
have the time. I'm up to my ass in crocodiles. After having setup Linux 
+ PostgreSQL + Apache + Tomcat, I have to move the server into the open 
Internet.

I can write the brief article on setting it up tot he list. Would 
someone post it to WiKi?


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


Re: Error -The requested service (Servlet TkTld is currently unavailable) is not currently available.

2003-12-02 Thread Dhruva B. Reddy
This usually means that for some reason the web application containing
this servlet did not load successfully.

--- Yuval  Zantkeren [EMAIL PROTECTED] wrote:
 
 Hi
 
 I'm trying to run a servlet and I get this error in the access log:
 [02/Dec/2003:12:11:49 +0200] GET /newer/Titled HTTP/1.1 503 788
 
 and in the browser I get:
 The requested service (Servlet TkTld is currently unavailable) is not
 currently available.
 
 please advise,
 
 
 Regards,
 
 Yuval Zantkeren
 
 Domain The Net Technologies Ltd.
 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]
 


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



Context/DefaultContext Question

2003-12-02 Thread Dhruva B. Reddy
Thanks to all who responded to my OutOfMemoryError post.  Among other
things, it was suggested that I look at the reloadable attribute for
the context definition.

We define a DefaultContext in server.xml, with the reloadable
attribute explicitly set to false.  We also have, for each application,
a separate context definition file, for which the reloadable
attribute is explicitly set to true.

I'm a little confused about these two work together.  We have a JNDI
resource set up in the DefaultContext for e-mail (see the
mail/Session example in the JNDI Resources HOWTO) that is actually
called mail/Session, with the mail.smtp.host parameter set to
localhost.  In the application-specific context, this same resource
is defined by the same name, but with mail.smtp.host set to a
different value.  The application always uses the value defined in the
DefaultContext.  Is this because the same name is being used, and once
something is defined in the DefaultContext, it cannot be overridden by
an app-specific Context?

Going back to the reloadable attribute, is each context that sets
this  overriding the value in DefaultContext?

Thanks,
Dhruva

__
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: Error -The requested service (Servlet TkTld is currently unavailable) is not currently available.

2003-12-02 Thread Yuval Zantkeren
How do I reload it?

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


-Original Message-
From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 2:37 PM
To: Tomcat Users List
Subject: Re: Error -The requested service (Servlet TkTld is currently
unavailable) is not currently available.


This usually means that for some reason the web application containing
this servlet did not load successfully.

--- Yuval  Zantkeren [EMAIL PROTECTED] wrote:

 Hi

 I'm trying to run a servlet and I get this error in the access log:
 [02/Dec/2003:12:11:49 +0200] GET /newer/Titled HTTP/1.1 503 788

 and in the browser I get:
 The requested service (Servlet TkTld is currently unavailable) is not
 currently available.

 please advise,


 Regards,

 Yuval Zantkeren

 Domain The Net Technologies Ltd.
 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]



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



Tomcat 5.x and JBoss

2003-12-02 Thread J.L.
Hi,

I want to use JBoss 3.2.2 and Tomcat 5.0.14.

The problem is that I have to replace the JBoss
embedded Tomcat, by the 5.0.14 version (I need local
access between servlets and EJBs). 

I have heard I can do that by recompiling JBoss with
Tomcat 5.0.14, but I have no idea how to do that.

If you have any ideas...

Thx

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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



RE: Error -The requested service (Servlet TkTld is currently unavailable) is not currently available.

2003-12-02 Thread Dhruva B. Reddy
From my experience, this is likely due to some sort of configuration
error for that application.  You'll have to look in the logs for a clue
as to what it could be.

--- Yuval  Zantkeren [EMAIL PROTECTED] wrote:
 How do I reload it?
 
 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
 
 
 -Original Message-
 From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 2:37 PM
 To: Tomcat Users List
 Subject: Re: Error -The requested service (Servlet TkTld is currently
 unavailable) is not currently available.
 
 
 This usually means that for some reason the web application
 containing
 this servlet did not load successfully.
 
 --- Yuval  Zantkeren [EMAIL PROTECTED] wrote:
 
  Hi
 
  I'm trying to run a servlet and I get this error in the access log:
  [02/Dec/2003:12:11:49 +0200] GET /newer/Titled HTTP/1.1 503 788
 
  and in the browser I get:
  The requested service (Servlet TkTld is currently unavailable) is
 not
  currently available.
 
  please advise,
 
 
  Regards,
 
  Yuval Zantkeren
 
  Domain The Net Technologies Ltd.
  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]
 
 
 
 __
 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]
 


__
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: endorsed directory

2003-12-02 Thread Basavaraju P. Banakar [SLK-India]
Thank Jean...

Basu.
- Original Message -
From: Jeanfrancois Arcand [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 01, 2003 9:12 PM
Subject: Re: endorsed directory


 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]



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



RE: Compression and server.xml file 5.0.14??

2003-12-02 Thread Shapira, Yoav

Howdy,

1) If you have compression turned off, then your don't need any of the
other
attributes. One would say bug, but personally I think its ok.

Yup, it's definitely not a bug, and definitely intentional.

2) I don't use the admin console. If these values can't be set - then
it
might be a bug since those attributes can't be set. (But I don't know
since
I
don't use the admin console)

I too haven't used the admin console to set the min compression size.
It may simply not be exposed, in which case you're welcome to submit a
patch.

Yoav Shapira


-Tim

Ron Andersen wrote:



 The sample server.xml includes the followng attributes for the
Connector
XML tag:

 compression=on
compressionMinSize=2048
 noCompressionUserAgents=gozilla, traviata
 compressableMimeType=text/html,text/xml


 In the admin console, I set the compression setting to no. After
reviewing the server.xml file, it did not include any compression
properties.

 Questions:

 1) Is this a bug; that is, after using the admin console to update
the
compression setiing, should the server.xml file include the (above)
compression attributes.
 2) If not, where do you set these setting(i.e. compressionMinSize)
via
the admin console?


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


-
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: Please Help to compile mod_jk2 on AIX

2003-12-02 Thread Christopher Schultz
Jose,

These all seem to be warnings, not errors. Does the build succed in
creating an object file?

Yes object file is created.
Okay, I think you're safe ignoring those warnings, then.

Are you using apxs to create an Apache DSO? If so, the file 
apache-2.0/mod_jk.la should exist (or apache-1.3/mod_jk.so for Apache 
1.3). You can simply copy it to your Apache modules directory. (Sorry, 
these are for mod_jk... mod_jk2 is likely to have the filenames slightly 
different).

Basically, you're looking for mod_jk.la for Apache 2.0 and mod_jk.so for 
Apache 1.3.

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


RE: Context/DefaultContext Question

2003-12-02 Thread Shapira, Yoav

Howdy,
For JNDI resources, such as your mail session, first bound stays bound.
In fact I'm surprised you don't get an error in the logs when you try to
define another JNDI resource with the same name.

For most other properties, including reloadable, last set stays set.  So
the context-specific one overrides DefaultContext.

Your setup is confusing and superfluous.  Only specify a property in one
place.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 7:57 AM
To: tomcat
Subject: Context/DefaultContext Question

Thanks to all who responded to my OutOfMemoryError post.  Among other
things, it was suggested that I look at the reloadable attribute for
the context definition.

We define a DefaultContext in server.xml, with the reloadable
attribute explicitly set to false.  We also have, for each application,
a separate context definition file, for which the reloadable
attribute is explicitly set to true.

I'm a little confused about these two work together.  We have a JNDI
resource set up in the DefaultContext for e-mail (see the
mail/Session example in the JNDI Resources HOWTO) that is actually
called mail/Session, with the mail.smtp.host parameter set to
localhost.  In the application-specific context, this same resource
is defined by the same name, but with mail.smtp.host set to a
different value.  The application always uses the value defined in the
DefaultContext.  Is this because the same name is being used, and once
something is defined in the DefaultContext, it cannot be overridden by
an app-specific Context?

Going back to the reloadable attribute, is each context that sets
this  overriding the value in DefaultContext?

Thanks,
Dhruva

__
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: Error -The requested service (Servlet TkTld is currently unavailable) is not currently available.

2003-12-02 Thread Shapira, Yoav

Howdy,
Yup, you logs will have errors, including a line from tomcat saying it's
marking the servlet as unavailable and why.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 8:26 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Error -The requested service (Servlet TkTld is currently
unavailable) is not currently available.

From my experience, this is likely due to some sort of configuration
error for that application.  You'll have to look in the logs for a clue
as to what it could be.

--- Yuval  Zantkeren [EMAIL PROTECTED] wrote:
 How do I reload it?

 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


 -Original Message-
 From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 2:37 PM
 To: Tomcat Users List
 Subject: Re: Error -The requested service (Servlet TkTld is currently
 unavailable) is not currently available.


 This usually means that for some reason the web application
 containing
 this servlet did not load successfully.

 --- Yuval  Zantkeren [EMAIL PROTECTED] wrote:
 
  Hi
 
  I'm trying to run a servlet and I get this error in the access log:
  [02/Dec/2003:12:11:49 +0200] GET /newer/Titled HTTP/1.1 503 788
 
  and in the browser I get:
  The requested service (Servlet TkTld is currently unavailable) is
 not
  currently available.
 
  please advise,
 
 
  Regards,
 
  Yuval Zantkeren
 
  Domain The Net Technologies Ltd.
  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]
 


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



__
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: OutOfMemoryError

2003-12-02 Thread Shapira, Yoav

Howdy,

Dhruva B. Reddy wrote:
 We get OutOfMemoryError's on Tomcat 4.1.27, running on RH 7.3, Sun
JDK
 1.4.1_02 (with 512MB allocated to it)  The box has 1GB of RAM, 2GB of
 swap space, and four Xeon processors.

Can you reproduce the errors in a test environment?

Are you using the context reloading feature?  reloadable=true or
using
the tomcat manager app will cause this to happen eventually.

Really?  Prove that please...

 calls Runtime.freeMemory() and .totalMemory(), it comes nowhere near
 using that much (we track it every five minutes by hitting a servlet
 that calls these methods).

It could easily happen that:
- You check memory, everything is fine
- User makes a request for a large dataset, you load it, run out of
memory.

So your check is not conclusive.  The stack trace suggested that the
error occurred while iterating through a ResultSet, so one thing you
should log are all the SQL queries you run and what they return: you
probably got a large one to cause the error.

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]



Virtual host configuration

2003-12-02 Thread shyamperi
7:21p
How is that I can configure my virtual host to be a deployable. In the sense, I would 
like it to be deployable with out stopping the server
Here is my server.xml and made necessary setting in the apache server also.
   Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
/Host
 Host name=test.org debug=0
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 Context path=/
   docBase=/home/test debug=0/
  /Host
But the problem with this I am unable to deploy the contents dynamically. When I 
reload or redeploy the [/] I get a message  no context found .
Can any body help me out with this

-
Warm Regards
Shÿam Peri

II Floor, Punja Building,
M.G.Road,
Ballalbagh,
Mangalore-575003 
Ph : 91-824-2451001/5
Fax : 91-824-2451050 





Original Message--

Thank Jean...

Basu.
- Original Message -
From: Jeanfrancois Arcand 
To: Tomcat Users List 
Sent: Monday, December 01, 2003 9:12 PM
Subject: Re: endorsed directory


 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]



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


DISCLAIMER: This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended
recipient you should not disseminate,distribute,store,print, copy or
deliver this message.Please notify the sender immediately by e-mail if
you have received this e-mail by mistake and delete this e-mail from
your system.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: SessionListener

2003-12-02 Thread Shapira, Yoav

Howdy,
Senor Basu, your solution is seriously not thread-safe.  But that's for
you to worry about it, maybe it's good enough for your needs ;)

As for Senor Hart's questions:
- HttpSessionListener goes in web.xml, as do all other Servlet
Specification listeners.
- SessionListener goes in server.xml, as do all other Tomcat-specific
listeners.

SessionListener is not tied to HttpSessionListener or HttpSession
directly.  You have to do a series of casts.  The event object in the
SessionListener's SessionEvent is a catalina-specific Session
implementation.  It will also implement the HttpSession interface.  So
you can get from one to another by casting, but it's ugly (as is the
whole SessionListener solution).

Let's step back a minute: you have this whole hassle because you want
the user's password.  You want the user's password in order to
authenticate the user.  But with the getUserPrincipal approach, the user
is already authenticated if the Principal is not null.  Alternatively,
if you have some input screen where the user enters the username and
password, grab them there instead of from the session.  I think what's
missing here is the big picture: tell us what you're trying to do, what
authentication mechanism you're using, and let's forget about the
tomcat-specific hacks for a minute ;)

Yoav Shapira
Millennium ChemInformatics


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

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 

RE: Shell script to check if Tomcat is running?

2003-12-02 Thread Shapira, Yoav

Howdy,
You can also always add -DthisIsMyTomcat=true (or any other
distinguishing argument) to the java runtime options, so that you can
grep the ps output for this specific parameter if there are multiple
java processes.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Oscar Carrillo [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 6:42 PM
To: Tomcat Users List
Subject: Re: Shell script to check if Tomcat is running?

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]




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.0.x memory leak (not javac)

2003-12-02 Thread Christopher Schultz
All,

http://www.apache.org/dist/jakarta/tomcat-4/v4.1.29/RELEASE-NOTES
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20758
Uhhh... this looks like standard operating procedure for Java to me...

When you dump a ClassLoader and all of it's object get GC'd, the VM 
almost never GC's the unused classes. The new ClassLoader re-loads all 
those classes, again, and you get new versions of those classes 
loaded into the VM. Even if there are no more instances of those 
classes, I thought they stuck around...

I was not suprised by anything mentioned in that bug. The only thing 
that's a shame is the fact that it's true, and it does interfere with 
the ability of an app server to re-load contexts indefinately. :(

The -Xnoclassgc option still exists for the 1.4.1 VM, so maybe I'm 
completely wrong, here. :)

-chris

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


RE: Argument Type Mismatch

2003-12-02 Thread Hart, Justin
I was reading through the code, the session has a note on it with the password.

I actually already wrote a custom realm implementation...  I wanted to join the 
sessions all by using the session ID, which the realm doesn't have, which is why I 
figured at the creation of the session would be the best place.

Honesly, I've already replaced a bunch of classes with my own, trying to do so without 
changing any Tomcat source, (by referencing them in through configuration).  Since 
it's for a commercial project, and I don't think that we'll be wanting to give away 
the source (Does the Apache license require that?).

I was considering extending GenericPrincipal in just such a manner in order to achieve 
that effect... 1 problem, is that safe security wise?  Principal seems to get passed 
around a lot.

Justin

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


ahha - the session won't have the password. But the Realm will. (or might not 
depending on implementation).  Actually - the Principal could have the 
password if it extends GenericPrincipal. If not, you could extend the Realm 
to ensure it does.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/realm/GenericPrincipal.html


-Tim

Hart, Justin wrote:

 I need access to the user's password, which all of the Servlet specific ones seem to 
 guard the programmer from getting access to.
 
 Justin
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Monday, December 01, 2003 8:10 PM
 To: Tomcat Users List
 Subject: Re: Argument Type Mismatch
 
 
 Ahh, I see. Why implement SessionListener which is tomcat specific when you 
 can implement the Servlet specific ones in web.xml?
 
 Look at the code for SingleSignOn or any code that utilizes it as to how a 
 SessionListener gets registered. I am guessing that you'll actuall need to 
 implement a no-op Vavle that registers the Listener on initialization of the 
 Vavle. But thats just a no code look swag.
 
 -Tim
 
 Hart, Justin wrote:
 
 
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]
 
 
 


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



upload file

2003-12-02 Thread andrea antibo
Hi,
my question is if you know if there are problems on file upload using cos.jar 
under tomcat 4.1.x, because I have a project that work fine on tomcat 4.0.6 
but it goes broke on tomcat 4.1.x or under jboss-tomcat.4.1.x.

thx



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



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

2003-12-02 Thread Shapira, Yoav

Howdy,
Besides what Senor Schultz said (which is 100% true),
1. Where is this mentioned in the release notes, and what would one have
to search for?
2. You mentioned in your passage the bug was marked as invalid or
wontfix, and the bug you gave below is marked as new.  So if anyone
actually wasted time (like me) looking up what you said, they didn't
find it.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: David Rees [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 3:33 AM
To: Tomcat Users List
Subject: Re: Tomcat 4.0.x memory leak (not javac)

Christopher Schultz wrote:
 We're having a problem with tomcat 4.0.4.  Every time a context is
 reloaded it
 leaks memory.

 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.

 Can you provide a bug number or a link? I'd like to take a look at
it.

Come on people, a simple search of the release notes an another of
bugzilla quickly turns up the relevant information.

http://www.apache.org/dist/jakarta/tomcat-4/v4.1.29/RELEASE-NOTES
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20758

-Dave

-
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-02 Thread Hart, Justin
Basic authentication.  I figured it wouldn't be hard with Form authentication, but I'm 
using basic in order to match the look and feel of the rest of the site.

Yeah, saw the same problem with Basu's implementation, though I did like the idea.

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:00 AM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,
Senor Basu, your solution is seriously not thread-safe.  But that's for
you to worry about it, maybe it's good enough for your needs ;)

As for Senor Hart's questions:
- HttpSessionListener goes in web.xml, as do all other Servlet
Specification listeners.
- SessionListener goes in server.xml, as do all other Tomcat-specific
listeners.

SessionListener is not tied to HttpSessionListener or HttpSession
directly.  You have to do a series of casts.  The event object in the
SessionListener's SessionEvent is a catalina-specific Session
implementation.  It will also implement the HttpSession interface.  So
you can get from one to another by casting, but it's ugly (as is the
whole SessionListener solution).

Let's step back a minute: you have this whole hassle because you want
the user's password.  You want the user's password in order to
authenticate the user.  But with the getUserPrincipal approach, the user
is already authenticated if the Principal is not null.  Alternatively,
if you have some input screen where the user enters the username and
password, grab them there instead of from the session.  I think what's
missing here is the big picture: tell us what you're trying to do, what
authentication mechanism you're using, and let's forget about the
tomcat-specific hacks for a minute ;)

Yoav Shapira
Millennium ChemInformatics


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

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 

Re: Tomcat FAQs on Wiki - mod_jk2 howto

2003-12-02 Thread Nikola Milutinovic
Tim Funk wrote:

Writing anything like that for the list is a good thing since we can 
always link to it in the archives ;)
Here goes.

STEP 1
--
Build mod_jk2.so and jkjni.so - do whatever needs to be done :-)

STEP 2
--
Place mod_jk2.so and jkjni.so with other Apache modules. In case of Mandrake 
9.1, it was in /usr/lib/apache2-extramodules

STEP 3
--
Setup your Apache virtual host. Although you can run without it, I prefer going 
the right way. In my case:

/etc/httpd/conf.d/75_mod_jk2.conf
-
#
# Sample Apache configuration file for mod_jk2.
# Include this in your httpd.conf.
#
IfDefine HAVE_JK2
IfModule !mod_jk2.c
LoadModule  jk2_module extramodules/mod_jk2.so
/IfModule
/IfDefine
IfModule mod_jk2.c
#
# Restrict access to JK status handler
#
Location /jkstatus/
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.61.110
/Location
/IfModule
/etc/httpd/2.0/conf/vhosts/External.ev.co.yu
VirtualHost 192.168.61.12:80
ServerName  External.ev.co.yu
ServerAdmin [EMAIL PROTECTED]
DocumentRoot/home/www/public_html
ErrorLog/home/www/logs/error.log
CustomLog   /home/www/logs/access.log common
IfModule mod_alias.c
ScriptAlias /cgi-bin/ /home/www/cgi-bin/
/IfModule
Directory /home/www/public_html
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Limit GET POST HEAD OPTIONS PROPFIND
Order allow,deny
Allow from all
/Limit
LimitExcept GET POST HEAD OPTIONS PROPFIND
Order deny,allow
Deny from all
/LimitExcept
/Directory
Directory /home/www/cgi-bin
AllowOverride None
Options FollowSymLinks
Order allow,deny
Allow from all
/Directory
/VirtualHost
STEP 4
--
Setup virtual host on Tomcat.

/etc/tomcat/server.xml
--
Host name=External.ev.co.yu debug=0 appBase=/home/www/webapps
  unpackWARs=true
  Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=external_access_log. suffix=.txt
 pattern=common/
  Logger className=org.apache.catalina.logger.FileLogger directory=logs
  prefix=external_log. suffix=.txt timestamp=true/
  Context docBase=ConsumerBill path=/bill reloadable=true
!-- setupt datasources as needed --
  /Context
/Host
STEP 5
--
Setup JK2 on Tomcat side.

/etc/tomcat4/jk2.properties
---
# Set the desired handler list
# handler.list=apr,request,channelJni
handler.list=apr,request,channelUnix
#
apr.NativeSo=/usr/lib/apache2-extramodules/jkjni.so
request.tomcatAuthentication=false

channelUnix.file=${jkHome}/work/tomcat.sock

STEP 6 !!!
--
Ensure that jkjni.so picks up serverConf value from environment! The easiest 
way for me was to edit /etc/tomcat/tomcat4.conf and add:

serverRoot=/etc/httpd/2.0
export serverRoot
If you're not using RPM version, just make sure that *that* variable is defined 
in the script starting tomcat. This is needed by jkjni.so, so it can locate 
workers2.properties. And if you're wondering, jkjni.so is needed to talk to UNIX 
domain socket. Tomcat can open it without using handler apr and jkjni.so, but 
refuses to communicate over it.

STEP 7
--
Setup your Apache side of JK2. Edit ${serverConf}/worker2.properties file. You 
must define socket channel, ajp13 worker and at least one URI mapping to your 
virtual host. Needless to say, VHost definitions on Tomcat and Apache must 
(should?) match.

/etc/httpd/2.0/conf/workers2.properties
---
[logger]
level=DEBUG
[config:]
debug=0
debugEnv=0
[uriMap:]
info=Maps the requests. Options: debug
debug=0
# Alternate file logger
[logger.file:0]
level=DEBUG
file=/var/log/httpd/mod_jk2.log
[workerEnv:]
info=Global server options
timing=1
debug=0
[channel.un:unixsock]
info=Main socket to Tomcat engine
file=/var/tomcat4/work/tomcat.sock
[status:]
info=Status worker, displays runtime informations
[ajp13:unixsock]
info=Default AJP 1.3 worker
channel=channel.un:unixsock
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:
[uri:external.ev.co.yu/bill]
info=Consumers bill
group=ajp13:unixsock
STEP 8
--
Restart Tomcat and then Apache.

Nix.

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


RE: Tomcat FAQs on Wiki

2003-12-02 Thread Shapira, Yoav

Howdy,
Wiki is for the most part trivially easy:
- Look for the link at the bottom of the page that says Edit Text or
something like that,
- Add your text
- Click save.

That's it.  There are a host of other tricks and trips on google.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 7:34 AM
To: Tomcat Users List
Subject: Re: Tomcat FAQs on Wiki

Writing anything like that for the list is a good thing since we can
always
link to it in the archives ;)

Each Wiki has its quirks and can be a PITA.

-Tim

Nikola Milutinovic wrote:

 Tim Funk wrote:

 Google for Wiki. Most of the links are great and you'll learn more
 about Wiki than you wish to know.

 The best page about Wikis is this one: http://c2.com/cgi/wiki


 I still haven't figured out how to publish to Wiki and frankly, I
don't
 have the time. I'm up to my ass in crocodiles. After having setup
Linux
 + PostgreSQL + Apache + Tomcat, I have to move the server into the
open
 Internet.

 I can write the brief article on setting it up tot he list. Would
 someone post it to WiKi?



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



R: upload file

2003-12-02 Thread Simone Chiaretta
I was using as you cos.jar and uploadbean from zoom
But monving to 4.1 and 5 I decided to pass  to commons-upload from
jakarta since it's more tested even it has some strange behaveour.

Simone

-
Simone Chiaretta
www.piyosailing.com/S
Any sufficiently advanced technology is indistinguishable from magic


 -Messaggio originale-
 Da: andrea antibo [mailto:[EMAIL PROTECTED] 
 Inviato: martedì 2 dicembre 2003 15.07
 A: Tomcat Users List
 Oggetto: upload file
 
 
 Hi,
 my question is if you know if there are problems on file 
 upload using cos.jar 
 under tomcat 4.1.x, because I have a project that work fine 
 on tomcat 4.0.6 
 but it goes broke on tomcat 4.1.x or under jboss-tomcat.4.1.x.
 
 thx
 
 
 
 -
 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 FAQs on Wiki

2003-12-02 Thread Derek Mahar
Speaking of Wiki, checkout Janne Jalkannen's JSPWiki at
http://www.jspwiki.org.

Derek

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: December 2, 2003 6:53 AM
To: Tomcat Users List
Subject: Re: Tomcat FAQs on Wiki


Google for Wiki. Most of the links are great and you'll learn more about
Wiki 
than you wish to know.

The best page about Wikis is this one: http://c2.com/cgi/wiki

-Tim

Adam Hardy wrote:
 On 12/02/2003 07:55 AM Nikola Milutinovic wrote:
 
 Mark Eggers wrote:

 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.


 How does one contribute? I know Wiki is supposed to be free for
 everyone to edit, but I've never done it. Any quick pointers,
links,...?

 I have managed to setup mod_jk2 over UNIX socket.
 
 
 Check out http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheWiki
 
 Adam
 
 PS perhaps you should stick this link somewhere central in wiki as 
 well.


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



RE: SessionListener

2003-12-02 Thread Shapira, Yoav

Howdy,

Basic authentication.  I figured it wouldn't be hard with Form
authentication, but I'm using basic in order to match the look and feel
of
the rest of the site.

OK, so you have basic authentication. Do you have a security-constraint
defined in web.xml?  A login-config?  You can let tomcat do the
authentication for you, and then use the HttpServletRequest methods
(getRemoteUser, getUserPrincipal, isUserInRole).  This is a standard,
easy, portable way, and you don't have to write any custom tomcat code.
Your webapp will not have access to the user's password, but you won't
need it either since the container will authenticate it for you.

Does that fill your needs?

Yoav Shapira


Yeah, saw the same problem with Basu's implementation, though I did
like
the idea.

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:00 AM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,
Senor Basu, your solution is seriously not thread-safe.  But that's for
you to worry about it, maybe it's good enough for your needs ;)

As for Senor Hart's questions:
- HttpSessionListener goes in web.xml, as do all other Servlet
Specification listeners.
- SessionListener goes in server.xml, as do all other Tomcat-specific
listeners.

SessionListener is not tied to HttpSessionListener or HttpSession
directly.  You have to do a series of casts.  The event object in the
SessionListener's SessionEvent is a catalina-specific Session
implementation.  It will also implement the HttpSession interface.  So
you can get from one to another by casting, but it's ugly (as is the
whole SessionListener solution).

Let's step back a minute: you have this whole hassle because you want
the user's password.  You want the user's password in order to
authenticate the user.  But with the getUserPrincipal approach, the
user
is already authenticated if the Principal is not null.  Alternatively,
if you have some input screen where the user enters the username and
password, grab them there instead of from the session.  I think what's
missing here is the big picture: tell us what you're trying to do, what
authentication mechanism you're using, and let's forget about the
tomcat-specific hacks for a minute ;)

Yoav Shapira
Millennium ChemInformatics


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

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 

Commons FileUpload

2003-12-02 Thread Luc Foisy

Could someone please describe this to me, it looks interesting, and perhaps useful to 
me, and the site doesn't have the greatest description of the project.
Basically a brief description of how it functions, and what its capabilities are after 
a file has been uploaded.

Thanks

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



RE: Commons FileUpload

2003-12-02 Thread Shapira, Yoav

Howdy,
This is not the list for commons-fileupload discussion, so please mark
your subject as [OFF-TOPIC] if you choose to pursue it.  The
commons-user list is the right place.

I find commons-fileupload's site to be complete and informative.  What
do you think it's missing.  Try reading the page titled Using, then
writing your own simple servlet, and go from there.

The navigation bar at the left side of fileupload's site is suboptimal.
Take a look through the very bottom section, Project Info and Project
Reports, for a lot more information including JavaDocs which show what
you can do with FileItem (which is the class representing an uploaded
file).

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:17 AM
To: Tomcat User List (E-mail)
Subject: Commons FileUpload


Could someone please describe this to me, it looks interesting, and
perhaps
useful to me, and the site doesn't have the greatest description of the
project.
Basically a brief description of how it functions, and what its
capabilities are after a file has been uploaded.

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

2003-12-02 Thread Hart, Justin
How will the container get my user logged into the database?  My plan was to use the 
username  password to authenticate to my database so the user only operates with 
their perms in the database.  My original approach was through realm, but this left 
the problem of figuring out which user was tied to which session.

D'oh!

Nevermind, damnit...  I spent a week doing this, and I figured it out.

I wanted to use session ID, which I don't have in the realm, instead, I use their 
principal!  The principal isn't unique to the session... but it doesn't need to be, in 
fact, it's BETTER if it isn't, because then if the same user logs in multiple times, 
it will share a database connection, meaning I open fewer database connections (of 
which there are a limitted pool).

Ok, so my realm implementation will authenticate to the database, the JSP will use the 
userprincipal to pair the authenticated user to their connection... better yet, the 
hash, so it's a bit more optimal.

*SLAPS FOREHEAD!*

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:13 AM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,

Basic authentication.  I figured it wouldn't be hard with Form
authentication, but I'm using basic in order to match the look and feel
of
the rest of the site.

OK, so you have basic authentication. Do you have a security-constraint
defined in web.xml?  A login-config?  You can let tomcat do the
authentication for you, and then use the HttpServletRequest methods
(getRemoteUser, getUserPrincipal, isUserInRole).  This is a standard,
easy, portable way, and you don't have to write any custom tomcat code.
Your webapp will not have access to the user's password, but you won't
need it either since the container will authenticate it for you.

Does that fill your needs?

Yoav Shapira


Yeah, saw the same problem with Basu's implementation, though I did
like
the idea.

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:00 AM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,
Senor Basu, your solution is seriously not thread-safe.  But that's for
you to worry about it, maybe it's good enough for your needs ;)

As for Senor Hart's questions:
- HttpSessionListener goes in web.xml, as do all other Servlet
Specification listeners.
- SessionListener goes in server.xml, as do all other Tomcat-specific
listeners.

SessionListener is not tied to HttpSessionListener or HttpSession
directly.  You have to do a series of casts.  The event object in the
SessionListener's SessionEvent is a catalina-specific Session
implementation.  It will also implement the HttpSession interface.  So
you can get from one to another by casting, but it's ugly (as is the
whole SessionListener solution).

Let's step back a minute: you have this whole hassle because you want
the user's password.  You want the user's password in order to
authenticate the user.  But with the getUserPrincipal approach, the
user
is already authenticated if the Principal is not null.  Alternatively,
if you have some input screen where the user enters the username and
password, grab them there instead of from the session.  I think what's
missing here is the big picture: tell us what you're trying to do, what
authentication mechanism you're using, and let's forget about the
tomcat-specific hacks for a minute ;)

Yoav Shapira
Millennium ChemInformatics


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

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

RE: SessionListener

2003-12-02 Thread Shapira, Yoav

Howdy,
Yes, now you got it ;)  It's these simple misunderstandings that often
cause a lot of debate.  As a bonus, your approach will work very well in
any J2EE container.

You may not have to do any custom coding, just the JDBC realm.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Hart, Justin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:22 AM
To: Tomcat Users List
Subject: RE: SessionListener

How will the container get my user logged into the database?  My plan
was
to use the username  password to authenticate to my database so the
user
only operates with their perms in the database.  My original approach
was
through realm, but this left the problem of figuring out which user was
tied to which session.

D'oh!

Nevermind, damnit...  I spent a week doing this, and I figured it out.

I wanted to use session ID, which I don't have in the realm, instead, I
use
their principal!  The principal isn't unique to the session... but it
doesn't need to be, in fact, it's BETTER if it isn't, because then if
the
same user logs in multiple times, it will share a database connection,
meaning I open fewer database connections (of which there are a
limitted
pool).

Ok, so my realm implementation will authenticate to the database, the
JSP
will use the userprincipal to pair the authenticated user to their
connection... better yet, the hash, so it's a bit more optimal.

*SLAPS FOREHEAD!*

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:13 AM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,

Basic authentication.  I figured it wouldn't be hard with Form
authentication, but I'm using basic in order to match the look and
feel
of
the rest of the site.

OK, so you have basic authentication. Do you have a security-constraint
defined in web.xml?  A login-config?  You can let tomcat do the
authentication for you, and then use the HttpServletRequest methods
(getRemoteUser, getUserPrincipal, isUserInRole).  This is a standard,
easy, portable way, and you don't have to write any custom tomcat code.
Your webapp will not have access to the user's password, but you won't
need it either since the container will authenticate it for you.

Does that fill your needs?

Yoav Shapira


Yeah, saw the same problem with Basu's implementation, though I did
like
the idea.

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:00 AM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,
Senor Basu, your solution is seriously not thread-safe.  But that's
for
you to worry about it, maybe it's good enough for your needs ;)

As for Senor Hart's questions:
- HttpSessionListener goes in web.xml, as do all other Servlet
Specification listeners.
- SessionListener goes in server.xml, as do all other Tomcat-specific
listeners.

SessionListener is not tied to HttpSessionListener or HttpSession
directly.  You have to do a series of casts.  The event object in the
SessionListener's SessionEvent is a catalina-specific Session
implementation.  It will also implement the HttpSession interface.  So
you can get from one to another by casting, but it's ugly (as is the
whole SessionListener solution).

Let's step back a minute: you have this whole hassle because you want
the user's password.  You want the user's password in order to
authenticate the user.  But with the getUserPrincipal approach, the
user
is already authenticated if the Principal is not null.  Alternatively,
if you have some input screen where the user enters the username and
password, grab them there instead of from the session.  I think what's
missing here is the big picture: tell us what you're trying to do,
what
authentication mechanism you're using, and let's forget about the
tomcat-specific hacks for a minute ;)

Yoav Shapira
Millennium ChemInformatics


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

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 

RE: SessionListener

2003-12-02 Thread Hart, Justin
Won't quite do it, JDBCRealm looks for users in a database, I want to connect a user 
TO a database using their credentials, but the code to do this feat will be quite 
minimal by comparison.

Thanks for bouncing ideas off me!  It's been most fun :-)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:23 AM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,
Yes, now you got it ;)  It's these simple misunderstandings that often
cause a lot of debate.  As a bonus, your approach will work very well in
any J2EE container.

You may not have to do any custom coding, just the JDBC realm.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Hart, Justin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:22 AM
To: Tomcat Users List
Subject: RE: SessionListener

How will the container get my user logged into the database?  My plan
was
to use the username  password to authenticate to my database so the
user
only operates with their perms in the database.  My original approach
was
through realm, but this left the problem of figuring out which user was
tied to which session.

D'oh!

Nevermind, damnit...  I spent a week doing this, and I figured it out.

I wanted to use session ID, which I don't have in the realm, instead, I
use
their principal!  The principal isn't unique to the session... but it
doesn't need to be, in fact, it's BETTER if it isn't, because then if
the
same user logs in multiple times, it will share a database connection,
meaning I open fewer database connections (of which there are a
limitted
pool).

Ok, so my realm implementation will authenticate to the database, the
JSP
will use the userprincipal to pair the authenticated user to their
connection... better yet, the hash, so it's a bit more optimal.

*SLAPS FOREHEAD!*

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:13 AM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,

Basic authentication.  I figured it wouldn't be hard with Form
authentication, but I'm using basic in order to match the look and
feel
of
the rest of the site.

OK, so you have basic authentication. Do you have a security-constraint
defined in web.xml?  A login-config?  You can let tomcat do the
authentication for you, and then use the HttpServletRequest methods
(getRemoteUser, getUserPrincipal, isUserInRole).  This is a standard,
easy, portable way, and you don't have to write any custom tomcat code.
Your webapp will not have access to the user's password, but you won't
need it either since the container will authenticate it for you.

Does that fill your needs?

Yoav Shapira


Yeah, saw the same problem with Basu's implementation, though I did
like
the idea.

Justin

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:00 AM
To: Tomcat Users List
Subject: RE: SessionListener



Howdy,
Senor Basu, your solution is seriously not thread-safe.  But that's
for
you to worry about it, maybe it's good enough for your needs ;)

As for Senor Hart's questions:
- HttpSessionListener goes in web.xml, as do all other Servlet
Specification listeners.
- SessionListener goes in server.xml, as do all other Tomcat-specific
listeners.

SessionListener is not tied to HttpSessionListener or HttpSession
directly.  You have to do a series of casts.  The event object in the
SessionListener's SessionEvent is a catalina-specific Session
implementation.  It will also implement the HttpSession interface.  So
you can get from one to another by casting, but it's ugly (as is the
whole SessionListener solution).

Let's step back a minute: you have this whole hassle because you want
the user's password.  You want the user's password in order to
authenticate the user.  But with the getUserPrincipal approach, the
user
is already authenticated if the Principal is not null.  Alternatively,
if you have some input screen where the user enters the username and
password, grab them there instead of from the session.  I think what's
missing here is the big picture: tell us what you're trying to do,
what
authentication mechanism you're using, and let's forget about the
tomcat-specific hacks for a minute ;)

Yoav Shapira
Millennium ChemInformatics


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

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--;}
 

RE: Argument Type Mismatch

2003-12-02 Thread Hart, Justin
I figured it out, see the SessionListener thread.  Instead of worrying about Session 
IDs, I'll use the principal to identify the user (hell, that's what the rest of the 
system does).  See, I needed a way to pair a user to the connection, if I use a hash 
of the principal, I can do so just as optimally as any implementation creating the 
pairing with Session ID (which is a 1 time shot anyway).

Justin

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


ahha - the session won't have the password. But the Realm will. (or might not 
depending on implementation).  Actually - the Principal could have the 
password if it extends GenericPrincipal. If not, you could extend the Realm 
to ensure it does.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/realm/GenericPrincipal.html


-Tim

Hart, Justin wrote:

 I need access to the user's password, which all of the Servlet specific ones seem to 
 guard the programmer from getting access to.
 
 Justin
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Monday, December 01, 2003 8:10 PM
 To: Tomcat Users List
 Subject: Re: Argument Type Mismatch
 
 
 Ahh, I see. Why implement SessionListener which is tomcat specific when you 
 can implement the Servlet specific ones in web.xml?
 
 Look at the code for SingleSignOn or any code that utilizes it as to how a 
 SessionListener gets registered. I am guessing that you'll actuall need to 
 implement a no-op Vavle that registers the Listener on initialization of the 
 Vavle. But thats just a no code look swag.
 
 -Tim
 
 Hart, Justin wrote:
 
 
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]
 
 
 


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



OutOfMemory Exception initializing page context

2003-12-02 Thread Rob Wichterman
Hello,
 
I am having major memory problem that I have been fighting through.  Has
any body ever seen this one.  Here are the errors that always come up in
my logs.
 
1.  java.lang.IllegalStateException: getAttribute: Session already
invalidated
2.  JspFactoryImpl: Exception initializing page context
java.lang.IllegalStateException: Cannot create a session after the
response has been committed
3.  JspFactoryImpl: Exception initializing page context
java.lang.OutOfMemoryError
 
Any help at all would be greatly appreciated.
 
Thanks,
 
Rob Wichterman


RE: OutOfMemory Exception initializing page context

2003-12-02 Thread Shapira, Yoav

Howdy,
Once you're out of memory, the system is in a bad state and must be
restarted.  You will see error messages that are at best meaningless and
at worst misleading, because they will make you look in the wrong
places.  You want to fix the memory issue first, by adding more memory
(via the -Xmx java command-line parameter) or fixing a memory leak if
there's one in your application.

Do not assume, for example, that the IllegalStateException you cite has
anything to do with the OutOfMemory error: it may be a misleading
message thrown by the system after it ran out of memory (even though it
shows up before the OutOfMemoryError in the log) while it was thrashing
to GC stuff by invalidating your sessions.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rob Wichterman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:57 AM
To: [EMAIL PROTECTED]
Subject: OutOfMemory Exception initializing page context

Hello,

I am having major memory problem that I have been fighting through.
Has
any body ever seen this one.  Here are the errors that always come up
in
my logs.

1. java.lang.IllegalStateException: getAttribute: Session already
invalidated
2. JspFactoryImpl: Exception initializing page context
java.lang.IllegalStateException: Cannot create a session after the
response has been committed
3. JspFactoryImpl: Exception initializing page context
java.lang.OutOfMemoryError

Any help at all would be greatly appreciated.

Thanks,

Rob Wichterman



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-02 Thread Christopher Schultz
Justin,

Won't quite do it, JDBCRealm looks for users in a database, I want to
connect a user TO a database using their credentials, but the code to
do this feat will be quite minimal by comparison.
This will make it hard to use a connection pool (which you mentioned
that you do/want to do).
Is there a particular reason for the database access paranoia? Most apps
connect to the db using the same login regardless of the user actually 
logged in to the application. They use other types of permission 
checking to see if you can perform some action, instead of relying on 
thr database for that kind of checking.

I absolutely agree that having multiple layers of security is great, but 
this one may make your application suck really bad, especially if you 
are using a db like Oracle, where the database connections are anything 
but lightweight.

-chris

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


RE: SessionListener

2003-12-02 Thread Hart, Justin
Unfortunately, the paranoia is founded in this case, though I do agree.

Justin

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 10:23 AM
To: Tomcat Users List
Subject: Re: SessionListener


Justin,

 Won't quite do it, JDBCRealm looks for users in a database, I want to
 connect a user TO a database using their credentials, but the code to
 do this feat will be quite minimal by comparison.

This will make it hard to use a connection pool (which you mentioned
that you do/want to do).

Is there a particular reason for the database access paranoia? Most apps
connect to the db using the same login regardless of the user actually 
logged in to the application. They use other types of permission 
checking to see if you can perform some action, instead of relying on 
thr database for that kind of checking.

I absolutely agree that having multiple layers of security is great, but 
this one may make your application suck really bad, especially if you 
are using a db like Oracle, where the database connections are anything 
but lightweight.

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



Configure tomcat for LDAP

2003-12-02 Thread Damien Pacaud
Hi, i want to use LDAP to athenticate my users on a JSP application and
would like to know how to configure TOMCAT so that i can acces the login of
the current user through a jsp ?

for now, i have it all set on apache, in the virtual host using ath_ldap .
my problem is that the request.getRemoteUser() method always returns null in
my jsp application...
but apache writes the login of the user in the acces.log so i guess it
is a conf problem with tomcat...

Does anyone have an idea, or a url that could halp ??
thanks in advance



---
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é.


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



Re: OutOfMemory Exception initializing page context

2003-12-02 Thread Christopher Schultz
What's with all the OOM questions this week? I've noticed that topics 
tend to come in waves.

I wonder if there are only like 5 people out there that post to the 
newsgroup, but they have all kinds of alias and alternate personalities 
so that the average response is what they use to solve their problems :)

Just an amusing thought to make me smile. :) There. I did it.

-chris

Shapira, Yoav wrote:
Howdy,
Once you're out of memory, the system is in a bad state and must be
restarted.  You will see error messages that are at best meaningless and
at worst misleading, because they will make you look in the wrong
places.  You want to fix the memory issue first, by adding more memory
(via the -Xmx java command-line parameter) or fixing a memory leak if
there's one in your application.
Do not assume, for example, that the IllegalStateException you cite has
anything to do with the OutOfMemory error: it may be a misleading
message thrown by the system after it ran out of memory (even though it
shows up before the OutOfMemoryError in the log) while it was thrashing
to GC stuff by invalidating your sessions.
Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rob Wichterman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:57 AM
To: [EMAIL PROTECTED]
Subject: OutOfMemory Exception initializing page context
Hello,

I am having major memory problem that I have been fighting through.
Has

any body ever seen this one.  Here are the errors that always come up
in

my logs.

1.  java.lang.IllegalStateException: getAttribute: Session already
invalidated
2.  JspFactoryImpl: Exception initializing page context
java.lang.IllegalStateException: Cannot create a session after the
response has been committed
3.  JspFactoryImpl: Exception initializing page context
java.lang.OutOfMemoryError
Any help at all would be greatly appreciated.

Thanks,

Rob Wichterman




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: Configure tomcat for LDAP

2003-12-02 Thread Hart, Justin
JNDIRealm can be used to authenticate users against an LDAP (I'm guessing in this case 
ActiveDirectory).

You will, however, want to use Basic authentication, and prompt the user username for 
a username and password.

Justin

-Original Message-
From: Damien Pacaud [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 10:16 AM
To: Tomcat Users List
Subject: Configure tomcat for LDAP


Hi, i want to use LDAP to athenticate my users on a JSP application and
would like to know how to configure TOMCAT so that i can acces the login of
the current user through a jsp ?

for now, i have it all set on apache, in the virtual host using ath_ldap .
my problem is that the request.getRemoteUser() method always returns null in
my jsp application...
but apache writes the login of the user in the acces.log so i guess it
is a conf problem with tomcat...

Does anyone have an idea, or a url that could halp ??
thanks in advance



---
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é.


-
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: Inconsistent Load Balancing info mod_jk2

2003-12-02 Thread Asif Chowdhary
The apache documentation say that higher the number
the greater the number of requests which tomcat will receive.

The tomcat definitive Guide from orielly says that the
lower the number the greater the number of requests 
a tomcat instance will receive.

What is correct?

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: OutOfMemory Exception initializing page context

2003-12-02 Thread Rob Wichterman
Well I have had my -Xmx set to as high as 1gb and I still receive these
errors.  The site will stay running for at best 1 day without crashing.
I was just hoping one of these could point me in a direction while I
work on looking at memory leaks.

Thanks,

Rob 

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 02, 2003 10:25 AM
To: Tomcat Users List
Subject: Re: OutOfMemory Exception initializing page context

What's with all the OOM questions this week? I've noticed that topics 
tend to come in waves.

I wonder if there are only like 5 people out there that post to the 
newsgroup, but they have all kinds of alias and alternate personalities 
so that the average response is what they use to solve their problems :)

Just an amusing thought to make me smile. :) There. I did it.

-chris

Shapira, Yoav wrote:
 Howdy,
 Once you're out of memory, the system is in a bad state and must be
 restarted.  You will see error messages that are at best meaningless
and
 at worst misleading, because they will make you look in the wrong
 places.  You want to fix the memory issue first, by adding more memory
 (via the -Xmx java command-line parameter) or fixing a memory leak if
 there's one in your application.
 
 Do not assume, for example, that the IllegalStateException you cite
has
 anything to do with the OutOfMemory error: it may be a misleading
 message thrown by the system after it ran out of memory (even though
it
 shows up before the OutOfMemoryError in the log) while it was
thrashing
 to GC stuff by invalidating your sessions.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 
-Original Message-
From: Rob Wichterman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 9:57 AM
To: [EMAIL PROTECTED]
Subject: OutOfMemory Exception initializing page context

Hello,

I am having major memory problem that I have been fighting through.
 
 Has
 
any body ever seen this one.  Here are the errors that always come up
 
 in
 
my logs.

1.java.lang.IllegalStateException: getAttribute: Session already
invalidated
2.JspFactoryImpl: Exception initializing page context
java.lang.IllegalStateException: Cannot create a session after the
response has been committed
3.JspFactoryImpl: Exception initializing page context
java.lang.OutOfMemoryError

Any help at all would be greatly appreciated.

Thanks,

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


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



Re: OutOfMemory Exception initializing page context

2003-12-02 Thread Christopher Schultz
Rob,

Well I have had my -Xmx set to as high as 1gb and I still receive these
errors.  The site will stay running for at best 1 day without crashing.
I was just hoping one of these could point me in a direction while I
work on looking at memory leaks.
Sorry for the levity. Try this:

Turn on verbose GCs, and make sure you're sending stdout to a log file 
(Tomcat does this by default, I think). Empty the stdout log file, 
restart Tomcat and then let it run out of memory.

Take a look at the GC output (they are prettty obvious) and see what's 
happening to memory. I've done this in the past, and I even wrote a 
(long lost) Perl script to parse the log file and generate X-Y 
coordinates that I could plot using Excel. We could plainly see that 
there was a memory leak of some kind because the graph kept going up and up.

It does take a long time to find memory leaks but there are a couple of 
things you can check.

First of all, what JSK are you using?

Check some of the following:
- Are you starting any of your own threads? If so, are they dying when 
the context reloads?
- Are you reloading the context a lot?
- Do any of your container objects like hashtables or whatever keep 
references to things like the ServletContext, etc.?
- Do you regularly remove old objects from users' sessions?
- Are you doing any XSLT?
- Are you using a database connection pool or are you creating new 
connections for each user?
- Do you keep any persistent connections like sockets or anything open?

-chris

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


RE: Tomcat FAQs on Wiki - mod_jk2 howto

2003-12-02 Thread Scott, Sean
In what cases is step 5 required?  I am currently running without
jk2.properties at all. 

Can you explain what the purpose of jk2.properties is and when it should be
used?
What is the handler list used for?

Thanks

-sean

-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 7:11 AM
To: Tomcat Users List
Subject: Re: Tomcat FAQs on Wiki - mod_jk2 howto


Tim Funk wrote:

 Writing anything like that for the list is a good thing since we can 
 always link to it in the archives ;)

Here goes.

STEP 1
--

Build mod_jk2.so and jkjni.so - do whatever needs to be done :-)

STEP 2
--

Place mod_jk2.so and jkjni.so with other Apache modules. In case of Mandrake

9.1, it was in /usr/lib/apache2-extramodules

STEP 3
--

Setup your Apache virtual host. Although you can run without it, I prefer
going 
the right way. In my case:

/etc/httpd/conf.d/75_mod_jk2.conf
-
#
# Sample Apache configuration file for mod_jk2.
# Include this in your httpd.conf.
#
IfDefine HAVE_JK2
 IfModule !mod_jk2.c
 LoadModule  jk2_module extramodules/mod_jk2.so
 /IfModule
/IfDefine

IfModule mod_jk2.c
 #
 # Restrict access to JK status handler
 #
 Location /jkstatus/
 Order Deny,Allow
 Deny from all
 Allow from 127.0.0.1
 Allow from 192.168.61.110
 /Location
/IfModule

/etc/httpd/2.0/conf/vhosts/External.ev.co.yu
VirtualHost 192.168.61.12:80
 ServerName  External.ev.co.yu
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot/home/www/public_html
 ErrorLog/home/www/logs/error.log
 CustomLog   /home/www/logs/access.log common
 IfModule mod_alias.c
 ScriptAlias /cgi-bin/ /home/www/cgi-bin/
 /IfModule
 Directory /home/www/public_html
 AllowOverride FileInfo AuthConfig Limit Indexes
 Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
 Limit GET POST HEAD OPTIONS PROPFIND
 Order allow,deny
 Allow from all
 /Limit
 LimitExcept GET POST HEAD OPTIONS PROPFIND
 Order deny,allow
 Deny from all
 /LimitExcept
 /Directory
 Directory /home/www/cgi-bin
 AllowOverride None
 Options FollowSymLinks
 Order allow,deny
 Allow from all
 /Directory
/VirtualHost

STEP 4
--

Setup virtual host on Tomcat.

/etc/tomcat/server.xml
--
Host name=External.ev.co.yu debug=0 appBase=/home/www/webapps
   unpackWARs=true
   Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs  prefix=external_access_log. suffix=.txt
  pattern=common/
   Logger className=org.apache.catalina.logger.FileLogger
directory=logs
   prefix=external_log. suffix=.txt timestamp=true/
   Context docBase=ConsumerBill path=/bill reloadable=true
 !-- setupt datasources as needed --
   /Context
/Host

STEP 5
--

Setup JK2 on Tomcat side.

/etc/tomcat4/jk2.properties
---
# Set the desired handler list
# handler.list=apr,request,channelJni
handler.list=apr,request,channelUnix
#
apr.NativeSo=/usr/lib/apache2-extramodules/jkjni.so

request.tomcatAuthentication=false

channelUnix.file=${jkHome}/work/tomcat.sock

STEP 6 !!!
--

Ensure that jkjni.so picks up serverConf value from environment! The
easiest 
way for me was to edit /etc/tomcat/tomcat4.conf and add:

serverRoot=/etc/httpd/2.0
export serverRoot

If you're not using RPM version, just make sure that *that* variable is
defined 
in the script starting tomcat. This is needed by jkjni.so, so it can locate 
workers2.properties. And if you're wondering, jkjni.so is needed to talk to
UNIX 
domain socket. Tomcat can open it without using handler apr and jkjni.so,
but 
refuses to communicate over it.

STEP 7
--

Setup your Apache side of JK2. Edit ${serverConf}/worker2.properties file.
You 
must define socket channel, ajp13 worker and at least one URI mapping to
your 
virtual host. Needless to say, VHost definitions on Tomcat and Apache must 
(should?) match.

/etc/httpd/2.0/conf/workers2.properties
---
[logger]
level=DEBUG

[config:]
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
[logger.file:0]
level=DEBUG
file=/var/log/httpd/mod_jk2.log

[workerEnv:]
info=Global server options
timing=1
debug=0

[channel.un:unixsock]
info=Main socket to Tomcat engine
file=/var/tomcat4/work/tomcat.sock

[status:]
info=Status worker, displays runtime informations

[ajp13:unixsock]
info=Default AJP 1.3 worker
channel=channel.un:unixsock

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:external.ev.co.yu/bill]
info=Consumers bill
group=ajp13:unixsock

STEP 8
--

Restart Tomcat and then Apache.

Nix.



AW: Servlet as Welcome File doesn't work

2003-12-02 Thread SH Solutions
Hi

I found an solution to force tomcat 4.1.29 to use servlets as welcome files.
My applications web.xml:

servlet
servlet-nameRoot/servlet-name
servlet-classcom.osiris4.servlets.Root/servlet-class
/servlet

servlet-mapping
servlet-nameRoot/servlet-name
url-pattern/root/url-pattern
/servlet-mapping

welcome-file-list
welcome-fileroot/welcome-file
/welcome-file-list


The problem on this was that tomcat checks for the very existence of the
file root, before actually invoking the servlet. The trick is to simply
have an empty file root in the applications docRoot directory.
If this is a problem for you, simply use another name for that file - e.g.
use the servlets name.

Thanks your answers anyway.

Steffen


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



load-on-startup and multiple coyotes

2003-12-02 Thread SH Solutions
Hi, once again,

after having just solved the welcome-servlet problem (posted separately) I
just run into another problem.
I have 5 distinct servlets while all inherit from a common base class whose
simple purpose is to initialize the applications database pool, read
different configuration files and preload some very important information
from the databse. The servlets base class also takes care of synchronization
and single database pool initialization.

This all works very well as long as I have no load-on-startup set. It also
works well with no load-on-startup but instead having only one coyote
connector assigned to the application.
This is were the problem comes in. I need to have 2 coyotes. One for http
and one for https.

As soon as I start using 2 coyote connectors together with load-on-startup
tomcat initializes the database pools twice.
Interestingly it keeps initializing things twice even if I add a third
coyote.

Anyone any glue so far?
I even don't know where to look for this. Any hint would be welcome.

Thanks,

Steffen


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



RE: load-on-startup and multiple coyotes

2003-12-02 Thread Shapira, Yoav

Howdy,

As soon as I start using 2 coyote connectors together with load-on-
startup
tomcat initializes the database pools twice.
Interestingly it keeps initializing things twice even if I add a third
coyote.

You have one load-on-startup tag for each servlet element in web.xml,
and one servlet element in web.xml for each servlet class, even when you
have multiple connectors in server.xml, right?

Tomcat (4.x) will create an instance of your servlet for every servlet
tag in web.xml.   Each instance will be initialized, so that may be what
you're seeing.

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: load-on-startup and multiple coyotes

2003-12-02 Thread Christopher Schultz
Steffen,

As soon as I start using 2 coyote connectors together with load-on-startup
tomcat initializes the database pools twice.
Interestingly it keeps initializing things twice even if I add a third
coyote.
In about two minutes, Yoav Shapira is going to tell you this:

Don't use a servlet to initialize your stuff. Instead, use a 
ContextListener. IT's cleaner, more flexible, and only gets loaded when 
it should get loaded.

I used to have InitServlet-style initialization, but now I use 
ContextListeners.

They're pretty easy: create a new class that implements 
javax.servlet.ServletContextListener.

Once you move your code from your old InitServlet, you have to install 
it into the web.xml file like this:

listener
listener-classfully.qualified.InitListener/listener-class
/listener
Put this section right before any servlet definitions but after any 
filter and filter-mapping sections you have.

-chris

-
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-02 Thread Neil Aggarwal
Chris:

 Yeah, it's possible (and probable) that the TagHandlerPool 
 maintains a 
 reference back to the ServletContext in which it lives. That 
 might kew 
 your results. I'm sure that the TagHandlerPool isn't actually 
 taking up 
 that much memory.

This is strange.  When I created a heap dump from my server
just now, it does not have any instances of TagHandlerPool
in the heap dump.  That is what I expected before, but I still
had them in my last dump.

 Do you have any of your own tag libraries, or are you using only 
 3rd-party taglibs? If you are using your own, check to see if you are 
 holding on to references or something like (anything like 
 shared objects 
 between tags -- that kind of thing).

We are not using any 3rd party tag libraries.
We are using our our tag library.  I will look into that.

 If you have a profiler handy (something more robust that the heap 
 dumper), check to see how many instances of various types 
 there are. For 
 example, if you are using org.foo.bar.taglib, then filter the object 
 list by org.foo.bar.taglib and take a look at how many 
 instances there 
 are. If you find that there are thousands of references to 
 tag handlers, 
 then something is probably wrong with Tomcat. Otherwise, 
 several hundred 
 references doesn't sound horrible. It's possible that they 
 haven't been 
 GC'd yet.

Doing a quick grep on my summary results from the new heap dump,
I get this result:
60256,1076,com/slsideas/pagegen/tags/SetPropertyTag
31296,652,com/slsideas/pagegen/tags/ValueTag
23088,481,com/slsideas/pagegen/tags/ProcessTag
13008,271,com/slsideas/pagegen/tags/IfNotNullTag
 9888,206,com/slsideas/pagegen/tags/IfNullTag
 9600,200,com/slsideas/pagegen/tags/IfEqTag
 5616,117,com/slsideas/pagegen/tags/IfExistTag
 4992,104,com/slsideas/pagegen/tags/IfNotEqTag
 3216,67,com/slsideas/pagegen/tags/IncludeTag
 3136,49,com/slsideas/pagegen/tags/LoopTag
  960,20,com/slsideas/pagegen/tags/IfNotExistTag
  608,2,class com/slsideas/pagegen/tags/ValueTag
  608,2,class com/slsideas/pagegen/tags/SetPropertyTag$Converter
  608,2,class com/slsideas/pagegen/tags/SetPropertyTag
  608,2,class com/slsideas/pagegen/tags/ProcessTag
  608,2,class com/slsideas/pagegen/tags/IncludeTag
  608,2,class com/slsideas/pagegen/tags/IfNotExistTag
  608,2,class com/slsideas/pagegen/tags/IfExistTag
  608,2,class com/slsideas/pagegen/tags/BaseTag
  304,1,class com/slsideas/pagegen/tags/LoopTag
  304,1,class com/slsideas/pagegen/tags/IfNullTag
  304,1,class com/slsideas/pagegen/tags/IfNotNullTag
  304,1,class com/slsideas/pagegen/tags/IfNotEqTag
  304,1,class com/slsideas/pagegen/tags/IfLoopTag
  304,1,class com/slsideas/pagegen/tags/IfGreaterThanTag
  304,1,class com/slsideas/pagegen/tags/IfGreaterOrEqTag
  304,1,class com/slsideas/pagegen/tags/IfEqTag
  304,1,class com/slsideas/pagegen/tags/EscapeValueTag
   56,1,com/slsideas/pagegen/tags/IfLoopTag

The first column is the total bytes held by the instance inself (not
including
references), the second column is the number of instances that were
present
in the heap dump, and the last column is the type of the object.

I find it very hard to believe that we have over 2500 active instances
of
our tags.  This seems to imply they are not being garbage collected.

 I also noticed that you are using JDK 1.4.1. I've heard that this 
 version (it might only be the Sun distro -- can someone 
 confirm?) has an 
 implementation of StringBuffer that has a terrible memory leak. You 
 might want to consider upgrading to 1.4.2 if that's possible.

I ran some code to count all of the instances of java/lang/StringBuffer
and the total bytes they hold both in themselves and their references.
I got 2,925,512 bytes in 15,914 instances of java/lang/StringBuffer.
The heap dump shows 174,740,832 total bytes used in 892,512 total
instances.

I don't belive the StringBuffer is the cause of my problems.

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]



Question using JProfiler with Tomcat

2003-12-02 Thread Laurent Michenaud
Hi,
 
I'm using Jprofiler to monitor my web application running on Tomcat.
My Webapp uses XML/XSLTC to generate the html page.
 
Looking at the JVM, I was horrified to see that some pages are using
more than 30 Mo of memory.
 
So, I've added another webapp that shows the JVM ( graphic in a applet
).
 
This applet shows differents values from Jprofiler about memory
consumption.
The used memory is not so much.
 
I think it is due to the fact that Jprofiler creates a lot of objects to
inspect the JVM.
 
So my conclusion is :
Don't use Jprofiler to see our much memory your web application use ! Or
divide the obtained
values by 3 or 4.
 
What's your opinion about that ?
 
Thanks
 


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

2003-12-02 Thread Christopher Schultz
Neil,

This is strange.  When I created a heap dump from my server
just now, it does not have any instances of TagHandlerPool
in the heap dump.  That is what I expected before, but I still
had them in my last dump.
That is weird. However, you still have a bunch of tag handler instances, 
I see...

Doing a quick grep on my summary results from the new heap dump,
I get this result:
60256,1076,com/slsideas/pagegen/tags/SetPropertyTag
31296,652,com/slsideas/pagegen/tags/ValueTag
The first column is the total bytes held by the instance inself (not
including references), the second column is the number of instances that
 were present in the heap dump, and the last column is the type of
 the object.
So you have 60k in SetPropertyTag objects? If you use them a lot 
(without pooling), then you'll get a lot of them on the heap at any 
given time. Can you observe that the number keeps going up, and never 
goes down?

I find it very hard to believe that we have over 2500 active instances
of our tags.  This seems to imply they are not being garbage collected.
Not necessarily. It might just be that they are taking a while to get 
GC'd. Again, what do you observe over time?

I don't belive the StringBuffer is the cause of my problems.
Okay, that's good.

-chris

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


RE: Question using JProfiler with Tomcat

2003-12-02 Thread Hart, Justin
You saw the 30 MB in JProfiler?

I haven't used it myself, but I would imagine that JProfiler tares its own consumption 
off of the scores.

Justin

-Original Message-
From: Laurent Michenaud [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:32 PM
To: [EMAIL PROTECTED]
Subject: Question using JProfiler with Tomcat


Hi,
 
I'm using Jprofiler to monitor my web application running on Tomcat.
My Webapp uses XML/XSLTC to generate the html page.
 
Looking at the JVM, I was horrified to see that some pages are using
more than 30 Mo of memory.
 
So, I've added another webapp that shows the JVM ( graphic in a applet
).
 
This applet shows differents values from Jprofiler about memory
consumption.
The used memory is not so much.
 
I think it is due to the fact that Jprofiler creates a lot of objects to
inspect the JVM.
 
So my conclusion is :
Don't use Jprofiler to see our much memory your web application use ! Or
divide the obtained
values by 3 or 4.
 
What's your opinion about that ?
 
Thanks
 

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



Setting Display Name

2003-12-02 Thread Rhino



Can anyone tell me where/how to set the Display Name for a given servlet or 
point me to the relevant documentation?

This is the valuethat comes up in the Manager application when it 
lists your servlets.
Rhino---rhino1 AT sympatico DOT ca"If you want the best 
seat in the house, you'll have to move the cat."


RE: Question using JProfiler with Tomcat

2003-12-02 Thread Shapira, Yoav

Howdy,
Never use a profiler for absolute values such as how much memory an
object takes or how much time it takes to do a certain operation.  The
time and memory are severely (often orders of magnitude) skewed by the
profiler.  Instead, use relative values as appropriate (e.g. 30% of the
time is spent in this method, rather than 30ms to do the method, or this
last change provided a 10% improvement in memory usage rather than a
10MB reduction).

What are Mo of memory?  MB and a typo I guess?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Laurent Michenaud [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:32 PM
To: [EMAIL PROTECTED]
Subject: Question using JProfiler with Tomcat

Hi,

I'm using Jprofiler to monitor my web application running on Tomcat.
My Webapp uses XML/XSLTC to generate the html page.

Looking at the JVM, I was horrified to see that some pages are using
more than 30 Mo of memory.

So, I've added another webapp that shows the JVM ( graphic in a applet
).

This applet shows differents values from Jprofiler about memory
consumption.
The used memory is not so much.

I think it is due to the fact that Jprofiler creates a lot of objects
to
inspect the JVM.

So my conclusion is :
Don't use Jprofiler to see our much memory your web application use !
Or
divide the obtained
values by 3 or 4.

What's your opinion about that ?

Thanks




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]



Can Tomcat really run cgi scripts?

2003-12-02 Thread Januski, Ken
I've been trying for last day to get Tomcat 4.1.12 to run a perl cgi script.
I've done most of it based on this article:
http://www.fawcette.com/javapro/2003_03/online/perl_teden_03_18_03/default_p
f.aspx. But now I'm stuck with this error:
java.io.IOException: CreateProcess: perl
C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.cgi
In researching this on google I've found that a number of people have run
into siimilar problems. Some of them solved it by adding Apache to the mix.
I don't want to add Apache if I don't have to. So what I'm wondering is if
anyone has had much success running perl scripts from cgi directory without
using Apache? And also does anyone know how to get around the above error?
Thanks,
Ken
P.S. The only reason I'm having to run perl is that I need to add iptc info
to jpeg files and I've only found perl methods for doing so. If anyone can
point me to a Java method of doing so I could avoid this problem for the
time being.





RE: OutOfMemory Exception initializing page context

2003-12-02 Thread Rob Wichterman
I consulted with the developers and they said we don't use or do
anything that you suggested except we do use tomcat's connection pooling
for oracle.  We are running Sun j2sdk1.4.2_02 with the Concurrent Mark
Sweep GC with -Xmx512m. I currently use the verbose logging for GC
times.  The odd thing is that it does not seem to progressively go up
but rather spike up with high GC times and the full GC will not clean
anything out. 

Thanks,

Rob


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: www.nuventive.com 


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 02, 2003 11:00 AM
To: Tomcat Users List
Subject: Re: OutOfMemory Exception initializing page context

Rob,

 Well I have had my -Xmx set to as high as 1gb and I still receive
these
 errors.  The site will stay running for at best 1 day without
crashing.
 I was just hoping one of these could point me in a direction while I
 work on looking at memory leaks.

Sorry for the levity. Try this:

Turn on verbose GCs, and make sure you're sending stdout to a log file 
(Tomcat does this by default, I think). Empty the stdout log file, 
restart Tomcat and then let it run out of memory.

Take a look at the GC output (they are prettty obvious) and see what's 
happening to memory. I've done this in the past, and I even wrote a 
(long lost) Perl script to parse the log file and generate X-Y 
coordinates that I could plot using Excel. We could plainly see that 
there was a memory leak of some kind because the graph kept going up and
up.

It does take a long time to find memory leaks but there are a couple of 
things you can check.

First of all, what JSK are you using?

Check some of the following:
- Are you starting any of your own threads? If so, are they dying when 
the context reloads?
- Are you reloading the context a lot?
- Do any of your container objects like hashtables or whatever keep 
references to things like the ServletContext, etc.?
- Do you regularly remove old objects from users' sessions?
- Are you doing any XSLT?
- Are you using a database connection pool or are you creating new 
connections for each user?
- Do you keep any persistent connections like sockets or anything open?

-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: OutOfMemory Exception initializing page context

2003-12-02 Thread David Rees
Christopher Schultz wrote:
What's with all the OOM questions this week? I've noticed that topics 
tend to come in waves.

I wonder if there are only like 5 people out there that post to the 
newsgroup, but they have all kinds of alias and alternate personalities 
so that the average response is what they use to solve their problems :)

Just an amusing thought to make me smile. :) There. I did it.
I was wondering the same thing.  Seems like OOM is the question of the 
week.  ;-)

-Dave

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


RE: Setting Display Name

2003-12-02 Thread Shapira, Yoav

Howdy,
Simply add display-nameBlahBlah/display-name to the servlet element.  The doc for 
this and all other deployment descriptor questions of this kind is the Servlet 
Specification itself, SRV 13.

Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:35 PM
To: tomcat-user
Subject: Setting Display Name

Can anyone tell me where/how to set the Display Name for a given servlet or point me 
to the relevant documentation?
 
This is the value that comes up in the Manager application when it lists your servlets.

Rhino
---
rhino1 AT sympatico DOT ca
If you want the best seat in the house, you'll have to move the cat.



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: OutOfMemory Exception initializing page context

2003-12-02 Thread Shapira, Yoav

Howdy,
How was 512MB determined to be the correct heap size for the
application?  Could it be that 512MB is too little for your application
when faced with a high load?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rob Wichterman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:40 PM
To: 'Tomcat Users List'
Subject: RE: OutOfMemory Exception initializing page context

I consulted with the developers and they said we don't use or do
anything that you suggested except we do use tomcat's connection
pooling
for oracle.  We are running Sun j2sdk1.4.2_02 with the Concurrent Mark
Sweep GC with -Xmx512m. I currently use the verbose logging for GC
times.  The odd thing is that it does not seem to progressively go up
but rather spike up with high GC times and the full GC will not clean
anything out.

Thanks,

Rob


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: www.nuventive.com


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 11:00 AM
To: Tomcat Users List
Subject: Re: OutOfMemory Exception initializing page context

Rob,

 Well I have had my -Xmx set to as high as 1gb and I still receive
these
 errors.  The site will stay running for at best 1 day without
crashing.
 I was just hoping one of these could point me in a direction while I
 work on looking at memory leaks.

Sorry for the levity. Try this:

Turn on verbose GCs, and make sure you're sending stdout to a log file
(Tomcat does this by default, I think). Empty the stdout log file,
restart Tomcat and then let it run out of memory.

Take a look at the GC output (they are prettty obvious) and see what's
happening to memory. I've done this in the past, and I even wrote a
(long lost) Perl script to parse the log file and generate X-Y
coordinates that I could plot using Excel. We could plainly see that
there was a memory leak of some kind because the graph kept going up
and
up.

It does take a long time to find memory leaks but there are a couple of
things you can check.

First of all, what JSK are you using?

Check some of the following:
- Are you starting any of your own threads? If so, are they dying when
the context reloads?
- Are you reloading the context a lot?
- Do any of your container objects like hashtables or whatever keep
references to things like the ServletContext, etc.?
- Do you regularly remove old objects from users' sessions?
- Are you doing any XSLT?
- Are you using a database connection pool or are you creating new
connections for each user?
- Do you keep any persistent connections like sockets or anything open?

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




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: Can Tomcat really run cgi scripts?

2003-12-02 Thread Christopher Schultz
Ken,

 But now I'm stuck with this error:
java.io.IOException: CreateProcess: perl
C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.cgi
This is likely to be due to the lack of PATH information available to 
the script itself. Try using #!/usr/bin/perl in your script instead of 
#!perl

I've heard some complains about sub-process permissions, but my initial 
reaction is that they are errant complaints.

-chris

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


Re: Please Help: Inconsistent Load Balancing info mod_jk2

2003-12-02 Thread David O'Brien
Higher the number ... More Hits

I have one worker at lb_factor=4 and one at lb_factor=8 and the 
distribution if I have
150 sessions active the server with lb_factor=4 has 49 and the server with 
lb_factor=8 has 101

This can be seen at @ http://www.nacrraware.net/cluster/

-Dave



At 10:32 AM 12/2/2003, Asif Chowdhary wrote:
The apache documentation say that higher the number
the greater the number of requests which tomcat will receive.
The tomcat definitive Guide from orielly says that the
lower the number the greater the number of requests
a tomcat instance will receive.
What is correct?

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]


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource  Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax


Re: OutOfMemory Exception initializing page context

2003-12-02 Thread Christopher Schultz
Rob,

I consulted with the developers and they said we don't use or do
anything that you suggested except we do use tomcat's connection pooling
for oracle.
Okay, that's good. Sometimes, people don't use connection pooling or do 
it improperly, and leave Connection objects lying around. SQL Connection 
objects do not clean themselves up nicely, if they even clean themselves 
up...

We are running Sun j2sdk1.4.2_02 with the Concurrent Mark
Sweep GC with -Xmx512m. I currently use the verbose logging for GC
times.  The odd thing is that it does not seem to progressively go up
but rather spike up with high GC times and the full GC will not clean
anything out.
Hmm... that's a little odd. You say you get huge, sudden spikes from 
which the GC cannot recover? That sounds like bad news. Do you have any 
data on which pieces of code (servlets, JSPs, actions) are being 
executed when this happens? Consider adding a request logger filter to 
see what might be causing the spike...

-chris

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


RE: Please Help: Inconsistent Load Balancing info mod_jk2

2003-12-02 Thread Asif Chowdhary
Thank you

-Original Message-
From: David O'Brien [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:48 PM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: Please Help: Inconsistent Load Balancing info mod_jk2


Higher the number ... More Hits

I have one worker at lb_factor=4 and one at lb_factor=8 and the 
distribution if I have
150 sessions active the server with lb_factor=4 has 49 and the server with 
lb_factor=8 has 101

This can be seen at @ http://www.nacrraware.net/cluster/

-Dave




At 10:32 AM 12/2/2003, Asif Chowdhary wrote:
The apache documentation say that higher the number
the greater the number of requests which tomcat will receive.

The tomcat definitive Guide from orielly says that the
lower the number the greater the number of requests
a tomcat instance will receive.

What is correct?

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]


David G. O'Brien
Web Services Coordinator / Systems Administrator

NACCRRA
The Nation's Network of Child Care Resource  Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax

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



RE: Can Tomcat really run cgi scripts?

2003-12-02 Thread Januski, Ken
Thanks Chris,

I've tried !#c:\perl\bin\perl.exe, #!c:\perl\bin, #!perl, and
#!/usr/bin/perl and get same error on each. I've also added perl to the
path environmental PATH variable. I do think that you're right about missing
PATH information so I'll keep experimenting. I just can't figure out what
additional paths to try.

Ken

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:53 PM
To: Tomcat Users List
Subject: Re: Can Tomcat really run cgi scripts?


Ken,

  But now I'm stuck with this error:
 java.io.IOException: CreateProcess: perl
 C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.cgi

This is likely to be due to the lack of PATH information available to 
the script itself. Try using #!/usr/bin/perl in your script instead of 
#!perl

I've heard some complains about sub-process permissions, but my initial 
reaction is that they are errant complaints.

-chris


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


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

2003-12-02 Thread David Rees
Shapira, Yoav wrote:
Besides what Senor Schultz said (which is 100% true),
1. Where is this mentioned in the release notes, and what would one have
to search for?
Under KNOWN ISSUES IN THIS RELEASE it does mention issues during web 
application reloading where shared libraries keep references to objects 
instantiated by the web application.  That says memory leak to me 
although it doesn't specifically say that.

2. You mentioned in your passage the bug was marked as invalid or
wontfix, and the bug you gave below is marked as new.  So if anyone
actually wasted time (like me) looking up what you said, they didn't
find it.
All I did was search for memory leak under Tomcat 4 and all status.  I 
was not positive that it was marked WONTFIX, I should have clarified 
that in my original message.  I had thought that the issue was something 
inherent to the design of Tomcat 4 (which was overhauled in Tomcat 5), 
but I'm sure that they are willing to accept patches if anyone can fix 
it.  ;-)

-Dave

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


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

2003-12-02 Thread Shapira, Yoav

Howdy,

Under KNOWN ISSUES IN THIS RELEASE it does mention issues during web
application reloading where shared libraries keep references to objects
instantiated by the web application.  That says memory leak to me
although it doesn't specifically say that.

I see what you mean.  I was searching for leak or memory and found
stuff unrelated to this issue.

All I did was search for memory leak under Tomcat 4 and all status.
I
was not positive that it was marked WONTFIX, I should have clarified
that in my original message.  I had thought that the issue was
something

Yup, I was searching for INVALID or WONTFIX resolutions for tomcat 4.

inherent to the design of Tomcat 4 (which was overhauled in Tomcat 5),
but I'm sure that they are willing to accept patches if anyone can fix
it.  ;-)

It's a tough one because of the plethora of 3rd party libraries that use
such static variables or threads, leaving tomcat without much choice.

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: Tomcat 4.0.x memory leak (not javac)

2003-12-02 Thread David Rees
Shapira, Yoav wrote:
inherent to the design of Tomcat 4 (which was overhauled in Tomcat 5),
but I'm sure that they are willing to accept patches if anyone can fix
it.  ;-)
It's a tough one because of the plethora of 3rd party libraries that use
such static variables or threads, leaving tomcat without much choice.
If it was easy to fix, I'm sure that someone would have fixed it by now. 
 I haven't had time to test it myself, but it would be interesting to 
see if the same issue does exist in Tomcat 5.

-Dave

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


RE: OutOfMemoryError

2003-12-02 Thread Trenton D. Adams
 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: December 2, 2003 6:55 AM
 To: Tomcat Users List
 Subject: RE: OutOfMemoryError
 
 
 Howdy,
 
 Dhruva B. Reddy wrote:
  We get OutOfMemoryError's on Tomcat 4.1.27, running on RH 7.3, Sun
 JDK
  1.4.1_02 (with 512MB allocated to it)  The box has 1GB of 
 RAM, 2GB of
  swap space, and four Xeon processors.
 
 Can you reproduce the errors in a test environment?
 
 Are you using the context reloading feature?  reloadable=true or
 using
 the tomcat manager app will cause this to happen eventually.
 
 Really?  Prove that please...

Actually, I can't prove it in his instance, but I have proved it time and time
again on ours.  I'm using 4.0.4 right now though so I haven't verified 4.1.x.
But, I heard that this is still the case in 4.1.x.

To reproduce this problem just reload a context over and over.  Depending on
how much memory it uses, it will start throwing OutOfMemory exceptions long
before the -mx JVM parameter value is ever reached.  eg.  I do a ps on linux
and it shows it as using like 140M or something like that and it already
starts throwing out of memory exceptions.

With our applications that we're running, we can usually get away with roughly
5-10 context reloads.

 
  calls Runtime.freeMemory() and .totalMemory(), it comes 
 nowhere near
  using that much (we track it every five minutes by hitting 
 a servlet
  that calls these methods).
 
 It could easily happen that:
 - You check memory, everything is fine
 - User makes a request for a large dataset, you load it, run out of
 memory.
 
 So your check is not conclusive.  The stack trace suggested that the
 error occurred while iterating through a ResultSet, so one thing you
 should log are all the SQL queries you run and what they return: you
 probably got a large one to cause the error.
 
 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]
 


__ 
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: Tomcat 4.0.x memory leak (not javac)

2003-12-02 Thread Trenton D. Adams
 -Original Message-
 From: David Rees [mailto:[EMAIL PROTECTED] 
 Sent: December 2, 2003 11:01 AM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.0.x memory leak (not javac)
 
 Shapira, Yoav wrote:
  Besides what Senor Schultz said (which is 100% true),
  1. Where is this mentioned in the release notes, and what 
 would one have
  to search for?
 
 Under KNOWN ISSUES IN THIS RELEASE it does mention issues during web 
 application reloading where shared libraries keep references 
 to objects 
 instantiated by the web application.  That says memory leak to me 
 although it doesn't specifically say that.
 
  2. You mentioned in your passage the bug was marked as invalid or
  wontfix, and the bug you gave below is marked as new.  So if anyone
  actually wasted time (like me) looking up what you said, they didn't
  find it.
 
 All I did was search for memory leak under Tomcat 4 and all 
 status.  I 
 was not positive that it was marked WONTFIX, I should have clarified 
 that in my original message.  I had thought that the issue 
 was something 
 inherent to the design of Tomcat 4 (which was overhauled in 
 Tomcat 5), 
 but I'm sure that they are willing to accept patches if 
 anyone can fix 
 it.  ;-)

Bugzilla is obviously not working sometimes.  I searched for memory leak one
time and got it.  Then I went to search for it for someone else so I could
give them the bug number but nothing came up.  I did the exact same search,
memory leak.  Very interesting indeed.  Heck, I even searched for just
memory or leak once each and came up with nothing.
 
 
 -Dave
 
 -
 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: Tomcat 4.0.x memory leak (not javac)

2003-12-02 Thread Shapira, Yoav

Howdy,
Since you can reproduce your error easily, can you narrow down which 3rd
party library is keeping the references that cause the memory leak?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Trenton D. Adams [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 1:43 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.0.x memory leak (not javac)

 -Original Message-
 From: David Rees [mailto:[EMAIL PROTECTED]
 Sent: December 2, 2003 11:01 AM
 To: Tomcat Users List
 Subject: Re: Tomcat 4.0.x memory leak (not javac)

 Shapira, Yoav wrote:
  Besides what Senor Schultz said (which is 100% true),
  1. Where is this mentioned in the release notes, and what
 would one have
  to search for?

 Under KNOWN ISSUES IN THIS RELEASE it does mention issues during web
 application reloading where shared libraries keep references
 to objects
 instantiated by the web application.  That says memory leak to me
 although it doesn't specifically say that.

  2. You mentioned in your passage the bug was marked as invalid or
  wontfix, and the bug you gave below is marked as new.  So if anyone
  actually wasted time (like me) looking up what you said, they
didn't
  find it.

 All I did was search for memory leak under Tomcat 4 and all
 status.  I
 was not positive that it was marked WONTFIX, I should have clarified
 that in my original message.  I had thought that the issue
 was something
 inherent to the design of Tomcat 4 (which was overhauled in
 Tomcat 5),
 but I'm sure that they are willing to accept patches if
 anyone can fix
 it.  ;-)

Bugzilla is obviously not working sometimes.  I searched for memory
leak
one
time and got it.  Then I went to search for it for someone else so I
could
give them the bug number but nothing came up.  I did the exact same
search,
memory leak.  Very interesting indeed.  Heck, I even searched for
just
memory or leak once each and came up with nothing.


 -Dave

 -
 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: Severe notification ...

2003-12-02 Thread Travis Reeder
This is in regards to this error message which kills tomcat:

SEVERE: All threads are busy, waiting. Please increase maxThreads or 
check the servlet status75 75

Erik: How do you know this is fixed in 4.1.29? 

Also, would increasing maxProcesses help in the connector?

Travis

On Tuesday, November 4, 2003, at 02:45 PM, Erik Wright wrote:

Hi,

I have had this problem exactly, and have been told that it is a bug in 
4.1.24 to 4.1.27 that has been fixed in 4.1.29. Essentially, when 
working at or near the maximum connections (as defined in the Connector 
config in server.xml) some threads get permanently deadlocked or 
something. I didn't investigate much more than that.

I created my own workaround which is really a hack not worth sharing 
here. Perhaps when I have time I will upgrade to 4.1.29 and see if that 
fixes the problem.

If you do upgrade, please post your results to the list!

Erik

Mufaddal Khumri wrote:

   I have my webapp up and running and am stress testing it. After a
   while I get this:
   Nov 4, 2003 1:50:12 PM org.apache.tomcat.util.threads.ThreadPool
   logFull
   SEVERE: All threads are busy, waiting. Please increase maxThreads or
   check the servlet status75 75
   I have no idea why all threads would be busy and waiting.

   I could raise the value of maxThreads, but that would just delay the
   error from being reported. I need to get a dump of my tomcat threads
   and see where the bottleneck is. How do I do this ? Is there a
   facility in tomcat that would allow me to dump its threads and allow
   me to see where the threads are waiting and not moving on ? Is there
   a good utility i can use ?
   Thanks. 



RE: OutOfMemory Exception initializing page context

2003-12-02 Thread Rob Wichterman
We have tried setting the heap as high as 1024 with the same results.
It actually seemed to make the tomcat die sooner with the higher
setting.  We currently have an average of 250 logins a day.

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: www.nuventive.com 


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 02, 2003 12:43 PM
To: Tomcat Users List
Subject: RE: OutOfMemory Exception initializing page context


Howdy,
How was 512MB determined to be the correct heap size for the
application?  Could it be that 512MB is too little for your application
when faced with a high load?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rob Wichterman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:40 PM
To: 'Tomcat Users List'
Subject: RE: OutOfMemory Exception initializing page context

I consulted with the developers and they said we don't use or do
anything that you suggested except we do use tomcat's connection
pooling
for oracle.  We are running Sun j2sdk1.4.2_02 with the Concurrent Mark
Sweep GC with -Xmx512m. I currently use the verbose logging for GC
times.  The odd thing is that it does not seem to progressively go up
but rather spike up with high GC times and the full GC will not clean
anything out.

Thanks,

Rob


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: www.nuventive.com


-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 11:00 AM
To: Tomcat Users List
Subject: Re: OutOfMemory Exception initializing page context

Rob,

 Well I have had my -Xmx set to as high as 1gb and I still receive
these
 errors.  The site will stay running for at best 1 day without
crashing.
 I was just hoping one of these could point me in a direction while I
 work on looking at memory leaks.

Sorry for the levity. Try this:

Turn on verbose GCs, and make sure you're sending stdout to a log file
(Tomcat does this by default, I think). Empty the stdout log file,
restart Tomcat and then let it run out of memory.

Take a look at the GC output (they are prettty obvious) and see what's
happening to memory. I've done this in the past, and I even wrote a
(long lost) Perl script to parse the log file and generate X-Y
coordinates that I could plot using Excel. We could plainly see that
there was a memory leak of some kind because the graph kept going up
and
up.

It does take a long time to find memory leaks but there are a couple of
things you can check.

First of all, what JSK are you using?

Check some of the following:
- Are you starting any of your own threads? If so, are they dying when
the context reloads?
- Are you reloading the context a lot?
- Do any of your container objects like hashtables or whatever keep
references to things like the ServletContext, etc.?
- Do you regularly remove old objects from users' sessions?
- Are you doing any XSLT?
- Are you using a database connection pool or are you creating new
connections for each user?
- Do you keep any persistent connections like sockets or anything open?

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




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: Tomcat 4.0.x memory leak (not javac)

2003-12-02 Thread Trenton D. Adams
Ouch, LOL.  I don't really know a whole lot about the tomcat under the hood!
:)

I can try though.  Do you have a procedure that I should take to find this?
Is there a debugging option that I can turn on for tomcat?

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: December 2, 2003 11:45 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.0.x memory leak (not javac)
 
 
 Howdy,
 Since you can reproduce your error easily, can you narrow 
 down which 3rd
 party library is keeping the references that cause the memory leak?
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Trenton D. Adams [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 1:43 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.0.x memory leak (not javac)
 
  -Original Message-
  From: David Rees [mailto:[EMAIL PROTECTED]
  Sent: December 2, 2003 11:01 AM
  To: Tomcat Users List
  Subject: Re: Tomcat 4.0.x memory leak (not javac)
 
  Shapira, Yoav wrote:
   Besides what Senor Schultz said (which is 100% true),
   1. Where is this mentioned in the release notes, and what
  would one have
   to search for?
 
  Under KNOWN ISSUES IN THIS RELEASE it does mention issues 
 during web
  application reloading where shared libraries keep references
  to objects
  instantiated by the web application.  That says memory leak to me
  although it doesn't specifically say that.
 
   2. You mentioned in your passage the bug was marked as invalid or
   wontfix, and the bug you gave below is marked as new.  
 So if anyone
   actually wasted time (like me) looking up what you said, they
 didn't
   find it.
 
  All I did was search for memory leak under Tomcat 4 and all
  status.  I
  was not positive that it was marked WONTFIX, I should have 
 clarified
  that in my original message.  I had thought that the issue
  was something
  inherent to the design of Tomcat 4 (which was overhauled in
  Tomcat 5),
  but I'm sure that they are willing to accept patches if
  anyone can fix
  it.  ;-)
 
 Bugzilla is obviously not working sometimes.  I searched for memory
 leak
 one
 time and got it.  Then I went to search for it for someone else so I
 could
 give them the bug number but nothing came up.  I did the exact same
 search,
 memory leak.  Very interesting indeed.  Heck, I even searched for
 just
 memory or leak once each and came up with nothing.
 
 
  -Dave
 
  
 -
  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]
 


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



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

2003-12-02 Thread Filip Hanik
download a trial of JProbe :)

Filip
- Original Message -
From: Trenton D. Adams [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 11:08 AM
Subject: RE: Tomcat 4.0.x memory leak (not javac)


Ouch, LOL.  I don't really know a whole lot about the tomcat under the
hood!
:)

I can try though.  Do you have a procedure that I should take to find this?
Is there a debugging option that I can turn on for tomcat?

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: December 2, 2003 11:45 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.0.x memory leak (not javac)


 Howdy,
 Since you can reproduce your error easily, can you narrow
 down which 3rd
 party library is keeping the references that cause the memory leak?

 Yoav Shapira
 Millennium ChemInformatics


 -Original Message-
 From: Trenton D. Adams [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 1:43 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.0.x memory leak (not javac)
 
  -Original Message-
  From: David Rees [mailto:[EMAIL PROTECTED]
  Sent: December 2, 2003 11:01 AM
  To: Tomcat Users List
  Subject: Re: Tomcat 4.0.x memory leak (not javac)
 
  Shapira, Yoav wrote:
   Besides what Senor Schultz said (which is 100% true),
   1. Where is this mentioned in the release notes, and what
  would one have
   to search for?
 
  Under KNOWN ISSUES IN THIS RELEASE it does mention issues
 during web
  application reloading where shared libraries keep references
  to objects
  instantiated by the web application.  That says memory leak to me
  although it doesn't specifically say that.
 
   2. You mentioned in your passage the bug was marked as invalid or
   wontfix, and the bug you gave below is marked as new.
 So if anyone
   actually wasted time (like me) looking up what you said, they
 didn't
   find it.
 
  All I did was search for memory leak under Tomcat 4 and all
  status.  I
  was not positive that it was marked WONTFIX, I should have
 clarified
  that in my original message.  I had thought that the issue
  was something
  inherent to the design of Tomcat 4 (which was overhauled in
  Tomcat 5),
  but I'm sure that they are willing to accept patches if
  anyone can fix
  it.  ;-)
 
 Bugzilla is obviously not working sometimes.  I searched for memory
 leak
 one
 time and got it.  Then I went to search for it for someone else so I
 could
 give them the bug number but nothing came up.  I did the exact same
 search,
 memory leak.  Very interesting indeed.  Heck, I even searched for
 just
 memory or leak once each and came up with nothing.
 
 
  -Dave
 
 
 -
  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]



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



deployment quirk in Tomcat5. Bug?

2003-12-02 Thread Jacob Kjome
When deploying war files in Tomcat-5.0.16, I noticed something a little odd.  
After using the ant manager deploy task and then doing an undeploy, manually 
dropping the war file into CATALINA_HOME/webapps trigger auto-deployment.

For example, say I have myapp.war.  I just drop this into Tomcat5's webapps 
directory and it deploys the app as expected.  I can do an undeploy via the 
html manager interface and it undeploys as expected.  I can repeat this ad-
infinitum and everything works fine.

Now, I deploy myapp.war via the ant manager deploy task and it deploys as 
expected.  Then I undeploy it with the html manager interface.  Now I try 
dropping the war file manually into webapps as explained above.  This time, the 
war does not deploy.  If I restart Tomcat5, manual deployment works fine 
again...until after the first time I use the ant manager deploy task, of course.

I can't imagine this is expected behavior.  Well, at least I didn't expect 
it.  Can anyone else confirm what exactly expected behavior is before I 
report a bug on this?

Jake

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



deploy unpack/context.xml

2003-12-02 Thread Frank Calfo
Does this combination of deployment options work ?

  Copy a war file for Tomcat to unpack to the webapps dir that also 
contains an xml config file ?

If I leave out the xml config file, Tomcat will unpack the war file as I 
want it to but when I add the xml config file, Tomcat
complains that the web.xml file was not found and does not unpack the war

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


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

2003-12-02 Thread Shapira, Yoav

Howdy,
You don't have to know much about the tomcat under the hood to
diagnose this.  It's not a problem with the tomcat classes.  What you
need to know is:
- What 3rd party libraries does your application use
- What classes stay in memory after a reload and have a 2nd instance of
them created.

You can use a profiler like Senor Hanik suggested (JProbe, OptimizeIt,
etc.) to find out the latter.  You want to look for a list of objects
whose instance count increases after a reload of your webapp.
OptimizeIt can do heap snapshot deltas which are the perfect tool here.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Trenton D. Adams [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 2:08 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 4.0.x memory leak (not javac)

Ouch, LOL.  I don't really know a whole lot about the tomcat under the
hood!
:)

I can try though.  Do you have a procedure that I should take to find
this?
Is there a debugging option that I can turn on for tomcat?

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: December 2, 2003 11:45 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.0.x memory leak (not javac)


 Howdy,
 Since you can reproduce your error easily, can you narrow
 down which 3rd
 party library is keeping the references that cause the memory leak?

 Yoav Shapira
 Millennium ChemInformatics


 -Original Message-
 From: Trenton D. Adams [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 1:43 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.0.x memory leak (not javac)
 
  -Original Message-
  From: David Rees [mailto:[EMAIL PROTECTED]
  Sent: December 2, 2003 11:01 AM
  To: Tomcat Users List
  Subject: Re: Tomcat 4.0.x memory leak (not javac)
 
  Shapira, Yoav wrote:
   Besides what Senor Schultz said (which is 100% true),
   1. Where is this mentioned in the release notes, and what
  would one have
   to search for?
 
  Under KNOWN ISSUES IN THIS RELEASE it does mention issues
 during web
  application reloading where shared libraries keep references
  to objects
  instantiated by the web application.  That says memory leak to
me
  although it doesn't specifically say that.
 
   2. You mentioned in your passage the bug was marked as invalid
or
   wontfix, and the bug you gave below is marked as new.
 So if anyone
   actually wasted time (like me) looking up what you said, they
 didn't
   find it.
 
  All I did was search for memory leak under Tomcat 4 and all
  status.  I
  was not positive that it was marked WONTFIX, I should have
 clarified
  that in my original message.  I had thought that the issue
  was something
  inherent to the design of Tomcat 4 (which was overhauled in
  Tomcat 5),
  but I'm sure that they are willing to accept patches if
  anyone can fix
  it.  ;-)
 
 Bugzilla is obviously not working sometimes.  I searched for memory
 leak
 one
 time and got it.  Then I went to search for it for someone else so I
 could
 give them the bug number but nothing came up.  I did the exact same
 search,
 memory leak.  Very interesting indeed.  Heck, I even searched for
 just
 memory or leak once each and came up with nothing.
 
 
  -Dave
 
 
 -
  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]



-
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 

Re: deployment quirk in Tomcat5. Bug?

2003-12-02 Thread Jacob Kjome

Whoops...

 manually dropping the war file into CATALINA_HOME/webapps trigger auto-
deployment.

Should say...

 manually dropping the war file into CATALINA_HOME/webapps *won't* trigger 
auto-deployment.

I believe it *should* continue to trigger auto-deployment where it doesn't 
currently.

Jake

Quoting Jacob Kjome [EMAIL PROTECTED]:

 When deploying war files in Tomcat-5.0.16, I noticed something a little odd.
 After using the ant manager deploy task and then doing an undeploy, manually
 dropping the war file into CATALINA_HOME/webapps trigger auto-deployment.
 
 For example, say I have myapp.war.  I just drop this into Tomcat5's webapps
 directory and it deploys the app as expected.  I can do an undeploy via the
 html manager interface and it undeploys as expected.  I can repeat this ad-
 infinitum and everything works fine.
 
 Now, I deploy myapp.war via the ant manager deploy task and it deploys as
 expected.  Then I undeploy it with the html manager interface.  Now I try
 dropping the war file manually into webapps as explained above.  This time,
 the
 war does not deploy.  If I restart Tomcat5, manual deployment works fine
 again...until after the first time I use the ant manager deploy task, of
 course.
 
 I can't imagine this is expected behavior.  Well, at least I didn't expect
 it.  Can anyone else confirm what exactly expected behavior is before I
 report a bug on this?
 
 Jake
 
 -
 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]



Catalina.out is empty after JDK upgrade!!!

2003-12-02 Thread Nadia Kunkov
Hi, I have upgraded my Linux box to j2sdk1.4.1_04 from jdk1.3.1_04.  I have fixed the 
Java_Home variable in /tomcat4/conf/tomcat4.conf file to use the new one.  Now, when I 
run my java applications usually catalina.out gets populated with errors and messages. 
 My catalina.out is completely empty!  What happened?  Its something with java upgrade 
but I don't know what it is. 
I'd appreciate any ideas. 
Thanks in advance.
N.K.



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



Re: Setting Display Name

2003-12-02 Thread Peter Choe
of the web.xml file in your servlet context.

Shapira, Yoav wrote:

Howdy,
Simply add display-nameBlahBlah/display-name to the servlet element.  The doc for 
this and all other deployment descriptor questions of this kind is the Servlet Specification 
itself, SRV 13.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 02, 2003 12:35 PM
To: tomcat-user
Subject: Setting Display Name

Can anyone tell me where/how to set the Display Name for a given servlet or point me to the relevant documentation?

This is the value that comes up in the Manager application when it lists your servlets.

Rhino
---
rhino1 AT sympatico DOT ca
If you want the best seat in the house, you'll have to move the cat.


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: Tomcat FAQs on Wiki

2003-12-02 Thread Cliff Willsher
Mark,

Thank you for this. With a just a little jiggery-pokery I was able to get 
Tomcat5 and IIS5 working together in minutes after many frustrating hours.

Thanks again.
Cliff
At 13:37 01/12/2003 -0800, you wrote:
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]


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


Re: Setting Display Name

2003-12-02 Thread Rhino
Hi,

Are we talking about the same thing? I mean the Display Names on the
http://localhost:8080/manager/html/list page, specifically the Display
Name column in the Applications table on that page.

All I was asking what how to set the display name for a given path in that
table. Is setting a value in the serlvet tag for an individual servlet in
my web.xml going to work when I've got several servlets in that web.xml? Or
is your suggestion assuming that I have only a single servlet in each path?

It's quite possible that I am doing something non-standard but I often have
many (related) servlets within each of the paths in that table. Naturally,
my web.xml then has several servlet elements in it. Is that a bad way of
doing things? Is it better for me to be putting each servlet in its own
path? That sounds like something that would have implications for my code,
particularly in how the different servlets share information, but if it's
the right way of doing things, I'd probably be better to bite the bullet
and make the necessary changes now

Also, can you give me a URL for SRV 13? I've never heard of that before.
Is it on the Apache website somewhere? In the Tomcat docs? Or is this at a
website for whatever standards body governs the server specs?

Rhino

- Original Message - 
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:42 PM
Subject: RE: Setting Display Name



Howdy,
Simply add display-nameBlahBlah/display-name to the servlet element.
The doc for this and all other deployment descriptor questions of this kind
is the Servlet Specification itself, SRV 13.

Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:35 PM
To: tomcat-user
Subject: Setting Display Name

Can anyone tell me where/how to set the Display Name for a given servlet or
point me to the relevant documentation?

This is the value that comes up in the Manager application when it lists
your servlets.

Rhino
---
rhino1 AT sympatico DOT ca
If you want the best seat in the house, you'll have to move the cat.



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: Can Tomcat really run cgi scripts?

2003-12-02 Thread Januski, Ken
Beat my head against wall for another couple hours and still end up with
this error. Anyone have any other ideas?

java.io.IOException: CreateProcess: perl
C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.pl lname=januski fname=ken
error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:550)
at java.lang.Runtime.exec(Runtime.java:416)
at
org.apache.catalina.servlets.CGIServlet$CGIRunner.run(CGIServlet.java:1583)
at
org.apache.catalina.servlets.CGIServlet.doGet(CGIServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:471)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:536)


-Original Message-
From: Januski, Ken [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 1:01 PM
To: Tomcat Users List
Subject: RE: Can Tomcat really run cgi scripts?


Thanks Chris,

I've tried !#c:\perl\bin\perl.exe, #!c:\perl\bin, #!perl, and
#!/usr/bin/perl and get same error on each. I've also added perl to the
path environmental PATH variable. I do think that you're right about missing
PATH information so I'll keep experimenting. I just can't figure out what
additional paths to try.

Ken

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:53 PM
To: Tomcat Users List
Subject: Re: Can Tomcat really run cgi scripts?


Ken,

  But now I'm stuck with this error:
 java.io.IOException: CreateProcess: perl
 C:\Tomcat4112\webapps\examples\WEB-INF\cgi\exp.cgi

This is likely to be due to the lack of PATH information available to 
the script itself. Try using #!/usr/bin/perl in your script instead of 
#!perl

I've heard some complains about sub-process permissions, but my initial 
reaction is that they are errant complaints.

-chris



Re: Setting Display Name

2003-12-02 Thread Ben Souther
 The display name is for the servlet contex, not for individual servlets.

You can download the Servlet Specs as a PDF here:
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html




On Tuesday 02 December 2003 03:16 pm, Rhino wrote:
 Hi,

 Are we talking about the same thing? I mean the Display Names on the
 http://localhost:8080/manager/html/list page, specifically the Display
 Name column in the Applications table on that page.

 All I was asking what how to set the display name for a given path in that
 table. Is setting a value in the serlvet tag for an individual servlet in
 my web.xml going to work when I've got several servlets in that web.xml? Or
 is your suggestion assuming that I have only a single servlet in each path?

 It's quite possible that I am doing something non-standard but I often have
 many (related) servlets within each of the paths in that table. Naturally,
 my web.xml then has several servlet elements in it. Is that a bad way of
 doing things? Is it better for me to be putting each servlet in its own
 path? That sounds like something that would have implications for my code,
 particularly in how the different servlets share information, but if it's
 the right way of doing things, I'd probably be better to bite the bullet
 and make the necessary changes now

 Also, can you give me a URL for SRV 13? I've never heard of that before.
 Is it on the Apache website somewhere? In the Tomcat docs? Or is this at a
 website for whatever standards body governs the server specs?

 Rhino

 - Original Message -
 From: Shapira, Yoav [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 12:42 PM
 Subject: RE: Setting Display Name



 Howdy,
 Simply add display-nameBlahBlah/display-name to the servlet element.
 The doc for this and all other deployment descriptor questions of this kind
 is the Servlet Specification itself, SRV 13.

 Yoav Shapira
 Millennium ChemInformatics

 -Original Message-
 From: Rhino [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 12:35 PM
 To: tomcat-user
 Subject: Setting Display Name

 Can anyone tell me where/how to set the Display Name for a given servlet or
 point me to the relevant documentation?

 This is the value that comes up in the Manager application when it lists
 your servlets.

 Rhino
 ---
 rhino1 AT sympatico DOT ca
 If you want the best seat in the house, you'll have to move the cat.



 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]

-- 
Ben Souther
F.W. Davison  Company, Inc.



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



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

2003-12-02 Thread Trenton D. Adams
Ok, thanks guys.  I'll see what I can do.  EXTREMELY busy right now, but I
might be able to try it over christmas holidays. :)  MAYBE!

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: December 2, 2003 12:08 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.0.x memory leak (not javac)
 
 
 Howdy,
 You don't have to know much about the tomcat under the hood to
 diagnose this.  It's not a problem with the tomcat classes.  What you
 need to know is:
 - What 3rd party libraries does your application use
 - What classes stay in memory after a reload and have a 2nd 
 instance of
 them created.
 
 You can use a profiler like Senor Hanik suggested (JProbe, OptimizeIt,
 etc.) to find out the latter.  You want to look for a list of objects
 whose instance count increases after a reload of your webapp.
 OptimizeIt can do heap snapshot deltas which are the perfect 
 tool here.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Trenton D. Adams [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 02, 2003 2:08 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat 4.0.x memory leak (not javac)
 
 Ouch, LOL.  I don't really know a whole lot about the tomcat 
 under the
 hood!
 :)
 
 I can try though.  Do you have a procedure that I should take to find
 this?
 Is there a debugging option that I can turn on for tomcat?
 
  -Original Message-
  From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
  Sent: December 2, 2003 11:45 AM
  To: Tomcat Users List
  Subject: RE: Tomcat 4.0.x memory leak (not javac)
 
 
  Howdy,
  Since you can reproduce your error easily, can you narrow
  down which 3rd
  party library is keeping the references that cause the memory leak?
 
  Yoav Shapira
  Millennium ChemInformatics
 
 
  -Original Message-
  From: Trenton D. Adams [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, December 02, 2003 1:43 PM
  To: 'Tomcat Users List'
  Subject: RE: Tomcat 4.0.x memory leak (not javac)
  
   -Original Message-
   From: David Rees [mailto:[EMAIL PROTECTED]
   Sent: December 2, 2003 11:01 AM
   To: Tomcat Users List
   Subject: Re: Tomcat 4.0.x memory leak (not javac)
  
   Shapira, Yoav wrote:
Besides what Senor Schultz said (which is 100% true),
1. Where is this mentioned in the release notes, and what
   would one have
to search for?
  
   Under KNOWN ISSUES IN THIS RELEASE it does mention issues
  during web
   application reloading where shared libraries keep references
   to objects
   instantiated by the web application.  That says memory leak to
 me
   although it doesn't specifically say that.
  
2. You mentioned in your passage the bug was marked as invalid
 or
wontfix, and the bug you gave below is marked as new.
  So if anyone
actually wasted time (like me) looking up what you said, they
  didn't
find it.
  
   All I did was search for memory leak under Tomcat 4 and all
   status.  I
   was not positive that it was marked WONTFIX, I should have
  clarified
   that in my original message.  I had thought that the issue
   was something
   inherent to the design of Tomcat 4 (which was overhauled in
   Tomcat 5),
   but I'm sure that they are willing to accept patches if
   anyone can fix
   it.  ;-)
  
  Bugzilla is obviously not working sometimes.  I searched 
 for memory
  leak
  one
  time and got it.  Then I went to search for it for 
 someone else so I
  could
  give them the bug number but nothing came up.  I did the 
 exact same
  search,
  memory leak.  Very interesting indeed.  Heck, I even 
 searched for
  just
  memory or leak once each and came up with nothing.
  
  
   -Dave
  
  
  
 -
   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.
 
 
  
 

Re: OutOfMemoryError

2003-12-02 Thread Christopher Schultz
Trenton,

Are you using the context reloading feature?  reloadable=true or
using
the tomcat manager app will cause this to happen eventually.
Really?  Prove that please...


Actually, I can't prove it in his instance, but I have proved it time and time
again on ours.  I'm using 4.0.4 right now though so I haven't verified 4.1.x.
But, I heard that this is still the case in 4.1.x.
To reproduce this problem just reload a context over and over.  Depending on
how much memory it uses, it will start throwing OutOfMemory exceptions long
before the -mx JVM parameter value is ever reached.  eg.  I do a ps on linux
and it shows it as using like 140M or something like that and it already
starts throwing out of memory exceptions.
Aah. I think I see a part of the problem. First of all, the amount of 
memory shown by 'ps' is completely irrelevant, except that it shows how 
much memory that the OS has allocated to the Java process. This is 
allowed to be more than the max heap size set for Java.

The heap is not related to the amount of memory the OS allocates, except 
that the OS report will always be larger than the heap report from Java.

You can get an OOM even if you have the heap set to 1GB and yet the 
process only has 50MB used. This is because OOMs usually happen *while 
the GC is doing its work*. I'm not sure if there's another thread that 
increases the actual size of the heap for you, but if so, I'm sure it's 
related to the GC anyway.

So, moving on, what usually happens is that a low memory condition 
triggers a GC (usually a full GC). When the GC runs, it needs some 
memory to work with. If it cannot allocate memory for itself, it will 
die with an OOM. If the heap hasn't increased, yet, then the GC cannot 
allocate more objects on the heap to do it's thing. That can explain why 
you get an OOM when you are way under the heap size in the output of ps.

With our applications that we're running, we can usually get away with roughly
5-10 context reloads.
Do you have any 3rd party containers or such that live outside of the 
context (their JARs would be in CATALINA_HOME/server/lib or 
CATALINA_HOME/common/lib -- someone please confirm that the second of 
these two does *not* get discarded along with the rest of the context 
upon reload). If you are using 3rd party containers like this, they will 
not dump their contents when you re-load the servlet context. If you 
have static singleton instances of these, then you'll likely fill up 
memory all the time.

This could also be related to the Java doesn't GC java.lang.Class 
objects thread that's going around this week, too.

-chris

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


RE: Windows Serive Permissions?

2003-12-02 Thread Karl Coleman
It seems the problem with this lies with JRE1.4. When we loaded 1.3 and ran it, it 
worked. Anyone know of a workaround for the exec method hanging when using JRE 1.4 
(besides using 1.3).

Karl

-Original Message-
From: Karl Coleman 
Sent: Monday, December 01, 2003 11:02 AM
To: [EMAIL PROTECTED]
Subject: Windows Serive Permissions?


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

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



4.1.29 tar file Cannot find message resources under key org.apache.struts.action.MESSAGE

2003-12-02 Thread tommy
I am getting this error returned to my browser when accessing 
http://10.1.1.1:8080/admin

org.apache.jasper.JasperException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

This is from an out-of-the-box install i.e. I downloaded Tomcat version 4.1.29.tar.gz 
from http://jakarta.apache.org/site/binindex.cgi then unzipped and untarred the entire 
contents to my root directory.

I discovered that the reason for the error is that the servlet is unable to find 
org.apache.webapp.admin.ApplicationServlet.class

Turns out the tar file appears to contains a lot of very long pathnames which are 
truncated if they exceed 100 bytes e.g.

jakarta-tomcat-4.1.29/server/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationServle

I don't see a tar option that gets around this. Is this just my version of tar that's 
doing this? Or is it a problem with the tar file? Could someone verify it e.g. tar 
tvf jakarta-tomcat-4.1.29.tar






EL and XML escaping

2003-12-02 Thread Dave Ford
Is there way to specify if EL expression in the body of a jsp page should be
escaped? Consider the following:

%
request.setAttribute(message,It is a igreat/i day);
request.setAttribute(equation,10  4);
%

${message} !-- xml escaping should be off --
br/
${equation} !-- xml escaping should be on --

Thanks


Dave Ford
Smart Soft - The Developer Training Company
http://www.smart-soft.com


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



[OT] Role-based security, how to switch active role

2003-12-02 Thread Richard Mixon (qwest)
We are considering assigning multiple roles to some users/principals in our Struts 1.1 
application. The alternative is to have to
give some users multiple login ids, which does not seem attractive. J2EE, Struts and 
Tomcat all seem to support multiple roles.

BACKGROUND:

I took a look at creating the logic to figure out how the various roles act when 
combined - its complex, but doable.  But the view
of data the user might see in such a situation may be confusing.

My inclination is to build support for a concept of the active. User's with multiple 
roles could, at will, switch which role they
were playing. The current active role will of course be stored in the user's session.

Examples of our roles might be the following three:

  STDUSER - allows a user to maintain a set of data on the system that applies mostly 
to them. Their data will reference common
data that is maintained by the organization.
  ORGADMIN - maintains the common/shared data that is referred to by all.
  HELPER - allows an expert user to view data created by others with the STDUSER role, 
but not update the data. They help less
experience users.

The roles authorize actions at two levels.

1) Standard J2EE security can use the rols to decide which actions/pages a user can 
switch to/see.

2) Additional business logic decides what particular subset of data the user will see, 
depending on their role, on a given page.

The users will not need to switch roles often, and there will be a default role 
defined for each user.

MY QUESTIONS:

1) Is this a good approach or are there better alternatives?

2) How can I put a mini form in my header that supports switching roles, but still 
stay on the current screen so that subsequent
actions will take this new active role into account. My understanding is that only a 
single form can be submitted. Most of my pages
have a main form, and then would have this mini form for switching active roles.

Thanks - Richard
-
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: Application-specific Manager access?

2003-12-02 Thread Leonard Sitongia
On Monday 10 November 2003 6:26 pm, Tim Funk wrote:
 Few options ...
 1) Place each group in its own virtual host. Then register a manager app
 per virtual host.

Hi,

I'm looking at this again.  The manager is a servlet container application (as 
I gather it's called) and is in server/webapps/manager, rather than an 
application under webapps.

How can this be associated with a particular virtual host?

I've created two virtual hosts with their own appBases, and put different 
applications in them.  I copied the webapp/ROOT
contents into the appBase of each virtual host so that I'd have an opening 
page.  That part is working.  

When I hit the manager/html on a virtual host, the resource is not available.  

What is the connection between webapps/ROOT, webapps/manager.xml,
manager/html and server/webapps/manager?

Thanks for your help!

 2) Write a filter and add that to the manager web.xml to perform the extra
 acl needs
 3) Write a perl(or pick your fav lang) wrapper that does all the ACL work
 then it calls the manager app URLS for you.

 -Tim

 Leonard Sitongia wrote:
  Hi!
 
  I'm looking for ideas, conventions, or standard approaches to giving
  people control over Tomcat Manager operations that are specific to
  particular applications.  This could involve virtual hosts, realms, and
  such, but I want to avoid setting up multiple servers, JVMs and such.
 
  I would like to set up a Tomcat server running multiple applications that
  are being developed by particular groups.  I want to identify someone
  responsible for each application and give them the authority to perform
  Manager functions for their application, such as start/stop/reload.
 
  Tomcat has a rich set of ways of approaching this, but I haven't gotten a
  vision of how to do this.
 
  Should I provide my own web pages that require authentication and provide
  Manager URLs that are specific to the application?  Should I put the
  applications in individual virtual hosts and provide a Manager for each
  one, that has its own Manager authentication unique to that virtual host?
   Are there better ways of doing this?

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

-- 
==Leonard E. Sitongia   
  Visualization and Enabling Technologies / Scientific Computing Division
  National Center for Atmospheric Research
  P.O. Box 3000 Boulder CO 80307  USA
  [EMAIL PROTECTED]voice: (303)497-2454   fax: (303)497-1239


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



Re: deployment quirk in Tomcat5. Bug?

2003-12-02 Thread Remy Maucherat
Jacob Kjome wrote:
When deploying war files in Tomcat-5.0.16, I noticed something a little odd.  
After using the ant manager deploy task and then doing an undeploy, manually 
dropping the war file into CATALINA_HOME/webapps trigger auto-deployment.

For example, say I have myapp.war.  I just drop this into Tomcat5's webapps 
directory and it deploys the app as expected.  I can do an undeploy via the 
html manager interface and it undeploys as expected.  I can repeat this ad-
infinitum and everything works fine.

Now, I deploy myapp.war via the ant manager deploy task and it deploys as 
expected.  Then I undeploy it with the html manager interface.  Now I try 
dropping the war file manually into webapps as explained above.  This time, the 
war does not deploy.  If I restart Tomcat5, manual deployment works fine 
again...until after the first time I use the ant manager deploy task, of course.

I can't imagine this is expected behavior.  Well, at least I didn't expect 
it.  Can anyone else confirm what exactly expected behavior is before I 
report a bug on this?
Don't bother: there's no use case for this, other than giving me a headache.

I don't find auto deploy very useful anyway, given that Tomcat doesn't 
have a fancy deployer like JBoss. It works much better when used in its 
simple scenario (you want to deploy or update a WAR) rather than more 
complex stuff, when you should really use the manager.
For non development stuff, forget about the auto deployer, and use 
exclusively the manager.

BTW, for updating a WAR with the auto deployer, you don't need to 
undeploy first with the manager, and then copy the WAR over again: 
simply overwrite the WAR and the webapp will be undeployed and then 
redeployed.

--
x
Rémy Maucherat
Senior Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  1   2   >