Re: Change thread name of HTTP worker threads at Runtime

2009-05-15 Thread Rainer Frey (Inxmail GmbH)
On Wednesday 06 May 2009 12:42:09 Ronald Klop wrote:
 Op woensdag, 6 mei 2009 11:58 schreef Rainer Frey (Inxmail GmbH)  :

  Hi,
 
  I occassionally have to analyse thread dumps of tomcat servers which
  serve up to 25 instances of the same (quite complex) web service
  application. All custom threads have names that contain the instance id,
  but it is impossible to see which HTTP processor threads serve which
  application instance.
 
  Now we came up with the idea to rename the threads at the beginning of
  the request processing (to current-name + application-id), and rename
  them back totheir base name after the request is processed. As these
  threads are managed by Tomcat, I am wondering: is this a bad idea?
  Anything in Tomcat (or Java) that could cause a problem if we do that?

 At the company I work we are doing this for a couple of years already with
 Tomcat 4, 5 and now 6. Works very well. And makes threaddumps more easy to
 read.

 Ronald.

Thanks for confirming, I implemented this and it works fine. I wonder though:
is the assumption that one request is processed by one thread (and never 
passed to another during processing) true for all connectors, including NIO?

Regards
Rainer

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



Re: .html pages as .jsp pages

2009-05-15 Thread Pid
Dola Woolfe wrote:
 Exactly right.
 
 I produce my static content programmatically.
 Many pages are too complex to be generated otherwise.
 Also, I get to write java not html.
 When I want to change a font, I do it in one place not 1000 places.

[wince]

Are we to assume that you're not able to use Server Side Includes or
Cascading Style Sheets on this site?  The font tag and most of the other
presentational elements have been discouraged, if not deprecated, for
about a decade.

If you're using JSP to generate static pages instead of using the above
technologies then you're making your life unnecessarily difficult.


p



 --- On Thu, 5/14/09, Hassan Schroeder hassan.schroe...@gmail.com wrote:
 
 From: Hassan Schroeder hassan.schroe...@gmail.com
 Subject: Re: .html pages as .jsp pages
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, May 14, 2009, 5:04 PM
 On Thu, May 14, 2009 at 1:43 PM, Ken
 Bowen kbo...@als.com
 wrote:
 Yes, but why the need to use the .jsp extension?  A
 static site would run
 just fine with everything as .html under
 either Tomcat or httpd or 
 Missing the point -- we're talking about static
 *deployment* of a
 dynamically *generated* site.

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

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


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


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



Re: file type being blocked by IE

2009-05-15 Thread André Warnier

Brandon Steward wrote:

I found this work around.  You can add this to the webapp's xml config.

Valve className=org.apache.catalina.authenticator.FormAuthenticator
 disableProxyCaching=false /

On the face of it, that doesn't seem to have *anything* to do with the 
issue you mentioned.

But hey, if it works with IE, who am I to wonder..


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



TCP Window Size

2009-05-15 Thread Phinux Zhang
Hello

Does anybody know how to change TCP window size in tomcat configuration?
It's strange that we can get about 200 KB/s bandwidth when downloading from
FTP service, but it's just about 45 KB/s bandwidth from tomcat service
located on the same server. I doubt it's a problem a TCP window size, maybe
we can improve the speed by changing the windows size.

Thanks in advance for any advices. Please let me know if you need any more
information.

Regards

Phinux


Re: TCP Window Size

2009-05-15 Thread André Warnier

Phinux Zhang wrote:

Hello

Does anybody know how to change TCP window size in tomcat configuration?
It's strange that we can get about 200 KB/s bandwidth when downloading from
FTP service, but it's just about 45 KB/s bandwidth from tomcat service
located on the same server. I doubt it's a problem a TCP window size, maybe
we can improve the speed by changing the windows size.

Thanks in advance for any advices. Please let me know if you need any more
information.

If you want to get some relevant answers, I suggest that you provide 
much more information about what you are really doing, what you are 
comparing, and how you obtain your bandwidth figures above.


At the general level, I would tend to think that FTP is a program whose 
main function is to download/upload files, while Tomcat is a servlet 
engine; so it is no wonder if FTP would be somewhat more efficient if 
you compare purely on the base of one large file download.
FTP is probably full of tricks to manipulate the window size and packet 
size dynamically, in function of the link performance at any point in 
time.  Tomcat being a much more generic piece of software, I doubt it 
would include the same kind of logic.


I would also think that, TCP window size being a parameter down at the 
socket level, it would be surprising if Tomcat itself had a 
configuration parameter for this. Maybe you will find one at the jvm 
level, or maybe you can, in your application, drill down to the java 
Socket level and set it there.

This being said, I doubt very much that your problem would be at that level.

Another suggestion : set up a comparison between Apache HTTPD and 
Tomcat, both delivering a page with a http link to the file you want to 
download, compare those, and post your comparison here.  That would be a 
much more relevant comparison.
And if you don't get much of a difference that way, then you have your 
answer already.




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



Re: How to get thread dump on Tomcat 6 (windows)

2009-05-15 Thread madhu sudhan bandari
Thanks Christopher..i'll do that.

On Fri, May 15, 2009 at 12:29 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Madhu,

 On 5/14/2009 4:02 AM, madhu sudhan bandari wrote:
  I am running my applications on Tomcat 6.0 at windows 2000 server.
 
  I have tried to use ctrl+break to get thread dump on the command prompt
  where the process is running but didn't get the expected output.

 What output /did/ you get?

 Since you're using Tomcat 6.0 you should be running Java 1.5 or better.
 If you are running Java 1.6, you should have a program called
 jstack.exe available, which can produce a thread dump.

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

 iEYEARECAAYFAkoMagsACgkQ9CaO5/Lv0PAjuQCgj3d5hvEqdXHSeu0YAv/efmPm
 sFkAoMRGQh5Dl6PZnMhzkv2SV58mQ+HT
 =9oiX
 -END PGP SIGNATURE-

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




Using IP and Auth Constraints together

2009-05-15 Thread Shashank Rachamalla
Hi!
Is there any way to configure security-constraint for a webapp to
disable authentication and authorization for a particular IP address and
enable it for all other IP addresses.

Thanks in advance.


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com

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



Re: .html pages as .jsp pages

2009-05-15 Thread Nikola Milutinovic
Well, it should be relatively simple. Add the following to your web.xml:

servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.html/url-pattern
/servlet-mapping


Nix.




From: Dola Woolfe dolac...@yahoo.com
To: Tom Cat tomcat-u...@jakarta.apache.org
Sent: Thursday, May 14, 2009 8:43:47 PM
Subject: .html pages as .jsp pages


Hi,

I need to give my jsp files the extension .html

1. How do I configure tomcat to treat .html files as .jsp files?

2. Off topic? How do I set up Eclipse so that .html files are opened with the 
same editor as .jsp files and give me all of the syntax highlighting, etc.

Many thanks in advance,

Dola


  

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


  

Re: Using IP and Auth Constraints together

2009-05-15 Thread André Warnier

Shashank Rachamalla wrote:

Hi!
Is there any way to configure security-constraint for a webapp to
disable authentication and authorization for a particular IP address and
enable it for all other IP addresses.

Probably not, since I doubt that this is foreseen by the Servlet 
Specification.
But I can think of a way, subject to confirmation by an expert on this 
list :


You could write a simple servlet filter, which checks the caller's IP 
address, and if it matches, sets the user-id in the session to some 
pre-determined value.
It is possible that when the authentication code finds out that there is 
already a user set, it would just return OK and let the call through.
And for your application code, it would be easier to deal with a case 
where there is always a user-id (even if one is a dummy), than have to 
deal with some cases where it is not set, no ?


What I am not quite sure of, is whether a filter runs early enough to 
precede the authentication part, or not.

I guess if not, then you would have to implement this as a Valve.



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



TC 5.5 with java -server mode in windows service

2009-05-15 Thread David kerber
How do I set the jvm to -server mode when running as a windows service?  
In tomcat5w.exe, if I put -server in the java options box, tomcat 
doesn't start.  Do I just specify the full path to the \Program 
Files\Java\jdk1.5.0_17\jre\bin\server\jvm.dll in the jvm box?  That's 
what I have now, but I don't know if it's the preferred way to do it, 
and a thread still says mixed mode, if I'm interpreting it correctly:


[2009-05-15 08:54:50] [info] Full thread dump Java HotSpot(TM) Server VM 
(1.5.0_17-b04 mixed mode):


TIA!
Dave




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



Re: Using IP and Auth Constraints together

