Virtual hosts and shared libraries

2005-07-21 Thread Oleg
I got a problem with Tomcat using a huge amount of memory on startup. Of 
course I realize that it all depends on how large are the applications. 
However, I have lets say two identical machines with Tomcat 5.5 installed. 
One Tomcat has 100 virtual hosts running the same application and takes up 
400MB of ram after it finished loading, second Tomcat has 300 identical 
applications but deployed under localhost and it uses only 200MB of ram 
after loading. Can somebody explain me what is the case here? Does it mean 
that virtual hosts load all libraries in shared directory for every host 
into memory but all application running under localhost, simply load them 
once? I am a bit lost, I need to figure something out to cut down on memory 
use, any ideas? All users are running same application, application specific 
classes are in its own application WEB-INF/classes and all libraries needed 
to run the application, like struts and hibernate and so on are in shared. 
Thank you.


Re: jsp stuff

2005-07-21 Thread Phuoc Diec
Hi,

One way to access database from JSP pages is using connection pool
from JNDI. You can find more information from here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html


On 7/21/05, ganesan malairaja <[EMAIL PROTECTED]> wrote:
> hi guys
> 
> i want to know is there any setting to be done with tomcat so the JSP codes
> can access the database ( MySQL) and display the information ?
> 
> 
> 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: RAM limity

2005-07-21 Thread Caldarale, Charles R
> From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
> Subject: Re: RAM limity
> >
> >I'm using TC559 and JVM 1.5.x with Win2003 / 2GB RAM.
> >I'd like upgrade to 4GB RAM...is there any JVM or Tomcat limit here?
> 
> I think JVM cannot use more than 1.6 GB of RAM - dunno why.

It's a Windows limitation.  Windows normally provides only 2 GB of
virtual address space per process, and this is somewhat fragmented by
various DLLs that are scattered about in it.  The JVM requires
contiguous space for its heap (at least it did in 1.4, haven't looked
inside 1.5 yet), and the biggest chunk it can get is about 1.6 MB.
There is a bootstrap option (sorry, I can't remember the tag) for some
versions of Windows server that allows 3 GB of address space per
process, but it reduces the amount of memory available for kernel
control structures, so there are tradeoffs in using it.  Also, the
32-bit JVM did have a problem with heaps over 2 GB due to sign handling
errors; this may be fixed in current levels (haven't tried it in a
while).

In any event, putting 4 GB on the system will help some, since that
would eliminate the risk of doing any paging, assuming you're not
running much else other than Tomcat.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RAM limity

2005-07-21 Thread Nikola Milutinovic

Paulo Alvim wrote:


Hi,

I'm using TC559 and JVM 1.5.x with Win2003 / 2GB RAM.

I'd like upgrade to 4GB RAM...is there any JVM or Tomcat limit here?
 



I think JVM cannot use more than 1.6 GB of RAM - dunno why.

Nix.

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



Limitting bandwidth: Filedownload

2005-07-21 Thread Lars Nielsen Lind
Hi.

 

Is there a way to make two channels with Apache / Jakarta-Tomcat regarding
to the Internet connections bandwidth?

 

One channel serving jsp, html, gif, jpg, png files, another channel serving
pdf, xls, doc files. Lets say the bandwidth totally are 512 kb is it then
possible to define for instance 384 kb for the first channel and 128 kb for
the last channel, vice versa?

 

The files are physically placed in the filesystem outside of Apache /
Jakarta-Tomcat webapp directory and is fetched with a download servlet
component.

 

Best regards,

 

Lars Nielsen Lind



mod_jk not detecting loss of a load balanced machine

2005-07-21 Thread Edmon Begoli
We've noticed with two versions of mod_jk we've been using (1.2.5 and 
one older) that if one of the machines
hosting load balanced tomcat gets completely off the network (power 
loss) mod_jk will seem not to emove that one from the load balanced 
instances,
so the whole site will appear down because mod_jk will I guess try to 
hit it. I can not say for sure that it is the reason behind the scenes,
but I can say for sure that these versions of mod_jk do not respond well 
to machine losses - which is a pretty possible scenario.


My question is - has this been addressed in some of the later releases, 
and if not is there a workaround?





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



RE: Error 500 messages

2005-07-21 Thread Rob Hills
Hi Adile,

I did say it was untested, and I've spotted a problem in my code already 
(why are bugs so invisible BEFORE you press the send button??!!)

On 22 Jul 2005 at 9:41, Rob Hills wrote:

> Something like the following (untested) in your error.jsp should do the trick:
> 
> <%
>   if (exception == null) {
> %>
> A null exception was encountered
> <%
>   } else {
> if (exception instanceof SQLException) {
>   Exception e = exception;  // WRONG

the line above should read:
  SQLException e = (SQLException)exception;

>   while (e != null) {
> %>
> Error Code: <%=e.getErrorCode()%>
> Message: <%=e.getMessage()%>
> <%
> e = e.getNextException();
>   }
> } else {
>   // non-sql error handling here...
> }
>   }
> 
> HTH,
> 
> Rob Hills
> www.netpaver.com.au
> Western Australia
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


Rob Hills
MBBS, Grad Dip Com Stud, MACS
Senior Consultant
Netpaver Web Solutions
Tel:(08) 9485 2555
Mob:(0412) 904 357
Fax:(08) 9485 2555



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



jsp stuff

2005-07-21 Thread ganesan malairaja

hi guys

i want to know is there any setting to be done with tomcat so the JSP codes 
can access the database ( MySQL) and display the information ?



thank you



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



Automated Server Configuration (was api for server.xml maintenance)

2005-07-21 Thread Rob Hills
Hi All,

I received no reply to my earlier email in this thread so I thought I'd try and 
come up with a less verbose description of my problem.

I'm looking to automate the management of hosts on my server.

Our tomcat servers operate multiple applications, each of which has its own 
host entry and root context.  We do this because each application has its 
own domain name and the domain name and root context is an important 
feature for our clients.

I've read the documentation on the Tomcat Manger and the Tomcat 
Deployer in great detail, but as far as I can tell, both only support the 
management of contexts under a previously established host.

I'm also aware of the ability to "auto-deploy" applications by depositing their 
WAR files into the %CATALINA_HOME%/webapps directory.  However, 
these are then associated with a context under the default host, which is not 
what I want to achieve.

I'd thought maybe there I could write a request filter that redirects requests 
for a specified url (domain name + url) to a context in the default host, but 
I'm not even sure that would do what I need, let alone how it would 
perform/scale.

Any thoughts, suggestions, comments welcome.

Rob Hills
www.netpaver.com.au
Western Australia

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



Re: Problem running Tomcat on Windows 64-Bit Edition

2005-07-21 Thread Bill Barker
There is a srvbatch in commons-daemon (I'm too lazy to look if there is a 
binary released for it :) that will allow you run the batch files as a 
service.

You can also grab the source from commons-daemon and compile a 64bit version 
yourself (only the MSDK is needed, but you need to create your own 
makefiles).

I've done both, and they both work well (but only the second one lets you 
have the nice configuration GUI :).

"Spors, Jeffrey R" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
I am trying to run Tomcat 5.5.9 as a service on Windows Server 2003
64-Bit Edition.

The following scenarios work fine:
 - 32-bit JDK and Tomcat 5.5 running as a service and using startup.bat
 - 64-bit JDK and Tomcat 5.5 using startup.bat

However, I can't run 64-bit JDK and Tomcat 5.5 as a service because it
runs tomcat5.exe, which is 32-bit app (32-bit apps cannot reference
64-bit apps and vice versa on Windows 64).

Is there a 64-bit binary for tomcat5.exe, is it possible for me to build
tomcat5.exe as a 64-bit app from source, or is there a way of getting
Tomcat to run as a service using only the .bat files?  Thanks for any
help.

Jeff Spors
Winona State University 




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



RE: Error 500 messages

2005-07-21 Thread Rob Hills
Hi Adile,

On 21 Jul 2005 at 19:09, Adile Abbadi wrote:

> Now I did a little more experimenting and discovered something interesting -
> as I said I can get an exception to be thrown to the page in a simple JSP
> file (I made it do a null pointer for example) and I can get it do pretty
> any other exception as well. Now what I did is I took one my more
> complicated JSP pages, made a copy and made a few changes to force some
> exceptions - now here is the weird thing - some exceptions are thrown to the
> screen and some are not.
> 
> For example I had a ResultSet DB object and I made a syntax error and I got
> an Error 500 screen to come up as follows (note I took out the extra stuff
> to shorten the email)
> 
> org.apache.jasper.JasperException: Unable to compile class for JSP

Note, you will always get a stacktrace if Tomcat can't compile a JSP - I 
believe this is appropriate as this is a "developer" error rather than a 
"runtime" error.

> However I tried to get it to do a syntax error in the query - and I end up
> with a blank page. The catalina log shows nothing, but my context log shows
> the following (clown is the word I used to screw up the query)
> 
> javax.servlet.ServletException: ERROR:  syntax error at or near "CLOWN" at
> character 260
> 
> --Root Cause--
> java.sql.SQLException: ERROR:  syntax error at or near "CLOWN" at character
> 260
> 
> Its almost as it the page refuses to compile with this error.

No, it has compiled OK or else you'd get the same kind of message as you 
did previously.

