Easy Servlet Question

2005-10-03 Thread Andrew Pierce
Hello. I realize this is about the stupidest question I could ask but, 
I've scoured the web, etc. and cannot get an easy example of making 
servlets actually work with Tomcat.


I have written a few Hello World servlets and gotten them to work with 
Resin but I cannot get even the most simple servlet to work with Tomcat.


I create the servlet code such as the one found here:

http://www.caucho.com/resin-3.0/servlet/tutorial/helloworld/index.xtp

I compile the servlet and place the .class file in the 
$CATALINA_HOME/webapps/app/WEB-INF/classes directory.


Then I modify the $CATALINA_HOME/webapps/app/WEB-INF/web.xml to include 
the declarations for the servlet.


I stop and restart Tomcat and alas, all I get is 404 when I try to 
access the servlet with a url like 
http://localhost:8080/app/HelloServlet.


I know this has got to VERY simple. Thanks in advance.
Andrew

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



Re: Easy Servlet Question

2005-10-03 Thread Andrew Pierce
OK. This was a bit of a simple one. Found my answer with the help of a 
couple of folks on IRC.


Please disregard.

Andrew Pierce wrote:

Hello. I realize this is about the stupidest question I could ask but, 
I've scoured the web, etc. and cannot get an easy example of making 
servlets actually work with Tomcat.




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



jsvc question

2005-09-23 Thread Andrew Stueve
I am new to Tomcat, and this is basic question.

I have jsvc setup to start Tomcat, and then run as user wwwadmin on port 80.  
When 
I execute, I get two processes running, a parent running as root, and the child 
as 
the wwwadmin user.

Is this normal?  I thought the root process was supposed to go away after 
setting 
up the listen connection on port 80.

-Andrew Stueve



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



Re: mod_jk performance

2005-09-17 Thread Andrew Miehs

Hi Peter,

That is why I mentioned it. We deliver our static content from other  
servers,
and had originally considered hiding our TCs behind apache for  
'security reasons'.


After seeing the speed difference, and the fact that their isn't  
really a security
difference if you just push all the traffic straight through anyway,  
we decided not

to put Apache between our users and our Tomcat servers.

If I didn't need to use re-writes, and complicated rules on our  
apaches, I would also

use THTTP for performance reasons.

Andrew


On Sep 16, 2005, at 3:39 PM, Peter Flynn wrote:

OK, that's useful information.

But I have 300,000+ static HTML files to server, and about
10 JSP files. I'm surely not switching my entire server to
Tomcat...:-)



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



Re: mod_jk performance

2005-09-14 Thread Andrew Miehs


Apache is easier to configure, but at a 50% performance hit for pure  
JSP pages


Andrew

On Sep 14, 2005, at 2:18 PM, KEREM ERKAN wrote:

Apache has better directory/file restricting and handling than  
Tomcat, it is
more customizable and it is much user/admin friendly to  
configure :-) (at

least for me)



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



Re: mod_jk performance

2005-09-14 Thread Andrew Miehs
We did some comparisons between running Tomcat 5.0 standalone, or TC  
5.0 and Apache 2.0


If you are ONLY delivering JSPs, we found that we could only deal  
with 50% of the requests when running combined Apache TC and mod_jk


Andrew


On Sep 14, 2005, at 2:45 PM, Lionel Farbos wrote:

I use Apache/mod_jk/Tomcat for a long time on production servers  
with load balancing/failover (and with high traffic sites) and I'm  
sure it's not 30% slower than a pure Tomcat.




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



Re: mod_jk performance

2005-09-14 Thread Andrew Miehs
We run F5 BigIPs as our loadbalancers, and have seperated images, etc  
onto another server


IE: i.domain.com for images, and www.domain.com for dynamic content.

F5 provides a feature call iRules to do the splitting between hosts  
for you, but I would

NOT use this on a high traffic site.

Andrew

On Sep 14, 2005, at 2:58 PM, Lionel Farbos wrote:

But, in a web site, there is never only JSPs : there is a lot of  
static files (images, css, js, ...)
So, if you don't have a apache in the frontend to deliver theses  
static files, there is an overload for the TC server...


So, your tests stressed only light JSPs or a real site ?
and what is your solution for load-balancing/failover ?

On Wed, 14 Sep 2005 14:50:52 +0200
Andrew Miehs [EMAIL PROTECTED] wrote:



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



Re: problems setting up tomcat on debian sarge

2005-09-13 Thread Andrew Miehs

Hi Martin,

I have tomcat 5.0.25 - 30 running on Sarge without a problem. Sun  
JVM 1.42r5 and greater.


The orginal poster seems to have a problem with his application as  
manager applets etc work.


I would however recommend running a 2.6 kernel

Andrew


On Sep 13, 2005, at 3:37 PM, Martin Wood wrote:

I struggled with running tomcat5 on sarge for a while and found  
that the blackdown jvm was the only one that seemed to work properly.


I had great problems using the Sun JVM (there was a thread on here  
about 6 weeks ago) whereby tomcat would just stop responding, and  
refuse to shutdown unless i killed the process.


I've not had any problems since switching to blackdown.

If you are going to try tomcat 5.5 then you'll need to remember to  
install the compatibility patch for using a 1.4 jvm.


thanks,

Martin

Sébastien GALLET wrote


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



Re: Does Tomcat work on dual processor systems?

2005-09-08 Thread Andrew Miehs

Hi Asha,

Asha Nallana wrote:


We are using Tomcat4.1.18, JDK1.4.2, Apache1.3 and mod_jk2.



And somewhere you mentioned Redhat 7.3. Isn't that VERY old?

can you provide the output of

uname -a
ps auxw
netstat -anp

and probably server.xml

Does this setup work? Did it ever work? or are you trying to get it to 
work for the first time?


I would seriously suggest though, that you get someone in to help you 
look at this problem,
as it sounds like you may require quite a bit of help to get it up and 
running - (probably about

3 weeks of using this mailing list)

Regards

Andrew

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



Re: Securityfilter for authentication

2005-08-23 Thread Andrew Stepanenko

Hi Mark,

I'm using SecurityFilter in my application successfully . What are your 
questions?


Regards,

--
Andrew Stepanenko,
Software engineer,
Ukrainian-Dutch Faculty of Economics and Management
Ternopil State Economic University
Shevchenko Street 9, Office 24-25
Ternopil, 46000 UKRAINE
Tel: +38 (0352) 43 52 41
fax: +38 (0352) 43 52 45
Web: http://unf.tane.edu.ua




Mark Goking wrote:


Has anyone here used securityfilter for authetntication? The samples
doesn't have any database realm example. If anyone got this working
using db for authetnication pls let me know, I would like to ask some
questions

thanks

-
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: Rc3.d startup scripts

2005-06-18 Thread Andrew Miehs

That really depends on the operating system.

You may also want to have a look at google

On Jun 17, 2005, at 8:34 PM, [EMAIL PROTECTED] wrote:

I am trying to create a startup script for Solaris for both Tomcat  
5.5.9

and Apache 2.0.52.

Can anyone tell me how to do that, so that when the box is rebooted it
automatically starts Tomcat and Apache.




Re: IE-Page not found problem

2005-06-06 Thread Andrew Miehs

Hi,

IMHO the best solution is to run tcpdump (or ethereel) on the server, 
and log the IE users
traffic (and try to limit it to only 1 user as you seem to indicate that 
you can easily reproduce
the problem). That will show you exactly what is going on. Anything else 
is just speculation.


Regards

Andrew

sudip shrestha wrote:


I have no idea why you are continuing on this pathBut all I am
looking for is suggestions on how to debug this problem with IE, if
there is any.  I am not offerring any excuse!!  It's my work related
work.  I have had few issues with IE in the past such as url
redirection problem but I have managed to find the fix for those.  So,
I was thinking maybe somebody in the users list have had some kind of
positive experience with this in the past.  Frank's suggestion on this
regard was constructive.  I work in a huge company...suddenly asking
users to change the browser is not exactly the pratical solution
either.

 



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



Cache CPU utilisation problems on Tomcat 5.5.7 on Windows 2003

2005-05-23 Thread Andrew Stevens
Hi,

 

I am a complete newbie to Tomcat so please forgive me...

 

I have two problems:

 

1.  Cache - Tomcat will cache everything to /temp and even when the
underlying content (images or pages) are changed, it will not refresh. I
have to stop the server, delete all files in the /temp directory and
then restart Tomcat to get the new content delivered to the browser.
This cache can build in size to gigabytes.

 

2.  CPU utilisation - Tomcat often hits 99% CPU and just stays there
until the server just comes to a grinding halt. This could of course be
a coding issue in a JSP or what have you, but my error logs are not
pointing to anything unusual.

 

Has anyone else had similar experiences? Do you have any tips for me?

 

Thank you, your help is appreciated.

 

Cheers,

 

Andrew



Re: tomcat jsessionid

2005-05-16 Thread Andrew Miehs
Are you load balancing? or do you have two different applications on  
two different servers?

The cookie is attached to the host name. Therefore you will have  two  
JSESSIONIDs

One cookie: hostA:JESSIONID and the other hostB:JESSIONID
Or do both hosts A and B have BOTH applications? IE:
Can someone access http://hostA/abc and https://hostA/abc ?
- If so - and these are two different appications - you will have  
problems.

Andrew
On May 16, 2005, at 4:54 PM, Millie Morton wrote:
As a systems admin I've set up the following
apache-2.0.54
tomcat-5.0.28
We are loadbalancing (tomcat) 2 different applications with the  
same path, one under SSL on hostA and the other unsecure on hostB.

Application A:   http:/hostA/abc
Application B:   https:/hostB/abc
The problem is: if a user goes to Application A (on hostA) first  
and then to Application B (on hostB) we are seeing apache log  
entries with 2 JSESSIONIDS, one from hostA and one from hostB. This  
makes for stickiness problems as you can imagine.

Is there a way to fix this without changing the path for one of the  
apps?

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


RE: SSL, Form Authentication 408 error

2005-05-04 Thread Andrew Chapman
I have resolved this problem, and as is so often is the case (certainly with
me anyway) the cause of this wasn't what it initially appeared. Anyway I
thought I'd share my findings in case anyone else came across this problem.

This is an IE specific problem relating to IFRAMES and nothing to do with
Tomcat.

A look at the AuthenticatorBase code lead me to believe the only thing that
could actually cause the 408 is if the session could not be located. This is
looked up from the session id in the request. It was a fair guess that
something was happening to the session id cookie when the request came as
the result of an IFRAME.

A little investigation with the Privacy controls in IE fixed the problem. It
seems the cookie settings are different to pages in IFRAMES than top level
pages. In order to get this working the global privacy level must be dropped
(specifically to Always allow session cookies) or (probably more
advisable) add the app url to the Manged Sites from the Advanced tab with
Always Allow