2009-05-15 Thread Shashank Rachamalla
I am using JNDI Realm to authenticate with LDAP and after a little bit
of exploration i found that a filter is always executed after a realm
executes and hence filters will not solve my problem. Will check out
Valves now.


On Fri, 2009-05-15 at 13:36 +0200, André Warnier wrote:
 Shashank Rachamalla wrote:
  Hi!
  Is there any way to configure security-constraint for a webapp to
  disable authentication and authorization for a particular IP address and
  enable it for all other IP addresses.
 
 Probably not, since I doubt that this is foreseen by the Servlet
 Specification.
 But I can think of a way, subject to confirmation by an expert on this
 list :

 You could write a simple servlet filter, which checks the caller's IP
 address, and if it matches, sets the user-id in the session to some
 pre-determined value.
 It is possible that when the authentication code finds out that there is
 already a user set, it would just return OK and let the call through.
 And for your application code, it would be easier to deal with a case
 where there is always a user-id (even if one is a dummy), than have to
 deal with some cases where it is not set, no ?

 What I am not quite sure of, is whether a filter runs early enough to
 precede the authentication part, or not.
 I guess if not, then you would have to implement this as a Valve.



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



Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

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



RE: .html pages as .jsp pages

2009-05-15 Thread Karthik Nanjangude
Hi

An Offline topic ... :{


 Off topic? How do I set up Eclipse so that .html files are opened with the 
 same editor as .jsp

In Eclipse -- windows -- Preference.. - General --
 Editors -- File Associations

Map the *.html file to Assiociate JSP Editor




Simple  :)

With regards
Karthik




-Original Message-
From: Nikola Milutinovic [mailto:alok...@yahoo.com]
Sent: Friday, May 15, 2009 4:45 PM
To: Tomcat Users List
Subject: Re: .html pages as .jsp pages

Well, it should be relatively simple. Add the following to your web.xml:

servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.html/url-pattern
/servlet-mapping


Nix.




From: Dola Woolfe dolac...@yahoo.com
To: Tom Cat tomcat-u...@jakarta.apache.org
Sent: Thursday, May 14, 2009 8:43:47 PM
Subject: .html pages as .jsp pages


Hi,

I need to give my jsp files the extension .html

1. How do I configure tomcat to treat .html files as .jsp files?

2. Off topic? How do I set up Eclipse so that .html files are opened with the 
same editor as .jsp files and give me all of the syntax highlighting, etc.

Many thanks in advance,

Dola




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



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



RE: TC 5.5 with java -server mode in windows service

2009-05-15 Thread Caldarale, Charles R
 From: David kerber [mailto:dcker...@verizon.net]
 Subject: TC 5.5 with java -server mode in windows service
 
 Do I just specify the full path to the
 \Program Files\Java\jdk1.5.0_17\jre\bin\server\jvm.dll in the jvm box?

Yes, that's the proper way to do it.

 [2009-05-15 08:54:50] [info] Full thread dump Java HotSpot(TM)
 Server VM (1.5.0_17-b04 mixed mode):

You're already in server mode.  The mixed mode indicates that you have both 
an interpreter and a JIT active; you cannot run without the interpreter, but 
you can run without a JIT, in which case it will say interpreted mode.  All 
is well.

 - Chuck


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


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



Re: Using IP and Auth Constraints together

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

On 5/15/2009 7:36 AM, André Warnier wrote:
 Shashank Rachamalla wrote:
 Hi!
 Is there any way to configure security-constraint for a webapp to
 disable authentication and authorization for a particular IP address and
 enable it for all other IP addresses.

 Probably not, since I doubt that this is foreseen by the Servlet
 Specification.
 But I can think of a way, subject to confirmation by an expert on this
 list :
 
 You could write a simple servlet filter, which checks the caller's IP
 address, and if it matches, sets the user-id in the session to some
 pre-determined value.

You can't really do this in a filter because you can't set the user's
principal at that high level. You'd have to at least use a Valve, so you
could get to the underlying guts in Tomcat required for such a feat.

You'd also have a problem trying to determine which roles to give the
user. Maybe you could hard-code (or soft-code, by listing the roles in
init-param elements for the filter/valve) the role values that you
want, and just all of the roles you recognize in your application.

 It is possible that when the authentication code finds out that there is
 already a user set, it would just return OK and let the call through.

This is possible using securityfilter, since the UserPrincipal is simply
a session attribute. If you put the right attribute in the session, sf
will use that as the currently-logged-in user and perform the
authorization steps against them.

 And for your application code, it would be easier to deal with a case
 where there is always a user-id (even if one is a dummy), than have to
 deal with some cases where it is not set, no ?

I think this is a good idea.

- -chris

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

iEYEARECAAYFAkoNdSYACgkQ9CaO5/Lv0PB2oQCgmtdj86LBGBzEt1cjD63f5KW5
Y0kAoMOQarWqUHIsH1lSgP09P4LKFYrI
=MO9W
-END PGP SIGNATURE-

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



Re: Change thread name of HTTP worker threads at Runtime

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

On 5/15/2009 2:37 AM, Rainer Frey (Inxmail GmbH) wrote:
 is the assumption that one request is processed by one thread (and never 
 passed to another during processing) true for all connectors, including NIO?

Are you asking if the request is passed to another thread at any point
for processing? Not likely, since Java doesn't support continuations.
The request handler thread should handle the request from start to finish.

The servlet spec goes on to require (in section 8.2) that the container
dispatches sub-requests (includes or forwards) using the same thread
that was originally chosen to handle the primary request.

I think you're safe.

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

iEYEARECAAYFAkoNdw8ACgkQ9CaO5/Lv0PB3zQCfao1TcPnoNZ6nMMiIvJ7Pi7Hf
HJwAoIG9NEmyyTZX81MuOkL4uM8bin1t
=ZFJ9
-END PGP SIGNATURE-

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



RE: TCP Window Size

2009-05-15 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: TCP Window Size
 
 FTP is probably full of tricks to manipulate the window size and packet
 size dynamically, in function of the link performance at any point in
 time.  Tomcat being a much more generic piece of software, I doubt it
 would include the same kind of logic.

The download efficiency of Tomcat can be improved by using a sendfile-capable 
Connector; the standard blocking connector does not use sendfile, but NIO and 
APR do.

 I would also think that, TCP window size being a parameter down at the
 socket level, it would be surprising if Tomcat itself had a
 configuration parameter for this.

The NIO connector does: socket.txBufSize.  However, for downloads, the window 
size is controlled by the box on the other end, not Tomcat; you need to get the 
client to adjust.

 Another suggestion : set up a comparison between Apache HTTPD and
 Tomcat, both delivering a page with a http link to the file you want to
 download, compare those, and post your comparison here.

Better to try the different Tomcat connectors, rather than add that degree of 
complexity.  The APR one should provide the identical network handling as 
httpd, without the overhead of going through two components.  Read more about 
it here:
http://tomcat.apache.org/tomcat-6.0-doc/aio.html
especially the section near the end on asynchronous writes.

 - Chuck


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



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



RE: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity

2009-05-15 Thread Caldarale, Charles R
 From: Pantvaidya, Vishwajit [mailto:vpant...@selectica.com]
 Subject: RE: Running out of tomcat threads - why many threads in
 RUNNABLEstage even with no activity
 
 Since I did not get any responses to this, just wanted to ask - did I
 post this to the wrong list and should I be posting this to the tomcat
 developers list instead?

This should be the correct list, but there's probably only one person who can 
definitively answer your question and he may be busy (or on holiday).

 - Chuck


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


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



Re: tomcat no longer writing to log files

2009-05-15 Thread Steve Ochani
Send reply to:  Tomcat Users List users@tomcat.apache.org
From:   Michael A. Repucci mich...@repucci.org
Date sent:  Thu, 14 May 2009 17:42:16 -0400
Subject:Re: tomcat no longer writing to log files
To: Tomcat Users List users@tomcat.apache.org

 Seems like a bit of animosity toward Tomcat has finally helped me make
 progress, mostly because it got all you gurus to actually explain a
 bit of how it works, and how it's packaged, all concepts I didn't
 understand. I'm a scientist, not a programmer.


Really? Your cv/resume indicates otherwise.

Sure your phd is in neuroscience but your current employment is listed as
Scientific Programmer and so was your last employment.

Considering that you are Proficient in things such as C/C++/C#, PHP ... 
Linux OS 
you should have considered that letting people know some details about your 
configuration/system would have helped.