I suspect the reason you get a blank page is that for reason's I've never 
been able to discover, SQL Exceptions are nested and the last error (the 
one shown on your error page) is always empty :-(

to see the true error(s), you have to write some code that works its way 
back through the nested SQL Exceptions, printing out the message for each 
as you go.

Something like the following (untested) in your error.jsp should do the trick:

<%
  if (exception == null) {
%>
A null exception was encountered
<%
  } else {
if (exception instanceof SQLException) {
  Exception e = exception;
  while (e != null) {
%>
Error Code: <%=e.getErrorCode()%>
Message: <%=e.getMessage()%>
<%
e = e.getNextException();
  }
} else {
  // non-sql error handling here...
}
  }

HTH,

Rob Hills
www.netpaver.com.au
Western Australia

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



RE: Error 500 messages

2005-07-21 Thread Adile Abbadi
Hi Anoop thanx for your help - first in regards to the file that the log is
writing to I'm referring to a log file I created for my context in the XML
supporting that context using the FileLogger (similar to as you have below).

Now I did a little more experimenting and discovered something interesting -
as I said I can get an exception to be thrown to the page in a simple JSP
file (I made it do a null pointer for example) and I can get it do pretty
any other exception as well. Now what I did is I took one my more
complicated JSP pages, made a copy and made a few changes to force some
exceptions - now here is the weird thing - some exceptions are thrown to the
screen and some are not.

For example I had a ResultSet DB object and I made a syntax error and I got
an Error 500 screen to come up as follows (note I took out the extra stuff
to shorten the email)

org.apache.jasper.JasperException: Unable to compile class for JSP

/var/lib/tomcat4/work/Standalone/localhost/podims/mod_pat_test_jsp.java:118:
')' expected
while(SQLR.next() {

I also got it do a null pointer exception:

org.apache.jasper.JasperException

Root Cause
java.lang.NullPointerException

However I tried to get it to do a syntax error in the query - and I end up
with a blank page. The catalina log shows nothing, but my context log shows
the following (clown is the word I used to screw up the query)

javax.servlet.ServletException: ERROR:  syntax error at or near "CLOWN" at
character 260

--Root Cause--
java.sql.SQLException: ERROR:  syntax error at or near "CLOWN" at character
260

Its almost as it the page refuses to compile with this error.

Any ideas - is it a configuration thing?

Thanx

Adile


-Original Message-
From: Anoop kumar V [mailto:[EMAIL PROTECTED]
Sent: July 21, 2005 6:32 PM
To: Tomcat Users List
Subject: Re: Error 500 messages


It might be easier than you think to output the error right onto the
page itself.

But would it help if you see the errors (+ other things) on the tomcat
console?? It will certainly help in your debugging.

To do that edit the server.xml in the conf directory and remove lines
similar to this:

  

The only problem I have seen when I do this is that a lot of
information prints out on to the console and makes it cluttered - but
my hope is that when you get an error/exception you will be able to
notice it in the console amidst all the other debugging info. Also
ensure that the debug has the value 0 in the host tag. This will
reduce the amount of debugging info.

Another point I wish to make is that when there is an error tomcat
just writes one file I am not sure which files you mention that
tomcat writes

The easiest thing I do and it works too is that - everything is
outputted into my one output file catalina.out and I use "tail -f
catalina.out" to see what is going on - of course this works only on
*nix servers (pity windows!!)...

HTH,
Anoop

On 7/21/05, Adile Abbadi <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I've got a very simple question to ask and I'm sure someone out there can
> help me. Ok I just migrated from Tomcat 3 to Tomcat 4 and everything is
> working great except one little thing. But a little background before I go
> on.
>
> Apache/Tomcat4 configuration - using libapache-mod_jk as the connector.
> Running on Linux
> JDK1.4
>
> My app is built in JSP with JavaBeans in the background. Most of JSP's are
> built as follows
>
> Container JSP file
> --jsp includes doing different thing like load session variables or nav
> menus, etc.
>
> Alright so here is the issue - in Tomcat 3 - whenever an error occurred
such
> as a null pointer, or other exception - the error would output right to
the
> JSP page itself and I could see it on the screen.
>
> Now in Tomcat 4 it outputs the error to the log. This is all fine and
dandy
> but it makes it hell to try and fix issues having to sift through log
files
> to figure out what the problem is.
>
> Now I have tried to build a simple test.jsp file and force it to through
an
> exception and that works fine (gives me the standard apache/tomcat error
500
> screen) - but for some reason in the more complicated jsp pages - I can't
> get the exception to come to the screen.
>
> So any ideas??
>
> Thanx
>
> Adile
>   
>  Mr. Adile Abbadi-MacIntosh - Chief Technical Officer
>
>
>  A: Suite 500 - 400 Crowfoot Cres NW
> Calgary, Alberta, Canada
> T3G 5H6 P: 403.693.2609
>  F: 403.693.2604
>  E: [EMAIL PROTECTED] C: 403.383.5285 
>
>


--
Thanks and best regards,
Anoop

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

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.9.2/54 - Release Date: 7/21/05

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Datab

Re: Dynamic server configuration...

2005-07-21 Thread Rob Hills
Hi Rodrigo,

On 21 Jul 2005 at 19:12, Rodrigo Spievak Cavalcanti wrote:

> Is there any way to change tomcat engine configuration at runtime, 
> without restarting the entire engine ? Some kind of dynamic engine 
> configuration, being able to change hosts, add hosts, and changing host 
> configurations ?

As far as I am aware, Tomcat currently has to be restarted if anything that is 
configured in server.xml is changed, whether by editing server.xml directly 
or by changing it using the Admin console.

I have previously asked a question on this list about automated 
management of server.xml (eg via an api or whatever) but have not 
received a reply to date.

Rob Hills
www.netpaver.com.au
Western Australia

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



Re: Application doesn't respond at all

2005-07-21 Thread Anoop kumar V
Seems like some application/class is consuming too many
thread/resources... I would suggest you use some profiling tool to
understand your problem better - I personally prefer JMeter - but
there are lots of tools available for this purpose.

HTH
Anoop

On 7/21/05, Pugalia, Jai P (JP) <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have a JSF web application deployed on Tomcat 5.0.28. Initially the
> application works normally and then it goes into a state where it stops
> responding to user requests from the browser. Once the application
> enters this state, even if a new browser window is launched, none of the
> application pages are accessible. Tomcat home page is still accessible
> implying that Tomcat is in good state. There are some background threads
> in the application and these continue to execute. However none of the
> web pages are shown in the browser window. The Tomcat logs do not
> provide any clues as to where the application is getting stuck. The only
> way out is to restart Tomcat.
> 
> Any suggestions on how to figure out where the request for the
> application is being held up?
> 
> Thanks,
> JP
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Thanks and best regards,
Anoop

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



Re: Error 500 messages

2005-07-21 Thread Anoop kumar V
It might be easier than you think to output the error right onto the
page itself.

But would it help if you see the errors (+ other things) on the tomcat
console?? It will certainly help in your debugging.

To do that edit the server.xml in the conf directory and remove lines
similar to this:

  

The only problem I have seen when I do this is that a lot of
information prints out on to the console and makes it cluttered - but
my hope is that when you get an error/exception you will be able to
notice it in the console amidst all the other debugging info. Also
ensure that the debug has the value 0 in the host tag. This will
reduce the amount of debugging info.

Another point I wish to make is that when there is an error tomcat
just writes one file I am not sure which files you mention that
tomcat writes

The easiest thing I do and it works too is that - everything is
outputted into my one output file catalina.out and I use "tail -f
catalina.out" to see what is going on - of course this works only on
*nix servers (pity windows!!)...

HTH,
Anoop

On 7/21/05, Adile Abbadi <[EMAIL PROTECTED]> wrote:
>  
> Hi all, 
>   
> I've got a very simple question to ask and I'm sure someone out there can
> help me. Ok I just migrated from Tomcat 3 to Tomcat 4 and everything is
> working great except one little thing. But a little background before I go
> on. 
>   
> Apache/Tomcat4 configuration - using libapache-mod_jk as the connector. 
> Running on Linux 
> JDK1.4 
>   
> My app is built in JSP with JavaBeans in the background. Most of JSP's are
> built as follows 
>   
> Container JSP file 
> --jsp includes doing different thing like load session variables or nav
> menus, etc. 
>   
> Alright so here is the issue - in Tomcat 3 - whenever an error occurred such
> as a null pointer, or other exception - the error would output right to the
> JSP page itself and I could see it on the screen. 
>   
> Now in Tomcat 4 it outputs the error to the log. This is all fine and dandy
> but it makes it hell to try and fix issues having to sift through log files
> to figure out what the problem is. 
>   
> Now I have tried to build a simple test.jsp file and force it to through an
> exception and that works fine (gives me the standard apache/tomcat error 500
> screen) - but for some reason in the more complicated jsp pages - I can't
> get the exception to come to the screen. 
>   
> So any ideas?? 
>   
> Thanx 
>   
> Adile 
>   
>  Mr. Adile Abbadi-MacIntosh - Chief Technical Officer
> 
>  
>  A: Suite 500 - 400 Crowfoot Cres NW
> Calgary, Alberta, Canada
> T3G 5H6 P: 403.693.2609 
>  F: 403.693.2604 
>  E: [EMAIL PROTECTED] C: 403.383.5285 
>  
>   


-- 
Thanks and best regards,
Anoop

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



Re: RAM limity

2005-07-21 Thread Tim Funk

Nope. No limits. Just OS limits.


-Tim

Paulo Alvim wrote:

Hi,

I'm using TC559 and JVM 1.5.x with Win2003 / 2GB RAM.

I'd like upgrade to 4GB RAM...is there any JVM or Tomcat limit here?



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



Application doesn't respond at all

2005-07-21 Thread Pugalia, Jai P \(JP\)
Hi,

I have a JSF web application deployed on Tomcat 5.0.28. Initially the
application works normally and then it goes into a state where it stops
responding to user requests from the browser. Once the application
enters this state, even if a new browser window is launched, none of the
application pages are accessible. Tomcat home page is still accessible
implying that Tomcat is in good state. There are some background threads
in the application and these continue to execute. However none of the
web pages are shown in the browser window. The Tomcat logs do not
provide any clues as to where the application is getting stuck. The only
way out is to restart Tomcat. 

Any suggestions on how to figure out where the request for the
application is being held up?

Thanks,
JP

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



Re: What commands to run in the Tomcat Debug Mode on Linux

2005-07-21 Thread Wendy Smoak
From: "Jyothi Palvai" <[EMAIL PROTECTED]>
> But I am on a linux box and I am unable to get it to start by using the
socket.
> I set the socket to 8000 but it does not seem to work, JPDA_ADDRESS=8000
> and JPDA_TRANSPORT=dt_socket  is already set in catalina.sh,
> so I just run using catalina run jpda. And when I run tomcat it starts
> and after that nothing happens.

You're going to have to be more specific than "it does not seem to work."
What did it do, and what did you think would happen?

I'm not sure if you're expecting Tomcat to "do something" when you start it
in debug mode.  It doesn't.  It acts normally until you connect to it with
the debugger you've chosen to use.  (Which one is that?)

I'm also unsure of the difference between 'run' and 'start'.  If you just
type 'catalina.bat' with no parameters, it prints out a usage statement that
lists 'jpda start' but not 'run jpda'.  Since it lists both 'run -security'
and 'start -security' separately I have to wonder if  'run jpda' is even a
valid option.

-- 
Wendy Smoak


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



RE: Max thread/session timeouts

2005-07-21 Thread Warren Taylor
There is no unsubscribe link.

WARREN TAYLOR
Sunbelt Business Advisors
Sunbelt Business Brokers of MS
www.sunbeltnetwork.com

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 5:06 PM
To: Tomcat Users List
Subject: RE: Max thread/session timeouts

Mr. Taylor,
 Not sure how you got on this list.  To remove yourself, scroll to the
bottom of any one of the messages to which you've replied and click on the
unsubscribe link.
Warren Pace


> Take me off this fucking list.
> 
> WARREN TAYLOR
> Sunbelt Business Advisors
> Sunbelt Business Brokers of MS
> www.sunbeltnetwork.com
> 
> -Original Message-
> From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 21, 2005 5:00 PM
> To: Tomcat Users List
> Subject: Re: Max thread/session timeouts
> 
> Ouch! Thats a LOT of threads - I can't believe your box still performs 
> well with this many threads - or have you enabled keep-alives?
> 
> The number of threads really depends on your application. I have max 
> threads set to 750, or our 32bit 2.6 Linux systems. Our thread count 
> normally doesn't go over 200. When the servers need to wait for the 
> backend, and the requests start to queue (heading towards 1000) - you 
> will end up with a huge problem anyway, as it is probably unlikely that 
> your backend servers/ database, etc, will be able to catch up  with the 
> requests, but as I said, that depends how and what your application does.
> 
> Andrew
> 
> J. Ryan Earl wrote:
> 
> > As a reference, in conf/server.xml I set my thread limit to 1 max 
> > threads, 1000 max idle threads, and 100 on startup.  I've seen my as 
> > many as 7K threads busy within my application.  This is on a 32bit 2.6 
> > Linux kernel with 2GB of RAM (-Xmx1500m).  On the 2.4 kernel I found 
> > practical limitations in how many "threads" the kernel could multiplex 
> > between, saw frequent system hangs under high load where the whole 
> > server would become unusable.
> >
> > On either linux kernel, you probably want to increase your maximum 
> > number of file descriptors in /etc/security/limits.conf for your 
> > Tomcat user account(s).  16K nofile as default works great for me.
> >
> > How much more memory you need really depends on your application.  500 
> > threads isn't that much memory overhead, but if each thread goes off 
> > and creates a bunch of objects while it's working you'll need to 
> > assure heapspace is available accordingly.  The short answer is: try 
> > it out, play with it.  500 threads isn't a whole lot.
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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




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



Re: What commands to run in the Tomcat Debug Mode on Linux

2005-07-21 Thread Jyothi Palvai
But I am on a linux box and I am unable to get it to start by using the socket. 
I set the socket to 8000 but it does not seem to work, JPDA_ADDRESS=8000 and 
JPDA_TRANSPORT=dt_socket  is already set in catalina.sh, so I just run using 
catalina run jpda. And when I run tomcat it starts and after that nothing 
happens.
Wendy Smoak <[EMAIL PROTECTED]> wrote:From: "Jyothi Palvai" 
> I think I have tomcat running in debug mode on a linux, I did this by
running the
> "catalina run debug" command but I don't know the debug commands to run to
> get to start Tomcat, watch the variables, put debug points etc.

You appear to be asking how to use your debugger, which we can't answer
unless you tell us what you're using.

I use JSwat with the Tomcat, Struts and Commons source code available. All
I do is start Tomcat with 'catalina.bat jpda start'. On Windows, it
defaults to shared memory, and I see the following in the console:
Listening for transport dt_shmem at address: jdbconn

(IIRC, on Linux it defaults to the other option, involving a socket.) There
is some info here:
http://jakarta.apache.org/tomcat/faq/development.html#rd

HTH
-- 
Wendy Smoak


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




-
Do you Yahoo!?
 Read only the mail you want - Yahoo! Mail SpamGuard.

Error 500 messages

2005-07-21 Thread Adile Abbadi



Hi 
all,
 
I've got a very 
simple question to ask and I'm sure someone out there can help me. Ok I just 
migrated from Tomcat 3 to Tomcat 4 and everything is working great except one 
little thing. But a little background before I go on.
 
Apache/Tomcat4 
configuration - using libapache-mod_jk as the connector.
Running on 
Linux
JDK1.4
 
My app is built in 
JSP with JavaBeans in the background. Most of JSP's are built as 
follows
 
Container JSP 
file
--jsp includes 
doing different thing like load session variables or nav menus, 
etc.
 
Alright so here is 
the issue - in Tomcat 3 - whenever an error occurred such as a null pointer, or 
other exception - the error would output right to the JSP page itself and I 
could see it on the screen.
 
Now in Tomcat 4 it 
outputs the error to the log. This is all fine and dandy but it makes it hell to 
try and fix issues having to sift through log files to figure out what the 
problem is. 
 
Now I have tried 
to build a simple test.jsp file and force it to through an exception and that 
works fine (gives me the standard apache/tomcat error 500 screen) - but for some 
reason in the more complicated jsp pages - I can't get the exception to come to 
the screen.
 
So any 
ideas??
 
Thanx
 
Adile
 

Mr. Adile Abbadi-MacIntosh - Chief 
Technical Officer

  
  

A:
Suite 500 - 400 Crowfoot Cres NWCalgary, Alberta, 
  CanadaT3G 5H6
P:
403.693.2609
  
F:
403.693.2604
  
E:
[EMAIL PROTECTED]
C:
403.383.5285


 


Jsp and xml

2005-07-21 Thread Kiran Patel
Hello all,

I am creating a xml document using JSP.  The JAVA codes in JSP creates blank 
lines in xml document.  How can I remove this or how can I don't create.  I 
will appreciate any help.

Thank You,

Kiran Patel
Software Engineer
Solutions Inc.


Dynamic server configuration...

2005-07-21 Thread Rodrigo Spievak Cavalcanti

Hi folks,

   Is there any way to change tomcat engine configuration at runtime, 
without restarting the entire engine ? Some kind of dynamic engine 
configuration, being able to change hosts, add hosts, and changing host 
configurations ?


  Thanks.

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



RE: tomcat 4.x classpath

2005-07-21 Thread Bergthorson, Jason
I want to add a directory that I have in my j2sdk\jre\lib\ext that I am
using for development on that server.  
I don't want to have to copy that folder over to tomcat/common/classes
(for example), and have 2 copies of my code on the same system.  I would
rather add my j2sdk\jre\lib\ext\X to tomcat's classpath, or just have
tomcat read my system classpath and get it from there.
But by default tomcat does not use your system classpath, and I can't
figure out how to either add the system classpath to its classpath or to
add directories to it.  It would read jar files from my lib/ext I
believe, but because this code is in development it is not yet in a jar
file.

jason
-Original Message-
From: Alon Belman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 4:35 PM
To: Tomcat Users List
Subject: Re: tomcat 4.x classpath

You almost certainly don't need to set it directly.  Tomcat will build
classpaths for its different class loaders itself following the rules
explained here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html

On 7/21/05, Bergthorson, Jason <[EMAIL PROTECTED]> wrote:
> How do you add directories to tomcat's classpath?
> 
> 
> 
> Jason Bergthorson
> 
> GIS Programmer/Applications Developer
> 
> 
> 
> Phone: 204.983.4035
> 
> Fax: 204.983.2178
> 
> 200-303 Main Street
> 
> Winnipeg MB R3C 3G7
> 
> 
> 
> [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: Max thread/session timeouts

2005-07-21 Thread Larry Meadors
Whoa! Someone forgot to take their meds today...

To unsubscribe, e-mail:
[EMAIL PROTECTED]

Larry


On 7/21/05, Warren Taylor <[EMAIL PROTECTED]> wrote:
> To unsubscribe, e-mail: [EMAIL PROTECTED]


RE: Max thread/session timeouts

2005-07-21 Thread pacea
Mr. Taylor,
 Not sure how you got on this list.  To remove yourself, scroll to the 
bottom of any one of the messages to which you've replied and click on the 
unsubscribe link.
Warren Pace


> Take me off this fucking list.
> 
> WARREN TAYLOR
> Sunbelt Business Advisors
> Sunbelt Business Brokers of MS
> www.sunbeltnetwork.com
> 
> -Original Message-
> From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, July 21, 2005 5:00 PM
> To: Tomcat Users List
> Subject: Re: Max thread/session timeouts
> 
> Ouch! Thats a LOT of threads - I can't believe your box still performs 
> well with this many threads - or have you enabled keep-alives?
> 
> The number of threads really depends on your application. I have max 
> threads set to 750, or our 32bit 2.6 Linux systems. Our thread count 
> normally doesn't go over 200. When the servers need to wait for the 
> backend, and the requests start to queue (heading towards 1000) - you 
> will end up with a huge problem anyway, as it is probably unlikely that 
> your backend servers/ database, etc, will be able to catch up  with the 
> requests, but as I said, that depends how and what your application does.
> 
> Andrew
> 
> J. Ryan Earl wrote:
> 
> > As a reference, in conf/server.xml I set my thread limit to 1 max 
> > threads, 1000 max idle threads, and 100 on startup.  I've seen my as 
> > many as 7K threads busy within my application.  This is on a 32bit 2.6 
> > Linux kernel with 2GB of RAM (-Xmx1500m).  On the 2.4 kernel I found 
> > practical limitations in how many "threads" the kernel could multiplex 
> > between, saw frequent system hangs under high load where the whole 
> > server would become unusable.
> >
> > On either linux kernel, you probably want to increase your maximum 
> > number of file descriptors in /etc/security/limits.conf for your 
> > Tomcat user account(s).  16K nofile as default works great for me.
> >
> > How much more memory you need really depends on your application.  500 
> > threads isn't that much memory overhead, but if each thread goes off 
> > and creates a bunch of objects while it's working you'll need to 
> > assure heapspace is available accordingly.  The short answer is: try 
> > it out, play with it.  500 threads isn't a whole lot.
> >
> 
> 
> -
> 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: Max thread/session timeouts

2005-07-21 Thread Warren Taylor
Take me off this fucking list.

WARREN TAYLOR
Sunbelt Business Advisors
Sunbelt Business Brokers of MS
www.sunbeltnetwork.com

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 5:00 PM
To: Tomcat Users List
Subject: Re: Max thread/session timeouts

Ouch! Thats a LOT of threads - I can't believe your box still performs 
well with this many threads - or have you enabled keep-alives?

The number of threads really depends on your application. I have max 
threads set to 750, or our 32bit 2.6 Linux systems. Our thread count 
normally doesn't go over 200. When the servers need to wait for the 
backend, and the requests start to queue (heading towards 1000) - you 
will end up with a huge problem anyway, as it is probably unlikely that 
your backend servers/ database, etc, will be able to catch up  with the 
requests, but as I said, that depends how and what your application does.

Andrew

J. Ryan Earl wrote:

> As a reference, in conf/server.xml I set my thread limit to 1 max 
> threads, 1000 max idle threads, and 100 on startup.  I've seen my as 
> many as 7K threads busy within my application.  This is on a 32bit 2.6 
> Linux kernel with 2GB of RAM (-Xmx1500m).  On the 2.4 kernel I found 
> practical limitations in how many "threads" the kernel could multiplex 
> between, saw frequent system hangs under high load where the whole 
> server would become unusable.
>
> On either linux kernel, you probably want to increase your maximum 
> number of file descriptors in /etc/security/limits.conf for your 
> Tomcat user account(s).  16K nofile as default works great for me.
>
> How much more memory you need really depends on your application.  500 
> threads isn't that much memory overhead, but if each thread goes off 
> and creates a bunch of objects while it's working you'll need to 
> assure heapspace is available accordingly.  The short answer is: try 
> it out, play with it.  500 threads isn't a whole lot.
>


-
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.x classpath

2005-07-21 Thread Warren Taylor
Please take me off this mailing list.  I don't know how I got on it and
don't know what the hell it is about.



WARREN TAYLOR
Sunbelt Business Advisors
Sunbelt Business Brokers of MS
www.sunbeltnetwork.com
-Original Message-
From: Alon Belman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 4:35 PM
To: Tomcat Users List
Subject: Re: tomcat 4.x classpath

You almost certainly don't need to set it directly.  Tomcat will build
classpaths for its different class loaders itself following the rules
explained here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html

On 7/21/05, Bergthorson, Jason <[EMAIL PROTECTED]> wrote:
> How do you add directories to tomcat's classpath?
> 
> 
> 
> Jason Bergthorson
> 
> GIS Programmer/Applications Developer
> 
> 
> 
> Phone: 204.983.4035
> 
> Fax: 204.983.2178
> 
> 200-303 Main Street
> 
> Winnipeg MB R3C 3G7
> 
> 
> 
> [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: Max thread/session timeouts

2005-07-21 Thread Andrew Miehs
Ouch! Thats a LOT of threads - I can't believe your box still performs 
well with this many threads - or have you enabled keep-alives?


The number of threads really depends on your application. I have max 
threads set to 750, or our 32bit 2.6 Linux systems. Our thread count 
normally doesn't go over 200. When the servers need to wait for the 
backend, and the requests start to queue (heading towards 1000) - you 
will end up with a huge problem anyway, as it is probably unlikely that 
your backend servers/ database, etc, will be able to catch up  with the 
requests, but as I said, that depends how and what your application does.


Andrew

J. Ryan Earl wrote:

As a reference, in conf/server.xml I set my thread limit to 1 max 
threads, 1000 max idle threads, and 100 on startup.  I've seen my as 
many as 7K threads busy within my application.  This is on a 32bit 2.6 
Linux kernel with 2GB of RAM (-Xmx1500m).  On the 2.4 kernel I found 
practical limitations in how many "threads" the kernel could multiplex 
between, saw frequent system hangs under high load where the whole 
server would become unusable.


On either linux kernel, you probably want to increase your maximum 
number of file descriptors in /etc/security/limits.conf for your 
Tomcat user account(s).  16K nofile as default works great for me.


How much more memory you need really depends on your application.  500 
threads isn't that much memory overhead, but if each thread goes off 
and creates a bunch of objects while it's working you'll need to 
assure heapspace is available accordingly.  The short answer is: try 
it out, play with it.  500 threads isn't a whole lot.





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



Re: tomcat 4.x classpath

2005-07-21 Thread Alon Belman
You almost certainly don't need to set it directly.  Tomcat will build
classpaths for its different class loaders itself following the rules
explained here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html

On 7/21/05, Bergthorson, Jason <[EMAIL PROTECTED]> wrote:
> How do you add directories to tomcat's classpath?
> 
> 
> 
> Jason Bergthorson
> 
> GIS Programmer/Applications Developer
> 
> 
> 
> Phone: 204.983.4035
> 
> Fax: 204.983.2178
> 
> 200-303 Main Street
> 
> Winnipeg MB R3C 3G7
> 
> 
> 
> [EMAIL PROTECTED]
> 
> 
> 
> 
>

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



Re: forwarding (and adding to) a request to another server

2005-07-21 Thread Robert Koberg

Warren Taylor wrote:

Please take me off your mailing list.  I don't know what the hell you are
talking about.  I got on this mailing list by error and it is way beyond my
comprehension.



Can you read the bottom of the post to this mail list?



-
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: forwarding (and adding to) a request to another server

2005-07-21 Thread Warren Taylor
Please take me off your mailing list.  I don't know what the hell you are
talking about.  I got on this mailing list by error and it is way beyond my
comprehension.

WARREN TAYLOR
Sunbelt Business Advisors
Sunbelt Business Brokers of MS
www.sunbeltnetwork.com

-Original Message-
From: Robert Koberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 3:52 PM
To: Tomcat Users List
Subject: forwarding (and adding to) a request to another server

Hi,

I have a secure webapp (main portal) in Tomcat that calls webservices 
for authentication. There are other *existing* apps on different 
servers. All users log in to all apps through my app (single sign on). 
When a user clicks a link in my app that is to go to another secure app, 
I need to call a web service to get authentication info for that 
particular app. Then, POST the authentication info to the other server 
and have the requested page show in the browser.

Is there some way to:

1. get the request in a Filter
2. call the webservice and get auth info
3. redirect/forward/open-a-url-conn to POST the auth info as form data 
to another app
4. finally, have the other app's page show in the user's browser

?

Anybody done anything like this? Any ideas? Is it possible?

I could do this with JavaScript by building the form for each page that 
have these secure link types. But, it complicates things a great deal 
because I would need to call the webservice and put the auth info 
(encrypted strings) on the page even though the user may never click the 
link.

any ideas,
-Rob

-
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: DBCP datasource works on 5.0.28 but fails on 5.5.

2005-07-21 Thread Warren Taylor
Please stop sending this stuff to me.  Somehow, by mistake, I got on this
mailing list and don't know a thing about it.

WARREN TAYLOR
Sunbelt Business Advisors
Sunbelt Business Brokers of MS
www.sunbeltnetwork.com

-Original Message-
From: Kenneth B. Harwood [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 3:53 PM
To: Tomcat Users List
Subject: Re: DBCP datasource works on 5.0.28 but fails on 5.5.

This issue was originally submitted by Steve Kirk on 20-May-2005
and RESOLVED on 22-May.  FYI, I experienced the same error(s) as 
Steve and tried all the same things Steve did before discovering 
Steve's question (and thread) on the User List.  The fix (as first
advised by Lutz & Nicola) was to create the configuration files with
the proper settings.  I'm running:

Apache 2.0.54 (w/the latest mod_jk)
TC 5.5.9 (w/multiple instances)
mySQL Server 4.1
Win2K Pro (w/multiple IP addresses)

The thread was very helpful.  I solved my problem after QUADRUPLE
CHECKING my  and  files.  I don't know what
exactly fixed it, but this is what I did (and currently have):


1) Remove the  related to my database connection 


1) Use the "improved" Resource element style.  
That is, define as many params as possible within the Resouce Tag:

   

2) Define additional non/essential parameters within the 
Tag:

   

factory
 
org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory


 testWhileIdle
 true


 timeBetweenEvictionRunsMillis
 1


 minEvictableIdleTimeMillis
  6

   

3) Note possible incorrect documentation

Note I am using org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory.

According to the TC docs, the "factory" setting should be:
org.apache.commons.dbcp.BasicDataSourceFactory

There was another thread on this userlist (I can't locate it now) which 
advised using a different class. All I can say is that when I extract the 
class list from /Tomcat/common/lib/naming-factory-dbcp.jar,
I do *not* see org.apache.commons.dbcp.BasicDataSourceFactory.

-

Now my SQL statement (w/TagLib) works just fine:

  ...

  

  


 - Ken H.



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



RAM limity

2005-07-21 Thread Paulo Alvim
Hi,

I'm using TC559 and JVM 1.5.x with Win2003 / 2GB RAM.

I'd like upgrade to 4GB RAM...is there any JVM or Tomcat limit here?

Thanks in advance!

Paulo Alvim
Powerlogic - Brazil



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



Re: DBCP datasource works on 5.0.28 but fails on 5.5.

2005-07-21 Thread Kenneth B. Harwood
This issue was originally submitted by Steve Kirk on 20-May-2005
and RESOLVED on 22-May.  FYI, I experienced the same error(s) as 
Steve and tried all the same things Steve did before discovering 
Steve's question (and thread) on the User List.  The fix (as first
advised by Lutz & Nicola) was to create the configuration files with
the proper settings.  I'm running:

Apache 2.0.54 (w/the latest mod_jk)
TC 5.5.9 (w/multiple instances)
mySQL Server 4.1
Win2K Pro (w/multiple IP addresses)

The thread was very helpful.  I solved my problem after QUADRUPLE
CHECKING my  and  files.  I don't know what
exactly fixed it, but this is what I did (and currently have):


1) Remove the  related to my database connection 


1) Use the "improved" Resource element style.  
That is, define as many params as possible within the Resouce Tag:

   