-Original Message-
From: Andrew Chapman [mailto:[EMAIL PROTECTED] 
Sent: 03 May 2005 10:29
To: tomcat-user@jakarta.apache.org
Subject: SSL, Form Authentication 408 error

If I set the src of an IFRAME to my web application, which uses Form
Authentication and SSL, the server consistently throws back a 408 error in
IE when attempting to log in. The same scenario consistently works with
Firefox.

I suspect there are timing issues with IE, IFRAMEs and Form Authentication
causing the 408. I have searched the archives without success and a more
general search seems to indicate that there are issues with IFRAMEs and SSL
in IE but no specifics.

My question is: Does anyone know of a way to configure Tomcat (5.0.28) to be
more resilient/permissive i.e. to increase the timeout for Form
Authentication before a 408 error is thrown?

Thanks in advance

Andy Chapman



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



SSL, Form Authentication 408 error

2005-05-03 Thread Andrew Chapman
If I set the src of an IFRAME to my web application, which uses Form
Authentication and SSL, the server consistently throws back a 408 error in
IE when attempting to log in. The same scenario consistently works with
Firefox.

I suspect there are timing issues with IE, IFRAMEs and Form Authentication
causing the 408. I have searched the archives without success and a more
general search seems to indicate that there are issues with IFRAMEs and SSL
in IE but no specifics.

My question is: Does anyone know of a way to configure Tomcat (5.0.28) to be
more resilient/permissive i.e. to increase the timeout for Form
Authentication before a 408 error is thrown?

Thanks in advance

Andy Chapman


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



Re: What is max value for MaxThreads

2005-04-26 Thread andrew
Hi Darek,
This really depends on your operating system
We have MaxThreads set to 750 on our boxes running sarge.
You should however be aware that using that many threads in not
necessarily benifical as far as performance is concerned...
You should definitely do some performance testing.
We looked at using apache with mod_jk in front of our tomcats,
but this effectively halved the number of connections our servers
could handle per second, so in the end, we went back to using the
standard http connector from tomcat.
Andrew
Darek Czarkowski wrote:
How many threads can tomcat handle?
Assuming single tomcat hosting 5 different apps, no load balance, using
mod_jk and Apache.
I am wondering what would be the safe limit.
 


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


FileUpload

2005-04-21 Thread Andrew Paliga
Hi,

I am trying to use FileUpload but i keep getting an Access denided error 
when i try to write things and i was wondering is there anyway around 
it...here is the error

Http Satus 404 - 
C:\AtrowkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemans (Access is 
denied)
type Status report
message C:\ArtworkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemand 
(Access is denied)
description The requested resource 
(C:\ArtworkOnDemand\jakarta-tomcat-4.1.24\webapps\artworkondemand (Access 
is denied)) is not available.

Any suggestions woudl be greatly appreciated



Andrew Paliga
Junior Project Manager
IBM Toronto Media Design Studio
Phone: (905) 413-2024

Re: Tomcat with PHP?

2005-04-19 Thread andrew
Dear Cameron,
You will need to use Apache with PHP, and use the Tomcat/ Apache 
connector so that apache pushes the requests through to tomcat
(jkmod)

Effectively you will have 2 seperate applications, and use the URLs/ 
browser requests to talk with each other

Andrew
Cameron Sim wrote:
Does Tomcat support PHP scripting? Ive tried installing PHP 4  5 but 
with
no joy.

I know Apache 2 supports PHP but what setup would I need to support
JSP/Servlets and PHP?
Hope you can help?

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

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


Re: How to read JNDI resources?

2005-04-07 Thread Andrew Watters
Hi Vaneet
Thanks for the reference. I'm a little confused though, what are you 
referring to in this page that I should read? I can't see anything that 
explains how the context element is used.

Thanks
Andrew
Vaneet Sharma wrote:
U need to read this page
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/deployment.html
Have fun reading
Vaneet
-Original Message-
From: Andrew Watters [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 6:14 PM
To: Tomcat Users List
Subject: Re: How to read JNDI resources?

Thank you, I appreciate your reply. I didn't have a context entry so I 
added a minimal one (copied from the /examples one) before proceeding 
further as shown below.

   Context path=/xxx docBase=xxx debug=0 reloadable=true 
crossContext=true /

Unfortunately tomcat doesn't start now. I get a 'Document base 
C:\Development\Java\jakarta-tomcat-4.1.31\webapps\xxx does not exist or 
is not a readable directory'

So I added a direcory xxx. Now tomcat starts ok but it doesn't unpack 
the xxx.war. Again I'm probably making some very simple mistake but 
can't see the problem or an answer in the docs or by googling...


Mark Thomas wrote:
 

You need to include a ResourceLink element in your context.
Mark
Andrew Watters wrote:
   

Using tomcat 4.3.1 I have included the following in server.xml 
GlobalNamingResources
  Environment name=config_file type=java.lang.String
value=test/
/GlobalNamingResources

In a servlet loaded on startup I try to read in the property 
InitialContext ic = new InitialContext(); Context ctx = (Context) 
ic.lookup(java:comp/env); String configFilename = 
(String)(ctx.lookup(config_file));

This code throws a NamingException. Where have I gone wrong?
Thanks
Andrew
-
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]

Vaneet Sharma
executive manager   
iDeasTank Limited   
an iwg business
dolphins' court po 388
valletta, m-malta/europe
mobile:  +356 9943 8263
skype:   CALLVANEET
fax: +356 9952 
phone:   +356 9942 
[EMAIL PROTECTED]
call me on www.skype.com - my ID is CALLVANEET
Want a signature like this? - www.plaxo.com\signature
iwg is a global e-mobile company creating, building and growing new businesses. 
 iwg founders are pioneers in creating multi-billion dollar mobile and Internet 
businesses in Europe, Asia and the US.
www.iWG.info
www.countryprofiler.com/iWG
www.visitmalta.com
www.mfc.com.mt
Privileged/Confidential Information may be contained in this message.  If 
you are not the addressee indicated in this message (or responsible for 
delivery of the message to such person), you may not copy or deliver this 
message to anyone. In such case, you should destroy this message and kindly 
notify the sender by reply email.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


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


Re: How to read JNDI resources?

2005-04-07 Thread Andrew Watters
Have found a couple of solutions.
Set the docbase to point to the WAR.
Context path=/xxx docBase=xxx.war debug=0 reloadable=true 
crossContext=true /

OR manually unpack the WAR after upload.
And the JNDI part works fine now :)

Andrew Watters wrote:
Hi Vaneet
Thanks for the reference. I'm a little confused though, what are you 
referring to in this page that I should read? I can't see anything 
that explains how the context element is used.

Thanks
Andrew
Vaneet Sharma wrote:
U need to read this page
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/deployment.html
Have fun reading
Vaneet
-Original Message-
From: Andrew Watters [mailto:[EMAIL PROTECTED] Sent: 
Wednesday, April 06, 2005 6:14 PM
To: Tomcat Users List
Subject: Re: How to read JNDI resources?

Thank you, I appreciate your reply. I didn't have a context entry so 
I added a minimal one (copied from the /examples one) before 
proceeding further as shown below.

   Context path=/xxx docBase=xxx debug=0 reloadable=true 
crossContext=true /

Unfortunately tomcat doesn't start now. I get a 'Document base 
C:\Development\Java\jakarta-tomcat-4.1.31\webapps\xxx does not exist 
or is not a readable directory'

So I added a direcory xxx. Now tomcat starts ok but it doesn't unpack 
the xxx.war. Again I'm probably making some very simple mistake but 
can't see the problem or an answer in the docs or by googling...


Mark Thomas wrote:
 

You need to include a ResourceLink element in your context.
Mark
Andrew Watters wrote:
  

Using tomcat 4.3.1 I have included the following in server.xml 
GlobalNamingResources
  Environment name=config_file type=java.lang.String
value=test/
/GlobalNamingResources

In a servlet loaded on startup I try to read in the property 
InitialContext ic = new InitialContext(); Context ctx = (Context) 
ic.lookup(java:comp/env); String configFilename = 
(String)(ctx.lookup(config_file));

This code throws a NamingException. Where have I gone wrong?
Thanks
Andrew
-
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]

Vaneet Sharma
executive manager   
iDeasTank Limited   
an iwg business
dolphins' court po 388
valletta, m-malta/europe
mobile: +356 9943 8263
skype: CALLVANEET
fax: +356 9952 
phone: +356 9942 

[EMAIL PROTECTED]
call me on www.skype.com - my ID is CALLVANEET
Want a signature like this? - www.plaxo.com\signature
iwg is a global e-mobile company creating, building and growing new 
businesses.  iwg founders are pioneers in creating multi-billion 
dollar mobile and Internet businesses in Europe, Asia and the US.

www.iWG.info
www.countryprofiler.com/iWG
www.visitmalta.com
www.mfc.com.mt
Privileged/Confidential Information may be contained in this 
message.  If you are not the addressee indicated in this message (or 
responsible for delivery of the message to such person), you may not 
copy or deliver this message to anyone. In such case, you should 
destroy this message and kindly notify the sender by reply email.

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


How to read JNDI resources?

2005-04-06 Thread Andrew Watters
Using tomcat 4.3.1 I have included the following in server.xml
GlobalNamingResources
   Environment name=config_file type=java.lang.String value=test/
 /GlobalNamingResources
In a servlet loaded on startup I try to read in the property
InitialContext ic = new InitialContext();
Context ctx = (Context) ic.lookup(java:comp/env);
String configFilename = (String)(ctx.lookup(config_file));
This code throws a NamingException. Where have I gone wrong?
Thanks
Andrew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to read JNDI resources?

2005-04-06 Thread Andrew Watters
Thank you, I appreciate your reply. I didn't have a context entry so I 
added a minimal one (copied from the /examples one) before proceeding 
further as shown below.

   Context path=/xxx docBase=xxx debug=0 reloadable=true 
crossContext=true /

Unfortunately tomcat doesn't start now. I get a 'Document base 
C:\Development\Java\jakarta-tomcat-4.1.31\webapps\xxx does not exist or 
is not a readable directory'

So I added a direcory xxx. Now tomcat starts ok but it doesn't unpack 
the xxx.war. Again I'm probably making some very simple mistake but 
can't see the problem or an answer in the docs or by googling...


Mark Thomas wrote:
You need to include a ResourceLink element in your context.
Mark
Andrew Watters wrote:
Using tomcat 4.3.1 I have included the following in server.xml
GlobalNamingResources
   Environment name=config_file type=java.lang.String 
value=test/
 /GlobalNamingResources

In a servlet loaded on startup I try to read in the property
InitialContext ic = new InitialContext();
Context ctx = (Context) ic.lookup(java:comp/env);
String configFilename = (String)(ctx.lookup(config_file));
This code throws a NamingException. Where have I gone wrong?
Thanks
Andrew
-
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]


HttpSessionListener events after redeployment?

2005-04-05 Thread Clute, Andrew
In my application I like to keep track of all the sessions that are
currently active. So, I have a class that implements HttpSessionListener
and have a static HashMap that keeps a reference to all the active
sessions.
 
Everything works great. I get the events, and can track them without any
issues.
 
My problem arises when I redeploy my application. My sessions serialize
just fine, and recreate ok as well. However after redeployment, I have
no references to the active sessions (since my static Map has been
destroyed). 
 
Are there any events I can listen for when a session is recreated from
serialization? I was hoping for HttpSessionListener.sessionCreated(),
but that doesn't happen, and I can understand why. Maybe there is a
cleaner way to get a reference to all of the sessions active on my
server that will survive serialization?
 
Thanks in advance!
 
-Andrew


RE: HttpSessionListener events after redeployment?

2005-04-05 Thread Clute, Andrew
That leads to an interesting point. There is no reason why I cannot
populate that HashMap every time a request comes in. I was looking for
events from Tomcat. But I can combine that with events from the user
(requests for pages!).

Good thinking! Thanks a lot!