Anyways, as stated by other people, get rid of the ubuntu packaged Tomcat and 
install the 
official one, also use a real Java version from SUN.


Also, tomcat does work out of the box. Incorrect administration of any system 
will stop it 
from working out of the box.



-Steve O.





 I'm new to Ubuntu and
 Tomcat. My colleagues have been completely unhelpful in this process.
 It works on their systems, so they've just left me to struggle on my
 own.
 
 My frustration is further fueled by the fact that the web site that
 our application will soon handle (http://neuroanalysis.org/toolkit/)
 is working just fine as static html; it doesn't change much, and most
 of the pages (not viewable externally) are generated automatically
 from code, using m2html or doxygen. But now they want me to integrate
 this site into the JSP format seen at the root
 (http://neuroanalysis.org/), despite the fact that I have zero
 experience with Tomcat, Java, or JSP, and nearly no web application
 development experience.
 
 It would have been nice if Tomcat just worked, out of the box, but it
 took me a couple days just to get it up and running. Now Tomcat works,
 at least the default page and the example webapps, but the application
 that my colleagues built won't work. This is their fault, as far as
 I'm concerned, yet there's nothing I can do to force them to improve
 what is probably sloppy code on their part.
 
 So I'm just looking for some help. Sorry to insult Tomcat, but thanks
 for the useful feedback. I'll work on the suggestions and let you know
 if I can't make any progress.
 
 :) Michael
 



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



Re: Confused by mpm/mod_jk

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bill,

On 5/11/2009 8:09 PM, Bill Davidson wrote:
 Rainer Jung wrote:
Are the Apaches connected to each Tomcat, or only to their Tomcat?
 
 Only to their own Tomcat.  I even do the connection on the loopback
 for security and (I hope) performance.

Yes, most TCP/IP stacks use 127.0.0.1 as a special-case that avoids most
of the real stack and instead uses a kernel buffer as the data transfer
mechanism.

I just tried to benchmark my own system localhost versus a DNS name that
resolves to an IP address handled on the same machine. The results of
downloading a 32MiB file 100 times using each address were the same. So,
either my previous statement is invalid or my Linux kernel is smart
enough to know that the same type of localhost optimization can be
performed when the destination IP is on the local machine.

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

iEYEARECAAYFAkoNe/MACgkQ9CaO5/Lv0PDYwwCghE45rXOm8DS+hENHCfa8D846
msYAoIlPsiCMmA+KH0bSKXaWgTZNbVze
=Aauf
-END PGP SIGNATURE-

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



Re: tomcat no longer writing to log files

2009-05-15 Thread Michael A. Repucci
On Fri, May 15, 2009 at 10:20 AM, Steve Ochani ocha...@ncc.edu wrote:

  Really? Your cv/resume indicates otherwise.

 Sure your phd is in neuroscience but your current employment is listed as
 Scientific Programmer and so was your last employment.

 Considering that you are Proficient in things such as C/C++/C#, PHP ...
 Linux OS
 you should have considered that letting people know some details about your
 configuration/system would have helped.


That's just marketing. If you look more carefully, I've never worked outside
of academia. I've even tried, and I can't get a job as a real programmer. My
father and brother are both real programmers, and I understand the
difference between what they know and what I know. But when trying to get a
job in science doing programming, the academics that tend to hire you like
to see proficiency, where my proficiency in any of those languages is
probably less than yours.


 Anyways, as stated by other people, get rid of the ubuntu packaged Tomcat
 and install the
 official one, also use a real Java version from SUN.


Working on it. I didn't realize that Ubuntu packages were the potentially
more difficult route. I'd made the false assumption that they might simplify
things for me.


 Also, tomcat does work out of the box. Incorrect administration of any
 system will stop it
 from working out of the box.


Honestly, what I'm most frustrated about isn't Tomcat, per say, but the
stuff written by my colleagues that should work with Tomcat. I'm a bit
baffled how the über-cross-platform Java (and its disciples Ant and Tomcat)
could be used to create code that is extraordinarily sensitive to the
version and platforms on which it is compiled and run. I suppose that's just
because the code was poorly written, and you could probably write platform-
and version-dependent code in any language, but it would have been nice if I
could have installed whatever the latest packages were on my system, and
compiled and run successfully the first time. Instead I'm spending upwards
of a week learning all the internals. I guess that's useful in the long run,
but I could just use some good and patient guidance. Sorry to have stepped
on anybody's toes, and thank you all for your help.

:) Michael


Re: tomcat no longer writing to log files

2009-05-15 Thread David Smith
Caldarale, Charles R wrote:
 From: michael.repu...@gmail.com [mailto:michael.repu...@gmail.com]
 Subject: Re: tomcat no longer writing to log files

 Then when I reinstalled, Tomcat didn't get reinstalled under 
 /etc nor /etc/init.d, and it didn't get started automatically
 as it had before.
 

 It wasn't clear to me whether you used a repackaged Tomcat this time, or 
 downloaded a real one from tomcat.apache.org.  If the latter, the scripts are 
 in Tomcat's bin directory, under the names startup.sh and shutdown.sh.  If 
 you used a 3rd-party repackaged version, there's no telling where they might 
 be.

  - Chuck


   