2) Define additional non/essential parameters within the  Tag:

   

factory
org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory


 testWhileIdle
 true


 timeBetweenEvictionRunsMillis
 1


 minEvictableIdleTimeMillis
  6

   

3) Note possible incorrect documentation

Note I am using org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory.

According to the TC docs, the "factory" setting should be:
org.apache.commons.dbcp.BasicDataSourceFactory

There was another thread on this userlist (I can't locate it now) which 
advised using a different class. All I can say is that when I extract the 
class list from /Tomcat/common/lib/naming-factory-dbcp.jar,
I do *not* see org.apache.commons.dbcp.BasicDataSourceFactory.

-

Now my SQL statement (w/TagLib) works just fine:

  ...

  

  


 - Ken H.

forwarding (and adding to) a request to another server

2005-07-21 Thread Robert Koberg

Hi,

I have a secure webapp (main portal) in Tomcat that calls webservices 
for authentication. There are other *existing* apps on different 
servers. All users log in to all apps through my app (single sign on). 
When a user clicks a link in my app that is to go to another secure app, 
I need to call a web service to get authentication info for that 
particular app. Then, POST the authentication info to the other server 
and have the requested page show in the browser.


Is there some way to:

1. get the request in a Filter
2. call the webservice and get auth info
3. redirect/forward/open-a-url-conn to POST the auth info as form data 
to another app

4. finally, have the other app's page show in the user's browser

?

Anybody done anything like this? Any ideas? Is it possible?

I could do this with JavaScript by building the form for each page that 
have these secure link types. But, it complicates things a great deal 
because I would need to call the webservice and put the auth info 
(encrypted strings) on the page even though the user may never click the 
link.


any ideas,
-Rob

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



Re: Max thread/session timeouts

2005-07-21 Thread Michael Kleinhenz

>  We're running an application on Tomcat that often hits the limit of
> 150 threads.  Can someone with experience changing this value give me
> advice on it?  How big can you make this number?  How much extra memory
> do I need if I say change it to, say, 500?  Thanks.

just a few facts on threads in Tomcat:

  . you'll need (Xss*max_threads)+Xmx+x memory in your box, where x is
the memory needed by the basic JVM tasks besides the thread space
(say, 100MB).

  . on ia32/Windows, you can only assign 1.6GB (Xmx-)memory to a single
JVM. A value above it will break the 2GB barrier and will not run.

  . you need to find the balance between max_threads and Xmx. A lower Xmx
gives you a higher max_threads and vice versa.

  . Tomcat on Windows doesn't scale well. Use multiple Tomcat instances
on one box if you have a large box. In my setup, I run 4 Tomcats on a
2xXeon system with 4GB memory. Each Tomcat gets 1000 threads and
512MB. This is _much_ faster than a single Tomcat with all
memory and 4000 threads.

  . Windows 2003 Server, at least the Standard Edition has major
limitations in both TCP connections and memory. There are some
workarounds using esoteric registry keys, but none of them works
well. Windows is a crippled desktop os that wants to be on the
server. If you want really high performance on large boxes, use
Linux (Kernel 2.6!). You even get a better administration
interface. Hate this inefficient administration-by-clicking ;-)