-Andrew



 -Original Message-
 From: Joe Riopel [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, April 05, 2005 4:30 PM
 To: Tomcat Users List
 Subject: Re: HttpSessionListener events after redeployment?
 
 Could you use the isNew() method from HttpSession ?
 
 On Apr 5, 2005 4:20 PM, Clute, Andrew 
 [EMAIL PROTECTED] wrote:
  In my application I like to keep track of all the sessions that are 
  currently active. So, I have a class that implements 
  HttpSessionListener and have a static HashMap that keeps a 
 reference 
  to all the active sessions.
  
  Everything works great. I get the events, and can track 
 them without 
  any issues.
  
  My problem arises when I redeploy my application. My sessions 
  serialize just fine, and recreate ok as well. However after 
  redeployment, I have no references to the active sessions (since my 
  static Map has been destroyed).
  
  Are there any events I can listen for when a session is 
 recreated from 
  serialization? I was hoping for 
 HttpSessionListener.sessionCreated(),
  but that doesn't happen, and I can understand why. Maybe there is a 
  cleaner way to get a reference to all of the sessions active on my 
  server that will survive serialization?
  
  Thanks in advance!
  
  -Andrew
  
 
 
 -
 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 taking 125 seconds to launch

2005-04-04 Thread Andrew Miehs
hmm - sounds like a dns lookup causing a problem
Andrew
On Apr 4, 2005, at 11:03 AM, t.n.a. wrote:
Michael Mehrle wrote:
The configuration is a modified version of appfuse 1.5 (struts and 
hibernate) - so this should give you a good idea of how it is 
structured. FYI: on my development machine here at home Tomcat starts 
in 28 seconds - identical project and configuration.
A fairly long time, any way you cut it. It takes about 6-9s on my 
Athlon 1900+ (using JDK 1.5), and a couple of seconds more on my 
laptop (even though the laptop has a 2.8GHz P4!, but runs blackdawn 
jdk 1.4).
Just a wild guess, but it seemes to me that you have a 2-minute 
timeout on something, and than tomcat normally loads in 5-6s.

-
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 taking 125 seconds to launch

2005-04-04 Thread Andrew Miehs
how about running tcpdump on the box to see what it is doing when you 
start tomcat?

Andrew
On Apr 4, 2005, at 5:46 PM, Michael Mehrle wrote:
You guys might be on to something - on my development machine it's 
taking only 25 seconds or so (identical code, tomcat version, and 
mysql installation). Question is: how do I fix a possible DNS lookup 
problem?

- Original Message - From: Andrew Miehs [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Monday, April 04, 2005 2:02 AM
Subject: Re: Tomcat taking 125 seconds to launch

hmm - sounds like a dns lookup causing a problem
Andrew
On Apr 4, 2005, at 11:03 AM, t.n.a. wrote:
Michael Mehrle wrote:
The configuration is a modified version of appfuse 1.5 (struts and 
hibernate) - so this should give you a good idea of how it is 
structured. FYI: on my development machine here at home Tomcat 
starts in 28 seconds - identical project and configuration.
A fairly long time, any way you cut it. It takes about 6-9s on my 
Athlon 1900+ (using JDK 1.5), and a couple of seconds more on my 
laptop (even though the laptop has a 2.8GHz P4!, but runs blackdawn 
jdk 1.4).
Just a wild guess, but it seemes to me that you have a 2-minute 
timeout on something, and than tomcat normally loads in 5-6s.

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


RH 7.3 to ES 3 migration Tomcat 5.0.28

2005-03-21 Thread Andrew Chapman
I am about to update from Red Hat 7.3 to Red Hat Enterprise Server 3. This a
move from Linux 2.4 kernel to a 2.4/2.6 hybrid.
 
The Native Posix Threading Library (NPTL) is the biggest change there seems
to be, does this cause any problems with the 1.5 JVM?
 
Is anyone running Tomcat 5.0.28 with 1.5 JVM on Red Hat ES 3, are there any
configuration issues that I should be aware of?
 
Thanks in advance.
 
Andy


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



Re: Altering default HTTP header fields for serving static content

2005-03-02 Thread Andrew Miehs
If you really want the browser not to cache images, you are better off 
putting a timestamp on
the end of the requests - as no-cache does not convince every browser 
all of the time...

ie:  http://localhost/image.gif?78927842303
On Mar 2, 2005, at 6:46 AM, [EMAIL PROTECTED] wrote:
Is there a way to alter the default HTTP header fields when a request 
is
made to Tomcat for static content? I would like to be able to add the
Cache-Control general header field with value no-cache when serving
images so they are not cached on the client side.

Can anyone please help? I've tried looking everywhere but can't find a
solution.
Thanks in advance... David
-
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: Load balancing SSL sessions

2005-02-23 Thread andrew
Hi Kelly,
To do a software solution you could use the following method.
www.mysite.com   - Both servers can answer this request, (for example 
round robin dns)
or some form of  hsrp (im sure there is a patch for linux to do this)...
and based upon load and a simple script (perl, java, etc)
they then redirect the traffic server1.mysite.com, or server2.mysite.com

This way the session then stays on server1 or server2.
As I said though, you will need 2 certificates if you do not want the 
clients complaining about broken ssl certificates.

Anderw

Kelly Vista wrote:
Thanks Andrew.
In answer to your question, some of our app requires SSL -- exactly 
like an order-style app (but it's not a product ordering app).

So, a person's session might involve the following path:
1. non SSL req
2. non SSL req
3. SSL req
4. non SSL req
and we'd like that entire session to be persistent (i.e., sticky with 
one particular app server).  BTW, it is not an issue for us if that 
server fails during the session.  It will happen rarely and it's an 
acceptable failure for us (i.e., not mission critical data).

I should have mentioned that we expect 1000 req/hour with this app.  
However, our app is not necessarily quick (dependent on external 
resources) and does keep a lot of state.

I'm personally someone in favor of a H/W LB solution, but looking to 
be convinced that a valid S/W solution exists which is better (or just 
as good) as a H/W solution.  I know the S/W solution will be less 
reliable (not solid state), but I'm looking to hear from folks who 
have done SSL session affinity with a S/W only approach.


Andrew
On Feb 22, 2005, at 10:24 PM, Kelly Vista wrote:
Hi -
We are looking to deploy our app, running on Tomcat 5, soon and are 
exploring load balancing options.  We are looking at H/W and S/W 
solutions, and I was wondering if anyone had any past 
experience/advice they would like to share.




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


Re: Load balancing SSL sessions

2005-02-22 Thread Andrew Miehs
We use F5 BigIPs, but they are probably overkill for your application - 
The cisco probably will be as well.

A 'Cheap' software solution might be to work with redirects, and 2 
separate IP addresses.
ie: ssl1.mysite.com and ssl2.mysite.com - You will need 2 ssl keys 
though for this to work.

Does all of your app require ssl? or just a certain part, ie: payment. 
Do you need the stickiness
for the whole app? or just for the ssl (seeing you are using tomcat, 
you will probably need it for the whole app)...

Andrew
On Feb 22, 2005, at 10:24 PM, Kelly Vista wrote:
Hi -
We are looking to deploy our app, running on Tomcat 5, soon and are 
exploring load balancing options.  We are looking at H/W and S/W 
solutions, and I was wondering if anyone had any past 
experience/advice they would like to share.

Our deployment is as pretty run-of-the-mill as it gets: 2 machines, 
each running Tomcat.  We would like to avoid replicating state (since 
we have a lot of state in these apps, for reasons beyond  our current 
control).  Even in-memory session replication would not be option 
here, so we're punting on the Tomcat cluster solution.

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


Re: Load balancing SSL sessions

2005-02-22 Thread Andrew Miehs
Problem with round robin dns is that you can not guarantee that the web 
browser/ client will not make a second request to the dns server during 
the session - although very very unlikely.

Andrew
On Feb 22, 2005, at 11:01 PM, Filip Hanik - Dev Lists wrote:
you can also use DNS round robin,
www.mysite.com resolves to two or more IP addresses.
Filip
Andrew Miehs wrote:
We use F5 BigIPs, but they are probably overkill for your application 
- The cisco probably will be as well.

A 'Cheap' software solution might be to work with redirects, and 2 
separate IP addresses.
ie: ssl1.mysite.com and ssl2.mysite.com - You will need 2 ssl keys 
though for this to work.

Does all of your app require ssl? or just a certain part, ie: 
payment. Do you need the stickiness
for the whole app? or just for the ssl (seeing you are using tomcat, 
you will probably need it for the whole app)...

Andrew
On Feb 22, 2005, at 10:24 PM, Kelly Vista wrote:
Hi -
We are looking to deploy our app, running on Tomcat 5, soon and are 
exploring load balancing options.  We are looking at H/W and S/W 
solutions, and I was wondering if anyone had any past 
experience/advice they would like to share.

Our deployment is as pretty run-of-the-mill as it gets: 2 machines, 
each running Tomcat.  We would like to avoid replicating state 
(since we have a lot of state in these apps, for reasons beyond  our 
current control).  Even in-memory session replication would not be 
option here, so we're punting on the Tomcat cluster solution.

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

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

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


Version control in WebDAV component of Tomcat

2005-02-07 Thread Andrew Paliga
Return Receipt
   
   Your   Version control in WebDAV component of Tomcat
   document:   
   
   wasAndrew Paliga/Toronto/IBM
   received
   by: 
   
   at:02/07/2005 09:29:52  
   





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



HTTP Statur 500 -

2005-02-04 Thread Andrew Paliga
Hi everyone,

I have an issue that i can not resolve and i would be very greatful if 
anyone has and suggestions of how to even approach fixing this issue.

I am running jdk 1.3.1_15
and jre 1.31_15 as well

I am trying to run a web client application that some of my colleagues 
have made. It is linked with Corel Draw to create Corel Draw files. 

I am running the server off of Tomcat 4.1.24

When the program tries to invoke Corel I get the following error messages:

HTTP Status 500 - 

--- 
-

type Exception report

message 

description The server encountered an internal error () that prevented it 
from fulfilling this request.

exception 

org.apache.jasper.JasperException: com/ibm/bridge2java/Dispatch
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil 
terChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain 
.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 
256)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe 
xt(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 
191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe 
xt(StandardPipeline.java:643)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
...
...
..



i'm just wondering where should i start to try to fix the program?...Is it 
something to do with registering Corel Draw? the JRE/JDK? the server? or a 
problem with the program itself??

ANY suggestions would be GREATLY appreciated

thanks,
Andrew Paliga



Andrew Paliga
Junior Project Manager
IBM Toronto Media Design Studio
Phone: (905) 413-2024

Re: Meaning of threads

2005-01-25 Thread Andrew Miehs
Using the worker-mpm or fork-mpm, apache does the same nasty thing with
threads and keep-alive, although I believe that when its starts running 
out of threads
it stops offering keep-alives - and to make matters worse - for each 
connection
you now have 2 threads - one for apache and one for tomcat -

Andrew
On Jan 25, 2005, at 6:46 AM, Sean M. Duncan wrote:
What is the impact of having apache httpd allow keep alive requests 
when
using the AJP connector to tomcat?  Does this have any impact on
tomcat's thread usage?  How well does httpd itself deal with keep alive
pipelines under a heavy user load?

-Sean

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


Re: Meaning of threads

2005-01-24 Thread Andrew Miehs
I would also consider turning of keepalive. Unfortunately tomcat (and 
apache)
both setup one thread per connection. You may be able to use squid as a
reverse proxy if you are having load/ number of connection/ thread 
problems
depending on your application

Andrew
On Jan 24, 2005, at 10:11 PM, Filip Hanik - Dev wrote:
maxThreads=150
your server can handle a maximum of 150 concurrent clients
minSpareThreads=25
if your server is idle, it will at least have 25 threads waiting to 
handle requests

maxSpareThreads=75
if your server is idle, it will have no more than 75 threads waiting 
to handle requests

you get the direction this is going in, right?
Filip

My server tends to lock out a user who bombards it
with requests so I'm wondering whether those options
have anything to do with it before I post the problem
here.


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


Re: AW: Meaning of threads

2005-01-24 Thread Andrew Miehs
On Jan 24, 2005, at 11:09 PM, Steffen Heil wrote:
Hi
the number of threads will depend on the size of your
machine, but to support many concurrent users, you will want
to turn off keep alive connections, as these will have the
opposite effect.
Wouldn't it make more sense to enable keep alive connections and 
increase
the thread count - if memory suffices?

Unfortunately not. IMHO threads are over used and over rated.
Have a look at the reasons THTTPD and Zeus webserver were created.
I was told that the 'Java Servlet Spec' (I think this was the one) 
requires
one thread per connection. I can understand the reasoning behind this,
as it makes the implementation much easier.

In my experience however, this does NOT work well in a high traffic 
situation.
It makes NO sense for a machine to need to deal with 1000+ threads. 
(Unless
of course you have an E15000 in the basement with 1000 processors). I 
had
major problems with Debian Woody as the supplied Glib C as I was unable
to get java to start more than 250 threads. Sarge was better in that it 
supported
the new linux threading library out of the box. I do not have any 
experience with
Solaris or Windows when dealing with that many threads.

You need to disable keep-alives, becuase if you don't you end up 
wasting a lot
of threads that just sit waiting for the next request on that 
connection - meaning
even more threads just hanging around.

The scary thing is, imagine something hangs on the backend for 30 
seconds, and
then all your 1000 threads start trying to do something at once You 
will end up
with a load of 1000 and ALL your requests will take a long time to 
return.

It may be interesting to replace the http connector for tomcat with one 
that uses
select and uses 'threads' as a type of worker pool. This way, you can 
deal with
all the connections in the select loop (incl. keep-alive) and still 
have the advantage
of not needing to remember state due to the worker threads to the back 
end...

My 2c
Andrew

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


Re: [OT] HTTP Sniffers

2004-12-16 Thread andrew
Puzzle no longer...
tcpdump -n -i eth0 -s0 -X
Should you have a problem with s0 try changing it to something bigger 
than your MTU, ie: if you
are using normal fast ethernet, 1600.

Regards
Andrew
On the technical level, you have to puzzle out the command line
arguments, which isn't that hard, and you also have to do some
post-processing on the data to make it intelligible.  Unfortunately, I
no longer have my notes from whenI puzzled this out for myself.  The
man pages for tcpdump have a fair amount of example recipes for the
arguments.  Some googling should turn up examples and explanations
of how to do this.
 


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


Re: [OT] HTTP Sniffers

2004-12-15 Thread Andrew Miehs
Pardon my ignorance, but what about tcpdump or snoop???
And if you have problems with those, have a look at ethereel
Andrew
Didier McGillis wrote:
Considering this is a pretty knowledgable group is there a good free 
HTTP Sniffer application I can use, I need to see what the HTTP 
headers are returning on my site.


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


No Cookies

2004-12-02 Thread Andrew Steady
Hi,

 

I require that an application never uses cookies, even if the user's browser
accepts cookies.

 

I have set cookies=false in the server.xml, however it is still attempting
to send cookies to the client. If the browser accepts the cookie, then the
session is maintained via cookies and if I do an encodeURL tomcat does not
add the session information to the URL.

 

Is it possible to do what I am describing or will tomcat always use cookies,
regardless of the cookies=false entry if the browser accepts a cookie?

 

Many thanks,

 

Andy



Re: mod_jk config on mac os x (Modifié par Cyri l Godefroy)

2004-12-02 Thread Andrew Becherer
On Thu, 2 Dec 2004 19:15:06 +0100, Cyril Godefroy [EMAIL PROTECTED] wrote:
   I have some trouble using mod_jk to connect my apache web server and
 my tomcat app server with mod_jk.  I use mac Os X 10.3.6, Tomcat 4.1.31
 Apache 2.0.57 mod_jk 1.2.5


This google search: http://www.google.com/search?q=osx+mod_jkie=UTF-8oe=UTF-8

Turned up this informative post: http://www.burnthacker.com/archives/000179.html

The Horrors of mod_jk and Mac OSX

I spent the day today trying to get mod_jk (and/or mod_jk2) working on
my powerbook, so I could have a real webserver in front of my
appserver. This turned out to be amazingly frustrating, largely due to
the OSX dynlib shared libraries just being different (they're pretty
much tied with the Win32 DLL format in that regard). The macosx binary
directory for mod_jk2 on the apache mirrors is empty for a good
reason: it doesn't even faintly build on OSX.

It turns out the secret sauce is not to use the apache2 from fink
(which ended up costing me several hours), but instead to use the
mod_jk 1.2.5 for macosx with the 1.3 apache that comes with the
system. If you then follow the normal mod_jk HOWTO, everything works
fine out of the box. Posted by kris at

November 10, 2004 05:34 AM | TrackBack 

-- 
Andrew Becherer
Student, Computing and Software Systems
University of Washington, Tacoma

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



Lots of seemingly dead tomcat processes

2004-11-24 Thread Andrew Garrett
Hi All.

I've got a bit of an issue with a tomcat installation - I have an ever
increasing number of processes, and the system users complain of
intermittant slow performance.  When a particular request is taking a
long time (generally not responding at all - timing out after a couple
of minutes) a page-refresh will generally generate a response in a
normal time frame (on the order of 1-2 seconds).  To me, this is
symptomatic of a particular request hitting a dead tomcat process,
while the refresh (being a different request) hits a different tomcat
process, which responds in a more normal time.

I'm a sys-admin type, not a developer, and my tomcat-foo is reasonably
weak (but getting stronger, the more I do with it, of course).

The system is running on a dual processor 2.8 GHz Xeon box, with 4 gig of ram. 
Base OS is Debian GNU/Linux
I'm using the JRockit JVM, and Tomcat 5.0.27
The JVM and tomcat are in a chroot jail
The tomcat server is making SOAP calls to another machine, and talking
directly to an MS-SQL box - both the machine to which it makes the
SOAP calls and the MS-SQL box show no indications of load.
When tomcat is freshly restarted, I have 44 tomcat processes (ps ax |
grep jrockit | wc -l).  Over time (a number of days) this increases,
until it hits around 245 processes, and it goes no higher than this.

What I'm looking for is some sort of solution - either some tomcat
setting I'm unfamiliar with that might be causing this, or some way
outside of Tomcat

I can put a band-aid style fix in place - restarting tomcat every X
days, but that's uglier than I'd like - I'd far rather identify and
fix the problem, than do scheduled restarts.

Any assistance or suggestions that any kind soul can offer would be
greatly appreciated.

Thanks.

Andrew

-- 
They sicken of the calm;  http://scroll.redemption.co.nz/
That know the storm.   http://www.gadgets-weblog.com/

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



HTTP Compression

2004-11-23 Thread andrew
Hi all,
I am looking at enabling compression on Tomcat 5.0.25.
Is everyone using compress=on or should I use an integer (?number of 
bytes?)

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


Re: high traffic Tomcat sites out there?

2004-11-22 Thread andrew
I would be very careful using tomcat for 'High-Performance' internet 
applications.
You will need to disable keepalives - or use some form of keep-alive 
proxy to stop tomcat
creating too many connections.

How many simultaneous users are you planning on having? What operating 
system are you planning
on using - With linux, make sure you use the new threading library - (NPTL).

Be careful with the ORB you choose, (should you be using an application 
server) as it to
can create way tooo many threads.

Thousands of request/ sec means that you will probably need to have your 
data in RAM -
you may find it difficult to find a database/ filesystem that can 
deliver you the data quickly
enough - would need to know more about the applications.

Do not underestimate the problems with keepalives and number of 
connections/ threads.

Regards
Andrew
Al Gidden wrote:
We have three Tomcat systems in front of a large database.
We use JMeter to test our site, and have pushed each system
with 1000 requests per minute and not noticed any problems at all.
Our servers only have one processor and 1GB of RAM.
The only time we start to see any performance issues is due to the size of the 
database pool and the responsiveness of the DB connections under extreme load.

Your code and the Tomcat config can all effect your performance.
In our case, it took a year for us to get our code cleaned up and
have enough benchmarks to know we made solid configuration changes for the
sake of scalability.
Best of luck to you,
Al G
- Original Message -
From: LAM Kwun Wa Joseph [EMAIL PROTECTED]
Date: Monday, November 22, 2004 4:55 am
Subject: high traffic Tomcat sites out there?
 

For my Tomcat cluster I'm looking for an upper limit on the 
estimation of
how much traffic it may face. Say, would thousands of HTTP req/s 
be too
'astronomical' for a 4-node Dual P4 Xeon cluster to achieve? (I'm 
talkingabout dynamic pages such as stock quotes and news)

Does anyone know of any high traffic JSP/servlet sites(running 
Tomcat or
similar servlet container)? I'm mostly interested to know what's the
typical magnitude of their HTTP throughput (e.g. hundreds or 
thousandsof HTTP/s) and what kinds of apps are they running.

Joseph Lam
---
--
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: Context element problems in conf/server.xml

2004-11-15 Thread Andrew Watters
Thanks again. That works great, I'm accessing my webapp fine as the 
default webapp with the following

Engine name=Catalina defaultHost=localhost debug=9
 Host name=localhost debug=9 appBase=webapps unpackWARs=true 
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
   Context path= docBase=pets-proper debug=9
 Environment name=servername type=java.lang.String 
value=dev.andrew override=false/
   /Context
 /Host
/Engine

However, my application can't find the 'servername' environment property 
again!

The combinations I've tried (each one three times to be sure) and their 
behaviour

path=, docBase=xxx, WAR named xxx.war --- WAR is unpacked, webapp 
starts but property not found
path=/, docBase=xxx, WAR named xxx.war --- WAR is unpacked, webapp 
starts but property not found
path=, docBase=ROOT, WAR named ROOT.war --- WAR is not unpacked, 
webapp does not start
path=/, docBase=ROOT, WAR named ROOT.war --- WAR is unpacked, webapp 
starts and property found!

I'm now really confused. The last option was where I came in! This 
didn't work previously and now does. I really wish that I understood 
tomcats behaviour. The only other change is that I've cleaned up my 
server.xml file but only to remove comments and commented out sections.

Andoni, thank you for your replies. Does this make any sense at all to 
you? If I have the time I'll take a look at the tomcat source but 
deadlines are looming at the moment... For the moment I have my fingers 
crossed (not my favourite policy) that all will keep working.

Regards
Andrew
Andoni wrote:
Yes, you can have any xxx.war that you access from
http://localhost/login.jsp so long as it's path= and it is the only
context in that Host which has path=. This is what makes it the default
app.
Andoni.
- Original Message - 
From: Andrew Watters [EMAIL PROTECTED]
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Friday, November 12, 2004 5:00 PM
Subject: Re: Context element problems in conf/server.xml

 

Hi Andoni
Thanks again for your reply.
I hope I'm understanding what you say correctly, apologies if not. If I
rename my WAR to say, app.war, then to access a page the URL would
become http://localhost/app/login.jsp. The reason why I changed the
appBase to ROOT and renamed my WAR ROOT.war was so that the URL would be
http://localhost/login.jsp. This is a customer directive.
Is the problem that I'm going about this the wrong way in the first
place? Can I have an app.war and access it like
   

http://localhost/login.jsp?
 

Best regards
Andrew

Andoni wrote:
   

Ok, You can ignore the logger's and valve's when you are worrying
 

about
 

configuration. So what you are left with is:
Engine name=Catalina defaultHost=localhost debug=9
Host name=localhost debug=9 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
Context path=/ docBase=ROOT debug=9
/Context
/Host
/Engine
What you have to be aware of is that ROOT is more than just another
 

name
 

for a webapp. ROOT is a special name for the default webapp in a host.
Therefore what you should do is to remove all references to root. Comment
out this line of the server.xml, call your .war file something else and
 

set
 

the path=.
Regards,
Andoni.
- Original Message - 
From: Andrew Watters [EMAIL PROTECTED]
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Friday, November 12, 2004 11:30 AM
Subject: Re: Context element problems in conf/server.xml


 

Thanks for your reply. Please find below the tags as requested. Thank
you for taking the time.
Engine name=Catalina defaultHost=localhost debug=9
Valve className=org.apache.catalina.valves.RequestDumperValve/
Logger className=org.apache.catalina.logger.FileLogger
prefix=catalina_log. suffix=.txt timestamp=true/
Realm className=org.apache.catalina.realm.UserDatabaseRealm
debug=9 resourceName=UserDatabase/
Host name=localhost debug=9 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
  Context path=/ docBase=ROOT debug=9
Environment name=servername type=java.lang.String
value=dev.andrew override=false/
  /Context
  Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs prefix=localhost_access_log. suffix=.txt
pattern=common resolveHosts=false/
  Logger className=org.apache.catalina.logger.FileLogger
directory=logs prefix=localhost_log. suffix=.txt
   

timestamp=true/
 

/Host
/Engine

Andoni wrote:

   

Hello,
You certainly don't need the / in the path attribute. This is not
 

going
 

 

to
 

work as it cannot match just one slash.
Would you please post the Engine Host and Context tags. They
 

should
 

all be seen as a group to know exactly what's being called.
Andoni.
- Original Message - 
From: Andrew Watters [EMAIL PROTECTED]
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Thursday, November 11, 2004 4:19 PM
Subject: Context element problems in conf/server.xml



 

Hi
I posted

Re: Analysing dead threads

2004-11-15 Thread andrew
Hi Stefan,
You might want to try
kill -3 processid
Depending on your JVM you may find a stacktrace in STDERR (STDIO?) or in 
a seperate file in the directory where you started the JVM

Depending on the version of Tomcat you are running, you may also want to 
have a look at the manager application:

http://www.myhost.com/manager/status
Regards
Andrew

Steffen Heil wrote:
Hi
I have a situation, where a lot of threads seem to stop working right in my
servlet.
From debug output, I know they entered the servlet but never leave it.
 


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


Re: Analysing dead threads

2004-11-15 Thread andrew
Hi Peter,
A profiler may cause more trouble than help if you try this on a heavily 
loaded production box.
It might be easiest if he first looks at the 'manager' application that 
comes with tomcat 5.

Regards
Andrew
Peter Lin wrote:
just for clarification. Do you mean zombie threads?  Threads that are
not reachable, but still running.  My advice would be to download a
profiler and figure out the cause.
peter
 


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


Re: Context element problems in conf/server.xml

2004-11-12 Thread Andrew Watters
Thanks for your reply. Please find below the tags as requested. Thank 
you for taking the time.

Engine name=Catalina defaultHost=localhost debug=9
 Valve className=org.apache.catalina.valves.RequestDumperValve/
 Logger className=org.apache.catalina.logger.FileLogger 
prefix=catalina_log. suffix=.txt timestamp=true/
 Realm className=org.apache.catalina.realm.UserDatabaseRealm 
debug=9 resourceName=UserDatabase/
 Host name=localhost debug=9 appBase=webapps unpackWARs=true 
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
   Context path=/ docBase=ROOT debug=9
 Environment name=servername type=java.lang.String 
value=dev.andrew override=false/
   /Context
   Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs prefix=localhost_access_log. suffix=.txt 
pattern=common resolveHosts=false/
   Logger className=org.apache.catalina.logger.FileLogger 
directory=logs prefix=localhost_log. suffix=.txt timestamp=true/
 /Host
/Engine


Andoni wrote:
Hello,
You certainly don't need the / in the path attribute. This is not going to
work as it cannot match just one slash.
Would you please post the Engine Host and Context tags. They should
all be seen as a group to know exactly what's being called.
Andoni.
- Original Message - 
From: Andrew Watters [EMAIL PROTECTED]
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Thursday, November 11, 2004 4:19 PM
Subject: Context element problems in conf/server.xml

 

Hi
I posted a problem a couple of days ago which I've made some progress
   

with.
 

Originally my webapp ROOT.war would not unpack. I've figured out the
problem was with the Context element as shown below
Context path= docBase=ROOT debug=9
 Environment name=servername type=java.lang.String
value=dev.andrew/
/Context
If I unpacked ROOT.war manually then my application worked fine.
By adding a forward slash to the path attribute as shown below
Context path=/ docBase=ROOT debug=9
 Environment name=servername type=java.lang.String
value=dev.andrew/
/Context
tomcat now unpacks the WAR fine. However, my application no longer
starts because it cannot find the 'servername'! Yikes!
Does anybody have any suggestions please?
Thanks again
Andrew
   


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




Re: Context element problems in conf/server.xml

2004-11-12 Thread Andrew Watters
Hi Andoni
Thanks again for your reply.
I hope I'm understanding what you say correctly, apologies if not. If I 
rename my WAR to say, app.war, then to access a page the URL would 
become http://localhost/app/login.jsp. The reason why I changed the 
appBase to ROOT and renamed my WAR ROOT.war was so that the URL would be 
http://localhost/login.jsp. This is a customer directive.

Is the problem that I'm going about this the wrong way in the first 
place? Can I have an app.war and access it like http://localhost/login.jsp?

Best regards
Andrew

Andoni wrote:
Ok, You can ignore the logger's and valve's when you are worrying about
configuration. So what you are left with is:
Engine name=Catalina defaultHost=localhost debug=9
Host name=localhost debug=9 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
 Context path=/ docBase=ROOT debug=9
 /Context
/Host
/Engine
What you have to be aware of is that ROOT is more than just another name
for a webapp. ROOT is a special name for the default webapp in a host.
Therefore what you should do is to remove all references to root. Comment
out this line of the server.xml, call your .war file something else and set
the path=.
Regards,
Andoni.
- Original Message - 
From: Andrew Watters [EMAIL PROTECTED]
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Friday, November 12, 2004 11:30 AM
Subject: Re: Context element problems in conf/server.xml

 

Thanks for your reply. Please find below the tags as requested. Thank
you for taking the time.
Engine name=Catalina defaultHost=localhost debug=9
 Valve className=org.apache.catalina.valves.RequestDumperValve/
 Logger className=org.apache.catalina.logger.FileLogger
prefix=catalina_log. suffix=.txt timestamp=true/
 Realm className=org.apache.catalina.realm.UserDatabaseRealm
debug=9 resourceName=UserDatabase/
 Host name=localhost debug=9 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
   Context path=/ docBase=ROOT debug=9
 Environment name=servername type=java.lang.String
value=dev.andrew override=false/
   /Context
   Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs prefix=localhost_access_log. suffix=.txt
pattern=common resolveHosts=false/
   Logger className=org.apache.catalina.logger.FileLogger
directory=logs prefix=localhost_log. suffix=.txt timestamp=true/
 /Host
/Engine

Andoni wrote:
   

Hello,
You certainly don't need the / in the path attribute. This is not going
 

to
 

work as it cannot match just one slash.
Would you please post the Engine Host and Context tags. They should
all be seen as a group to know exactly what's being called.
Andoni.
- Original Message - 
From: Andrew Watters [EMAIL PROTECTED]
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Thursday, November 11, 2004 4:19 PM
Subject: Context element problems in conf/server.xml


 

Hi
I posted a problem a couple of days ago which I've made some progress
   

with.
 

Originally my webapp ROOT.war would not unpack. I've figured out the
problem was with the Context element as shown below
Context path= docBase=ROOT debug=9
Environment name=servername type=java.lang.String
value=dev.andrew/
/Context
If I unpacked ROOT.war manually then my application worked fine.
By adding a forward slash to the path attribute as shown below
Context path=/ docBase=ROOT debug=9
Environment name=servername type=java.lang.String
value=dev.andrew/
/Context
tomcat now unpacks the WAR fine. However, my application no longer
starts because it cannot find the 'servername'! Yikes!
Does anybody have any suggestions please?
Thanks again
Andrew
   

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




Context element problems in conf/server.xml

2004-11-11 Thread Andrew Watters
Hi
I posted a problem a couple of days ago which I've made some progress with.
Originally my webapp ROOT.war would not unpack. I've figured out the 
problem was with the Context element as shown below

Context path= docBase=ROOT debug=9
 Environment name=servername type=java.lang.String 
value=dev.andrew/
/Context

If I unpacked ROOT.war manually then my application worked fine.
By adding a forward slash to the path attribute as shown below
Context path=/ docBase=ROOT debug=9
 Environment name=servername type=java.lang.String 
value=dev.andrew/
/Context

tomcat now unpacks the WAR fine. However, my application no longer 
starts because it cannot find the 'servername'! Yikes!

Does anybody have any suggestions please?
Thanks again
Andrew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Renaming WAR problem

2004-11-09 Thread Andrew Watters
Thanks for your reply Tim.
Tim Penhey wrote:
Andrew Watters wrote:
In this case the webapps directory is entirely empty, I delete the 
ROOT folder as part of the publish procedure and there are no other 
apps configured except for the manager and admin ones.

What about the XML configuration file in 
$TOMCAT_HOME/conf/Catalina/localhost
Does it specify the name of the correct war file?
The only files in here are admin.xml and manager.xml. Should I have 
something for ROOT?

As Yoav mentioned, look at the Host element in the /conf/server.xml 
file.  Specifically the values for unpackWARs and autoDeploy.
I think this is configured correctly. I have
Host name=localhost debug=9 appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false
I have also set all debug leverls in /conf/server.xml and /conf/web.xml 
to 9. I don't see any indication of errors in any of the generated logs 
or in the command window.

Tim

-
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: Doubts with tomcat

2004-11-08 Thread Andrew Miehs
Tomcat starts 5 connector threads, plus the other internal threads that 
it uses for its own house keeping.

Andrew
On 08.11.2004, at 08:29, Michael Echerer wrote:


1) When I start tomcat with above server.xml , it creates 9 process 
with same output on shell. it is I configured tomcat to run with 
minSpareThreads=5 then why it start with 9 threads?
You configured 5 connector threads that not necessarily match OS 
threads (or whatever you saw). Check with Tomcat's manager application 
how many connector threads you really have.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Connection Timeout

2004-11-08 Thread Andrew Miehs
Does anyone know any way that I can tell tomcat to kill the 'thread' if 
it isn't back in a ready state within 30 seconds? (waiting for new 
requests)