Actually it seemed clear to me the OP used a package installer as the
original tomcat download doesn't have anything to place files in /etc
automatically (at least not that I've ever seen).  I think the OP should
have used the operating system's install/uninstall tool to remove the
package instead of just deleting files.  It also sounds to me the
reinstall failed in some manner, maybe silently.

To Michael:

I would use the system control panel stuff included with your OS to
uninstall the tomcat package, then go back in and re-install it.  If the
re-install doesn't work, check the logs related to package maintenance
(maybe syslog?) and ask on a email list for your OS how to
remove/reinstall a damaged package. 

Or you could just uninstall it, download tomcat from tomcat.apache.org
and install it.  Installation is super easy -- just unarchive it using
the appropriate unzip/untar program, cd to tomcat's bin directory and
run startup.sh.  Once you get it running, then go ahead and modify files
like server.xml and tomcat-users.xml to taste as well as add/remove
webapps in the webapps directory.  It won't start automatically this
way, but at least you'll have something working.

--David

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



Re: Running out of tomcat threads - why many threads in RUNNABLE stage even with no activity

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Vishwajit,

On 5/13/2009 5:28 PM, Pantvaidya, Vishwajit wrote:
 My setup is tomcat 5.5.17 + mod_jk 1.2.15 + httpd 2.2.2. I am using
 AJP1.3.

Old versions of everything. Consider upgrading?

 Every 2-3 days with no major load, tomcat throws the error: SEVERE:
 All threads (200) are currently busy, waiting...
 
 I have been monitoring my tomcat TP-Processor thread behavior over
 extended time intervals and observe that: - even when there is no
 activity on the server, several TP-Processor threads are in RUNNABLE
 state while few are in WAITING state

It appears that you have 200 threads available. How many (on average)
are RUNNABLE versus WAITING? (The two counts should add to 200, unless
there's some other state (BLOCKED?) that the threads can be in, but you
didn't mention any other states).

 - RUNNABLE threads stack trace shows java.lang.Thread.State:
 RUNNABLE at java.net.SocketInputStream.socketRead0(Native
 Method)...

This indicates that the client has not yet disconnected, and is probably
still sending data. If there were not any data waiting, the state should
be BLOCKED.

 - WAITING thread stack trace shows java.lang.Thread.State: WAITING
 on
 org.apache.tomcat.util.threads.threadpool$controlrunna...@53533c55

These are idle threads.

 - tomcat adds 4 new TP-Processor threads when a request comes in and
 it can find no WAITING threads

Wow, 4 new threads? That seems like 3 too many...

 So I conclude that my tomcat is running out of threads due to many
 threads being in RUNNABLE state when actually they should be in
 WAITING state. Is that happening because of the socket_keepalive in
 my workers.properties shown below?

worker.socket_keepalive just keeps the connection between Apache httpd
and Tomcat alive in case you have an overzealous firewall that closes
inactive connections. The request processor shouldn't be affected by
this setting.

 Why are threads added in bunches of 4 - is there any way to configure
 this?
 
 My workers config is:
 
 Worker...type=ajp13 Worker...cachesize=10

Are you using the prefork MPM? If so, cachesize should be /1/.

 Worker...cache_timeout=600 Worker...socket_keepalive=1 
 Worker...recycle_timeout=300

Are these timeouts necessary? Why not simply let the connections stay
alive all the time?

 Earlier posts related to this issue on the list seem to recommend
 tweaking: - several timeouts - JkOptions +DisableReuse

This will require that every incoming HTTP connection opens up a new
ajp13 connection to Tomcat. Your performance will totally suck if you
enable this. But if it's the only way for you to get your application
working properly, then I guess you'll have to do it. I suspect you /will
not/ have to enable +DisableReuse.

 I am planning to do the following to resolve our problem: - upgrade
 jk to latest version - e.g. 1.2.28

Upgrading is (almost) always a good idea.

 - replace recycle_timeout with connection_pool_timeout - add
 connectionTimeout in server.xml - add JkOptions +DisableReuse

I think these settings will only reduce performance. If you want my
advice, I'd simplify your configuration as much as possible, then add
settings as you need them.

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

iEYEARECAAYFAkoNf5EACgkQ9CaO5/Lv0PCswQCfQ101OnbCFnTEOu0e8wqlVt1Q
gycAn1hohlsIrYyEEno0jGrGglE2yInF
=hWV8
-END PGP SIGNATURE-

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



Re: Change thread name of HTTP worker threads at Runtime

2009-05-15 Thread Rainer Frey (Inxmail GmbH)
On Friday 15 May 2009 16:07:11 Christopher Schultz wrote:
 Rainer,

 On 5/15/2009 2:37 AM, Rainer Frey (Inxmail GmbH) wrote:
  is the assumption that one request is processed by one thread (and never
  passed to another during processing) true for all connectors, including
  NIO?

 Are you asking if the request is passed to another thread at any point
 for processing? 

Exactly, in my case I'm interested in the span between entering the 
application's filter chain and returning from it in the outmost filter.

 Not likely, since Java doesn't support continuations. 
 The request handler thread should handle the request from start to finish.

Is this explicitly stated somewhere? There could theoretically be a queue of 
Request/Response pairs, and different threads could pick one up, execute one 
element in the filter chain, and put the pair back for the next thread.

 The servlet spec goes on to require (in section 8.2) that the container
 dispatches sub-requests (includes or forwards) using the same thread
 that was originally chosen to handle the primary request.

I just read this up. It says should ensure. How strong this is sepends on 
whether this has RFC SHOULD characteristics, or is merely a recommendation.

 I think you're safe.

I guess so too, but it's nice to hear opinions of people with insightinto 
internals.

 -chris

Rainer

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



Re: What is the difference?

2009-05-15 Thread János Löbb


On May 14, 2009, at 4:12 PM, André Warnier wrote:


I'm frustrated.
For once there was a question which was right at my level, you guys  
all beat me to answer it.




Well, just to make Your day, here is another one :)

Who is the absolute thin ?

Here is the answer encoded:  Aki a hasaat szappanozza ees a haata  
habzik.


Enjoy,

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



Re: tomcat no longer writing to log files

2009-05-15 Thread David Smith
Michael A. Repucci wrote:
 On Fri, May 15, 2009 at 10:20 AM, Steve Ochani ocha...@ncc.edu wrote:

   
  Really? Your cv/resume indicates otherwise.

 Sure your phd is in neuroscience but your current employment is listed as
 Scientific Programmer and so was your last employment.

 Considering that you are Proficient in things such as C/C++/C#, PHP ...
 Linux OS
 you should have considered that letting people know some details about your
 configuration/system would have helped.

 

 That's just marketing. If you look more carefully, I've never worked outside
 of academia. I've even tried, and I can't get a job as a real programmer. My
 father and brother are both real programmers, and I understand the
 difference between what they know and what I know. But when trying to get a
 job in science doing programming, the academics that tend to hire you like
 to see proficiency, where my proficiency in any of those languages is
 probably less than yours.


   
 Anyways, as stated by other people, get rid of the ubuntu packaged Tomcat
 and install the
 official one, also use a real Java version from SUN.
 


 Working on it. I didn't realize that Ubuntu packages were the potentially
 more difficult route. I'd made the false assumption that they might simplify
 things for me.


   
 Also, tomcat does work out of the box. Incorrect administration of any
 system will stop it
 from working out of the box.
 


 Honestly, what I'm most frustrated about isn't Tomcat, per say, but the
 stuff written by my colleagues that should work with Tomcat. I'm a bit
 baffled how the über-cross-platform Java (and its disciples Ant and Tomcat)
 could be used to create code that is extraordinarily sensitive to the
 version and platforms on which it is compiled and run. I suppose that's just
 because the code was poorly written, and you could probably write platform-
 and version-dependent code in any language, but it would have been nice if I
 could have installed whatever the latest packages were on my system, and
 compiled and run successfully the first time. Instead I'm spending upwards
 of a week learning all the internals. I guess that's useful in the long run,
 but I could just use some good and patient guidance. Sorry to have stepped
 on anybody's toes, and thank you all for your help.

 :) Michael

   
Webapps written to the servlet spec aren't super-sensitive.  If written
to spec, there might be some minor bit of setup (e.g. database pool),
but otherwise they should just plain work.  Your colleagues may have
done things outside the spec if their stuff doesn't just work with a
minor bit of setup like a database pool if needed.

Adding to that, tomcat as packaged at tomcat.apache.org and run on Sun's
JVM isn't sensitive either.  I've never had any trouble setting up an
instance of it, but then again, I don't use the third party packages
either.  If your system is using some other JVM like Kaffe, it may be
contributing to your headaches.

Try this for a confidence builder:
  - get tomcat 6 from tomcat.apache.org
  - unpack wherever you like
  - make sure you have a Sun JVM  version 1.5 or better installed and
available (execute the command java -version to see what comes up)
  - cd into tomcat's bin directory
  - start tomcat with ./startup.sh
  - go to your favorite browser and browse http://localhost:8080 (I
think that's the default, out of the box http connector port) and see
the magic.

Once you have that success, add your webapp to the webapps directory and
check it out on that same browser.  'tis just that simple.

--David

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



Re: Difference between running bootstrap.jar and catalina.bat

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jan,

On 5/15/2009 1:25 AM, Jan Horký wrote:
 I got the following error:
 
 15.5.2009 7:10:16
 com.sun.xml.ws.transport.http.servlet.WSServletContextListener
 contextInitialized
 SEVERE: WSSERVLET11: failed to parse runtime descriptor:
 java.lang.VerifyError: (class: com/sun/xml/ws/model/AbstractSEIModelImpl,
 method: createJAXBContext signature: ()Lcom/sun/xml/bind/api/JAXBRIContext;)
 Incompatible argument to function java.lang.VerifyError: (class:
 com/sun/xml/ws/model/AbstractSEIModelImpl, method: createJAXBContext
 signature: ()Lcom/sun/xml/bind/api/JAXBRIContext;) Incompatible argument
 to function

You have mismatched your libraries: you have a .class file that is
trying to call something like createJAXBContext(FooType) and the
function available is actually createJABXContext(BarType).

You need to make sure that the libraries used to compile your code are
the same as those used to run it. All the libraries your application
needs to run should be in your webapp's WEB-INF/lib directory. Try
removing everything you added to Tomcat's lib directory and Java's lib
(or lib/ext) directories and just using WEB-INF/lib.

 It has to be some classpath mismatch(java -jar bootstrap.jar start works
 fine) but I can't find what. The libraries in this app are bit complicated.
 There is custom tomcat realm for authentication (this is the thing why is
 some libraries located in tomcat\lib)

That's fine: if you have custom authentication, go ahead and put that in
Tomcat's lib directory.

 some custom listeners and so on.

Unless you are configuring these listeners at the top-level (like within
Service, Engine or Host), your listeners will be loaded by your
web application's ClassLoader, and so the classes can be in
WEB-INF/classes or WEB-INF/lib (in JAR files, of course).

 I
 need to override somehow the jaxb1 api which I'm using for older custom
 component in application.

You can put your JAXB classes into your webapp. Webapp ClassLoaders are
guarantees to load their classes locally (that is, from WEB-INF/lib)
before asking the parent ClassLoader to load the class. Note that this
is exactly the opposite of the way most ClassLoaders work. But, it's
mandated so that things like what you want to do actually work.

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

iEYEARECAAYFAkoNgu4ACgkQ9CaO5/Lv0PDt/QCgu1T7kLnurlRMRlRyyKnOP1TO
W6sAn2I5ZoONrIOvKR0NE6G0nigorfyQ
=C1m+
-END PGP SIGNATURE-

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



RE: Change thread name of HTTP worker threads at Runtime