-- Michael

-- 
Dipl.-Technoinform Michael Kleinhenz
tarent GmbH . Bahnhofstraße 13 . 53123 Bonn
fon: +49 (228) / 52 67 5-0
fax: +49 (228) / 52 67 5-25


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



Problem running Tomcat on Windows 64-Bit Edition

2005-07-21 Thread Spors, Jeffrey R
I am trying to run Tomcat 5.5.9 as a service on Windows Server 2003
64-Bit Edition.  

The following scenarios work fine:
 - 32-bit JDK and Tomcat 5.5 running as a service and using startup.bat
 - 64-bit JDK and Tomcat 5.5 using startup.bat

However, I can't run 64-bit JDK and Tomcat 5.5 as a service because it
runs tomcat5.exe, which is 32-bit app (32-bit apps cannot reference
64-bit apps and vice versa on Windows 64).

Is there a 64-bit binary for tomcat5.exe, is it possible for me to build
tomcat5.exe as a 64-bit app from source, or is there a way of getting
Tomcat to run as a service using only the .bat files?  Thanks for any
help.

Jeff Spors
Winona State University


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



Re: Max thread/session timeouts

2005-07-21 Thread J. Ryan Earl
As a reference, in conf/server.xml I set my thread limit to 1 max 
threads, 1000 max idle threads, and 100 on startup.  I've seen my as 
many as 7K threads busy within my application.  This is on a 32bit 2.6 
Linux kernel with 2GB of RAM (-Xmx1500m).  On the 2.4 kernel I found 
practical limitations in how many "threads" the kernel could multiplex 
between, saw frequent system hangs under high load where the whole 
server would become unusable.