Thanks
Andrew
On 05.11.2004, at 16:20, Phillip Qin wrote:

Byte recv and byte sent?
-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED]
Sent: November 5, 2004 10:18 AM
To: Tomcat Users List
Subject: Re: Connection Timeout
Hi Phillip,
The request is for example a 10K image.
Regards
Andrew
On 05.11.2004, at 16:11, Phillip Qin wrote:

My guess is the request was serviced by Tomcat, and took that much
time.
What did your request column tell? A huge request, file upload?
-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED]
Sent: November 5, 2004 4:24 AM
To: Tomcat Users List
Subject: Connection Timeout
Dear List,
In /manager/status, I occasionally see connections where the status is
'S' and the time column is huge!  1 ms.
Does this mean that the request is still being processed by tomcat? or
is this a request waiting to be picked up - ie: chunked?
If so, is there any way I can set a timeout for this, as a time  10
seconds makes very little sense with our application?
Thanks in advance,
Andrew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Renaming WAR problem

2004-11-08 Thread Andrew Watters
I have a WAR which tomcat recognises and unpacks correctly. When I 
rename the WAR tomcat no longer unpacks it. Is this expected behaviour? 
I've had a look in the 2.4 servlet spec and haven't been able to find 
anything on this topic. Is there a work around that will allow me to do 
this?

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