2009-05-15 Thread Caldarale, Charles R
 From: Rainer Frey (Inxmail GmbH) [mailto:rainer.f...@inxmail.de]
 Subject: Re: Change thread name of HTTP worker threads at Runtime
 
 I just read this up. It says should ensure. How strong this is
 sepends on whether this has RFC SHOULD characteristics, or is 
 merely a recommendation.

It's not a recommendation, it's a requirement.  The Tomcat committers are 
extremely careful about implementing the spec precisely.  There's only one 
thread that processes a request from start to finish.

 - Chuck


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



Re: tomcat no longer writing to log files

2009-05-15 Thread Andre-John Mas


On 15-May-2009, at 10:37, Michael A. Repucci wrote:

Also, tomcat does work out of the box. Incorrect administration  
of any

system will stop it
from working out of the box.



Honestly, what I'm most frustrated about isn't Tomcat, per say, but  
the

stuff written by my colleagues that should work with Tomcat. I'm a bit
baffled how the über-cross-platform Java (and its disciples Ant and  
Tomcat)

could be used to create code that is extraordinarily sensitive to the
version and platforms on which it is compiled and run. I suppose  
that's just
because the code was poorly written, and you could probably write  
platform-
and version-dependent code in any language, but it would have been  
nice if I
could have installed whatever the latest packages were on my system,  
and
compiled and run successfully the first time. Instead I'm spending  
upwards
of a week learning all the internals. I guess that's useful in the  
long run,
but I could just use some good and patient guidance. Sorry to have  
stepped

on anybody's toes, and thank you all for your help.



I hate to say it, but the best way to make Java code have issues is  
trying to
be too smart when doing something. This usually results in code that  
works
in certain narrow situations, but not the rest. What I mean by being  
'too
smart' is when someone try to make the best 'uber' code possible,  
which ends

up being convoluted and only understandable to the author when it was
written. I am not saying it is the case here, but programming is like
hand writing, in that you do yourself a favour by making sure it is  
written
well enough that someone else can read it and yourself in a month's  
time.


On the other hand, there are different version of servlet specification,
of Java, of Tomcat and each has their incompatibilities. Learning how to
make your code work in the widest range of conditions will help make
you a better programmer, IMHO.

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



RE: org.apache.jk.common.ChannelSocket processConnection WARNING: processCallbacks status 2 - RESOLVED

2009-05-15 Thread Robin Wilson
FYI, I've answered my own problem...

First, the cause of this problem:

When using AJP, this problem is caused by a request coming from the httpd 
(apache) server to tomcat, but the apache server is stopped from listening for 
the response from the tomcat server. Usually this is caused by a user clicking 
on a new link before tomcat has a chance to respond (fully), so apache has 
moved on - but tomcat doesn't know about it.

It can be safely ignored.

Second, how do you fix it?

For my case, I added the following 2 lines to the bottom of the 
'logging.properties' (we use the default JULI logging package):

org.apache.jk.common.ChannelSocket.level = SEVERE
org.apache.jk.common.ChannelSocket.handlers = 
2localhost.org.apache.juli.FileHandler

The first line tells JULI to only log 'SEVERE' errors from this class. The 
second line ties this logging class to the standard FileHandler in JULI. (You 
may have a different setup on this second line - I just copied it from another 
line in the file for the FileHandler setup, and then changed the class to 
match the ChannelSocket class I needed to adjust. I figured this out by 
figuring out which line mapped the handler to the 'catalina.out' file, and then 
duplicated that setup...)

The reason I'm bothering to note this here is because in all the research I've 
done on this - I found not one single answer to how to make it stop.

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
WORK: 512-623-5913
CELL: 512-426-3929
www.KingsIsle.com


-Original Message-
From: Robin Wilson [mailto:rwil...@kingsisle.com] 
Sent: Friday, April 24, 2009 3:56 PM
To: users@tomcat.apache.org
Subject: org.apache.jk.common.ChannelSocket processConnection WARNING: 
processCallbacks status 2

I'm trying to figure out what this means, and how to stop it... We're getting 
following error repeated in our catalina.out logs:

Apr 24, 2009 8:42:24 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 8:44:00 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 8:46:36 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 8:46:38 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 8:46:39 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 8:46:40 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 9:44:17 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 9:45:03 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 10:10:42 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 10:10:43 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 10:10:45 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 10:10:45 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Apr 24, 2009 10:16:05 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2

...

It goes on like this all day long - every few minutes we get another error.