On either linux kernel, you probably want to increase your maximum 
number of file descriptors in /etc/security/limits.conf for your Tomcat 
user account(s).  16K nofile as default works great for me.


How much more memory you need really depends on your application.  500 
threads isn't that much memory overhead, but if each thread goes off and 
creates a bunch of objects while it's working you'll need to assure 
heapspace is available accordingly.  The short answer is: try it out, 
play with it.  500 threads isn't a whole lot.


-ryan

Kenneth Litwak wrote:


 We're running an application on Tomcat that often hits the limit of
150 threads.  Can someone with experience changing this value give me
advice on it?  How big can you make this number?  How much extra memory
do I need if I say change it to, say, 500?  Thanks.



Ken
 



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



Re: Apache2+jk+tomcat5.028+uri utf-8 [NOT] SOLVED

2005-07-21 Thread Chris Brown
Hello, Sorry for not replying to the thread referenced in my subject (See July 
1st, 2005), I'm new to the list and didn't have the email to reply to. 

I am having the same trouble that Paul and Steve encountered. (Error connecting 
to tomcat from mod_jk). Like Steve I have two similarly configured machines, 
one works, one doesn't. I can provide configuration files and more detailed 
logs but the errors I get are similar. Maybe I can peek someone's interest or 
jog a memory by proviging more detail.

I'm running two identically configured Fedora Core 4 boxes. The one that works 
is running on a Pentium II 450mhz running (FC4 i386), the one that doesn't work 
is running on a Xeon 2.8ghz (FC4 x86_64).

I've compiled mod_jk v1.2.14.1 from source on each box configured everything 
with simple settings from the tomcat connector HOWTOs. I'm running apache 
2.0.54-10. I also tried downloading a precompiled binary 
(jakarta-tomcat-connectors-jk-1.2.10-linux-sles9-x86_64-prefork.so) but didn't 
have any better results.

I tried pointing the working box's workers.properties file to the other boxes 
tomcat to confirm tomcat was in fact listening on port 8009. That worked.

I turned off my firewall to ensure that wasn't the issue. below is the log from 
mod_jk. I can provide one with debug message but thought I'd start with the 
shorter version.

Thanks for any help on this matter, I'm stumped.
Chris Brown

[Thu Jul 21 00:18:16 2005] [error] init_jk::mod_jk.c (2356): Initializing 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] init_jk::mod_jk.c (2356): Initializing 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:21 2005] [info]  jk_open_socket::jk_connect.c (444): connect 
to 127.0.0.1:8009 failed with errno=13
[Thu Jul 21 00:18:21 2005] [info]  ajp_connect_to_endpoint::jk_ajp_common.c 
(889): Failed opening socket to (127.0.0.1:8009) with (errno=13)
[Thu Jul 21 00:18:21 2005] [info]  ajp_send_request::jk_ajp_common.c (1248): 
Error connecting to the Tomcat process.
[Thu Jul 21 00:18:21 2005] [info]  ajp_service::jk_ajp_common.c (1749): Sending 
request to tomcat failed,  recoverable operation attempt=1
[Thu Jul 21 00:18:21 2005] [info]  jk_open_socket::jk_connect.c (444): connect 
to 127.0.0.1:8009 failed with errno=13
[Thu Jul 21 00:18:21 2005] [info]  ajp_connect_to_endpoint::jk_ajp_common.c 
(889): Failed opening socket to (127.0.0.1:8009) with (errno=13)
[Thu Jul 21 00:18:21 2005] [info]  ajp_send_request::jk_ajp_common.c (1248): 
Error connecting to the Tomcat process.
[Thu Jul 21 00:18:21 2005] [info]  ajp_service::jk_ajp_common.c (1749): Sending 
request to tomcat failed,  recoverable operation attempt=2
[Thu Jul 21 00:18:21 2005] [info]  jk_open_socket::jk_connect.c (444): connect 
to 127.0.0.1:8009 failed with errno=13
[Thu Jul 21 00:18:21 2005] [info]  ajp_connect_to_endpoint::jk_ajp_common.c 
(889): Failed opening socket to (127.0.0.1:8009) with (errno=13)
[Thu Jul 21 00:18:21 2005] [info]  ajp_send_request::jk_ajp_common.c (1248): 
Error connecting to the Tomcat process.
[Thu Jul 21 00:18:21 2005] [info]  ajp_service::jk_ajp_common.c (1749): Sending 
request to tomcat failed,  recoverable operation attempt=3
[Thu Jul 21 00:18:21 2005] [error] ajp_service::jk_ajp_common.c (1758): Error 
connecting to tomcat. Tomcat is probably not started or is listening on the 
wrong port. worker=ajp13w failed
[Thu Jul 21 00:18:21 2005] [info]  service::jk_lb_worker.c (662): service 
failed, worker ajp13w is in error state
[Thu Jul 21 00:18:21 2005] [info]  service::jk_lb_worker.c (712): All tomcat 
instances are busy or in error state
[Thu Jul 21 00:18:21 2005] wlb 192.168.0.10 0.001245

[Thu Jul 21 00:18:21 2005] [info]  jk_handler::mod_jk.c (1971): Service error=0 
for worker=wlb


Re: Ports 8005 8009 8080 in default Tomcat 4.x installation.

2005-07-21 Thread Darryl L. Miles


127.0.0.1:8005 : Shutdown port, I've not seen this working in TC in a 
while.  You are meant to be able to connect and send the shutdown 
password with EOL and it instructs TC to shutdown gracefully.  Other 
method of doing the same include installing the TC admin webapp and 
doing the same thing from the frontend.


127.0.0.1:8009 AJP/1.3 (Apache J Protocol) Connector port.  This is used 
to connect Tomcat to another webserver, for example with Apache Httpd 
you would install mod_jk in the httpd and it would connect to TC on this 
port.  There are also other connectors for IIS that use this common wire 
protocol to comunicate.  I believe this wraps the HTTP request response 
with other control information in a more machine readable format than 
making TC re-parse the entire HTTP request and also can convery SSL 
security info if mod_ssl is in use.


publicIP:8080 HTTP Webserver.  This is a direct HTTP server 
implementation Coyote inside TC, this allows TC to act as a standalone 
webserver without the need for Apache/IIS.


Leon Pu wrote:


After lauching Tomcat with the default ports setting in
conf/server.xml. I use netstat to check the opening ports, but I only
found 8080 port is using.

What's the exact usage of preceding three ports?
 




--
Darryl L. Miles



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



Re: Request parameter data not being recognised as UTF-8