Re: Renaming WAR problem

2004-11-08 Thread Andrew Watters
Well, that explains something :) So what is tomcat seeing in the WAR 
that it refuses to unpack it after renaming?

Shapira, Yoav wrote:
Hi,
 

I have a WAR which tomcat recognises and unpacks correctly. When I
rename the WAR tomcat no longer unpacks it. Is this expected behaviour?
I've had a look in the 2.4 servlet spec and haven't been able to find
anything on this topic. Is there a work around that will allow me to do
this?
   

Considering that unpacking of WARs and renaming of web application are
not areas covered by the Servlet Spec, I'm not surprised you didn't find
anything there ;)  It's a container-specific implementation issue.
Yoav

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




Re: Renaming WAR problem

2004-11-08 Thread Andrew Watters
In this case the webapps directory is entirely empty, I delete the ROOT 
folder as part of the publish procedure and there are no other apps 
configured except for the manager and admin ones.

Shapira, Yoav wrote:
Hi,
 

Well, that explains something :) So what is tomcat seeing in the WAR
that it refuses to unpack it after renaming?
   

A directory with that name already existing.  Tomcat won't overwrite
such a directory if it exists.
If your app is Spec-compliant, considering setting unpackWARs=false
for your Host.
Yoav

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




Re: Renaming WAR problem

2004-11-08 Thread Andrew Watters
Apologies, I replied before but it never appeared, trying again...
I renamed it to ROOT.WAR. The webapp used to be named like this and 
previously worked fine. It's now called ROOT-1.0.WAR. The new name is a 
result of moving to maven and it appending the version number.

Ben Souther wrote:
What did you rename it to?

On Mon, 2004-11-08 at 09:46, Andrew Watters wrote:
 

I have a WAR which tomcat recognises and unpacks correctly. When I 
rename the WAR tomcat no longer unpacks it. Is this expected behaviour? 
I've had a look in the 2.4 servlet spec and haven't been able to find 
anything on this topic. Is there a work around that will allow me to do 
this?

Thank you
Andrew
-
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: Renaming WAR problem

2004-11-08 Thread Andrew Watters
I renamed it to ROOT.WAR. The webapp used to be named like this and 
previously worked fine. It's now called ROOT-1.0.WAR. The new name is a 
result of moving to maven and it appending the version number.

Ben Souther wrote:
What did you rename it to?

On Mon, 2004-11-08 at 09:46, Andrew Watters wrote:
 

I have a WAR which tomcat recognises and unpacks correctly. When I 
rename the WAR tomcat no longer unpacks it. Is this expected behaviour? 
I've had a look in the 2.4 servlet spec and haven't been able to find 
anything on this topic. Is there a work around that will allow me to do 
this?

Thank you
Andrew
-
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: Renaming WAR problem

2004-11-08 Thread Andrew Watters
Thanks. Sorry that's just my poor typing. It actually is ROOT.war. If I 
name it back again it unpacks fine! Aaagh, my head hurts now.

Ben Souther wrote:
try ROOT.war
On Mon, 2004-11-08 at 10:27, Andrew Watters wrote:
 

Apologies, I replied before but it never appeared, trying again...
I renamed it to ROOT.WAR. The webapp used to be named like this and 
previously worked fine. It's now called ROOT-1.0.WAR. The new name is a 
result of moving to maven and it appending the version number.

Ben Souther wrote:
   

What did you rename it to?

On Mon, 2004-11-08 at 09:46, Andrew Watters wrote:
 

I have a WAR which tomcat recognises and unpacks correctly. When I 
rename the WAR tomcat no longer unpacks it. Is this expected behaviour? 
I've had a look in the 2.4 servlet spec and haven't been able to find 
anything on this topic. Is there a work around that will allow me to do 
this?

Thank you
Andrew
-
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]


Connection Timeout

2004-11-05 Thread Andrew Miehs
Dear List,
In /manager/status, I occasionally see connections where the status is 
'S' and the time column is huge!  1 ms.

Does this mean that the request is still being processed by tomcat? or 
is this a request waiting to be picked up - ie: chunked?

If so, is there any way I can set a timeout for this, as a time  10 
seconds makes very little sense with our application?

Thanks in advance,
Andrew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Connection Timeout

2004-11-05 Thread Andrew Miehs
Hi Phillip,
The request is for example a 10K image.
Regards
Andrew
On 05.11.2004, at 16:11, Phillip Qin wrote:

My guess is the request was serviced by Tomcat, and took that much 
time.
What did your request column tell? A huge request, file upload?

-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED]
Sent: November 5, 2004 4:24 AM
To: Tomcat Users List
Subject: Connection Timeout
Dear List,
In /manager/status, I occasionally see connections where the status is
'S' and the time column is huge!  1 ms.
Does this mean that the request is still being processed by tomcat? or
is this a request waiting to be picked up - ie: chunked?
If so, is there any way I can set a timeout for this, as a time  10
seconds makes very little sense with our application?
Thanks in advance,
Andrew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
!DSPAM:418b46a1164289526310470!

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


Re: Connection Timeout

2004-11-05 Thread Andrew Miehs
Hi Phillip,
S506331 ms17 KB0 KBx.x.2.24www.x.comGET 
/x//img/x/Image.gif HTTP/1.1

Regards
Andrew
On 05.11.2004, at 16:20, Phillip Qin wrote:

Byte recv and byte sent?
-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED]
Sent: November 5, 2004 10:18 AM
To: Tomcat Users List
Subject: Re: Connection Timeout
Hi Phillip,
The request is for example a 10K image.
Regards
Andrew
On 05.11.2004, at 16:11, Phillip Qin wrote:

My guess is the request was serviced by Tomcat, and took that much
time.
What did your request column tell? A huge request, file upload?
-Original Message-
From: Andrew Miehs [mailto:[EMAIL PROTECTED]
Sent: November 5, 2004 4:24 AM
To: Tomcat Users List
Subject: Connection Timeout
Dear List,
In /manager/status, I occasionally see connections where the status is
'S' and the time column is huge!  1 ms.
Does this mean that the request is still being processed by tomcat? or
is this a request waiting to be picked up - ie: chunked?
If so, is there any way I can set a timeout for this, as a time  10
seconds makes very little sense with our application?
Thanks in advance,
Andrew
-
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]
!DSPAM:418b99c3205412059510077!



Re: Huge tomcat memory footprint

2004-11-03 Thread Andrew Miehs
Hi Anand,

We currently have a similar problem. Under load the JVM consumes more and more 
memory. (We are using tomcat 5.0 and Sun JVM 1.4.2 and linux (debian sarge))

In our case it looks as if the Garbage Collector is not getting enough time to 
free memory - but this is still very much a guess. You may want to have a 
look in this direction however.

We are currently looking at see what setting we can tune for the GC or maybe 
using a different JVM.

Good luck,

Andrew

  -Original Message-
  From: Anand Narasimhan [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 01, 2004 5:26 PM
  To: [EMAIL PROTECTED]
  Subject: Huge tomcat memory footprint
  
  Hi,
  
  I am not able to determine if the problem is related to
 
  tomcat, solaris
  or
 
  the application itself. Any help/pointers to debug the
 
  problem will be
 
  greatly appreciated.
  
  The application runs on Solaris 2.8 using Sun's Java version
 
  1.4.1_02.
  The
 
  tomcat version is 4.1.27. The GUI is written using HTML/JSP/Struts
 
  1.0.2.
 
  The database is Oracle version 8.x (I think). The
 
  application also has
  API
 
  interface written using Java/XML/Soap etc. The application is
 
  memory/CPU
 
  intensive.  The problem I am having is,  after running under a large
 
  load,
 
  tomcat process's memory footprint (reported by top command)
 
  increases
 
  rapidly to more that 2G. The heap size (max configured to 1G),
 
  increases to
 
  about 500 - 600M. I have tried running tomcat with
 
  optimizeit to see if
 
  there are any memory leaks. optimizeit as wells as the
 
  output from GC
 
  (running with -verbose:gc, -XX+PrintGCDetails) shows
 
  frequent garbage
 
  collection activity and the heap size does not grow too much.
  
  I am not able to figure out why the process memory grows. If the heap
 
  is
 
  not
  growing too much, what is consuming the memory?
  

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



Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Dear List,
I am new to the list and have a few questions about Tomcat 5.0.
We are attempting to use tomcat in a High Traffic, many simultaneous 
Internet user environment.

I have about 8000 simultaneous users, and plan on using 14 web servers. 
These servers connect via CORBA to a group of backend servers. The 14 
web severs are load balanced with a hardware load balancer.

How does Tomcat deal with connections?
When a request from a user arrives, is it assigned a thread? and is 
this thread ONLY used for this connection, (including obtaining 
information from the backend) until the request is finished?

How are keep-alives dealt with? When a user requests a keep-alive, is a 
thread held permanently for this user, until the connection is dropped? 
If this is the case, how is this ment to scale?

A connection pool of 750 threads seems unusable... How can 1 thread per 
connection scale? or have I misunderstood how tomcat uses its 
connection pool? And should all of these threads ever have something to 
do at the same time, the box would just fall over with a load of 
750

Would it not make more sense to use a smaller connection pool, and set 
up queues?

Would it not then be better when the request has been processed, to put 
this into a second queue for requests which then go to the backend, 
etc, etc? So many threads can't help performance. Wouldn't the kernel 
be busy the whole time with context switching? and no user would ever 
get any data back

Thanks in advance for any comments,
Andrew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Hi Peter,
The load balancer is an F5 and we are doing can do the balancing based 
on JSESSIONID. At the moment we are doing persistence based on our own 
cookie (Long story).

How did you disable keep-alives? maxKeepAliveRequests=1 ? Doesn't it 
make more sense to use keep-alives? And what does tomcat really do with 
these keep-alive connections? Does it really keep 1 thread open for 
each keep-alive? this seems VERY unnecessary

Regards
Andrew
On 29.10.2004, at 17:02, Peter Lin wrote:
if you're using hardware load balancer like cisco localdirector, I
would setup the load balancer to direct the traffic based on
sessionid.
this way, you don't need to use keep alive. when you say 8K
simultaneous users, what does that translate to in terms of concurrent
requests per second? An easy way to figure that out is to use a Http
analysis tool like webtrends, or HttpAnalyze to generate statistics.
I would look at the peak and average concurent requests. once you know
that, it will be easier to determine if 14 servers are sufficient.
peter
On Fri, 29 Oct 2004 16:53:26 +0200, Andrew Miehs [EMAIL PROTECTED] 
wrote:
Dear List,
I am new to the list and have a few questions about Tomcat 5.0.
We are attempting to use tomcat in a High Traffic, many simultaneous
Internet user environment.
I have about 8000 simultaneous users, and plan on using 14 web 
servers.
These servers connect via CORBA to a group of backend servers. The 14
web severs are load balanced with a hardware load balancer.

How does Tomcat deal with connections?
When a request from a user arrives, is it assigned a thread? and is
this thread ONLY used for this connection, (including obtaining
information from the backend) until the request is finished?
How are keep-alives dealt with? When a user requests a keep-alive, is 
a
thread held permanently for this user, until the connection is 
dropped?
If this is the case, how is this ment to scale?

A connection pool of 750 threads seems unusable... How can 1 thread 
per
connection scale? or have I misunderstood how tomcat uses its
connection pool? And should all of these threads ever have something 
to
do at the same time, the box would just fall over with a load of
750

Would it not make more sense to use a smaller connection pool, and set
up queues?
Would it not then be better when the request has been processed, to 
put
this into a second queue for requests which then go to the backend,
etc, etc? So many threads can't help performance. Wouldn't the kernel
be busy the whole time with context switching? and no user would ever
get any data back

Thanks in advance for any comments,
Andrew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

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


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Hi Yoav,
I have not read the Servlet Spec, so please pardon my ignorance. 
(Definitely do not mean to offend). What I still haven't had clearly 
answered is:

User A sends request (with keepalive) to tomcat. Tomcat assigns request 
to thread (T1).
Tomcat sends result back. Is thread T1 now kept reserved for user A 
until he/ or tomcat closes the keep-alive connection?

If this is the case, and I now have 1000 users, each with 2 connections 
per user (ie: 2000 connections) do I need 2000 threads? What if the 
requests each only take a very short amount of time? The server is 
capable of answering a lot more requests than those from the 1000 
users, but due to the number of connections and threads, I am limited 
to the 1000 users per machine...

Or am I just missing something here...
I can understand the issue with the one thread one request in the Spec 
- am just wondering if there isn't a better way, as I can not see how 
this can possible scale in a high traffic environment -
or maybe I just don't understand... :-(

Thanks
Andrew
On 29.10.2004, at 17:28, Shapira, Yoav wrote:
Hi,
these keep-alive connections? Does it really keep 1 thread open for
each keep-alive? this seems VERY unnecessary
Remember that the Servlet Spec mandates the Servlet Container service a
request with one thread, independent of the HTTP details.  So before 
you
think we're clueless when it comes to performant connection handling
design, please keep that in mind ;)