We'd like to know what's causing it - and whether there is any way to prevent 
it (or even filter it if it isn't worth worrying about). Our production team is 
a stickler for not logging things that don't require action (in production), so 
they are really queasy about this repeated error.

FYI, our configuration is:

4 Apache 2.2.11 servers (running on Red Hat Linux boxes)

each Apache is currently running in a 1:1 AJP Proxy connection to 1 of: 

4 tomcat 6.0.18 servers (running on Red Hat Linux boxes)

So apache 1 connects only to tomcat 1, and apache 2 connects only to 
tomcat 2, etc.

(We're working on getting our tomcat clustering stable enough to deploy.)

One of the things that is preventing our roll out of full clustering is 
understanding the nature of this error in the catalina.out logs.

Also, all 4 tomcat servers are identically configured with the same webapps, 
and the apache servers are load-balanced, but setup with sticky sessions so a 
browser will stay with the same apache once they connect. 

We do have distributable / setup in our web.xml for one of our web apps, and 
we have a clustering basic (the defaults from one of the docs on clustering) 
setup in the 'server.xml' file. This seems to work - but we throw a lot of 
errors when we actually try to use clustered sessions - so we're working 
through those as quickly as we can.

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
www.KingsIsle.com





Re: Change thread name of HTTP worker threads at Runtime

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rainer,

On 5/15/2009 10:47 AM, Rainer Frey (Inxmail GmbH) wrote:
 On Friday 15 May 2009 16:07:11 Christopher Schultz wrote:
 Not likely, since Java doesn't support continuations. 
 The request handler thread should handle the request from start to finish.
 
 Is this explicitly stated somewhere?

Java simply does not have continuations, so the thread that calls, say,
Filter.doFilter must be the same thread that returns from that same
Filter.doFilter call.

 There could theoretically be a queue of 
 Request/Response pairs, and different threads could pick one up, execute one 
 element in the filter chain, and put the pair back for the next thread.

Er, I suppose that's technically possible but there's no reason to do
that: pipelineing an HTTP request is pretty silly, since you'd just be
adding thread management overhead to a straightforward process.

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

iEYEARECAAYFAkoNjJ8ACgkQ9CaO5/Lv0PCkuQCfSsUDQvnqLv6EtP6ida/eP7oK
GxgAnAqMLCkrHvsLRyVEsYO63MWeVQVY
=mY4K
-END PGP SIGNATURE-

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



Re: tomcat no longer writing to log files

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Michael,

On 5/14/2009 4:14 PM, Michael A. Repucci wrote:
 Yes. That changed nothing. Still no catalina.out, still no ourapp.log.

Sorry for the barrage of questions, but the answers will help us figure
out what's going on:

Can you tell us how you start Tomcat?
Are you sure that it's running when no log files are generated?
What is the euid of the running Tomcat process?
Where /is/ Tomcat's log directory (you may have to read the script that
you use to start Tomcat to figure out what that is)?
What are the file permissions on Tomcat's log directory?
What are the file permissions of the log files themselves (if the files
still exist)?
What JVM are you using (try running java -version)?
What version of Tomcat are you using?

I don't want to start a flame war, but you'll catch more flies with
honey: saying that TC is a crappy piece of software is not recommended
technique when asking for help from this list.

As for your colleagues' code not running, I suspect it's something
simple like a required database library not being installed into Tomcat
(which is required, depending on how they have arranged everything).

Once error messages return, you are welcome to report the errors you get
from their application and we'll do what we can to help.

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

iEYEARECAAYFAkoNj+QACgkQ9CaO5/Lv0PBvOwCeM4lDnGOsWkHJOl/nYI41pmlN
Gy8AoLHam8zJ4tmjAYFcqoKrWqK18pMJ
=RY7b
-END PGP SIGNATURE-

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



mod_jk: question regarding log-format

2009-05-15 Thread Gregor Schneider
hi guys,

i'm wondering where - except from the source - i could find the
information of what the log-format-parameters actually mean.

example:

JkLogStampFormat [%a %b %d %H:%M:%S %Y]

that's the default format-string, however, in the docs
(http://tomcat.apache.org/connectors-doc/reference/printer/apache.html)
i can't find what %a and %b mean.

I presume that %a tells me the ip-adress and that %b are the bytes,
however, i'd really like to read it up somewhere.

any clue?

tia

gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

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



Re: Page not completing loading - ideas?

2009-05-15 Thread Andre-John Mas


On 13-May-2009, at 21:14, Caldarale, Charles R wrote:


From: Andre-John Mas [mailto:andrejohn@gmail.com]
Subject: Page not completing loading - ideas?

Does anyone have any ideas of how to go about analysing the issue?


I'd start with a Wireshark capture/trace on the client workstation  
to see exactly what's going on over the network.  If you can get a  
Tomcat AccessLogValve trace from the integration server to correlate  
with it, that would help.


I was told that a day later it was back to normal.  Apparently the  
only thing that changed was the CMS content. This is resolved for now.


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



Re: Peformance on socket reads

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 5/14/2009 8:34 AM, David kerber wrote:
   len = req.getContentLength();
   b = new byte[ len ];

Don't forget to check to see if getContentLength() returned zero.

What is the content-type here? Is it application/x-www-form-urlencoded?
Are you calling req.getParameter() or any of the same family of
functions? If both of those are true, then Tomcat has already read the
body of the request, and you won't be able to re-read it.

   iStream = req.getInputStream();
/* this is the line 198 that the above thread dump is waiting for: */
   strLen = iStream.read( b, 0, len );
   iStream.close();

If you want a String, why not use req.getReader() instead of
req.getInputStream()?

I think you may have better luck reading until there is no more input,
rather than relying upon the Content-Length matching the available data
(which really /should/ work, but obviously something else is happening
here).

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

iEYEARECAAYFAkoNkvwACgkQ9CaO5/Lv0PC6LgCeKxfj76DEe3zvkp7xLAvyDd5b
WYEAoJLpw50J6iGdu2s0QPeL5Q+eoRB9
=uYLB
-END PGP SIGNATURE-

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



Re: mod_jk: question regarding log-format

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gregor,

On 5/15/2009 11:59 AM, Gregor Schneider wrote:
 however, in the docs
 (http://tomcat.apache.org/connectors-doc/reference/printer/apache.html)
 i can't find what %a and %b mean.

Read more closely:


The Tomcat Connector module date log format, using an extended strftime
syntax.


Just look at the man page for strftime to find out what all the
%-thingys mean. If you don't have the man page handy, you can read one
online: http://www.manpagez.com/man/3/strftime/

 I presume that %a tells me the ip-adress and that %b are the bytes,
 however, i'd really like to read it up somewhere.

%a is documented to be the abbreviated weekday name while %b is
documented to be the abbreviated month name.

It's possible that the documentation is wrong and that Apache's log
formatting options are in effect:

http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats

I would look at your log file relative to the configured log format to
see which one is being used. If the documentation is wrong, please
notify Rainer or Mladen so they can correct it.

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

iEYEARECAAYFAkoNlecACgkQ9CaO5/Lv0PBi/gCfaFlpQDuGqr4ngoQZggWbOGLC
oH4AoJtp1PFiFq1RFImzOilneU+xFZl2
=ft9e
-END PGP SIGNATURE-

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



Re: Peformance on socket reads

2009-05-15 Thread David kerber

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 5/14/2009 8:34 AM, David kerber wrote:
  

  len = req.getContentLength();
  b = new byte[ len ];



Don't forget to check to see if getContentLength() returned zero.
  

I do, it's just not in that code snippet.

What is the content-type here? Is it application/x-www-form-urlencoded?
Are you calling req.getParameter() or any of the same family of
functions? If both of those are true, then Tomcat has already read the
body of the request, and you won't be able to re-read it.
  
I don't recall the content-type off the top of my head (and I don't have 
the source of the sending app at hand), and I don't use 
req.getParameter() at all.  But the code works; it just seems to be a 
little slow.


  

  iStream = req.getInputStream();
   /* this is the line 198 that the above thread dump is waiting for: */
  strLen = iStream.read( b, 0, len );
  iStream.close();



If you want a String, why not use req.getReader() instead of
req.getInputStream()?
  
At this point, it's still encrypted, and a string may not properly 
handle some of the bytes.  I don't make it a string until I'm done 
decrypting it (forgot to mention that point in my original post).



I think you may have better luck reading until there is no more input,
  
What method would you suggest?  Create the byte array long enough to 
handle any possible input and then read without specifying the length?



rather than relying upon the Content-Length matching the available data
(which really /should/ work, but obviously something else is happening
here).
  


Thanks!
D



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



Re: TC 5.5 with java -server mode in windows service

2009-05-15 Thread George Sexton

Are you running under 64 bit windows?

I noticed that the 64 bit server DLLs were not installed.

I noticed this because the registry entries the installer created still 
point to them.


Look for

Program Files\Java\[java version]\bin\server\jvm.dll



David kerber wrote:
How do I set the jvm to -server mode when running as a windows 
service?  In tomcat5w.exe, if I put -server in the java options box, 
tomcat doesn't start.  Do I just specify the full path to the \Program 
Files\Java\jdk1.5.0_17\jre\bin\server\jvm.dll in the jvm box?  That's 
what I have now, but I don't know if it's the preferred way to do it, 
and a thread still says mixed mode, if I'm interpreting it correctly:


[2009-05-15 08:54:50] [info] Full thread dump Java HotSpot(TM) Server 
VM (1.5.0_17-b04 mixed mode):


TIA!
Dave




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



--
George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/


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



MAX Simultaneous connections with Tomcat on Windows XP Pro

2009-05-15 Thread Arijit Sarkar Job Gmail
All,

This has been troubling me for some time now. and I don't have an answer to
it.

We all know that IIS and XP Pro have a 10 concurrent connection limit .
If I am using Apache Tomcat on XP Pro, do I still have this limit on the
connections? 

 

Any help will be greatly appreciated.

 

Regards,

Arijit S.

 

 



RE: TC 5.5 with java -server mode in windows service

2009-05-15 Thread Caldarale, Charles R
 From: David kerber [mailto:dcker...@verizon.net]
 Subject: Re: TC 5.5 with java -server mode in windows service
 
 I was just surprised the thread dump didn't say Server mode
 instead of Mixed mode.

Note that it says Server VM; running the client version will say Client VM.

The HotSpot JVM always has to have an interpreter available because the JITs 
don't kick in until after some analysis has been done of the running code.

 - Chuck


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


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



Re: MAX Simultaneous connections with Tomcat on Windows XP Pro

2009-05-15 Thread David kerber

Arijit Sarkar Job Gmail wrote:

All,

This has been troubling me for some time now. and I don't have an answer to
it.

We all know that IIS and XP Pro have a 10 concurrent connection limit .
If I am using Apache Tomcat on XP Pro, do I still have this limit on the
connections? 
  

No, because they're a different kind of connection.

D



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



RE: Peformance on socket reads

2009-05-15 Thread Caldarale, Charles R
 From: David kerber [mailto:dcker...@verizon.net]
 Subject: Re: Peformance on socket reads

 What method would you suggest?  Create the byte array long enough to
 handle any possible input and then read without specifying the length?

No, keep allocating the byte array based on the content-length (plus perhaps a 
bit more for insurance); but if you discover that there is more input than 
that, get a larger one and do System.arraycopy() to save what you already 
processed.  That shouldn't happen very often, so it's not a performance issue.  
If it does happen often, your clients are broken and need to be fixed.

 - Chuck


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



Re: TC 5.5 with java -server mode in windows service

2009-05-15 Thread David kerber

Caldarale, Charles R wrote:

From: David kerber [mailto:dcker...@verizon.net]
Subject: Re: TC 5.5 with java -server mode in windows service

I was just surprised the thread dump didn't say Server mode
instead of Mixed mode.



Note that it says Server VM; running the client version will say Client VM.
  

Ok, that's what I was missing:  I was just looking in the wrong place.


Thanks!
D



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



Re: Peformance on socket reads

2009-05-15 Thread David kerber

David kerber wrote:

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 5/14/2009 8:34 AM, David kerber wrote:
 

  len = req.getContentLength();
  b = new byte[ len ];



Don't forget to check to see if getContentLength() returned zero.
  

I do, it's just not in that code snippet.

What is the content-type here? Is it application/x-www-form-urlencoded?
Are you calling req.getParameter() or any of the same family of
functions? If both of those are true, then Tomcat has already read the
body of the request, and you won't be able to re-read it.
  
I don't recall the content-type off the top of my head (and I don't 
have the source of the sending app at hand), and I don't use 
req.getParameter() at all.  But the code works; it just seems to be a 
little slow.

The content-type is application/binary.



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



RE: MAX Simultaneous connections with Tomcat on Windows XP Pro

2009-05-15 Thread Arijit Sarkar Job Gmail
WOW!! That was fast..

So If I have an web application deployed on tomcat and windows XP pro,
theoretically, unlimited users can connect to the application
simultaneously?
Tomcat or Windows XP does not place any limits to that?

If that is true... it would be really pleasing to my ears...




-Original Message-
From: David kerber [mailto:dcker...@verizon.net] 
Sent: Friday, May 15, 2009 12:54 PM
To: Tomcat Users List
Subject: Re: MAX Simultaneous connections with Tomcat on Windows XP Pro

Arijit Sarkar Job Gmail wrote:
 All,

 This has been troubling me for some time now. and I don't have an answer
to
 it.

 We all know that IIS and XP Pro have a 10 concurrent connection limit .
 If I am using Apache Tomcat on XP Pro, do I still have this limit on the
 connections? 
   
No, because they're a different kind of connection.

D



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


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



Re: Confused by mpm/mod_jk

2009-05-15 Thread Bill Davidson

Rainer Jung wrote:

IfModule mpm_worker_module
   StartServers  2
   MaxClients  256
   MinSpareThreads  25
   MaxSpareThreads  75
   ThreadsPerChild  32



Usually MinSpaceThreads and MaxSpareThreads having a multiple of
ThreadsPerChild makes it easier understandable, what the numbers mean.
Scaling up and down is always done in increments of processes, each
having ThreadsPerChild threads.
  


OK.  I changed MinSpareThreads to 32 and MaxSpareThreads to 96
and left the others as is.

workers.properties:

worker.tomcat1.type=ajp13
worker.tomcat1.host=127.0.0.2
worker.tomcat1.port=8009
worker.tomcat1.connection_pool_size=150



Delete the connection_pool_size.


Done.


worker.tomcat1.connection_pool_timeout=600



you need to set connectionTimeout for the Tomcat connector to 60 then.
  


Done.



server.xml:

Connector port=8009
  protocol=AJP/1.3
  address=127.0.0.2
  redirectPort=443
  maxThreads=150 /



The 150 threads do not make a good fit to your MaxClients of 256.


Increased to 256 to match MaxClients.


I'm going to be hit with a traffic storm (many thousands
of simultaneous connection attempts in a few minutes) in a few days, and
I'm thinking I should make sure I've got this right.