2005-07-21 Thread Mark Thomas

Tim Koop wrote:
I have a web page form that is expecting UTF-8 data, but when my code 
gets the data, the getParameter() methods don't return the right thing.  



In server.xml, I have added these lines to each Connector:
 URIEncoding="UTF-8"  useBodyEncodingForURI="false"
 (I have also tried useBodyEncodingForURI="true")

Leave this as false.
I have added this text to JAVA_OPTS (in my rc.d init script) and have 
confirmed that these are indeed Java system properties

-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8
I am not sure if the first one of these will do anything and I am 
certain the second will not - it is a read only property on most JVMs.


I have tried calling request.setCharacterEncoding("UTF-8") in my code.  
I've even made it the first line of the jsp page.  No luck.

This is good.


I even have the environment variable LANG set to "en_GB.UTF-8"

Not necessary.



I have <%@ page contentType="text/html; charset=UTF-8"  
pageEncoding="UTF-8" %> in my jsp page.

Good.

I have  in my jsp page.

Not necessary.

Should this actually work and I'm just doing something wrong?

Yes it should (and does for me) work.


Is there anything else I can try?


1. Try accessing Tomcat directly to see if mod_jk is causing problems.
2. Try 4.1.31 - it has a bunch of bug fixes that might (I haven't 
checked the release note for details) help
3. Try the following simple test JSP and once this works, see how your 
app is different.


<%@ page contentType="text/html; charset=UTF-8" %>


  
Encoding fun
  
  
Data posted to this form was:
<%
  request.setCharacterEncoding("UTF-8");
  out.print(request.getParameter("mydata"));
%>



  
  
  

  


Mark


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



Request parameter data not being recognised as UTF-8

2005-07-21 Thread Tim Koop

Hi everyone.

___ The Problem ___

I have a web page form that is expecting UTF-8 data, but when my code 
gets the data, the getParameter() methods don't return the right thing.  
I have to run this code to get the right thing:


String value = new 
String(request.getParameter("fieldName").getBytes("ISO-8859-1"), "UTF-8");


Naturally I don't want to run this code every time I want a simple 
parameter.  There must be a setting somewhere.


The page itself displays fine; the form data that it gives me is not 
being interpretted as UTF-8.



___ What I have tried ___

I have searched the web and have found these possible solutions, but I 
can't get them to work for me.  I have tried all the following things:


In server.xml, I have added these lines to each Connector:
 URIEncoding="UTF-8"  useBodyEncodingForURI="false"
 (I have also tried useBodyEncodingForURI="true")

I have added this text to JAVA_OPTS (in my rc.d init script) and have 
confirmed that these are indeed Java system properties

-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8

I have tried calling request.setCharacterEncoding("UTF-8") in my code.  
I've even made it the first line of the jsp page.  No luck.


I have restarted Tomcat many times.

I even have the environment variable LANG set to "en_GB.UTF-8"

I have <%@ page contentType="text/html; charset=UTF-8"  
pageEncoding="UTF-8" %> in my jsp page.
I have  in my jsp page.


___ My questions ___

Should this actually work and I'm just doing something wrong?

Is there anything else I can try?


___ Technical details ___

I'm using Tomcat 4.1.30, Apache httpd 1.?, mod_jk, Sun JVM 1.4.2, Linux 
Fedora Core 2.4.22


A part of my server.xml file looks like this:
   
 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"

  URIEncoding="UTF-8"
  useBodyEncodingForURI="false" />



Thanks for any ideas.  I've tried everything I can think of.

--
Tim Koop

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



Re: What commands to run in the Tomcat Debug Mode on Linux

2005-07-21 Thread Wendy Smoak
From: "Jyothi Palvai" <[EMAIL PROTECTED]>
> I think I have tomcat running in debug mode on a linux, I did this by
running the
> "catalina run debug" command but I don't know the debug commands to run to
> get to start Tomcat, watch the variables, put debug points etc.

You appear to be asking how to use your debugger, which we can't answer
unless you tell us what you're using.

I use JSwat with the Tomcat, Struts and Commons source code available.  All
I do is start Tomcat with 'catalina.bat jpda start'.  On Windows, it
defaults to shared memory, and I see the following in the console:
   Listening for transport dt_shmem at address: jdbconn

(IIRC, on Linux it defaults to the other option, involving a socket.)  There
is some info here:
http://jakarta.apache.org/tomcat/faq/development.html#rd

HTH
-- 
Wendy Smoak


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



Re: Ports 8005 8009 8080 in default Tomcat 4.x installation.

2005-07-21 Thread David Smith
8005 = default shutdown port.  I believe it used to be the default ajp12
port.  This is bound specifically to 127.0.0.1 and cannot be accessed
from any other system.
8009 = default ajp13 connector port.  Can be disabled if you aren't
using mod_jk to connect with Apache or IIS.
8080 = default http protocol port.  Change this to 80 if you are using
Tomcat with out Apache or IIS in production.

--David

Leon Pu wrote:

>Hi all,
>
>After lauching Tomcat with the default ports setting in
>conf/server.xml. I use netstat to check the opening ports, but I only
>found 8080 port is using.
>
>What's the exact usage of preceding three ports?
>
>
>Best regards,
>Leon
>
>__
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>


-- 
===
David Smith
Network Operations Supervisor
Department of Entomology
College of Agriculture & Life Sciences
Cornell University
2132 Comstock Hall
Ithaca, NY  14853
Phone: 607.255.9571
Fax: 607.255.0939



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



Re: Max thread/session timeouts

2005-07-21 Thread Darryl L. Miles

Kenneth Litwak wrote:


 We're running an application on Tomcat that often hits the limit of
150 threads.  Can someone with experience changing this value give me
advice on it?  How big can you make this number?  How much extra memory
do I need if I say change it to, say, 500?  Thanks.
 

I take it you know the 150 is the default limt in the config/server.xml 
and this can be upped towards you operating system platform maximum.


A ball park of your applications memory needs @150 threads is better 
chcked by simply looking at the paged in size while under that load (the 
RSS size in "ps uaxw" under Unix).  You can't expect us to guess exactly 
how much more memory you need from the information you've given, I mean 
you've not told us if you already have 8Gb of RAM installed or just 32Mb 
for us to at least take a guess at the answer.


Maybe the Java VM -Xss is a useful option to look at, but I think 
providing you are not hitting your upper limit on a single process 
memory usage (into the 3/4Gb realm on 32bit) for a high number of 
threads then it will make little difference.  As I believe stack space 
just like other application memory is paged in as its used and reducing 
the stack space to a lower limit than your application need will just 
make it crash.


--
Darryl L. Miles



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



Re: What commands to run in the Tomcat Debug Mode on Linux

2005-07-21 Thread Jyothi Palvai
Can anyone help, I need this info badly. Thanks in advance.
-Jyothi

Jyothi Palvai <[EMAIL PROTECTED]> wrote:
Hi All,
I think I have tomcat running in debug mode on a linux, I did this by running 
the "catalina run debug" command but I don't know the debug commands to run to 
get to start Tomcat, watch the variables, put debug points etc. Thanks in 
advance for providing this info.
Thanks,
Jyothi


-
Start your day with Yahoo! - make it your home page 
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

tomcat 4.x classpath

2005-07-21 Thread Bergthorson, Jason
How do you add directories to tomcat's classpath?

 

Jason Bergthorson

GIS Programmer/Applications Developer

 

Phone: 204.983.4035

Fax: 204.983.2178

200-303 Main Street

Winnipeg MB R3C 3G7

 

[EMAIL PROTECTED]

 



Ports 8005 8009 8080 in default Tomcat 4.x installation.

2005-07-21 Thread Leon Pu
Hi all,

After lauching Tomcat with the default ports setting in
conf/server.xml. I use netstat to check the opening ports, but I only
found 8080 port is using.

What's the exact usage of preceding three ports?


Best regards,
Leon

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: How to implement Cluster using tomcat5.0

2005-07-21 Thread Jason Bainbridge
On 7/21/05, Sridhar <[EMAIL PROTECTED]> wrote:
> Hi Everybody,
> 
> How to implement Cluster using tomcat5.0.

Start here first:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html

Then try to get it working and if you have trouble try researching the
issues a little and then if you get stumped post your questions to the
list.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Max thread/session timeouts

2005-07-21 Thread Kenneth Litwak
  We're running an application on Tomcat that often hits the limit of
150 threads.  Can someone with experience changing this value give me
advice on it?  How big can you make this number?  How much extra memory
do I need if I say change it to, say, 500?  Thanks.

 

Ken



Re: Problem with refreshing JSP

2005-07-21 Thread Travis Stevens


The other thing to note about reloading JSPs is that tomcat 5.5 seems 
to copy ones web context directory into its own webapps directory.  
Any changes to the original JSPs will not show up unless you 
physically copy the JSP from the original directory to the webapps 
directory.



I haven't observed this behavior with my Tomcat 5.5.
Maybe you have set antiResourceLocking="true" or something like this. 
In this case I think tomcat will copy all the files.


I double checked and antiResourceLocking is false.  Is there some other 
configuration property somewhere that would indicate that the webapp is 
to be copied?  I use the 5.5.9 tomcat for Linux pretty much right out of 
the box.


-Trav

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



Re: IIS6 Win2003 ISAPI config

2005-07-21 Thread Rogerio Baldini das Neves
Chuk

My jkstatus wasn´t working with 1.2.13.
I ´ve updated to 1.2.14 and everything is working fine right now.

Rogerio.


- Original Message - 
From: "Sumpter, Chuck" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, July 21, 2005 11:36 AM
Subject: IIS6 Win2003 ISAPI config


> Jk1.2 in this environment works fine, except for jkstatus.
>
> I've worked through the how-to's and examples on the Tomcat connectors
> site, including the workers how-to.
>
> The jkstatus page gets a 404 every time.
>
>
>
> Does anyone have example workers.properties and uriworkermap.properties
> that they would be willing to post?
>
>
>
>



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



RE: IIS6 Win2003 ISAPI config

2005-07-21 Thread Derrick Koes

I'm using 1.2.14-ish.  I've noticed jkstatus sometimes works, sometimes not 
with IIS 6.

workers.properties:

#
#-- DEFAULT worket list --
#-
#
#
# The workers that your plugins should create and work with
# The name of the worker can contain only the alphanumeric characters
# [a-z][A-Z][0-9] and is case insensitive.
#
# Add 'inprocess' if you want JNI connector 
worker.list=loadbalancer,loadbalancer2,jkstatus