Yoav

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

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

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


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
The loadbalancer forwards the packet to tomcat, and as such, tomcat  
sees the keep-alive request.
If tomcat has keep-alive enabled, it will set up keep alive on its end.

Andrew
On 29.10.2004, at 17:31, Peter Lin wrote:
you don't need to use keepalive.  generally, in a load balanced setup,
keepalive is disabled because the load balancer is already making sure
the user goes to the same webserver for the life time of the session.
keepalive is usually set in the HTTP header by the client, so I don't
think you need to do anything to tomcat's config. someone correct me
if I'm wrong. remy can provide a better description of what happens in
the case a browser wants to use keep alive.
peter
On Fri, 29 Oct 2004 17:20:18 +0200, Andrew Miehs [EMAIL PROTECTED]  
wrote:
Hi Peter,
The load balancer is an F5 and we are doing can do the balancing based
on JSESSIONID. At the moment we are doing persistence based on our own
cookie (Long story).
How did you disable keep-alives? maxKeepAliveRequests=1 ? Doesn't it
make more sense to use keep-alives? And what does tomcat really do  
with
these keep-alive connections? Does it really keep 1 thread open for
each keep-alive? this seems VERY unnecessary

Regards
Andrew

On 29.10.2004, at 17:02, Peter Lin wrote:
if you're using hardware load balancer like cisco localdirector, I
would setup the load balancer to direct the traffic based on
sessionid.
this way, you don't need to use keep alive. when you say 8K
simultaneous users, what does that translate to in terms of  
concurrent
requests per second? An easy way to figure that out is to use a Http
analysis tool like webtrends, or HttpAnalyze to generate statistics.

I would look at the peak and average concurent requests. once you  
know
that, it will be easier to determine if 14 servers are sufficient.

peter
On Fri, 29 Oct 2004 16:53:26 +0200, Andrew Miehs [EMAIL PROTECTED]
wrote:
Dear List,
I am new to the list and have a few questions about Tomcat 5.0.
We are attempting to use tomcat in a High Traffic, many simultaneous
Internet user environment.
I have about 8000 simultaneous users, and plan on using 14 web
servers.
These servers connect via CORBA to a group of backend servers. The  
14
web severs are load balanced with a hardware load balancer.

How does Tomcat deal with connections?
When a request from a user arrives, is it assigned a thread? and is
this thread ONLY used for this connection, (including obtaining
information from the backend) until the request is finished?
How are keep-alives dealt with? When a user requests a keep-alive,  
is
a
thread held permanently for this user, until the connection is
dropped?
If this is the case, how is this ment to scale?

A connection pool of 750 threads seems unusable... How can 1 thread
per
connection scale? or have I misunderstood how tomcat uses its
connection pool? And should all of these threads ever have something
to
do at the same time, the box would just fall over with a load of
750
Would it not make more sense to use a smaller connection pool, and  
set
up queues?

Would it not then be better when the request has been processed, to
put
this into a second queue for requests which then go to the backend,
etc, etc? So many threads can't help performance. Wouldn't the  
kernel
be busy the whole time with context switching? and no user would  
ever
get any data back

Thanks in advance for any comments,
Andrew
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

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

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

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


Re: extraordinarily stupid question

2004-10-29 Thread Andrew Miehs
mv $TOMCAT_HOME/server/webapps/manager 
$TOMCAT_HOME/server/webapps/newmanager

On 29.10.2004, at 17:45, joon yoo wrote:
After I install tomcat 5.0, the tomcat management page is on 
http://tomcat:8080

How can this management page be obscured/moved to a different url and
then, how can a redirector to http://tomcat:8080/application be put in
for that root address?
Thanks for any help,
joon
-
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 in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Hi Filip,
Is this how you disable keep-alive on tomcat?
maxKeepAliveRequests=1
or is there another switch that I am missing..
On 29.10.2004, at 17:49, Filip Hanik - Dev wrote:
turn off keep alive

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


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Hi Peter,
I am not using keep-alives to keep session persistence, but was rather 
hoping for better client performance. Using keep-alives saves creating 
a tcp connection for each request - and thereby saving 3 tcp packets 
(and roundtrip times) per request.

Andrew
On 29.10.2004, at 17:53, Peter Lin wrote:
mladen makes a good point. the sites I've worked on, we left the
keepalive up to the browser and didn't explicitly disable keepalive.
the sites I've worked on we simply used hardware load balancer to make
sure the session goes to the right server.
that is usually enough from my experience. my bias perspective is,
unless the users are sending requests very rapidly, I don't see much
benefit to using keepalive. If the interval between requests is rather
long, like minutes, I doubt keepalive would provide any measurable
benefit.
I would look at the statistics from the http logs to determine whether
keepalive should be disabled or not.

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


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
On 29.10.2004, at 19:08, Peter Lin wrote:
if you're looking for better client performance I would explore other
areas first.
1. use gzip compression - this can reduce the html to 1/10th the size.
your mileage will vary.
This is being looked at - loadbalancer vrs tomcat

2. caching results on the web-tier
Very dynamic content
3. putting the images on a dedicated image server
Already being done. 2x Servers running apache - which also have this 
keep-alive problem. Running 1000 threads per server is NOT my idea of a 
good time. I will be having a look at a couple of other alternatives to 
apache over the next couple of weeks. Due to operating system/ kenerl  
overheads
time for one request  (time for 10 parallel requests)/10  (time for 
1000 parallel requests)/1000

Squid is a good example of how you can server MANY connections without 
starting thousands of threads.

4. distributing your servers across multiple ISP. many service
providers don't tell you this, but often their pipe is saturated and
can't really handle a large number of concurrent requests. if you host
your own servers i would recommend getting more than 1 connection and
use different providers
This is NOT a pipe saturation issue. The issue is definitely a tomcat/ 
number of connections issue.
I already have this problem in my local network with load tests.

Most browsers today are Http1.1 compliant, which means they are
limited to 2 connections to the same server. Normally the browser will
use the same connection to get the html and the other resources like
images and javascript.
This will only happen if keep-alives are enabled. If keep-alives are 
disabled each GET will be a new connection. The F5 load balancers (4.5) 
have a 'cool-feature?!' that 'forwards' the keep-alive connection 
through to the backend server - With the 4.5 version of the software 
they are doing packet mangling. This means that even though the cllient 
only has 2 connections, the load balancer multiplies this connection to 
EACH of the backend servers with which the client is communicating, ie: 
static servers get 2 connections per client, statistic servers get 2 
connections per client, tomcats get 2 connections per client..

Version 9 of the software has just come out, and it does proxying this 
should hopefully help solve this problem - I am still in the process of 
testing the new version.

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


RE: can't send request over my network ip

2004-09-21 Thread Andrew Janian
You are using the port when trying from the pricate network also, right?

Andrew

-Original Message-
From: Sebastian Kerekes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 9:17 AM
To: Tomcat Users List
Subject: can't send request over my network ip


I can access Tomcat through 127.0.0.1:8080 but not via 192.168.1.172 
(private network). I'm using Tomcat 5.0.27. I haven't changed any of 
Tomcat's settings. Do I have to change some settings or is this problem 
not related to Tomcat?

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


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



RE: Connection class unknown...

2004-09-06 Thread Bodycombe, Andrew
You could try importing java.sql.Connection (not javax.sql.Connection).

Maybe this would help.
 
Regards,
Andy

-Original Message-
From: Sexy Prague
To: [EMAIL PROTECTED]
Sent: 05/09/2004 18:12
Subject: Connection class unknown...

Hello everybody,

I've got a problem with creating Connection object in my jsp where I'd
like 
to use DB.
I use JNDI and this is the code of my jsp's scriptlet:

Context initContext = new InitialContext();
Context envContext  =
(Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/TestDB);
//until this part it works perfectly, but when I add the next line,
tomcat 
screams, that
//can not resolve symbol Connection... so classic error with unknown
class
Connection conn;
//after previous line it doesn't work

It is strange, because I have imported the whole javax.sql.* package

Have somebody already met this problem?

Thanks in advance, Peter

_
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci. 
http://messenger.msn.cz/


-
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: Rotation of Catalina.out

2004-09-03 Thread Andrew Janian
Here is a couple links that should explain the lack of rotation of catalina.out:

1) http://jakarta.apache.org/tomcat/faq/misc.html#catalina.out

This one is from the tomcat website and is just the question you are asking.  
It says that you should not be using stdout (System.out.println) because you should be 
using a logging package like log4j (good recommendation).

2) http://marc.theaimsgroup.com/?t=10554447261r=1w=2

As reference by the above link, this one is a thread about rotating 
catalina.out.

Hope this helps,

Andrew Janian