You need to do stress testing in order to find out, what the correct
sizing is. If your application can stand the load and is very
fast/lightweight, then you could manage more than 1000 requests/second
with three Tomcats without ever reaching 256 MaxClients per Apache. If
your application gets slow, then you might not be able to server 50
requests/second. Play around with the above formula.
  


Not sure what the correct sizing is yet.  However, we got the storm today
and all went well.  At one point ipvsadm -L -persistent-conn was reporting
active connections in the 250-300 range and over 1500 inactive connections
for all three servers.  Nothing broke.

The web servers never seemed to be heavily loaded.  Only one of the three
ever had a load average over 1.  The database was loaded but not to the
point of being scary.  Obviously, I've still got some homework to do.

Thank you so much for your help.


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



Re: Performance on socket reads

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 5/15/2009 12:22 PM, David kerber wrote:
 But the code works; it just seems to be a little slow.

Gotcha. How slow are we talking, here? I'm not sure whether the
underlying InputStream, here, is buffering, but you could try:

iStream = new BufferedInputStream(req.getInputStream());

... to see if that improves things at all.

 At this point, [the data is] still encrypted, and a string may not properly
 handle some of the bytes.

Oh, right. I forgot you were sending encrypted data.

 I think you may have better luck reading until there is no more input,

 What method would you suggest?  Create the byte array long enough to
 handle any possible input and then read without specifying the length?