#
#-- DEFAULT ajp13 WORKER DEFINITION --
#-
#

#
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.qailt005:8009.port=8009
worker.qailt005:8009.host=qailt005
worker.qailt005:8009.type=ajp13
worker.qailt005:8009.cache_timeout=600

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  > lbfactor must be > 0
#  > Low lbfactor means less work done by the worker.
worker.qailt005:8009.lbfactor=1

#
# Specify the size of the open connection cache.
worker.qailt005:8009.cachesize=100
#
worker.qailt006:8009.port=8009
worker.qailt006:8009.host=qailt006
worker.qailt006:8009.type=ajp13
worker.qailt006:8009.cache_timeout=600

#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  > lbfactor must be > 0
#  > Low lbfactor means less work done by the worker.
worker.qailt006:8009.lbfactor=1

#
# Specify the size of the open connection cache.
worker.qailt006:8009.cachesize=100

worker.dwqa2:8009.port=8009
worker.dwqa2:8009.host=dwqa2
worker.dwqa2:8009.type=ajp13
worker.dwqa2:8009.lbfactor=1
worker.dwqa2:8009.cachesize=100
worker.dwqa2:8009.cache_timeout=600

worker.dwqa3:8009.port=8009
worker.dwqa3:8009.host=dwqa3
worker.dwqa3:8009.type=ajp13
worker.dwqa3:8009.lbfactor=1
worker.dwqa3:8009.cachesize=100
worker.dwqa3:8009.cache_timeout=600
#
#-- DEFAULT LOAD BALANCER WORKER DEFINITION --
#-
#

#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
#  > If a worker dies, the load balancer will check its state
#once in a while. Until then all work is redirected to peer
#workers.
# These workers should not appear in the worker.list property!
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=qailt005:8009,qailt006:8009
worker.loadbalancer.sticky_session=1
worker.loadbalancer.method=T


worker.loadbalancer2.type=lb
worker.loadbalancer2.balance_workers=dwqa2:8009,dwqa3:8009
worker.loadbalancer2.sticky_session=1


worker.jkstatus.type=status



uriworkermap.properties:

/iltlbtesting=loadbalancer
/iltlbtesting/*=loadbalancer
/iltscripting=loadbalancer
/iltscripting/*=loadbalancer
/iltlbtestingalt=loadbalancer
/iltlbtestingalt/*=loadbalancer
/dmlbilt=loadbalancer
/dmlbilt/*=loadbalancer


/DM6247QA6201=loadbalancer2
/DM6247QA6201/*=loadbalancer2

/lb6255Master_arm=loadbalancer2
/lb6255Master_arm/*=loadbalancer2

/QA6201CFLB6247DM=loadbalancer2
/QA6201CFLB6247DM/*=loadbalancer2

/QA6201CFLB6255DM=loadbalancer2
/QA6201CFLB6255DM/*=loadbalancer2

/DM42=loadbalancer2
/DM42/*=loadbalancer2

/jkstatus=jkstatus
/jkstatus/*=jkstatus
 




-Original Message-
From: Sumpter, Chuck [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 10:36 AM
To: tomcat-user@jakarta.apache.org
Subject: IIS6 Win2003 ISAPI config

Jk1.2 in this environment works fine, except for jkstatus.   

I've worked through the how-to's and examples on the Tomcat connectors site, 
including the workers how-to.  

The jkstatus page gets a 404 every time. 

 

Does anyone have example workers.properties and uriworkermap.properties that 
they would be willing to post?  

 


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



IIS6 Win2003 ISAPI config

2005-07-21 Thread Sumpter, Chuck
Jk1.2 in this environment works fine, except for jkstatus.   

I've worked through the how-to's and examples on the Tomcat connectors
site, including the workers how-to.  

The jkstatus page gets a 404 every time. 

 

Does anyone have example workers.properties and uriworkermap.properties
that they would be willing to post?  

 



better profiler for tomcat

2005-07-21 Thread Paulo Alvim
Hi!

What'd be the best Open-Source option for Tomcat profiling?

Thanks in advance...

Alvim.


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



[Jasper/Orion] compile JSP servlets

2005-07-21 Thread Romain Thouvenin
I'm trying to write an ant task to pre-compile JSP pages, but I have the 
following problem.


Here is a piece of page :
# 
(itlBean.getIdy() returns a Long.)

Then I try to transform the JSP page into a servlet with the jasper 
task, which gives the following java code :

#  _jspx_th_form_input_0.setParent(null);
#  _jspx_th_form_input_0.setType("hidden");
#  _jspx_th_form_input_0.setName("idy");
#  _jspx_th_form_input_0.setValue( itlBean.getIdy() );

But the value field in the tag handler is a String and so the setter is 
void setValue(String value), therefore javac refuses to compile the 
corresponding servlet.
Unlike jasper, Orion (the server I'm using) generate the following java 
code for the same page :

#__tag1.setParent(null);
#__tag1.setName("idy");
#__tag1.setType("hidden");
#__tag1.setValue(com.orionserver.util.ObjectUtils.toString( 
itlBean.getIdy() ));


Great ! Orion recognized the problem and convert the Long to a String.
And now my question :
Is jasper able to do that ? How ?
If not, does this way of proceeding conforms exactly to JSP spec. ?
Can my problem be solved ?

Thanks for your help.
Romain Thouvenin



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



Where to beging with secure mail

2005-07-21 Thread Brian McGovern
Can anyone tell me how to get my app, which uses java mail to get a secure 
session with my smtp resource as defined in my context file.



mail.smtp.host 
192.168.100.24
mail.smtp.socketFactory.class 
javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback 
false
mail.smtp.socketFactory.port 
465


I get an error that my smtp is not communicating via SSL.  Its an IIS box, but 
ill also need to do this on linux running sendmail in the near future.  What I 
dont understand is the key generation process and how to configure ssl on the 
mail side.  

Any help or ref docs would be a great help.
THanks
-B


apache2.0.54 + 2 tomcat 5.0.28 + jk 1.2.14

2005-07-21 Thread Hallvard Lid
I've got this setup working on my testserver(win2003), the apache
answers on port 80 and talks to the two tomcats through the jk-connector
on some other ports. The problem is that the tomcat servers have some
bad code in them and from time to time they just hang for a while eating
cpu. Earlier we countered this bad programming with a cheap hack that
timed the loading of an index.jsp and killed the prosess. Now on the
other hand it is hard to tell which server that is causing trouble
because of the transparancy in the setup.

The connector(jk) has some advanced options that probably are meant for
this kind of situation, but I can't seem to find any way to actually do
something(other than ignore the lost server in the loadbalancer). Is
there any way to channel a request through the apache server and onto a
specific tomcat? Or any other aproach to make apache(or windows) restart
the tomcat that goes haywire.

The only real good solution is ofcourse to find the source of the
problem in the java-code on the tomcats, but that ofcourse takes time
and money...

Hallvard Lid


Re: can't start tomcat as user

2005-07-21 Thread David Smith
This problem can be caused by the port <= 1024 problem under unix/linux. 
If so, take a look at the commons-daemon project on the jakarta site.


Also be sure your config, log, webapp (optional), work, and temp 
directories are owned by the tomcat user. They should be writeable by 
tomcat at least and I've seen cases in my system where ownership was 
necessary. Don't ask me why -- I have yet to explain it myself.


LastIy, check catalina.out for errors. The logs are invaluable in 
finding problems.


--David


dummy wrote:


Then how to start automatically at boot time ?


-Original Message-
From: Luis Durán [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 9:33 AM

To: Tomcat Users List
Subject: Re: can't start tomcat as user

dummy wrote:
 


Hi,

Got problem starting Tomcat as user tomcat. No problem starting it under
root. Any idea why ?


   


On Linux, only root can open ports below 1024 (included). You must
compile the jsvc program and setup a tomcat user and it will start
tomcat as root and then change the effective user before receiving
requests. I hope this help. (jsvc is in the bin folder, i think is
originally compressed)

 




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



Re: jkstatus

2005-07-21 Thread Rogerio Baldini das Neves
I ´ve solved my problem.

I think there is a bug in mod_jk 1.2.13 and jkstatus doesn´t work.

I just updated to mod_jk 1.2.14 and it´s working fine.


- Original Message - 
From: "Lionel Farbos" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 21, 2005 5:29 AM
Subject: Re: jkstatus


> Hi,
>
> I think your worker.properties is OK
> I suppose your tomcat.conf is included into httpd.conf
>
> So, in my own tests, it works with (in tomcat.conf) :
> 
> JkMount status
> Order deny,allow
> Deny from all
> Allow from 127.0.0.1
> 
>
> Regards
>
> On Wed, 20 Jul 2005 11:00:04 -0300
> "Rogerio Baldini das Neves" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I have installed a cluster using Apache2.0.54 + mod_jk 1.2.13 +
Tomcat5.5.9.
> > And it_s working fine.
> >
> > I want to configure jkstatus but I haven_t been success.
> >
> > My worker.properties
> > worker.tomcat1.type=ajp13
> > worker.tomcat1.host=localhost
> > worker.tomcat1.port=8009
> > worker.tomcat1.lbfactor=1
> > worker.tomcat1.cachesize=1
> >
> > worker.tomcat2.type=ajp13
> > worker.tomcat2.host=localhost
> > worker.tomcat2.port=8010
> > worker.tomcat2.lbfactor=1
> > worker.tomcat2.cachesize=1
> >
> > worker.loadbalancer.type=lb
> > worker.loadbalancer.balance_workers=tomcat1,tomcat2
> >
> > worker.status.type=status
> >
> > worker.list=loadbalancer, status
> >
> > My tomcat.conf
> > 
> >   LoadModule jk_module modules/mod_jk.so
> > 
> >
> > JkWorkersFile  conf/workers.properties
> >
> > JkLogFile logs/mod_jk.log
> > JkLogLevel debug
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> > #JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> > JkRequestLogFormat "%w %V %T"
> > JkMount /servlets-examples/* loadbalancer
> >
> > JkMount /jkstatus/* status
> >
> >
> > When I try "/jkstatus/" I receive "Internal Server Error".
> >
> > Can anybody help me ?
> >
> > Thanks
> > Rogerio Baldini
> >
> >
>
> -
> 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.5.9 jdk 1.5 howto

2005-07-21 Thread Werner Punz

The howto on the website is slightly wrong
here is the exact howto

first of all remove all jikes related jars from the tomcat lib dir,
second add tools.jar from the jdk to the tomcat classpath
third add ant.jar from an ant installation to the classpath
fourth replace the servlet entry from the conf/web.xml
with following:

 

jsp
org.apache.jasper.servlet.JspServlet

fork
false


xpoweredBy
false


 compiler
 javac1.5


 compilerSourceVM
 1.5


compilerTargetVM
1.5  


3


and now startup tomcat with a working jdk 1.5 and pages should compile

also see http://marc.theaimsgroup.com/?l=tomcat-user&m=111660999324714&w=2


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



Re: How to do authentication and secure line HTTPS (SSL)

2005-07-21 Thread Yasir Khan
Please read 

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html

Regards,
Yasir Khan
  - Original Message - 
  From: Abdullah Abdullah 
  To: tomcat-user@jakarta.apache.org 
  Sent: Thursday, July 21, 2005 2:43 PM
  Subject: How to do authentication and secure line HTTPS (SSL)


  Dear all

  Actually, I would like to ask you that how can I do authentication and 
  secure line HTTPS (SSL) for my web pages ? It is worth mentioning that I am 
  using JSP and Tomcat 5.5.9 .

  Thank you in advance.

  Regards
  Abdullah

  _
  Winks & nudges are here - download MSN Messenger 7.0 today! 
  http://messenger.msn.co.uk


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




Re: Connection pool

2005-07-21 Thread Christoph Kutzinski

Start a new discussion thread instead of hijacking this one.

And if you do that: give more information. What have you done so far? 
have you read the documentation? What are the error messages, if you 
already at that point? etc. etc.


Sridhar wrote:
Can anyone help how to create Connection Pool in Tomcat 5.0 with a 
Oracle9i database.


This is very urgnet...



-
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: binary streaming / content-type problem with mod_jk ?

2005-07-21 Thread Jérôme Chauvin

Thanks for your answer Henri :)
I agree with you, finally I don't think the problem comes from mod_jk
It may be Apache (using mod_jk and Tomcat) like described by Stuart 
Hynd in his post on this page : http://www.junlu.com/msg/107218.html


Or, perhaps, QuickTime 6 which is more "weaker" than QT7 which doesn't 
care about the thing which makes the problem (and I would like to know 
where this thing comes from).


But the incredible thing is that, using this : 
http://localhost:8080/my_test/BinaryStreamingit works perfectly on 
QT6  (without the 8080 port, the latence problem appears -> QT6 or the 
servlet or Apache, is waiting for the video file entirely created 
before starting to play it)...



Any other suggestions or opinions about this mystery ? :)



Jérôme Chauvin

OPSOMAI
77, rue de Charonne
75011 Paris - France
Tél : +33 (0)1 58 39 38 22
Fax : +33 (0)1 43 70 70 72
@ : [EMAIL PROTECTED]
URL : http://www.opsomai.com

Le 20 juil. 05, à 23:24, Henri Gomez a écrit :

not true, mod_jk didn't change the mime type provided by servlet 
output.


I'm doing it on productions servers to handle on the fly generated PDFs

2005/7/20, Jérôme Chauvin <[EMAIL PROTECTED]>:

Any ideas ?
It would be helpful :)
Thanks,

Jérôme Chauvin

Le 19 juil. 05, à 10:09, Jérôme Chauvin a écrit :


Hi all !

I've developed a servlet ("BinaryStreaming" based on
"StreamingContent" by Raj Behera) which does a binary stream of a 
mpeg

video file which is created progressively (by another
servlet/software/Unix command/... not important ) and finally read 
and

played by Quicktime.
I use Apache and Tomcat so I've installed mod_jk

All work well (-> MacOS and Windows) but... :
If I go on http://localhost:8080/my_test/BinaryStreaming it
works well with QuickTime 7 and QuickTime 6 (6, 6.5, 6.5.2, ...).

I have mod_jk so I can go on
http://localhost/my_test/BinaryStreaming   and here it still 
works

well with QT7.
But QT6 seems to wait that the video file is entirely created to 
start

the viewing instead of starting to play the movie as soon as there is
data in it, progressively.
-> like it does with QT7 and QT6 with :8080  OR  when I use QT7
without :8080.

I think it's due to mod_jk but I've no idea to make it work


I've found that another person had a similar problem, but no answer
was given :
http://www.junlu.com/msg/107218.html

This message was posted in 09/2004 and it seems that Apache causes
problems with pre-defined MIME-Types.



Does someone have an answer or an idea ? :-)
I really need to fix this ! :(

Thanks in advance.  :o)

Regards,

Jérôme

---
Jérôme Chauvin

OPSOMAI
77, rue de Charonne
75011 Paris - France
Tél : +33 (0)1 58 39 38 22
Fax : +33 (0)1 43 70 70 72
@ : [EMAIL PROTECTED]
URL : http://www.opsomai.com




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



How to do authentication and secure line HTTPS (SSL)

2005-07-21 Thread Abdullah Abdullah

Dear all

Actually, I would like to ask you that how can I do authentication and 
secure line HTTPS (SSL) for my web pages ? It is worth mentioning that I am 
using JSP and Tomcat 5.5.9 .


Thank you in advance.

Regards
Abdullah

_
Winks & nudges are here - download MSN Messenger 7.0 today! 
http://messenger.msn.co.uk



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



FW: How to do authentication and secure line HTTPS (SSL)

2005-07-21 Thread Abdullah Abdullah




From: "Abdullah Abdullah" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Developers List" 
To: tomcat-dev@jakarta.apache.org
Subject: How to do authentication and secure line HTTPS (SSL) Date: Wed, 20 
Jul 2005 10:50:01 +0100


Dear all

Actually, I would like to ask you that how can I do authentication and 
secure line HTTPS (SSL) for my web pages ? It is worth mentioning that I am 
using JSP and Tomcat 5.5.9 .


Thank you in advance.

Regards
Abdullah

_
Use MSN Messenger to send music and pics to your friends 
http://messenger.msn.co.uk



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



_
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters



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



Connection pool

2005-07-21 Thread Sridhar
Can anyone help how to create Connection Pool in Tomcat 5.0 with a Oracle9i 
database.


This is very urgnet...



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



How to implement Cluster using tomcat5.0

2005-07-21 Thread Sridhar
Hi Everybody,

How to implement Cluster using tomcat5.0.



Regards

Sridhar


Re: jkstatus

2005-07-21 Thread Lionel Farbos
Hi,

I think your worker.properties is OK
I suppose your tomcat.conf is included into httpd.conf

So, in my own tests, it works with (in tomcat.conf) :

JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1


Regards

On Wed, 20 Jul 2005 11:00:04 -0300
"Rogerio Baldini das Neves" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I have installed a cluster using Apache2.0.54 + mod_jk 1.2.13 + Tomcat5.5.9.
> And it_s working fine.
> 
> I want to configure jkstatus but I haven_t been success.
> 
> My worker.properties
> worker.tomcat1.type=ajp13
> worker.tomcat1.host=localhost
> worker.tomcat1.port=8009
> worker.tomcat1.lbfactor=1
> worker.tomcat1.cachesize=1
> 
> worker.tomcat2.type=ajp13
> worker.tomcat2.host=localhost
> worker.tomcat2.port=8010
> worker.tomcat2.lbfactor=1
> worker.tomcat2.cachesize=1
> 
> worker.loadbalancer.type=lb
> worker.loadbalancer.balance_workers=tomcat1,tomcat2
> 
> worker.status.type=status
> 
> worker.list=loadbalancer, status
> 
> My tomcat.conf
> 
>   LoadModule jk_module modules/mod_jk.so
> 
> 
> JkWorkersFile  conf/workers.properties
> 
> JkLogFile logs/mod_jk.log 
> JkLogLevel debug
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " 
> #JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> JkRequestLogFormat "%w %V %T" 
> JkMount /servlets-examples/* loadbalancer
> 
> JkMount /jkstatus/* status
> 
> 
> When I try "/jkstatus/" I receive "Internal Server Error".
> 
> Can anybody help me ?
> 
> Thanks
> Rogerio Baldini
> 
> 

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



RE: can't start tomcat as user

2005-07-21 Thread Dale, Matt

That is operating system dependent. On linux you will have to write a script 
and put it in /etc/rc.d/init.d then symlink it from the relevant run level 
directories.

Ta
Matt

-Original Message-
From: dummy [mailto:[EMAIL PROTECTED]
Sent: 21 July 2005 04:09
To: Tomcat Users List
Subject: RE: can't start tomcat as user


Then how to start automatically at boot time ?


-Original Message-
From: Luis Durán [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 21, 2005 9:33 AM
To: Tomcat Users List
Subject: Re: can't start tomcat as user

dummy wrote:
> Hi,
>  
> Got problem starting Tomcat as user tomcat. No problem starting it under
> root. Any idea why ?
>  
> 
On Linux, only root can open ports below 1024 (included). You must
compile the jsvc program and setup a tomcat user and it will start
tomcat as root and then change the effective user before receiving
requests. I hope this help. (jsvc is in the bin folder, i think is
originally compressed)

-- 

Luis Edgardo Durán Lebis
Soporte Técnico y Sistemas
http://mipagina.cantv.net/elebis
[EMAIL PROTECTED]
0416-7580991


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



WEB-INF/context.xml

2005-07-21 Thread Guillaume Lederrey
  Hello !

  I've read on 
http://wiki.jboss.org/wiki/Wiki.jsp?page=LimitAccessToCertainClients
that it seems possible to add a context.xml file under WEB-INF. I
tried to use the following context.xml :






But now I get an HTTP 403. Is it valid to declare a Realm in
WEB-INF/context.xml ? Is there a place with more docs about this
feature ?

Thanks for your help !

   Guillaume

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



Tomcat stops responding

2005-07-21 Thread Manfred Steurer

We have an app running productive for ~1 year without noticeable errors

(Tomcat 4.1.24, Java 1.4.1_03, Postgres 7.3 on RedHat 9).
But recently tomcat stops processing requests now and then.
- Tomcat is running
- No errors in the logfiles
- Due to RequestDumperValve Tomcat does not receive any requests when locked
- Other non-Tomcat java-apps on this server (using the same db) don't 
encounter any problems


After restarting Tomcat everything is fine.

Any suggestions will be appreciated.
thx




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