-Original Message-
From: David Goodenough [mailto:[EMAIL PROTECTED]
Sent: Friday, September 03, 2004 7:49 AM
To: [EMAIL PROTECTED]
Subject: Rotation of Catalina.out


I am running Tomcat 5.0.27 on a Debian Unstable system
in /usr/local/share/tomcat5.  Under this directory is the logs directory
and that contains lots of localhost_log.-mm-dd.txt files (one for
each day) but only one catalina.out file.

In server.xml there are two Logger tags:-

  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_log. suffix=.txt
  timestamp=true/

Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/

and I guess that the latter is responsible for all the daily logs.

The former however is obviously not responsible for the 
catalina.out as the file name is wrong.

So I assume that Catalina.out is coming from
StandardErrLogger and/or StandardOutLogger.  

My question is how to get daily files for Catalina.out?

David

-
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: Rotation of Catalina.out

2004-09-03 Thread Andrew Janian
If you remove the stdout references then the output will only go to your file.  See 
below:



# Sample properties to initialise log4j
#log4j.rootCategory=debug, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=logtags.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file -- really keeping 2, you know that right?
log4j.appender.R.MaxBackupIndex=2

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n



Hope that helps,

Andrew

-Original Message-
From: David Goodenough [mailto:[EMAIL PROTECTED]
Sent: Friday, September 03, 2004 8:47 AM
To: Tomcat Users List
Subject: Re: Rotation of Catalina.out


Well actually I am using Log4j (under the covers) I think.  I am 
using the log JSP tags, and they have log4j as a pre-req.  But
obviously somehow the default config for log4j is writing to 
stdout rather than a log file.  

The default log4j.properties file that ships with the log tags is:-



# Sample properties to initialise log4j
#log4j.rootCategory=debug, stdout, R
log4j.rootCategory=debug, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=logtags.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=2

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n



Obviously I need to modify this to get it to put the output
somewhere else and to rotate it.  But reading the log4j manual
on the apache site I am not sure I know what I need to modify.

TIA

David

On Friday 03 September 2004 13:55, Andrew Janian wrote:
 Here is a couple links that should explain the lack of rotation of
 catalina.out:

 1) http://jakarta.apache.org/tomcat/faq/misc.html#catalina.out

   This one is from the tomcat website and is just the question you are
 asking.  It says that you should not be using stdout (System.out.println)
 because you should be using a logging package like log4j (good
 recommendation).

 2) http://marc.theaimsgroup.com/?t=10554447261r=1w=2

   As reference by the above link, this one is a thread about rotating
 catalina.out.

 Hope this helps,

 Andrew Janian

 -Original Message-
 From: David Goodenough [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 03, 2004 7:49 AM
 To: [EMAIL PROTECTED]
 Subject: Rotation of Catalina.out


 I am running Tomcat 5.0.27 on a Debian Unstable system
 in /usr/local/share/tomcat5.  Under this directory is the logs directory
 and that contains lots of localhost_log.-mm-dd.txt files (one for
 each day) but only one catalina.out file.

 In server.xml there are two Logger tags:-

   !-- Global logger unless overridden at lower levels --
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=catalina_log. suffix=.txt
   timestamp=true/

 Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=localhost_log. suffix=.txt
 timestamp=true/

 and I guess that the latter is responsible for all the daily logs.

 The former however is obviously not responsible for the
 catalina.out as the file name is wrong.

 So I assume that Catalina.out is coming from
 StandardErrLogger and/or StandardOutLogger.

 My question is how to get daily files for Catalina.out?

 David

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



Accessing files within the WEB-INF folder

2004-09-02 Thread Steiger, Andrew
Hello All,

I am wondering what the best method for accessing files that are located
within the WEB-INF folder?  I tried using the ClassLoader.getResource(), but
then I realized that won't work.

Thanks in advance,
Andrew.

--
  Name: Andrew Steiger
  Phone: 267.305.1515
  Cubicle:   UG2A208T 
  Mailstop: UG2A-50 
  Email: [EMAIL PROTECTED]  
-



--
Notice:  This e-mail message, together with any attachments, contains information of 
Merck  Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or 
its affiliates (which may be known outside the United States as Merck Frosst, Merck 
Sharp  Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary 
copyrighted and/or legally privileged. It is intended solely for the use of the 
individual or entity named on this message.  If you are not the intended recipient, 
and have received this message in error, please notify us immediately by reply e-mail 
and then delete it from your system.
--

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



Access Log Valve

2004-08-31 Thread Sinkinson,Andrew [NCR]

   Hi,
  I have enabled access logging by uncomment the Access Log Valve in the
server.xml file.  I have added the resolveHosts attribute and set it to
true.  I have also changed the pattern attribute to %h so that I can
just get the  Remote host name in the log file.  In the access log file
I only get an ip address per request.  Any ideas on why I am not able to
resolve host names?
Thanks,
Andrew





RE: Access Log Valve

2004-08-31 Thread Sinkinson,Andrew [NCR]
If I log onto the server running my tomcat installation and perform an
nslookup on the ip that is sending the request it resolves.  Running
tomcat 5.0.27 as a service.

-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: August 31, 2004 10:31 AM
To: Tomcat Users List
Subject: Re: Access Log Valve


On Tue, Aug 31, 2004 at 10:29:09AM -0400, Sinkinson,Andrew [NCR] wrote:
: Reply-To: Tomcat Users List [EMAIL PROTECTED]
:   I have enabled access logging by uncomment the Access Log Valve in
the
: server.xml file.  I have added the resolveHosts attribute and set it
to
: true.  I have also changed the pattern attribute to %h so that I can
: just get the  Remote host name in the log file.  In the access log
file
: I only get an ip address per request.  Any ideas on why I am not able
to
: resolve host names?

Just one -- perhaps the IPs in question do not resolve to hostnames.

Put another way, those IPs may not be resolvable from the Tomcat host.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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


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



AW: Access Log Valve

2004-08-31 Thread Sinkinson,Andrew [NCR]

Forgot to enableLookups=true on the Connector.  By default it is set
to false :)
-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: August 31, 2004 10:31 AM
To: Tomcat Users List
Subject: Re: Access Log Valve


On Tue, Aug 31, 2004 at 10:29:09AM -0400, Sinkinson,Andrew [NCR] wrote:
: Reply-To: Tomcat Users List [EMAIL PROTECTED]
:   I have enabled access logging by uncomment the Access Log Valve in
the
: server.xml file.  I have added the resolveHosts attribute and set it
to
: true.  I have also changed the pattern attribute to %h so that I can
: just get the  Remote host name in the log file.  In the access log
file
: I only get an ip address per request.  Any ideas on why I am not able
to
: resolve host names?

Just one -- perhaps the IPs in question do not resolve to hostnames.

Put another way, those IPs may not be resolvable from the Tomcat host.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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


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



RE: Configuring RemoteHostValve

2004-08-27 Thread Sinkinson,Andrew [NCR]
I have tried using a lot of different regexps in the allow attribute of
the valve element but have not had any luck.
All I want is a regexps that validates that the dns is from .gc.ca

Any help would be appreciated...thanks

Andrew

-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: August 26, 2004 4:18 PM
To: Tomcat Users List
Subject: Re: Configuring RemoteHostValve


On Thu, Aug 26, 2004 at 01:53:26PM -0400, Sinkinson,Andrew [NCR] wrote:
:  I am having difficulty in setting up a RemoteHostValve for my
WebApp.
:  [snip]
:Valve className=org.apache.catalina.valves.RemoteHostValve
:  allow=*.gc.ca/
   ^^^

The docs state this should be a regular expression.
What you've included here is not a regular expression, but a wildcard.

Review a couple of sites/docs on regexps and you'll see what I mean.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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


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



Configuring RemoteHostValve

2004-08-26 Thread Sinkinson,Andrew [NCR]


 Hi All,
 
 I am having difficulty in setting up a RemoteHostValve for my WebApp.
 I have created a configuration descriptor file named CST_CLIENT.xml
 with the following Context defined:

  Context path=/CST_CLIENT
   Valve className=org.apache.catalina.valves.RemoteHostValve
 allow=*.gc.ca/
   !-- Valve
 className=org.apache.catalina.valves.RemoteAddrValve
 allow=142.135.*/ --
 /Context
 
 I am running Tomcat 5.0.27 on Windows 2000 Server.  I have no problem
 when I use RemoteAddrValve but cannot get the RemoteHostValve to work.
 Here is the error in the stdout.log file:
 
 SEVERE: Error deploying configuration descriptor CST_CLIENT.xml
 java.io.IOException: java.lang.IllegalArgumentException: Syntax error
 in request filter pattern *.gc.ca
   at
 org.apache.catalina.core.StandardHostDeployer.install(StandardHostDepl
 oyer.java:494)
   at
 org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
 
 I have tried a lot of different regex expressions but have not had any
 luck.  If I try to perform an NSLOOKUP on the server this works also
 without any problem.
 What am I missing?  Any help would be appreciated!
 
 Thanks in advance
 
 Andrew


RE: Configuring RemoteHostValve

2004-08-26 Thread Sinkinson,Andrew [NCR]
Has anyone been able to configure a Remote Host Filter for tomcat 5.0.27
that works?

-Original Message-
From: Sinkinson,Andrew [NCR] 
Sent: August 26, 2004 1:53 PM
To: [EMAIL PROTECTED]
Subject: Configuring RemoteHostValve




 Hi All,
 
 I am having difficulty in setting up a RemoteHostValve for my WebApp. 
 I have created a configuration descriptor file named CST_CLIENT.xml 
 with the following Context defined:

  Context path=/CST_CLIENT
   Valve className=org.apache.catalina.valves.RemoteHostValve
 allow=*.gc.ca/
   !-- Valve 
 className=org.apache.catalina.valves.RemoteAddrValve
 allow=142.135.*/ --
 /Context
 
 I am running Tomcat 5.0.27 on Windows 2000 Server.  I have no problem 
 when I use RemoteAddrValve but cannot get the RemoteHostValve to work.

 Here is the error in the stdout.log file:
 
 SEVERE: Error deploying configuration descriptor CST_CLIENT.xml
 java.io.IOException: java.lang.IllegalArgumentException: Syntax error 
 in request filter pattern *.gc.ca
   at 
 org.apache.catalina.core.StandardHostDeployer.install(StandardHostDepl
 oyer.java:494)
   at
 org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
 
 I have tried a lot of different regex expressions but have not had any

 luck.  If I try to perform an NSLOOKUP on the server this works also 
 without any problem. What am I missing?  Any help would be 
 appreciated!
 
 Thanks in advance
 
 Andrew

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



Tomcat unable to unpack WAR (sometimes)

2004-08-19 Thread Andrew Watters
Problem with tomcat 5 on Linux:
Put WAR in webapps directory.
Restart tomcat.
Tomcat restarts ok but doesn't unpack WAR.
No errors in catlania.out.
Same WAR works ok on Windows machine. Although I'm not sure it is a 
Windows/Linux issue.
Unpack WAR on Linux and re-jar. Then unpacks fine when tomcat restarts.

We've previously had a similar problem and never figured it out. Has 
anyone else encountered this problem before?

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


Re: T5 ignoring mime mapping

2004-08-18 Thread Andrew Shirk
As I stated, I used the jsp:directive syntax. You'd think the spec would be 
a little more clear about this. It's pretty easy to miss that brief 
sentence while scanning for answers...

Thanks for the help.
Andrew
At 09:53 PM 8/17/2004, you wrote:
JSPs don't use the mime-mappings from web.xml (per the JSP spec).  You have
to use the jsp:directive.page contentType=... / syntax.
Andrew Shirk [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 This is pretty much a stock T5 install. No filters are configured for this
 app. So if it is indeed a servlet, it must be the faces servlet or the jsp
 servlet that is applying the text/xml mime type. However, as a work
around,
 I am able to use a jsp directive to set the mime type from the document:

 jsp:directive.page contentType=text/html /

 This seems silly though since I'm already setting the mime type in
web.xml.

 Andrew

 At 11:08 AM 8/17/2004, you wrote:
 It sounds like there is another servlet/filter/?? setting the content
type
 to text/xml.
 
 -Tim
 
 Andrew Shirk wrote:
 
 Despite having set a mime mapping for the .faces extension in my
web.xml,
 Tomcat 5 still insists on returning a JSP 2 documents with the .faces
 extension as text/xml.
 Am I doing something wrong?
 mime-mapping
extensionfaces/extension
mime-typetext/html/mime-type
 /mime-mapping
 
 -
 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]


T5 ignoring mime mapping

2004-08-17 Thread Andrew Shirk
Despite having set a mime mapping for the .faces extension in my web.xml, 
Tomcat 5 still insists on returning a JSP 2 documents with the .faces 
extension as text/xml.

Am I doing something wrong?
mime-mapping
  extensionfaces/extension
  mime-typetext/html/mime-type
/mime-mapping
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: T5 ignoring mime mapping

2004-08-17 Thread Andrew Shirk
This is pretty much a stock T5 install. No filters are configured for this 
app. So if it is indeed a servlet, it must be the faces servlet or the jsp 
servlet that is applying the text/xml mime type. However, as a work around, 
I am able to use a jsp directive to set the mime type from the document:

jsp:directive.page contentType=text/html /
This seems silly though since I'm already setting the mime type in web.xml.
Andrew
At 11:08 AM 8/17/2004, you wrote:
It sounds like there is another servlet/filter/?? setting the content type 
to text/xml.

-Tim
Andrew Shirk wrote:
Despite having set a mime mapping for the .faces extension in my web.xml, 
Tomcat 5 still insists on returning a JSP 2 documents with the .faces 
extension as text/xml.
Am I doing something wrong?
mime-mapping
  extensionfaces/extension
  mime-typetext/html/mime-type
/mime-mapping
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: can't use EL c:out value=${obj.names}....

2004-08-16 Thread Andrew Watters
Hi Tobias
I've previously had the same problem. The cause, in my case, was that I 
was declaring servlet spec 2.3 in web.xml. I changed this to 2.4 and it 
resolved the problem. The declaration I have is

web-app xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4

Hope that helps
Regards
Andrew
Tobias Eriksson wrote:
Hi
For some reason I'm having difficulties getting something as simple as
this to work, see below.
The result I get is this, see below. It seems to me that the
VALUE-attribute is not evaluated. I've downloaded the JSTL-package from
apache's homepage and I've included the tld and jar files in the WEB-INF
dir.
I am not sure what to try next, so any pointers would be appreciated.
Regards
Tobias

***

This is my JSP page. 
77 
${ttt.val} 
Name: ${ttt.val}
Parameter values passed to this page for each parameter: 

${current.key} 

${aVal} 




**


%@ page language=java import=java.lang.*,java.util.* %
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %

html
 head
   base href=%=basePath%
   

   titleMy JSP Tag-test page/title
   

 /head

 body
 

   This is my JSP page. br
   

jsp:useBean id=ttt class=com.comopt.support.beans.TestBean
scope=request /
jsp:getProperty name=ttt property=val /
BR
c:out value=${ttt.val} /
BR
c:forEach items=${ttt.Names} var=aname
  Name: c:out value=${ttt.val} /BR
/c:forEach



bParameter values passed to this page for each parameter: /b
table border=2
c:forEach var=current items=${param}
   tr
   td
   bc:out value=${current.key} //b
   /td
   c:forEach var=aVal items=${paramValues[current.key]}
   td
   c:out value=${aVal} /
   /td
   /c:forEach
   /tr
/c:forEach
/table


 /body
/html
-
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]


Recursion in JSP

2004-08-04 Thread Andrew Janian
Does anyone know if I am able to use recursion to traverse a tree but then to use a 
tag inside the recursive method?  If that was unclear, I want to know if I can do this:

%!
void dfs(Node root){
%
tag:tree
%!
Vector children = root.getChildren();
for(int i=0; ichildren.size(); i++){
dfs((Node)(children.elementAt(i)));
}
%
/tag:tree
%!
}
%

Thanks,

Andrew Janian

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



Protecting JSPs in Tomcat 5

2004-07-26 Thread Andrew Shirk
In Tomcat 4, I would map request URLs to JSPs and handle the forwarding on 
the server side. Direct user access to JSPs was prevented using the 
following security constraint configuration:

security-constraint
  display-nameJSP Protection/display-name
  web-resource-collection
web-resource-nameJSPs/web-resource-name
url-pattern*.jsp/url-pattern
http-methodDELETE/http-method
http-methodGET/http-method
http-methodPOST/http-method
http-methodPUT/http-method
  /web-resource-collection
  auth-constraint
role-nameAdministrator/role-name
  /auth-constraint
  user-data-constraint
transport-guaranteeNONE/transport-guarantee
  /user-data-constraint
/security-constraint
This seems to not work with Tomcat 5 as the constraint is applied even 
though no direct request is made by the user. Is this change in behavior 
the result of a spec change? I could find no such clarification.

Thanks for the help.
Andrew 

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


Re: Protecting JSPs in Tomcat 5

2004-07-26 Thread Andrew Shirk
Please disregard my previous post. I
Thank you.
At 03:20 PM 7/26/2004, you wrote:
In Tomcat 4, I would map request URLs to JSPs and handle the forwarding on 
the server side. Direct user access to JSPs was prevented using the 
following security constraint configuration:

security-constraint
  display-nameJSP Protection/display-name
  web-resource-collection
web-resource-nameJSPs/web-resource-name
url-pattern*.jsp/url-pattern
http-methodDELETE/http-method
http-methodGET/http-method
http-methodPOST/http-method
http-methodPUT/http-method
  /web-resource-collection
  auth-constraint
role-nameAdministrator/role-name
  /auth-constraint
  user-data-constraint
transport-guaranteeNONE/transport-guarantee
  /user-data-constraint
/security-constraint
This seems to not work with Tomcat 5 as the constraint is applied even 
though no direct request is made by the user. Is this change in behavior 
the result of a spec change? I could find no such clarification.

Thanks for the help.
Andrew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


RE: How does the deploy descriptor work?

2004-07-23 Thread Andrew Janian
If it is not a typo then your problem is here:

servlet-namemyRoot/servlet-name -- servlet-namemyRoot/servlet-name (missing a 
)

and then the next one too.

Andrew


-Original Message-
From: Jon Doe [mailto:[EMAIL PROTECTED]
Sent: Friday, July 23, 2004 3:11 PM
To: [EMAIL PROTECTED]
Subject: How does the deploy descriptor work?


I thought I understood this, but clearly I don't! (Or at least my app 
doesn't work.) So, if I may, I would like to explain my understanding of how 
you create the deploy descriptor, and how it works in Tomcat. Just to get 
some clarity.

OK, so I have a website, hosted as the context /mywebsite in Tomcat. So the 
localhost syntax to the root of this application is:

http://localhost/mywebsite/

Now as I understand it, to get this URL to execute a servlet called Index 
(ie the class WEB-INF\classes\com\mywebsite\Index.class -- assumes Windows) 
I need to add this to the deployment descriptor:

servlet
servlet-namemyRoot/servlet-name
servlet-classcom.mywebsite.Index/servlet-class
/servlet
servlet-mapping
servlet-namemyRoot/servlet-name
url-pattern//url-pattern
/servlet-mapping

That is straight forward. Now what if I want /Login, /Register, /Catalogue, 
etc? What is the url-pattern for these? If I enter /Login, for example, will 
this the call that servlet when I use this URL:

http://localhost/mywebsite/Login

If not, and I have to use a url-pattern of /mywebsite/Login, what happens if 
I decide to change the context path, or even to host it as a virtual server? 
Do I have to re-edit the web.xml file to reflect these changes?

One final question. If the url-pattern for Login is 
/mywebsite/Login.something, does this mean the user has to type:

http://localhost/mywebsite/Login.something

for this to trigger? In short, is it the URL that is all important, and not 
the underlying filenames? (God knows how the wildcards work, so I've been 
trying to use 'full paths' as I thought this was easier. But I get no output 
even though I have lines writing to the ServletConfig log, to standard out 
and to the PrintWriter output!)

If anyone can comment on the above -- such as it is totally accurate, or it 
is all rubbish -- that would be useful!

Joe.

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail


-
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 fails to start

2004-07-20 Thread Andrew Janian
I am using Eclipse with MyEclipseIDE to run Tomcat.  If I use the startup.bat for 
tomcat everything works fine.  However, if I use eclipse to start tomcat i get the 
error below.  Any ideas?

The version of server.xml that you see below is near identical to server-minimal.xml.

This has been happening for about a day now.  There were no changes made when it 
started to occur, but since then I have reinstalled the JDK, Eclipse, and MyEclipseIDE.

Thanks in advance,

Andrew

?xml version='1.0' encoding='UTF-8'?
Server port=8005 shutdown=SHUTDOWN
GlobalNamingResources
!-- Used by Manager webapp --
Resource name=UserDatabase auth=Container 
type=org.apache.catalina.UserDatabase description=User database that can be updated 
and saved
/Resource
ResourceParams name=UserDatabase
parameter
namefactory/name

valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
/parameter
parameter
namepathname/name
valueconf/tomcat-users.xml/value
/parameter
/ResourceParams
/GlobalNamingResources
Service name=Catalina
Connector port=8080/
!-- This is here for compatibility only, not required --
!-- Connector port=8009 protocol=AJP/1.3/ --
Engine name=Catalina defaultHost=localhost
!--
Logger className=org.apache.catalina.logger.FileLogger/
Realm className=org.apache.catalina.realm.UserDatabaseRealm 
resourceName=UserDatabase/
--
!-- Host name=localhost appBase=webapps / --
/Engine
/Service
/Server

Thread [main] (Suspended (exception EOFException))
XMLEntityScanner.load(int, boolean) line: not available
XMLEntityScanner.skipSpaces() line: not available
XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(boolean) line: not 
available
XMLDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) 
line: not available
XML11Configuration.parse(boolean) line: not available
XML11Configuration.parse(XMLInputSource) line: not available
SAXParser(XMLParser).parse(XMLInputSource) line: not available
SAXParser(AbstractSAXParser).parse(InputSource) line: not available
CatalinaDigester(Digester).parse(InputSource) line: 1548
Catalina.load() line: 489
Catalina.load(String[]) line: 528
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available 
[native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object[]) line: 324
Bootstrap.load(String[]) line: 247
Bootstrap.main(String[]) line: 421

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



Win2K, ApacheHTTPD2.0.5, Tomcat5 and JK2

2004-07-20 Thread Andrew Pealing
Hello all

I've got a win2k server running Apache2.0.5, mod_jk2/2.0.2 and tomcat4.1, using the 
inprocess worker

I am trying to upgrade to Tomcat 5 and mod_jk2/2.0.4

If I start Tomcat5 manually, then ApacheHTTPd and mod_jk2 succesfully pass the 
requests through and jsp and servlets work. However, just starting the ApacheHTTP, 
tomcat won't start.

I've tried upgrading just the mod_jk2 , and leaving Tomcat at 4.1, with no difference 
- Tomcat doesn't appear to attempt to start. 

If I try to upgrade Tomcat to 5 and leave mod_jk2 at mod_jk2/2.0.2, then I get errors 
in the error.log regarding classes not found. I've tried various combinations of 
classpath in the workers2.properties, including all the jar files in 
${CATALINA_HOME}/bin and $(CATALINA_HOME}/server/lib. The class not found varies 
depending on the classpath. With all the jar files in the classpath, there are no 
errors re class not ofund, but the workers do not start.

Below are my workers2.properties and my jk2.properties.

Anyone made Apache/Tomcat5 communicate using the inprocess worker? Any tips?

Roo

jk2.properties
--
apr.jniModeSo=inprocess

workers2.properties
---


[logger]
level=ERROR

[shm]
file=D:/www/logs/jk2.shm
size=1048576
disabled=0

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

#InProcess Channel
[channel.jni:jni]
info=The jni channel - used if Tomcat is started inprocess

# define the worker
#[ajp13:localhost:8009]
#channel=channel.socket:localhost:8009

[vm:]
info=Parameters used to load a JVM in the server process
OPT=-Djava.class.path=C:/Programs/ApacheGroup/tomcat5/server/lib/tomcat-jk2.jar;C:/Programs/ApacheGroup/tomcat5/server/lib/catalina.jar;C:/Programs/ApacheGroup/tomcat5/server/lib/tomcat-jni.jar
OPT=-Dtomcat.home=C:/Programs/ApacheGroup/tomcat5
OPT=-Dcatalina.home=C:/Programs/ApacheGroup/tomcat5
OPT=-Xmx128M
disabled=0

[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
disabled=0
stdout=D:/www/logs/stdout.log
stderr=D:/www/logs/stderr.log

[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
disabled=0

# Uri mapping
[uri:/ROOT/*]
[uri:/jsp-examples/*]
[uri:/servlets-examples/*]
[uri:/balancer/*]
[uri:/tomcat-docs/*]
#worker=ajp13:localhost:8009

# define the worker
[status:status]

# Uri mapping
[uri:/jkstatus/*]
worker=status:status


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



Re: Apache miss handling jsp files

2004-07-09 Thread Andrew Boyer
I'm not sure if someone already responded, but you may want to check
httpd.conf, and ensure that index.jsp is added to the DirectoryIndex
parameter.

Andrew

 From: James Pohl [EMAIL PROTECTED]
 Subject: Apache miss handling jsp files
 
 I have tomcat 4 installed on a RedHat based server.
 
 I have aliases set up for a test domain.
 
 The site works fine when going to the test domain :8080, but when I try
 to go to the site without port :8080 the original tomcat page comes up.
 So it seems tomcat is working properly because the 8080 port answers
 correctly. So when apache answers it seems to ignore the DocumentRoot's
 index.jsp and serves the tomcat page.  If I go to a phpinfo.php page
 within the DocumentRoot apache will answer properly.
 
 Can someone shed some light as to what I'm missing in the server set
 up.


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



RE: How to start a web app?

2004-07-08 Thread Andrew Janian
You don't get a login screen, you get a login popup.  Not getting that either?

Andrew

-Original Message-
From: Michael Labhard [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 1:12 PM
To: Tomcat Users List
Subject: Re: How to start a web app?


 Long story short:  Tomcat does not search the webapps directory
 recursively for webapps; it loads contexts that are immediate children
 of the webapps directory.

 -QM

QM:

Thank you.  That was it.  I thought I could create subfolders at will.  I must 
put all apps only one folder below.

Any ideas about the problem with the Manager?  I still cannot use it.  
Shouldn't I get a login screen as I do with the Administration option?

-- Michael

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


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



RE: How to start a web app?

2004-07-08 Thread Andrew Janian
Are you sure that Tomcat itself is running?  Did the manager webapp get loaded.  You 
should see in the logs that the manager webapp, administraion app, and a couple other 
examples get loaded if you are using Tomcat out of the box and have not disabled it.  
Did you provide a username and password when the box popped up?  What was the result 
if so?

Andrew

-Original Message-
From: Michael Labhard [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 1:19 PM
To: Tomcat Users List
Subject: Re: How to start a web app?


On Thursday 08 July 2004 11:14 am, Andrew Janian wrote:
 You don't get a login screen, you get a login popup.  Not getting that
 either?

Nope, not getting that either.  I did see it once, yesterday.  Ever since, 
nothing.  I have even reinstalled Tomcat without benefit.

-- Michael

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


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



RE: How to start a web app?

2004-07-08 Thread Andrew Janian
That looks about right.  It is re-deploying the app after the context is removed (why 
it is removed at all i do not know).  Everything looks fine.

-Original Message-
From: Michael Labhard [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 2:10 PM
To: Tomcat Users List
Subject: Re: How to start a web app?


On Thursday 08 July 2004 11:50 am, Andrew Janian wrote:
 Are you sure that Tomcat itself is running?  

Would I not have trouble getting the Home page and logging into the 
Administration page were it not?  Also, I can install, run and use JSP pages 
deployed to $CATALINA_HOME/webapps.  I'm pretty sure it's running.

 Did the manager webapp get 
 loaded.  You should see in the logs that the manager webapp, administraion
 app, and a couple other examples get loaded if you are using Tomcat out of
 the box and have not disabled it.  

The log file shows these lines:

Jul 8, 2004 11:24:19 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /manager
Jul 8, 2004 11:24:19 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /admin
Jul 8, 2004 11:24:19 AM org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger,path=/admin,host=localhost

Jul 8, 2004 11:24:29 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL 
file:/etc/tomcat/Catalina/localhost/manager.xml

Jul 8, 2004 11:24:26 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL 
file:/etc/tomcat/Catalina/localhost/admin.xml



 Did you provide a username and password 
 when the box popped up?  What was the result if so?

Yes, I did but it was the wrong ones and I was denied access at that time.  I 
haven't had another chance.

tomcat-users.xml looks like this:

?xml version='1.0' encoding='utf-8'?
tomcat-users
  role rolename=tomcat/
  role rolename=role1/
  role rolename=manager/
  role rolename=admin/
  user username=mel password=tomcat roles=tomcat,admin,manager/
  user username=tomcat password=tomcat roles=tomcat/
  user username=role1 password=tomcat roles=role1/
/tomcat-users

My username is mel.

-- Michael


-
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: Anyone really using JAX-RPC?

2004-06-29 Thread Andrew Shirk
Yes, we're using it (Sun JWSDP). Works as advertised.
Andrew
At 03:43 PM 6/28/2004, you wrote:
Folks,
Is anyone out there running a deployed application using JAX-RPC for
soap/wsi? If so, are you using Axis, or the Sun JWSDP stuff? Or
something else entirely?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


How do I find out which version of tomcat is installed?

2004-06-24 Thread Andrew Watters
I have full access to the tomcat directory but I can't find the version 
number in any of the files. It's probably somewhere obvious but I just 
can't see it.

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


  1   2   3   4   5   6   7   8   9   >