Something like that. After thinking a bit about it, specifying more
bytes to read than are available either blocks (waiting for more data
that will come) or returns after reading fewer bytes (because the stream
is closed and there's no more to read). Your code should be pretty good
as-is.

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

iEYEARECAAYFAkoNuYUACgkQ9CaO5/Lv0PAOwQCgxCEVgtRLYG0V1mFC421dC318
8wkAoLQ1WwoQULSMcTiyEFGHQaGYTBPL
=ADDW
-END PGP SIGNATURE-

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



Re: Peformance on socket reads

2009-05-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 5/15/2009 2:28 PM, David kerber wrote:

 The content-type is application/binary.

I might have used application/octet-stream, but it's really just
semantics.

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

iEYEARECAAYFAkoNuj0ACgkQ9CaO5/Lv0PAZXACgjkZJUayvnBK/16BXcgZC/nxp
TU4An3BXtBFI6A4RzioZH/MpZB/2vqiJ
=Gt6+
-END PGP SIGNATURE-

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



Re: Performance on socket reads

2009-05-15 Thread David kerber

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 5/15/2009 12:22 PM, David kerber wrote:
  

But the code works; it just seems to be a little slow.



Gotcha. How slow are we talking, here? I'm not sure whether the
underlying InputStream, here, is buffering, but you could try:
  
Not noticeably slow from a human watching it viewpoint, but when I do a 
thread dump, I see quite a few of the threads waiting on the .read() 
statement.  quite a few in the case of the one I did just now (the 
busiest time of day for this app) means 12 out of the total of 75 
http-processorXXX threads.



iStream = new BufferedInputStream(req.getInputStream());

... to see if that improves things at all.
  
I was wondering about that, too.  I couldn't see anything that 
specifically said whether the InputStream from an HttpServletRequest was 
buffered or not, but the implication from some reading about a 3rd party 
BufferedServletInputStream is that TC 4.x and later provide a buffer for it.


  

At this point, [the data is] still encrypted, and a string may not properly
handle some of the bytes.



Oh, right. I forgot you were sending encrypted data.

  

I think you may have better luck reading until there is no more input,
  

What method would you suggest?  Create the byte array long enough to
handle any possible input and then read without specifying the length?



Something like that. After thinking a bit about it, specifying more
bytes to read than are available either blocks (waiting for more data
that will come) or returns after reading fewer bytes (because the stream
is closed and there's no more to read). Your code should be pretty good
as-is.
  


Thanks,
D



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



Re: Confused by mpm/mod_jk

2009-05-15 Thread Bill Davidson

Christopher Schultz wrote:


Yes, most TCP/IP stacks use 127.0.0.1 as a special-case that avoids most
of the real stack and instead uses a kernel buffer as the data transfer
mechanism.

I just tried to benchmark my own system localhost versus a DNS name that
resolves to an IP address handled on the same machine. The results of
downloading a 32MiB file 100 times using each address were the same. So,
either my previous statement is invalid or my Linux kernel is smart
enough to know that the same type of localhost optimization can be
performed when the destination IP is on the local machine.
  


Well, at least it's a security thing then.  Even if the firewall
somehow got opened up, Tomcat is still only accessible from
outside the box by going through httpd first.


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



Re: mod_jk: question regarding log-format

2009-05-15 Thread Rainer Jung
On 15.05.2009 18:18, Christopher Schultz wrote:
 Gregor,
 
 On 5/15/2009 11:59 AM, Gregor Schneider wrote:
 however, in the docs
 (http://tomcat.apache.org/connectors-doc/reference/printer/apache.html)
 i can't find what %a and %b mean.
 
 Read more closely:
 
 
 The Tomcat Connector module date log format, using an extended strftime
 syntax.
 
 
 Just look at the man page for strftime to find out what all the
 %-thingys mean. If you don't have the man page handy, you can read one
 online: http://www.manpagez.com/man/3/strftime/
 
 I presume that %a tells me the ip-adress and that %b are the bytes,
 however, i'd really like to read it up somewhere.
 
 %a is documented to be the abbreviated weekday name while %b is
 documented to be the abbreviated month name.
 
 It's possible that the documentation is wrong and that Apache's log
 formatting options are in effect:
 
 http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats
 
 I would look at your log file relative to the configured log format to
 see which one is being used. If the documentation is wrong, please
 notify Rainer or Mladen so they can correct it.

Chris is right, strftime plus proprietery %Q and %q is used. The docs
should be correct, except for the fact, that obviously not many users of
mod_jk will know about strftime().

Don't confuse JkLogStampFormat with JkRequestLogFormat. The first is
only for the time stamp formatting, the second adds access log like
lines to the jk log. The first ones uses a list of pattern characters
similar to strftime (strftime + Q + q), the second one an access log
like list of patterns.

I generally do not recommend to use JkRequestLogFormat, because you
should be better of by using the notes you can add to your original
access log. See mod_log_config on the same docs page.

Concerning JkLogStampFormat I'm not sure, whether you should use it.
Yes, if you have strict rules how your timestamps have to be configured.
But there is also one experience that gives an argument against using
it: we introduced the helpful logging of milliseconds to our default
timestamp format. If you had configured a timestamp format yourself, you
wouldn't have gotten the milliseconds, because then the newly introduced
letter for it wouldn't have been in your old pattern.

Regards,

Rainer

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



Re: j_security_check/j_username/j_password issue in Tomcat Version 6.0.18

2009-05-15 Thread Sid Sidney
You should check to see if you are able to get the parameters when the 
request(s) is send via a get vs. a post.    

--- On Wed, 5/6/09, Sanjay Manchiganti ms4san...@yahoo.com wrote:

From: Sanjay Manchiganti ms4san...@yahoo.com
Subject: Re: j_security_check/j_username/j_password issue in Tomcat Version 
6.0.18
To: Tomcat Users List users@tomcat.apache.org
Date: Wednesday, May 6, 2009, 11:08 AM

What two versions?  

The version in which I can retrieve the j_username/j_password values is 
5.5.27.  This doesn't work in version 6.0.18.

When using Tomcat Version 6.0.18,  I monitored the app using a proxy(Charles 
Proxy),  I see the j_username and j_password in the request but when I do a 
request.getParameter(j_username) or request.getParameter(j_password) in a 
jsp I'm getting a null value back.

Thanks,
Sanjay.



From: Caldarale, Charles R chuck.caldar...@unisys.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, May 5, 2009 10:40:41 PM
Subject: RE: j_security_check/j_username/j_password issue in Tomcat Version 
6.0.18

 From: Sanjay Manchiganti [mailto:ms4san...@yahoo.com]
 Subject: j_security_check/j_username/j_password issue in Tomcat Version
 6.0.18
 
 Did anything change in terms of j_securitycheck / container managed
 security between these two versions of tomcat?

What two versions?  The only one you mention is 6.0.18; I don't think much 
changed between 6.0.18 and 6.0.18.

- Chuck


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


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


      


  

Re: MAX Simultaneous connections with Tomcat on Windows XP Pro

2009-05-15 Thread David Kerber

Arijit Sarkar Job Gmail wrote:

WOW!! That was fast..

So If I have an web application deployed on tomcat and windows XP pro,
theoretically, unlimited users can connect to the application
simultaneously?
Tomcat or Windows XP does not place any limits to that?
  
The only limits are resource limits (memory, cpu, network bandwidth, 
etc) if you hit it with a lot of connections at a time, and what you 
configure in tc's config files in order to control the performance and 
stay within those resource limits (threads, mainly).


D



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



RE: .html pages as .jsp pages

2009-05-15 Thread Dola Woolfe

Hi,

I did this but when I click on a .html file to open it, I'm still not getting 
syntax aware editing like I do with .jsp pages. It still think it's HTML. 
Anything else I should look at?

Thanks

--- On Fri, 5/15/09, Karthik Nanjangude karthik.nanjang...@xius-bcgi.com 
wrote:

 From: Karthik Nanjangude karthik.nanjang...@xius-bcgi.com
 Subject: RE: .html pages as .jsp pages
 To: Tomcat Users List users@tomcat.apache.org
 Date: Friday, May 15, 2009, 9:44 AM
 Hi
 
 An Offline topic ... :{
 
 
  Off topic? How do I set up Eclipse so that .html
 files are opened with the same editor as .jsp
 
 In Eclipse -- windows -- Preference.. - General
 --
                
                
              Editors
 -- File Associations
 
 Map the *.html file to Assiociate JSP Editor
 
 
 
 
 Simple  :)
 
 With regards
 Karthik
 
 
 
 
 -Original Message-
 From: Nikola Milutinovic [mailto:alok...@yahoo.com]
 Sent: Friday, May 15, 2009 4:45 PM
 To: Tomcat Users List
 Subject: Re: .html pages as .jsp pages
 
 Well, it should be relatively simple. Add the following to
 your web.xml:
 
     servlet-mapping
        
 servlet-namejsp/servlet-name
        
 url-pattern*.html/url-pattern
     /servlet-mapping
 
 
 Nix.
 
 
 
 
 From: Dola Woolfe dolac...@yahoo.com
 To: Tom Cat tomcat-u...@jakarta.apache.org
 Sent: Thursday, May 14, 2009 8:43:47 PM
 Subject: .html pages as .jsp pages
 
 
 Hi,
 
 I need to give my jsp files the extension .html
 
 1. How do I configure tomcat to treat .html files as .jsp
 files?
 
 2. Off topic? How do I set up Eclipse so that .html files
 are opened with the same editor as .jsp files and give me
 all of the syntax highlighting, etc.
 
 Many thanks in advance,
 
 Dola
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 




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



trouble starting tomcat: error 0 on Windows 64bit

2009-05-15 Thread w...@serensoft.com
We're having a heck of a time getting tomcat running on windows server
2003 enterprise x64 -- it barely gets started, and instantly quits. We
installed java from jdk-1_5_0_18-windows-amd64.exe  which seems to be
the only 64-bit version available? Our processor is intel, tho... Is
there an intel-not-amd version we missed?


All we get is error 0x0...?

This is on Windows Server 2003 R2 Enterprise x64 (SP2) -- Yes, this is
a 64-bit machine

Tried tomcat from both apache-tomcat-5.5.27.exe installer and from straight ZIP

Java is 1.5.0_18

Java has no spaces in its path: C:\Java\jdk1.5.0_18 (from
jdk-1_5_0_18-windows-amd64.exe installer)

No port conflicts (we're asking for port 80 instead of 8080) according
to netstat -an


yes, we're listening on port 80 instead of 8080 (via server.xml);
Tomcat has no spaces in its path: C:\Tomcat55

Executing tomcat5.exe from the command line shows only a blank line,
then the command prompt pops up again (no text-to-console logged).

Executing startup.bat shows
Using CATALINA_BASE:   C:\Tomcat55
Using CATALINA_HOME:   C:\Tomcat55
Using CATALINA_TMPDIR: C:\Tomcat55\temp
Using JRE_HOME:C:\Java\jdk1.5.0_18

We've tried running it as a service (setting it up via 'service.bat'), too:

The startadmincomponentServicesevent viewer shows only:

The Apache Tomcat service terminated with service-specific error 0 (0x0).

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.


C:\Tomcat55\logstype jakarta_service_20090515.log
[2009-05-15 15:03:59] [info] Procrun (2.0.4.0) started
[2009-05-15 15:03:59] [info] Service sakai name Apache Tomcat sakai
[2009-05-15 15:04:00] [info] Service sakai installed
[2009-05-15 15:04:00] [info] Procrun finished.
[2009-05-15 15:04:00] [info] Procrun (2.0.4.0) started
[2009-05-15 15:04:00] [info] Updating service...
[2009-05-15 15:04:00] [info] Service sakai updated
[2009-05-15 15:04:00] [info] Update service finished.
[2009-05-15 15:04:00] [info] Procrun finished.
[2009-05-15 15:04:00] [info] Procrun (2.0.4.0) started
[2009-05-15 15:04:00] [info] Updating service...
[2009-05-15 15:04:00] [info] Service sakai updated
[2009-05-15 15:04:00] [info] Update service finished.
[2009-05-15 15:04:00] [info] Procrun finished.
[2009-05-15 15:05:19] [info] Procrun (2.0.4.0) started
[2009-05-15 15:05:19] [info] Running Service...
[2009-05-15 15:05:19] [info] Starting service...
[2009-05-15 15:05:19] [174  javajni.c] [error] %1 is not a valid Win32
application.
[2009-05-15 15:05:19] [994  prunsrv.c] [error] Failed creating java
C:\Java\jdk1.5.0_18\jre\bin\server\jvm.dll
[2009-05-15 15:05:19] [1269 prunsrv.c] [error] ServiceStart returned 1
[2009-05-15 15:05:19] [info] Run service finished.
[2009-05-15 15:05:19] [info] Procrun finished.

Both stderr and stdout logs are empty.

We did find a thread online that recommended copy the file
msvcr71.dll from the bin dir of your java installation, to the bin dir
of the tomcat installation. Of course, we don't have a msvcr71 (tho
we did find a msvcrt.dll which didn't do the trick.)

Any pointers would be great!


-- 
will trillich
Our only real economic security lies in our power to meet human
needs. -- S.Covey, the 8th Habit

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