Re: [OT] [Fwd: TomEE Professional Support]

2013-11-14 Thread Pid
On 13/11/2013 14:53, Gurkan Erdogdu wrote:
 
 Hello all,
 
 When an Apache project founder[1] starts spamming the Apache community,
 Sorry but how could you say spamming the Apache Community? without knowing 
 me and how I have been contributing to the Apache community and projects? 

It's obviously unsolicited commercial email, which is the common base
definition of spam.

It also seems to me that sending it falls below the standard that one
expects from members of the Apache community - I don't recall it
happening before.


 there can and ought to be consequences.
 What do you mean?
 
 Doesn't Apache have some minimu standards for this?  He seems to be a 
 project committer, but hasn't contributed any code in about a year.
 I am PMC Chair of OpenWebBeans project. I think you don't know the roles of 
 PMC Chair, please learn from here before talking. 
 
 Lastly, 
 
 
 I get everyday huge amount of such marketing emails from all big known 
 software vendors. I am sure you also receive such emails. If I am not 
 interested, I simply unsubscribe from the list, this is not a really big 
 problem to discuss! 
 
 If you received such email from my email address, and not interested please 
 unsubscribe from the list and you will never get a such email again.
 
 Best 
 
 Gurkan
 
 
 
 
 On Wednesday, November 13, 2013 4:24 PM, Tim Watts t...@cliftonfarm.org 
 wrote:
  
 On Wed, 2013-11-13 at 14:56 +0100, Leon Rosenberg wrote:
 I got it too. I think its easier to delete and forget it, as to debate
 about it. ;-)
 
 When an Apache project founder[1] starts spamming the Apache community,
 there can and ought to be consequences.
 
 ___
 [1] At least that's his claim in the email. Their website doesn't post
 any PMC member list that I could find.  Doesn't Apache have some minimum
 standards for this?  He seems to be a project committer, but hasn't
 contributed any code in about a year.
 
 
 
 regards
 Leon


 On Wed, Nov 13, 2013 at 2:15 PM, André
  Warnier a...@ice-sa.com wrote:

 Hi.

 I got the following email in my personal email inbox.

 Isn't there some rule, or at least some matter of self-control, in not
 using email addresses collected on this list for commercial promotion ?

  Original Message 
 From: - Wed Nov 13 13:48:37 2013
 X-Mozilla-Status: 0001
 X-Mozilla-Status2: 
 Return-Path: bounce-mc.us3_22715643.227889-aw=ice-sa.com@mail173.

  us4.mcsv.net
 X-Original-To: a...@ice-sa.com
 Delivered-To: andre.warn...@ice-sa.com
 Received-SPF: Pass (sender SPF authorized) identity=mailfrom;
 client-ip=205.201.128.173; helo=mail173.us4.mcsv.net;
 envelope-from=bounce-mc.us3_22715643.227889-aw=ice-sa.com@
 mail173.us4.mcsv.net; receiver=a...@ice-sa.com
 Received: from mail173.us4.mcsv.net (mail173.us4.mcsv.net[205.201.128.173]) 
by
 tor.combios.es (Postfix) with ESMTP id DCFAB3C0AD2   for a...@ice-sa.com;
 Wed, 13 Nov 2013 13:48:25 +0100 (CET)
 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=k1; d=
 mail173.us4.mcsv.net; h=Subject:From:Reply-To:To:Date:Message-ID:List-
 Unsubscribe:Sender:Content-Type:MIME-Version; i=gurkanerdogdu=3Dyahoo.com@
 mail173.us4.mcsv.net; bh=Mxp5nGTBAhJ4tiDlAEgNxpJYWwM=;
 b=Ocyx3ymgzmK11vA3/+524g885jWe0hlVlLQwFLGw052EepxX/u3JqrGTIZv6+afps8yWKhHqpMRz
 DR1JqSg9JPIfmn6xVzPvr5X/5Ve5g78ZKmZm5BmxmCRNyqB4fIc5+iLuIas31KKRImjm5cpEh8P5
 RAauIo5RquVVHcBgVbU=
 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=k1; d=
 mail173.us4.mcsv.net; b=BmLvRK7R5zl2/VRFdLZ09BJy50nOQFBXLcUoHLPQqfO

   o7DkgQbmi8Ug7bwNHNpotAwBLuXBIp2sW w8nzt6XeIcHys59itcvcLBKCt6zoR1
 vBv1RFw1OMSwlwuilV8u0zcNtNcav+LdWoW8zAnksyWOWL /knOPWkSMr9PbtPhtB4=;
 Received: from (127.0.0.1) by mail173.us4.mcsv.net id hgdqg0174lg1 for 
 a...@ice-sa.com; Wed, 13 Nov 2013 12:47:58 + (envelope-from
 bounce-mc.us3_22715643.227889-aw=ice-sa@mail173.us4.mcsv.net)
 Subject: TomEE Professional Support
 From: Apache TomEE Support gurkanerdo...@yahoo.com
 Reply-To: Apache TomEE Support gurkanerdo...@yahoo.com
 To:  a...@ice-sa.com
 Date: Wed, 13 Nov 2013 12:47:58 +
 Message-ID: 9781cf0ccdac7604f1f7fd52ea052bfdbb3.20131113124746@mail173.
 us4.mcsv.net
 X-Mailer: MailChimp Mailer - **CID105b909b64a052bfdbb3**
 X-Campaign: mailchimp9781cf0ccdac7604f1f7fd52e.105b909b64
 X-campaignid: mailchimp9781cf0ccdac7604f1f7fd52e.105b909b64
 X-Report-Abuse: Please report abuse for this
  campaign here:
 http://www.mailchimp.com/abuse/abuse.phtml?u=9781cf0ccdac7604f1f7fd52eid=
 105b909b64e=a052bfdbb3
 X-MC-User: 9781cf0ccdac7604f1f7fd52e
 x-accounttype: ff
 List-Unsubscribe: mailto:unsubscribe-9781cf0ccdac7604f1f7fd52e-
 105b909b64-a052bfd...@mailin1.us2.mcsv.net?subject=unsubscribe, 
 http://blogspot.us3.list-manage.com/unsubscribe?u=

  9781cf0ccdac7604f1f7fd52eid=b75a8245a1e=a052bfdbb3c=105b909b64
 Sender: Apache TomEE Support gurkanerdogdu=yahoo.com@
 mail173.us4.mcsv.net
 x-mcda: FALSE
 Content-Type: multipart/alternative; boundary=_--=_MCPart_
 1458955636
 MIME-Version: 1.0

 20% off TomEE Support from Java 

Re: FW: Reg. Tomcat Support Cost

2013-05-29 Thread Pid
On 29/05/2013 12:44, Jailwal, Pawan (Genworth) wrote:
 Hi Thanks,
 
 Can you tell me the support cost? Like what are all the support level  cost 
 accordingly? 

Either you can read the pages indicated, or you could pay me $1m a year
for dedicated support for all levels to help you read the pages indicated.


p



 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com] 
 Sent: 29 May 2013 12:42
 To: Tomcat Users List
 Subject: Re: FW: Reg. Tomcat Support Cost
 
 Jailwal, Pawan (Genworth) wrote:
 Hello,

 We are looking information of support/license cost of Tomcat server, can you 
 please provide the information on the same?


 As indicated on the Internet home page of the Tomcat project at 
 http://tomcat.apache.org, Tomcat is open-source (and free software), so there 
 is no license fee.
 As also indicated under the find help item on that same page, there are a 
 number of possibilities for help and support, some of them free, some not.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]

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



Re: Making sure I understand application startup order correctly

2013-05-29 Thread Pid
On 29/05/2013 00:24, Nick Williams wrote:
 Guys,
 
 Can some of the fine experts on this list double check my assertions below 
 and let me know if I'm going wrong anywhere? I hope I got it all right. :-)
 
 Assertion #1
 If metadata-complete=true is present in the deployment descriptor:
 A) The container does NOT scan /WEB-INF/classes for annotations,
 B) The container does NOT scan /WEB-INF/lib JARs for 
 ServletContainerInitializers,

The metadata-complete and invocation of ServletContainerInitializers
are independent.

 https://java.net/jira/browse/SERVLET_SPEC-36


p

 C) The container does NOT scan /WEB-INF/lib JARs for web-fragment.xml files, 
 and
 D) The container does NOT scan /WEB-INF/lib JARs for annotations.
 
 Assertion #2
 If class loading is configured parent last, the 
 ServletContainerInitializers in the application are fired before 
 ServletContainerInitializers provided by the container. If class loading is 
 configured parent first, the ServletContainerInitializers provided by the 
 container fire before the ServletContainerInitializers in the application.
 
 Assertion #3
 ServletContainerInitializers in the container and in /WEB-INF/lib JARs are 
 fired before any ServletContextListeners. The order in which they are fired 
 is determined by absolute-ordering (web.xml) and/or order 
 (web-fragment.xml), but if neither of those are present the order is 
 unspecified.
 
 Assertion #4
 The init methods of ServletContextListeners declared in the container, in 
 /WEB-INF/classes, and in /WEB-INF/lib JARS are all fired BEFORE the init 
 methods of any Filters or Servlets. The destroy methods of 
 ServletContextListeners declared in the container, in /WEB-INF/classes, and 
 in /WEB-INF/lib JARs are all fired AFTER the destroy methods of any Filters 
 or Servlets.
 
 Assertion #5
 The init methods of Filters declared in the container, in /WEB-INF/classes, 
 and in /WEB-INF/lib JARs are all fired BEFORE the init methods of any 
 Servlets. The destroy methods of Filters declared in the container, in 
 /WEB-INF/classes, and in /WEB-INF/lib JARs are all fired AFTER the destroy 
 methods of any Servlets.
 
 Assertion #6
 If any given ServletContainerInitializer is the first 
 ServletContainerInitializer to be fired when an application starts up, and 
 that ServletContainerInitializer adds a ServletContextListener and a Filter 
 to the ServletContext:
 A) The Listener it adds will be the first Listener whose init method is 
 called and the last Listener whose destroy method is called,
 B) The Filter it adds will be the first Filter whose init method is called 
 and the last Filter whose destroy method is called, and
 C) The Filter will be the first Filter on the Filter chain, always.
 
 Thanks in advance,
 
 Nick
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]

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



Re: Tomcat access log reveals hack attempt: HEAD /manager/html HTTP/1.0 404

2013-04-15 Thread Pid
On 15/04/2013 00:03, Christopher Schultz wrote:
 Pid,
 
 On 4/12/13 1:54 PM, Pïd stèr wrote:
 On 11 Apr 2013, at 21:36, Christopher Schultz 
 ch...@christopherschultz.net wrote:
 [...] though I would run Apache httpd and Tomcat on different
 hosts, so localhost-binding is not possible unless you are doing
 something like stunnel (which also might be a good idea if you
 are traversing an untrusted network).
 
 Respectfully, I have to disagree. Unless the Apache HTTPD is
 loaded with IDS that can sniff the inbound traffic, you've not
 achieved much, and now you have two boxes that have to be
 maintained, secured  patched. HTTPD != firewall.
 
 While httpd != firewall, it's traditional to allow external-access to
 your web server but not your app servers (databases, etc.). That means
 that external threats can only directly-attack the web server.

Respectfully, this is clearly not true if you are just passing traffic
to the app server.  An attack that compromises the application server in
the way described above would still be effective regardless of the
presence of HTTPD.

The risk I perceive is that users think that simply installing HTTPD
somehow improves their security, when it does not.

The 'traditional' approach in these matters needs close scrutiny IMO.
People can't afford to rely on received wisdom for security and forget
more important basics such as regular patching.

I regularly debate this with customers and we usually agree/find a
better approach.


 Obviously, suffering a web server break-in sucks, but at least the
 attacker then needs to break-into the application server after that.

Why would they bother if they can attack the applications directly anyway?


 If it's a one-box wonder, you've been owned in a one fell swoop.

A bit like this one, then.


 Also, running a heterogeneous environment can thwart attackers who
 have some kind of zero-day that got them into the web server (e.g.
 running httpd on Linux). Then they try the app server and surprise!
 It's NetBSD and they have to stop and find another attack to proceed.

This is of course possible, but in practice quite rare.


p



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

-- 

[key:62590808]

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



Re: Tomcat access log reveals hack attempt: HEAD /manager/html HTTP/1.0 404

2013-04-15 Thread Pid
On 15/04/2013 03:51, Esmond Pitt wrote:
 
 I agree with your comment. Adding a second box for Tomcat only means I 
 also have to configure a firewall between them, whereas using 
 127.0.0.x for Tomcat protects it completely.
 
 No it doesn't!
 Obfuscation or indirection != security.
 HTTPD doesn't magically provide you with some extra security capability.
 
 I don't know what you're talking about. I didn't mention HTTPD in the
 message you quoted. I mentioned 127.0.0.x, and it does exactly what I said
 it does. There is no 'security via obscurity' here, just a well-known TCP
 mechanism.

I quote:

 We:

 - Hid the Tomcat behind an Apache HTTPD on port 80.

You used the word 'hid'.

ob·scure
 Adjective
  Not discovered or known about; uncertain.
 Verb
  Keep from being seen; conceal.

Security via obscurity.


 - Closed port 8080, indeed removed all the HTTP Connectors from Tomcat and
 just used AJP connectors running on 127.0.0.1/2/3/4/..., all on the same
 port for simplicity, so there is no zero direct access to Tomcat from the
 outside

I am objecting to the above as being an improvement on two counts:

1. the phrase 'direct access' has no meaning here

2. Tomcat still processes the bytes received from the client with no
prior inspection or validation of their safety.


 - Configured Apache HTTPD for LDAP authentication via an OpenLDAP server
 that in turn is configured via the Password Policy overlay for finite (5 I
 think) password retries before locking out the account
 - required a very restricted LDAP group membership for access to /manager
 (and the other Tomcat builtins).

So you secured the Manager app, rather than use a password that could be
guessed.


 No recurrence, not even an attempt. I think actually closing port 8080 may
 have played the biggest part in all this.

No it didn't.  Using a password that couldn't be guessed did.


p





-- 

[key:62590808]

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



Re: Tomcat access log reveals hack attempt: HEAD /manager/html HTTP/1.0 404

2013-04-15 Thread Pid
On 15/04/2013 11:36, Esmond Pitt wrote:
 When you quote me in refutation, kindly quote *all* and *only* the parts
 that are relevant. You have now made both mistakes in succession. I hid the
 Tomcat behind an HTTPD on port 80, closed port 8080, and made the Tomcat
 listen on 127.0.0.x only. A TCP socket that listens on 127.0.0.1 cannot be
 connected to from outside the localhost. That's not 'security by obscurity',
 that's security via a well-known feature of TCP. 


Kindly don't top post.

I replied to a thread, it's quite normal to use context from prior
messages in the thread.  I am clearly replying in the context of the thread.


 It is in effect a firewall.

It is not a firewall.  It is a reverse proxy.


 127.0.0.x for Tomcat protects it completely.

No it doesn't, for a number of reasons, not least of which being that
you're still sending traffic to it from the network.



I believe you are missing my point, or choosing not to address it.

A client makes a connection to a server through a succession of devices,
each of which is forwarding the TCP traffic to the next device.  Simply
adding another entry to that pipeline that only performs the same job of
forwarding traffic onto another port (local or otherwise) does not
provide an improvement in security.

So even if Tomcat only listens on a localhost socket, when you provide a
means for other devices to connect to it from the network without
intercepting that traffic to check it is safe, you are entirely negating
the security benefit you postulate.


I think that the attack you referred to would still have occurred even
with your new 'security' if a) the manager app remained visible to the
outside world and b) you left the password as it was.

You fixed your problem by either preventing access to the Manager from
the outside world (perhaps by a mod_jk/mod_proxy_ajp mapping) or by
changing the noddy password you were using;  You did not fix it by
'hiding' Tomcat itself or removing traffic from port 8080.


I'm persisting in this point because I don't want other users to
continue believing the fallacy that 'hiding' Tomcat behind Apache HTTPD
alone improves their security.


p


 EJP
 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: Monday, 15 April 2013 8:25 PM
 To: Esmond Pitt
 Cc: 'Tomcat Users List'
 Subject: Re: Tomcat access log reveals hack attempt: HEAD /manager/html
 HTTP/1.0 404
 
 On 15/04/2013 03:51, Esmond Pitt wrote:

 I agree with your comment. Adding a second box for Tomcat only means 
 I also have to configure a firewall between them, whereas using 
 127.0.0.x for Tomcat protects it completely.

 No it doesn't!
 Obfuscation or indirection != security.
 HTTPD doesn't magically provide you with some extra security capability.

 I don't know what you're talking about. I didn't mention HTTPD in the 
 message you quoted. I mentioned 127.0.0.x, and it does exactly what I 
 said it does. There is no 'security via obscurity' here, just a 
 well-known TCP mechanism.
 
 I quote:
 
 We:

 - Hid the Tomcat behind an Apache HTTPD on port 80.
 
 You used the word 'hid'.
 
 ob.scure
  Adjective
   Not discovered or known about; uncertain.
  Verb
   Keep from being seen; conceal.
 
 Security via obscurity.
 
 
 - Closed port 8080, indeed removed all the HTTP Connectors from Tomcat 
 and just used AJP connectors running on 127.0.0.1/2/3/4/..., all on 
 the same port for simplicity, so there is no zero direct access to 
 Tomcat from the outside
 
 I am objecting to the above as being an improvement on two counts:
 
 1. the phrase 'direct access' has no meaning here
 
 2. Tomcat still processes the bytes received from the client with no prior
 inspection or validation of their safety.
 
 
 - Configured Apache HTTPD for LDAP authentication via an OpenLDAP 
 server that in turn is configured via the Password Policy overlay for 
 finite (5 I
 think) password retries before locking out the account
 - required a very restricted LDAP group membership for access to 
 /manager (and the other Tomcat builtins).
 
 So you secured the Manager app, rather than use a password that could be
 guessed.
 
 
 No recurrence, not even an attempt. I think actually closing port 8080 
 may have played the biggest part in all this.
 
 No it didn't.  Using a password that couldn't be guessed did.
 
 
 p
 
 
 
 
 


-- 

[key:62590808]

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



Re: Tomcat access log reveals hack attempt: HEAD /manager/html HTTP/1.0 404

2013-04-15 Thread Pid
On 15/04/2013 16:11, Mark Eggers wrote:
 On 4/15/2013 3:19 AM, Pid wrote:
 On 15/04/2013 00:03, Christopher Schultz wrote:
 Pid,

 On 4/12/13 1:54 PM, Pïd stèr wrote:
 On 11 Apr 2013, at 21:36, Christopher Schultz
 ch...@christopherschultz.net wrote:
 [...] though I would run Apache httpd and Tomcat on different
 hosts, so localhost-binding is not possible unless you are doing
 something like stunnel (which also might be a good idea if you
 are traversing an untrusted network).

 Respectfully, I have to disagree. Unless the Apache HTTPD is
 loaded with IDS that can sniff the inbound traffic, you've not
 achieved much, and now you have two boxes that have to be
 maintained, secured  patched. HTTPD != firewall.

 While httpd != firewall, it's traditional to allow external-access to
 your web server but not your app servers (databases, etc.). That means
 that external threats can only directly-attack the web server.

 Respectfully, this is clearly not true if you are just passing traffic
 to the app server.  An attack that compromises the application server in
 the way described above would still be effective regardless of the
 presence of HTTPD.

 The risk I perceive is that users think that simply installing HTTPD
 somehow improves their security, when it does not.

 
 I guess we first need to agree what is meant by compromised. If you mean
 application-level compromise, then absolutely. Simply adding Apache
 HTTPD, multiple systems, firewalls with carefully crafted holes to allow
 proxying does little (possibly nothing?) to improve security.
 
 If you mean OS-level compromise (administrative access on a target
 machine), then these techniques can improve security. 




 Of course, the
 security that this provides depends almost entirely on the underlying
 architecture and little on the fact that you're fronting Tomcat with HTTPD.
 
 One possible improvement in security afforded by running Tomcat behind
 HTTPD is the use of mod_security. While mod_security impacts performance
 and doesn't catch everything (currently JSON support is not at all
 good), it will help as a part of a systems security architecture.
 
 This turns Apache HTTPD into an IDS, which was mentioned a bit ago in
 this thread.

(By me!)

Agreed, adding mod_security could provide a reason to use HTTPD in front.


 The 'traditional' approach in these matters needs close scrutiny IMO.
 People can't afford to rely on received wisdom for security and forget
 more important basics such as regular patching.

 
 Regular patching, regular auditing of logs, regular testing, keep up on
 the relevant technology mailing lists. I really do not like the
 (prevalent?) attitude of if it aint broke, don't patch it.
 Well-architected systems don't (shouldn't) break when you patch
 components. If you find a lot of breakage, then you're looking at
 tightly coupled systems - in almost every case this is a Bad Thing (IMHO).
 
 I regularly debate this with customers and we usually agree/find a
 better approach.


 Obviously, suffering a web server break-in sucks, but at least the
 attacker then needs to break-into the application server after that.

 Why would they bother if they can attack the applications directly
 anyway?

 
 Again, this depends on the target. If by breaking the application you
 gain control of the application server or obtain PII (personally
 identifiable information), then this may be all that's desired.

Look at the typical attack patterns described as being prevalent today,
they are mass-produced, automated scripts probing IP after IP.  They are
not a single guy in a dark room working a keyboard.

They are going for the LCD, for which the most part is unpatched
systems.  The zero-day vulnerabilities are saved for high-value targets
and the occasional publicity generating show off.

Most frequently they are just probing IP ranges and it's not *you*
that's being targeted specifically, the attacker just wants to add
another machine for their botnet.

 If you desire a beachhead to investigate / crack the target further,
 then usually OS-level access (and often, a privileged account) is needed.

Yes, (assuming they are attacking you deliberately), to get this they
will not attack your website, they will attempt to compromise your
employees, starting with someone who is not IT literate  getting them
to open an email attachment that looks like it comes from a colleague.


p

 If it's a one-box wonder, you've been owned in a one fell swoop.

 A bit like this one, then.


 Also, running a heterogeneous environment can thwart attackers who
 have some kind of zero-day that got them into the web server (e.g.
 running httpd on Linux). Then they try the app server and surprise!
 It's NetBSD and they have to stop and find another attack to proceed.

 This is of course possible, but in practice quite rare.

 
 Agreed, operations likes same-ol', same-ol'. Running completely
 different architectures on different layers is usually not seen, unless

Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Pid
On 22/03/2013 14:42, Julien Martin wrote:
 @Chuck: thanks for the link. I have read it. Umm... the thing is I don't
 close my connection manually. I use Spring. Here is my configuration:
 
 bean class=org.apache.commons.dbcp.BasicDataSource
 destroy-method=close id=dataSource
 property name=driverClassName value=${database.driverClassName} /
 property name=url value=${database.url} /
 property name=username value=${database.username} /
 property name=password value=${database.password} /
 property name=testOnBorrow value=true /
 property name=testOnReturn value=true /
 property name=testWhileIdle value=true /
 property name=timeBetweenEvictionRunsMillis value=180 /
 property name=numTestsPerEvictionRun value=3 /
 property name=minEvictableIdleTimeMillis value=180 /
 property name=validationQuery value=SELECT 1 /
 property name=maxActive value=2/
 property name=logAbandoned value=true/
 property name=removeAbandoned value=true/
 /bean

What happens if you set it to 1?


p


 Any idea what I am getting wrong?
 
 @Daniel, I have configured jmx with Spring and I get a numIdle of 0 and
 numActive of 2 after the problem occurs. This confirms what you and Chuck
 say: my app leaks db connections.
 
 However, I am still not sure why my app leaks the connections. I use the
 default Spring configuration...
 
 Sorry: it is slightly offtopic now. I guess this is no longer a Tomcat
 question so I should post it elsewhere.
 
 Julien.
 
 
 2013/3/22 Caldarale, Charles R chuck.caldar...@unisys.com
 
 From: Julien Martin [mailto:bal...@gmail.com]
 Subject: Re: My use of Spring MVC's DeferredResult class causes Tomcat
 7.0.35 to crash silently

 http-bio-8080-exec-10 daemon prio=10 tid=0x7f68840a2800 nid=0x41b5
 in
 Object.wait() [0x7f690cc57000]
java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x0007e8fc4650 (a
 org.apache.commons.pool.impl.GenericObjectPool$Latch)
 at java.lang.Object.wait(Object.java:503)
 at
 org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1115)
 - locked 0x0007e8fc4650 (a
 org.apache.commons.pool.impl.GenericObjectPool$Latch)
 at
 org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)

 Looks like you're leaking database connections, likely by not returning
 them to the pool.  Read Chris' article on how to do it right:


 http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/

  - Chuck


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


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


 


-- 

[key:62590808]

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



Re: Where does Tomcat log the logAbandoned information?

2013-03-22 Thread Pid
On 22/03/2013 14:45, Julien Martin wrote:
 Hello,
 
 I have enabled the *logAbandoned* property as follows (in Spring):
 
 property name=maxActive value=2/
 property name=logAbandoned value=true/
 property name=removeAbandoned value=true/
 
 I know for certain it is taken into account by Tomcat but *I just can't
 figure out where the information is logged*.

It will be logged to standard out, catalina.out or catalina.{date}.log

In your case, the timeBetweenEvictionRunsMillis check will happen every
180 millis, which is 1800 seconds, which is every 30 minutes for
connections that have been idle the same period, which may mean that
they don't qualify for eviction for over 30 mins, which in turn would
mean the next check - 30m later.

Maybe you should reduce that number during testing.


p


 It seems to be a recurring question on the web but I was not able to find
 the answer to it.
 
 Can anyone please informed advice?
 Regards,
 
 Julien.
 


-- 

[key:62590808]

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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Pid
On 22/03/2013 14:56, Julien Martin wrote:
 Hi,
 You mean if I set maxActive to 1?


 J.
 
 2013/3/22 Pid p...@pidster.com
 
 On 22/03/2013 14:42, Julien Martin wrote:
 @Chuck: thanks for the link. I have read it. Umm... the thing is I don't
 close my connection manually. I use Spring. Here is my configuration:

 bean class=org.apache.commons.dbcp.BasicDataSource
 destroy-method=close id=dataSource
 property name=driverClassName value=${database.driverClassName} /
 property name=url value=${database.url} /
 property name=username value=${database.username} /
 property name=password value=${database.password} /
 property name=testOnBorrow value=true /
 property name=testOnReturn value=true /
 property name=testWhileIdle value=true /
 property name=timeBetweenEvictionRunsMillis value=180 /
 property name=numTestsPerEvictionRun value=3 /
 property name=minEvictableIdleTimeMillis value=180 /
 property name=validationQuery value=SELECT 1 /
 property name=maxActive value=2/
 property name=logAbandoned value=true/
 property name=removeAbandoned value=true/
 /bean

 What happens if you set it to 1?


Yes, I meant maxActive, sorry.

Why use a DeferredResult here if you're just setting the result
synchronously and inline anyway?  You may as well just remove the key
from the map manually.  Am I missing something?


p

 Any idea what I am getting wrong?

 @Daniel, I have configured jmx with Spring and I get a numIdle of 0 and
 numActive of 2 after the problem occurs. This confirms what you and Chuck
 say: my app leaks db connections.

 However, I am still not sure why my app leaks the connections. I use the
 default Spring configuration...

 Sorry: it is slightly offtopic now. I guess this is no longer a Tomcat
 question so I should post it elsewhere.

 Julien.


 2013/3/22 Caldarale, Charles R chuck.caldar...@unisys.com

 From: Julien Martin [mailto:bal...@gmail.com]
 Subject: Re: My use of Spring MVC's DeferredResult class causes Tomcat
 7.0.35 to crash silently

 http-bio-8080-exec-10 daemon prio=10 tid=0x7f68840a2800
 nid=0x41b5
 in
 Object.wait() [0x7f690cc57000]
java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x0007e8fc4650 (a
 org.apache.commons.pool.impl.GenericObjectPool$Latch)
 at java.lang.Object.wait(Object.java:503)
 at

 org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1115)
 - locked 0x0007e8fc4650 (a
 org.apache.commons.pool.impl.GenericObjectPool$Latch)
 at

 org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)

 Looks like you're leaking database connections, likely by not returning
 them to the pool.  Read Chris' article on how to do it right:



 http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/

  - Chuck


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


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





 --

 [key:62590808]

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


 


-- 

[key:62590808]

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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Pid
On 22/03/2013 15:08, Julien Martin wrote:
 You're right. I should set the result in another method/thread i.e. a post
 method...
 Is this related to the memory leaks?

It might be worth simplifying the method while you debug the connection
leak issue.


p


 J.
 
 2013/3/22 Pid p...@pidster.com
 
 On 22/03/2013 14:56, Julien Martin wrote:
 Hi,
 You mean if I set maxActive to 1?


 J.

 2013/3/22 Pid p...@pidster.com

 On 22/03/2013 14:42, Julien Martin wrote:
 @Chuck: thanks for the link. I have read it. Umm... the thing is I
 don't
 close my connection manually. I use Spring. Here is my configuration:

 bean class=org.apache.commons.dbcp.BasicDataSource
 destroy-method=close id=dataSource
 property name=driverClassName value=${database.driverClassName} /
 property name=url value=${database.url} /
 property name=username value=${database.username} /
 property name=password value=${database.password} /
 property name=testOnBorrow value=true /
 property name=testOnReturn value=true /
 property name=testWhileIdle value=true /
 property name=timeBetweenEvictionRunsMillis value=180 /
 property name=numTestsPerEvictionRun value=3 /
 property name=minEvictableIdleTimeMillis value=180 /
 property name=validationQuery value=SELECT 1 /
 property name=maxActive value=2/
 property name=logAbandoned value=true/
 property name=removeAbandoned value=true/
 /bean

 What happens if you set it to 1?


 Yes, I meant maxActive, sorry.

 Why use a DeferredResult here if you're just setting the result
 synchronously and inline anyway?  You may as well just remove the key
 from the map manually.  Am I missing something?


 p

 Any idea what I am getting wrong?

 @Daniel, I have configured jmx with Spring and I get a numIdle of 0 and
 numActive of 2 after the problem occurs. This confirms what you and
 Chuck
 say: my app leaks db connections.

 However, I am still not sure why my app leaks the connections. I use
 the
 default Spring configuration...

 Sorry: it is slightly offtopic now. I guess this is no longer a Tomcat
 question so I should post it elsewhere.

 Julien.


 2013/3/22 Caldarale, Charles R chuck.caldar...@unisys.com

 From: Julien Martin [mailto:bal...@gmail.com]
 Subject: Re: My use of Spring MVC's DeferredResult class causes
 Tomcat
 7.0.35 to crash silently

 http-bio-8080-exec-10 daemon prio=10 tid=0x7f68840a2800
 nid=0x41b5
 in
 Object.wait() [0x7f690cc57000]
java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x0007e8fc4650 (a
 org.apache.commons.pool.impl.GenericObjectPool$Latch)
 at java.lang.Object.wait(Object.java:503)
 at


 org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1115)
 - locked 0x0007e8fc4650 (a
 org.apache.commons.pool.impl.GenericObjectPool$Latch)
 at


 org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)

 Looks like you're leaking database connections, likely by not
 returning
 them to the pool.  Read Chris' article on how to do it right:




 http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/

  - Chuck


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


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





 --

 [key:62590808]

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





 --

 [key:62590808]

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


 


-- 

[key:62590808]

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



Re: Where does Tomcat log the logAbandoned information?

2013-03-22 Thread Pid
On 22/03/2013 15:02, Julien Martin wrote:
 Hi Pid,
 Is there any other config I need to add (for instance to log4j.properties)
 in order for the logAbandoned logging to occur?

Actually, you're right this is DBCP inside your app - so you might need
to look in an app log if there is one.


 I see nothing in stdout nor in the tomcat logs...

Maybe you're not waiting long enough or there's no abandoned connections
to be logged.


p


 Regards,
 J.
 
 2013/3/22 Pid p...@pidster.com
 
 On 22/03/2013 14:45, Julien Martin wrote:
 Hello,

 I have enabled the *logAbandoned* property as follows (in Spring):

 property name=maxActive value=2/
 property name=logAbandoned value=true/
 property name=removeAbandoned value=true/

 I know for certain it is taken into account by Tomcat but *I just can't
 figure out where the information is logged*.

 It will be logged to standard out, catalina.out or catalina.{date}.log

 In your case, the timeBetweenEvictionRunsMillis check will happen every
 180 millis, which is 1800 seconds, which is every 30 minutes for
 connections that have been idle the same period, which may mean that
 they don't qualify for eviction for over 30 mins, which in turn would
 mean the next check - 30m later.

 Maybe you should reduce that number during testing.


 p


 It seems to be a recurring question on the web but I was not able to find
 the answer to it.

 Can anyone please informed advice?
 Regards,

 Julien.



 --

 [key:62590808]

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


 


-- 

[key:62590808]

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



Re: Upgrading Tomcat in the customer base

2013-03-20 Thread Pid
On 19/03/2013 19:24, Patrick Flaherty wrote:
 Hi,
 
 We deploy tomcat in our own folder (c:\rsi_tc\tomcat) on a WIndows
 machine as a service. We use the service.bat to install
 as a service. Historically to update tomcat we would remove the current
 version and install the new version. There is rub in all
 this which we have to change the service login to be an account that can
 access files from a network share. Therefore when
 we upgrade tomcat, we remove the current version and install the new
 version and then someone ( the customer :-(  ) has to
 go into the service and change the service login back to the account
 that will give them access to the network share.

What is on the network share?


p


 I'm looking for a way (if possible) to avoid having the customer to have
 change the service login. I'm looking for suggestions
 to make this easier and have the following questions about whether some
 of my thoughts to make it easier are safe.
 
 1. Can I *not* uninstall the service and just replace the folder
 structure on the file system with the new version? I have tried it
 and it seems to work but question whether or not it is safe. I know
 if a major version changes I cannot do this as the service
 calls tomcat6.exe vs tomcat7.exe for instance and therefore would
 have to do the complete uninstall/install.
 
 2. If I do the above does calling the service.bat install again using
 the *newer* service.bat version make a difference? We are calling it
 (the newer service.bat)
 and it seems to be harmless and thought that it might help in case
 something in the batch install changed, we would get the changes.
 
 Bottom line, has anyone faced this dilemma and found a successful way to
 upgrade a tomcat instance that uses a unique service login.
 
 Thanks for any input.
 Pat
 
 
 
  
  
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]

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



Re: Console when running as a service.

2013-03-11 Thread pid
On 11 Mar 2013, at 14:21, André Warnier a...@ice-sa.com wrote:

 So if for some scenarios, it would be useful to use say MS-Word to
 produce a PDF version of a document, it is not possible (or very difficult) 
 to trigger
 this from Tomcat when running as a Service.

Eek! Eek I say!


p

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



Re: HTTP rejections and too many open files exception on tomcat

2013-02-18 Thread Pid
On 18/02/2013 17:05, Radha Krishnan D wrote:
 Hi
 
 Am sorry, clicked submit by mistake
 
 The below is the actual problem
 
 
 We are running into too many open files  exception on  our production tomcat 
 server for the last 2-3 days.
 
 We have max threads as 150 and acceptCount as 100 and at one point of time 
 all the 250 threads are busy processing requests  (due to application related 
 issues)

You only have 150 threads, not 250.  150 is not a large number  is in
fact lower than the default.

At 50-60 requests per second, you must serve each request within 0.3s to
avoid queuing requests (ie, using the acceptCount queue).  You should
avoid queueing requests.


 At peak times, when all the threads are busy, new requests are rejected by 
 tomcat.

Expected.


 Nearly 40 mins to 1 hr after the rejections begin, there are too many open 
 files exception coming on the tomcat server..

Maybe this is the real peak.


 The number of file descriptors is 16384 and we are getting 50-60 requests per 
 sec.
 
 What can be the root cause here.  

Too many possible options, not enough info.


 After rejecting a request, is the socket not closed immediately and this 
 results in pile up of open files or is there some other reason ?

 Can any one help us in this regard ?

Please post the Connector configuration from server.xml.  You may
obscure/remove passwords if present.


p

 Thanks,
 D.Radhakrishnan
 
 
 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com]
 Sent: 18 February 2013 22:32
 To: Tomcat Users List
 Subject: Re: HTTP rejections and too many open files exception on tomcat
 
 Radha Krishnan D wrote:
 Hi,

 We are running into too many open issues  exception on  our production 
 systems for the last
 
 With a lot of guesswork ..
 
 Google for ulimit ?
 Get a bigger server ?
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 This email and any attachments are confidential, and may be legally 
 privileged and protected by copyright. If you are not the intended recipient 
 dissemination or copying of this email is prohibited. If you have received 
 this in error, please notify the sender by replying by email and then delete 
 the email completely from your system. Any views or opinions are solely those 
 of the sender. This communication is not intended to form a binding contract 
 unless expressly indicated to the contrary and properly authorised. Any 
 actions taken on the basis of this email are at the recipient's own risk.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]

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



Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Pid
On 12/02/2013 17:53, Cool Techi wrote:
 
 
 
 I am new to this, I have just installed YourKit and see a lot of threads 
 blocked,but currently my response are fine, the blocked thread are showing 
 the following
 
 Blocker Thread QuartzSchedular_Worker-6 native ID ..
 
 On clicking on the Blocker thread it shows me the following,
 
 
   
 org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
 Does any of these sound like  reason. It would be great to get pointed in the 
 right direction.
 Regards,Ayush


Oh dear.

Are you doing your app logging to a database?

Is it the same database that your app uses?

Is it the same connection pool that your app uses?


p


 Date: Tue, 12 Feb 2013 15:35:40 -0200
 From: edsonrich...@hotmail.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]

 There is a similar thread published a week ago.
 It can be caused by almost anything, and my last suspect would be Tomcat 
 it self.
 Most of time, the cause is some programming error, like:
 - missing step out of recursive loop
 - loading too many objects is memory (for example, when using JPA where 
 graph of objects are all connected - so, when you load one object, all 
 database is read into memory)
 - some deadlock in multi-threaded application...

 How to discover:

 1) Try to get a memory dump and check how your memory is being used
 2) Get a heap dump (stack trace, as well) or currently running 
 application when it is hang, and check for deadlocks
 3) Use VisualVM to get a big picture of what the virtual machine is doing
 4) Put the application running under profiler (like JRockit Mission 
 Control, or NetBeans profiler)

 These are some ideas...

 Regards,

 Edson


 Em 12/02/2013 15:27, Cool Techi escreveu:
 Hi,

 We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
 installed on the server.

 The
   server seems to be running smoothly most of the time, but suddenly the
 memory used goes very high and tomcat stops responding, the logs don't
 show any out of memory or thread exceptions.

 What could be causing this?

 Regards,
 Ayush   


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

 
 
 


-- 

[key:62590808]

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



Re: Tomcat hanging unexpectedly [URGENT]

2013-02-12 Thread Pid
On 12/02/2013 18:42, Cool Techi wrote:
 I am not logging to database, these are my appenders,

You posted the below in a previous message. It was in a single
unintelligible line.  Perhaps you could clarify what you intended to
post and try again?

 org.apache.log4j.Category.callAppenders
 com.mysql.jdbc.SingleByteCharsetConverter.getInstance
 org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()
 org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()
 ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle


p


 appender name=errorfile class=org.apache.log4j.DailyRollingFileAppender
 param name=File value=D:/Logs/errorVer.log /
 param name=threshold value=error /
 layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d{-MMM-dd 
 HH:mm:ss,SSS} %5p %c{1}:%L - %m%n /
 /layout
 /appender
 
 appender name=debugfile 
 class=org.apache.log4j.DailyRollingFileAppender
 param name=File value=D:/Logs/debugVer.log /
 layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d{-MMM-dd 
 HH:mm:ss,SSS} %5p %c{1}:%L - %m%n /
 /layout
 filter class=org.apache.log4j.varia.LevelRangeFilter
 param name=LevelMin value=debug /
 param name=LevelMax value=debug /
 /filter
 /appender  
 
 regards,
 Ayush
 
 Date: Tue, 12 Feb 2013 18:38:24 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]

 On 12/02/2013 17:53, Cool Techi wrote:



 I am new to this, I have just installed YourKit and see a lot of threads 
 blocked,but currently my response are fine, the blocked thread are showing 
 the following

 Blocker Thread QuartzSchedular_Worker-6 native ID ..

 On clicking on the Blocker thread it shows me the following,


   
 org.apache.log4j.Category.callAppenderscom.mysql.jdbc.SingleByteCharsetConverter.getInstanceorg.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrorObject()org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool()ogr.apache.tomcat.dbcp.pool.impl.GenericObjectPool.getNumIdle
 Does any of these sound like  reason. It would be great to get pointed in 
 the right direction.
 Regards,Ayush


 Oh dear.

 Are you doing your app logging to a database?

 Is it the same database that your app uses?

 Is it the same connection pool that your app uses?


 p


 Date: Tue, 12 Feb 2013 15:35:40 -0200
 From: edsonrich...@hotmail.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat hanging unexpectedly [URGENT]

 There is a similar thread published a week ago.
 It can be caused by almost anything, and my last suspect would be Tomcat 
 it self.
 Most of time, the cause is some programming error, like:
 - missing step out of recursive loop
 - loading too many objects is memory (for example, when using JPA where 
 graph of objects are all connected - so, when you load one object, all 
 database is read into memory)
 - some deadlock in multi-threaded application...

 How to discover:

 1) Try to get a memory dump and check how your memory is being used
 2) Get a heap dump (stack trace, as well) or currently running 
 application when it is hang, and check for deadlocks
 3) Use VisualVM to get a big picture of what the virtual machine is doing
 4) Put the application running under profiler (like JRockit Mission 
 Control, or NetBeans profiler)

 These are some ideas...

 Regards,

 Edson


 Em 12/02/2013 15:27, Cool Techi escreveu:
 Hi,

 We are using tomcat 6.0.26 on windows 2008 web server, with Jdk 1.6.32 
 installed on the server.

 The
   server seems to be running smoothly most of the time, but suddenly the
 memory used goes very high and tomcat stops responding, the logs don't
 show any out of memory or thread exceptions.

 What could be causing this?

 Regards,
 Ayush 


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


   



 -- 

 [key:62590808]

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


-- 

[key:62590808]

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



Re: How to limit the number of renegotiations for a single TLS / SSL connection

2013-02-09 Thread Pid
On 08/02/2013 15:05, Mark Thomas wrote:
 On 08/02/2013 14:34, Caldarale, Charles R wrote:
 From: dku...@ccilindia.co.in [mailto:dku...@ccilindia.co.in] 
 Subject: How to limit the number of renegotiations for a single TLS
 / SSL connection

 We are using - Tomcat Version - 6.0.18

 Please suggest the recommended solution for tomcat

 Try using a version of Tomcat that's newer than 4.5 years old.  Many
 security-related fixes have gone in since then, and it's
 irresponsible to expose your site to situations that have been
 addressed years previously.  If you check the changelog, I think
 you'll find this TLS issue was addressed quite some time ago; it may
 require a JVM upgrade as well.
 
 No, this is a different issue.

Not to disagree with Mark T... but the point about using old software is
still a good one.

 Tomcat 6.0.18 vs Tomcat 6.0.36

 OpenSSL 0.9.8k (25-Mar-2009) vs OpenSSL 0.9.8y (05-Feb-2013)


Focusing on particular issues like this, rather than addressing the big
picture and using a more recent build of Open SSL and/or Tomcat (that
will carry many fixes) means the OP is probably Doing IT Wrong.


p

-- 

[key:62590808]

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



Re: deploy application in new service in tomcat

2013-02-09 Thread Pid
On 07/02/2013 13:03, Anil Goyal -X (anigoyal - Aricent Technologies at
Cisco) wrote:
 Hi,
 
 I am creating a new service in tomcat (7.0.20) with service name 
 'catalina_new' and appBase='webapps' by doing some changes in server.xml.
 I am keeping the appBase same as that for default service 'catalina'

Why?

A side effect will be that all apps in webapps are deployed to both
services.  This is because you've told Tomcat to do that.

What do you gain by having the same appBase?


 I have several applications deployed under webapps.
 I want only a single application with context '/feeder' to be accesible 
 through new service.

 Condition: I do not want to have a separate appBase for new service and 
 deployed only the required app under this new appBase.

Why not?

Why have you invented a spurious and unnecessary condition like this?


 In short, do we have a context based filtering in tomcat so that tomcat 
 incorporate request only from a specific context path and ignore all others

No.


p


 Thanks
 Anil
 


-- 

[key:62590808]

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



Re: Need to Specify keystorePass on Command Line

2013-02-08 Thread Pid
On 08/02/2013 16:11, Caldarale, Charles R wrote:
 From: Harris, Jeffrey E. [mailto:jeffrey.har...@mantech.com] 
 Subject: RE: Need to Specify keystorePass on Command Line
 
 First, I cannot store the password ANYWHERE on the system, which is why 
 it needs to be entered on the command line.
 
 Then you can't run Tomcat as a service - there is no command line.  It's my 
 understanding that all parameters for a service must be available in the 
 registry or elsewhere in the file system prior to starting the service.
 
 Consider running Tomcat from the .bat scripts instead, in which case you can 
 pass arbitrary parameters, but you will need to do this from a logged-in 
 account.

But bear in mind that setting the password as -Dblah=password may still
expose the password to other processes able to read the startup
parameters of that process.

Which IMHO is less secure than putting the password in a file with
permissions such that only the Tomcat user can read it...


p

  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]

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



Re: rolling deployments with tomcat clustering

2013-02-05 Thread Pid
On 05/02/2013 02:25, Zippy Zeppoli wrote:
 Hello,
 I have a tomcat 7 cluster which I want to do rolling deployments.
 I am using FarmDeployer. I am wondering, what is the default behavior of
 FarmDeployer, does it undeploy and deploy the new app all at once?
 
 Is there any way to modify this behavior to do it serially?

Try versioning your war files.

 myapp##v1.0.0.war
 myapp##v1.0.1.war

This feature is called 'parallel deployment'.

You can use JMX to monitor the activeCount of sessions of the older
version and also to undeploy it when that number reaches zero.


p

 Thanks,
 z
 


-- 

[key:62590808]

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



Re: How to configure tomcat 6.0.36 in Windows 7 to deploy servlets

2013-01-27 Thread Pid
On 27/01/2013 16:25, Varuna Seneviratna wrote:
 I extracted tomcat-6.0.36 zip file to c:\tomcat, now root of my tomcat
 installation is c:\tomcat. I have set the CLASSPATH  to
 
 .;C:\tomcat\lib\servlet-api.jar;C:\Program Files\Java\jdk1.7.0_10

Don't do that.  Tomcat configures the classpath for itself.


 Tomcat-6.0.36 is now running and the Home page is displayed
 
 I created the below Servlet
 SERVLET
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 
 public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res)
   throws ServletException, IOException  {
   
   res.setContentType(text/html);
   PrintWriter out = res.getWriter();
   
   
   out.println(HTML);
   out.println(HEADTITLEHello World/TITLE/HEAD);
   out.println(BODY)
   out.println(BIGHello World/BIG);
   out.println(/BODY/HTML);
   
   
   }
 }
 
 /SERVLET
 
 The above Servlet was successfully compiled and the resulting .class
 file was placed in the directory /webapps/ROOT/WEB-INF/classes
 The classes directory was not created when the tomcat zip file was
 extraxted so I created it my self.Inside WEB-INF/ directory there is a
 web.xml file and I didn't do anything with it.

You need to specify the Servlet in web.xml.  That would be why it
doesn't work, read the Servlet Specification for more information and
follow the guide here:

 http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html

Tip: don't modify the existing Tomcat applications, remove/backup the
existing ones and replace them with the ones you create.


p


 When I tried to access the Servlet HelloWorld through the url
 http://localhost:8080/servlet/HelloWorld the response is
 RESPONSE
 HTTP Status 404 - /servlet/HelloWorld
 
 type Status report
 
 message /servlet/HelloWorld
 
 description The requested resource is not available.
 Apache Tomcat/6.0.36
 /RESPONSE
 
 trying with the url http://localhost:8080/servlets/servlet/HelloWorld
 resulted in the same response as above
 
 What must be done to get the Servlets deployed?
 
 Thanks
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]

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



Re: WELCOME to users@tomcat.apache.org

2013-01-23 Thread pid
On 23 Jan 2013, at 02:52, DHARMENDRA SETHI sethi.dharmen...@gmail.com
wrote:

Hi

I just installed Eclipse (Version: Juno Service Release 1 Build id:
20120920-0800) and want to know the how to make Tomcat node show up in
window - preferences. I know I am missing the plugin but am not sure which
plugin to download?


This would be an Eclipse question and one that is probably well documented
there.


p


I have following software downloaded/installed -

[image: Inline image 2]

Thanks
DK


On Tue, Jan 22, 2013 at 9:22 PM, users-h...@tomcat.apache.org wrote:

 Hi! This is the ezmlm program. I'm managing the
 users@tomcat.apache.org mailing list.

 I'm working for my owner, who can be reached
 at users-ow...@tomcat.apache.org.

 Acknowledgment: I have added the address

sethi.dharmen...@gmail.com

 to the users mailing list.

 Welcome to users@tomcat.apache.org!

 Please save this message so that you know the address you are
 subscribed under, in case you later want to unsubscribe or change your
 subscription address.


 --- Administrative commands for the users list ---

 I can handle administrative requests automatically. Please
 do not send them to the list address! Instead, send
 your message to the correct command address:

 To subscribe to the list, send a message to:
users-subscr...@tomcat.apache.org

 To remove your address from the list, send a message to:
users-unsubscr...@tomcat.apache.org

 Send mail to the following for info and FAQ for this list:
users-i...@tomcat.apache.org
users-...@tomcat.apache.org

 Similar addresses exist for the digest list:
users-digest-subscr...@tomcat.apache.org
users-digest-unsubscr...@tomcat.apache.org

 To get messages 123 through 145 (a maximum of 100 per request), mail:
users-get.123_...@tomcat.apache.org

 To get an index with subject and author for messages 123-456 , mail:
users-index.123_...@tomcat.apache.org

 They are always returned as sets of 100, max 2000 per request,
 so you'll actually get 100-499.

 To receive all messages with the same subject as message 12345,
 send a short message to:
users-thread.12...@tomcat.apache.org

 The messages should contain one line or word of text to avoid being
 treated as sp@m, but I will ignore their content.
 Only the ADDRESS you send to is important.

 You can start a subscription for an alternate address,
 for example john@host.domain, just add a hyphen and your
 address (with '=' instead of '@') after the command word:
 users-subscribe-john=host.dom...@tomcat.apache.org

 To stop subscription for this address, mail:
 users-unsubscribe-john=host.dom...@tomcat.apache.org

 In both cases, I'll send a confirmation message to that address. When
 you receive it, simply reply to it to complete your subscription.

 If despite following these instructions, you do not get the
 desired results, please contact my owner at
 users-ow...@tomcat.apache.org. Please be patient, my owner is a
 lot slower than I am ;-)

 --- Enclosed is a copy of the request I received.

 Return-Path: sethi.dharmen...@gmail.com
 Received: (qmail 2373 invoked by uid 99); 23 Jan 2013 02:22:46 -
 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230)
 by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 02:22:46
 +
 X-ASF-Spam-Status: No, hits=1.5 required=5.0
 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS
 X-Spam-Check-By: apache.org
 Received-SPF: pass (nike.apache.org: domain of 
 sethi.dharmendra@gmail.comdesignates 209.85.223.178 as permitted sender)
 Received: from [209.85.223.178] (HELO mail-ie0-f178.google.com)
 (209.85.223.178)
 by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 02:22:37
 +
 Received: by mail-ie0-f178.google.com with SMTP id c12so13119109ieb.9
 for users-sc.1358907612.mngongokjnbjkkgiplli-sethi.dharmendra=
 gmail@tomcat.apache.org; Tue, 22 Jan 2013 18:22:16 -0800 (PST)
 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20120113;
 h=mime-version:x-received:in-reply-to:references:date:message-id
  :subject:from:to:content-type;
 bh=rxIXeyPfIacgJ3qKEtynw4l7yO4GjiUyRCZb6wEmNC4=;

 b=gWGZnR3RJqWQ5vzfH91Wef2WRHW7+KkGl//jkdbd1DhZFyitvQjBzmcuAnzYYbtO7U

  w2tiqSgH3VBI8oPdKDcBpEMKnd4u2K1KF1VdOQeRkANNwF9a6cQj7vr+URovcoKmXRAM

  HuU1lBaL+28tiyXQvDZWuksM2cPsahtFs0+IvnhtWjiIJoP5rcHg4D4fOhYI2A6QLraj

  qF2fTGSnKgWWUYFIZgigTLctGUm1ixd2TkfYU8fe08RLcgjb2U6Z2EZHLrwj5xNro48J

  aVhGcZE2PbaewvApOdUITlgMXEn31aYMNsgEnXZb2RYUxArl6kQCGn9Had1d3HtcFbV8
  gOvQ==
 MIME-Version: 1.0
 X-Received: by 10.43.125.133 with SMTP id
 gs5mr16234899icc.54.1358907736763;
  Tue, 22 Jan 2013 18:22:16 -0800 (PST)
 Received: by 10.64.78.69 with HTTP; Tue, 22 Jan 2013 18:22:16 -0800 (PST)
 In-Reply-To: 1358907612.97014.ez...@tomcat.apache.org
 References: 1358907612.97014.ez...@tomcat.apache.org
 Date: Tue, 22 Jan 2013 21:22:16 -0500
 Message-ID: CALnLOBzg3WUjCB0i=et__sbEu5tngsO=
 

Re: War archive issue

2013-01-21 Thread pid
On 21 Jan 2013, at 05:42, vicky007aggar...@yahoo.co.in
vicky007aggar...@yahoo.co.in wrote:

 Is this is an issue in tomcat that if we
 Deploy an archive file having hypen(-) , then the tomcat creates multiple 
 directories while deploying it eg:- if the war file name is demo-rest.war 
 then tomcat creates two
 Directories i.e demo-rest  demo

 Please suggest, does this is the expected behavior

You should know to include version info by now.


p




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


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



Re: Capacity Planning Turk's Formula

2013-01-17 Thread Pid
On 17/01/2013 18:08, yogesh hingmire wrote:
 Folks,
 
 I was reading this article by Mladen Turk from the FAQ section on TomCat
 Performance  Capacity Planning

 http://people.apache.org/~mturk/docs/article/ftwai.html

 It says,

 “To get most out of Tomcat you should limit the number of concurrent
 requests to 200 per CPU.

 So we can come with the simple formula to calculate the maximum number of
 concurrent connections a physical box can handle:

  500

 Concurrent requests = ( --  ) * Number of CPU's

  AART (ms)

  The Question I have is,  how did Turk arrive at this formula and why does
 he say to get the max we have to limit to 200.

It came to him in a dream.


p

  Thank You for all your help

 


-- 

[key:62590808]

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



Re: docBase

2013-01-16 Thread Pid
On 11/01/2013 20:24, Leo Donahue - RDSA IT wrote:
 Tomcat 7.0.34
 Java 1.6.0_35
 
 Can the document base of a context be an administrative share?

Yes.  But I would not encourage it.  2nd only to NFS for causing random
errors.

Unless you have a massive number of images totalling large amounts of
data, it would be better to arrange a periodic sync job to copy images
across to each node.


p


 Ex: 
 \\servername\share$\somedirectoryfile:///\\servername\share$\somedirectory
 
 I run tomcat as a service using a local account on webserver1, that same 
 local account has read access to the administrative share (checked the 
 passwords to make sure they were the same), but I'm getting an 
 illegalArgumentException in the logs.  The local account has share access and 
 permissions on the \\servername\share$ root directory.
 
 SEVERE: Error starting static Resources
 java.lang.IllegalArgumentException: Document base 
 \\servername\share$\somedirectory does not exist or is not a readable 
 directory
 at 
 org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)
 at 
 org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4906)
 at 
 org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5086)
 at 
 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at 
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 at 
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 at 
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
 at 
 org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
 at 
 org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)
 at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at 
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
 Leo
 
 
 


-- 

[key:62590808]

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



Re: docBase

2013-01-16 Thread Pid
On 16/01/2013 21:17, Leo Donahue - RDSA IT wrote:
 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: docBase

 On 11/01/2013 20:24, Leo Donahue - RDSA IT wrote:
 Tomcat 7.0.34
 Java 1.6.0_35

 Can the document base of a context be an administrative share?

 Yes.  But I would not encourage it.  2nd only to NFS for causing random 
 errors.

 Unless you have a massive number of images totalling large amounts of data,
 it would be better to arrange a periodic sync job to copy images across to 
 each
 node.


 p

 
 Thank you sir.
 
 What if one suffers from having conservatively configured nodes?  The amount 
 of image cache we would want to create would not fit on any of our 
 webservers.  Our web servers are virtualized and have only a few GB of 
 storage.

If it can be publicly accessible, but CDNs are increasingly inexpensive.


 Moving off topic:
 
 How does google do this:  
 http://mt1.google.com/vt/lyrs=m@20500hl=ensrc=appx=11y=25z=6s=Ga  
 do you think these images are sitting on every node?  And what if google 
 wanted to include an option to view aerial photos for each year for the past 
 ten years?  That becomes a lot of data that lives on each node?  

No.  Custom CDN  some clever storage.


 In the example above, when a user requests an image tile from google, you 
 can't tell whether that image lives on the webserver, or whether the 
 webserver fetches that image from a share on another server.

No shares, lots of DNS routing and other nifty stuff.


 I have a lot of room on my NAS, but not on my webservers.  When we cache 
 images for just our county, depending on how many scale levels I create and 
 tile size, I can end up with several hundred GB for just a single year of 
 aerial photos.  Reading those images on local (webserver) storage vs network 
 storage is what I'm trying to decide.

That's quite a lot. :)

How many are in use at any given moment?  A caching app that was able to
preload adjacent image tiles would work if you wanted to build something.


p


-- 

[key:62590808]

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



Re: Tomcat vs IIS download speed - configuration suggestions?

2013-01-11 Thread Pid *
On 10 Jan 2013, at 20:20, Daniel Mikusa dmik...@vmware.com wrote:

 On Jan 10, 2013, at 3:10 PM, Linoma DevTeam wrote:

 Thank you everyone for the responses/suggestions.

 I did ensure that those were the same during the tests, but had removed
 that from the server.xml before sending. Both servers had negotiated the
 equivalent of TLS_RSA_WITH_AES_128_CBC_SHA with the client during testing.

 Also, i've verified the JVM is in server mode, and I'm currently using
 1.6.0_14.

 This is pretty old, you might also try the latest 1.6.0_x release and/or the 
 latest 17.0_x release.  Those could have some performance improvements which 
 would narrow the gap.

+1

Don't underestimate the impact of that.


p

 Dan



 At times i can hit increased speeds of 10.8MB/s for IIS (about as fast as
 this server's network card can handle), with tomcat running close to 7.8
 MB/s.  (I'm just thinking out loud here) Assuming this is a normal
 difference with tomcat running at 72% the speed of IIS, and if the system
 was congested to the point of slowing down the downloads from the servers,
 then I would expect tomcat to run at 2.5 MB/s if IIS was serving files at
 3.5 MB/s.  It however looks like tomcat is serving data at a consistent 3.0
 MB/s slower than IIS (not percentage based), which is why i saw 350 KB/s
 against the 3.5 MB/s from IIS?

 Anyway, I will try the APR connector and let you know.  Thanks again for
 your comments!

 On Thu, Jan 10, 2013 at 8:31 AM, David kerber dcker...@verizon.net wrote:

 On 1/10/2013 8:56 AM, Linoma DevTeam wrote:

 Hi everyone,

 I'm running some comparison tests with tomcat 6.0.35 and IIS running in
 parallel on Windows Server 2008 R2.  Now I would expect Tomcat to be
 somewhat slower, given the extra JVM layer, but in some situations, i'm
 seeing differences that are tough to swallow.

 What JVM are you running under?  Is it running the client or server
 version?  I've found huge performance improvements in some kind of
 operations under a server JVM compared to client ones.


 D



 Downloads
 IIS ~3.7 MB/s
 Tomcat  ~350 KB/s

 Test Details:
 I placed a ~500MB file in the document root of the web app on tomcat and
 set up an HTTPS connector.  Then I set up IIS with the same file and an
 HTTPS listener.  I configured the cipher suite in tomcat to be the same
 one
 that was negotiated between IIS and my Chrome browser.  Finally, I set the
 JVM max memory to 1024MB with a min of 900MB to reduce the impact of the
 GC
 and the memory allocation.

 I'm using HTTP/1.1 connectors with pretty standard configuration:

 Server port=9005 shutdown=SHUTDOWN

 Service name=admin
 Connector port=9080 /

 Connector port=9443 protocol=HTTP/1.1
 SSLEnabled=true enableLookups=false disableUploadTimeout=true
 scheme=https secure=true clientAuth=false sslProtocol=TLS
 algorithm=SunX509 keystoreFile=C:\temp\sample_**keystore.jks
 keystorePass=password keyAlias=sample-key keystoreType=JKS
 truststoreFile=C:\temp\**sample_truststore.jks
 truststorePass=password
 truststoreType=JKS /

 Engine name=admin defaultHost=localhost
 Host name=localhost appBase=webapps
 errorReportValveClass=com.**company.**CustomErrorReportValve
 Context path=/sample docBase=C:\temp\application\**WebRoot
 reloadable=false
 Loader delegate=true /
 /Context
 /Host
 /Engine
 /Service
 /Server

 So, I extend the question of, why would tomcat only be able to reach 10%
 of
 the speed IIS is able to server when running parallel tests?  Any
 suggestions on configurations that I could adjust on Tomcat, the JVM, or
 operating system that improve that download speed?

 Thanks in advance!

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

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


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



Re: Remove apache tomcat default home page

2013-01-04 Thread Pid *
On 4 Jan 2013, at 04:39, ana kando anaka...@yahoo.com wrote:

 Hi all,

 I just installed a software that bundled with apache tomcat. I successfully 
 installed the software and can run the software at 
 http://localhost:8080/myapps/

 However, when i remove /myapps from browser, it will go directly to apache 
 tomcat default page. Cau you help me to remove this page from being display 
 when i go to http://localhost:8080/ ??

 Here is my tomcat version and operating system spec.


 Apache Tomcat 5.5.20

#fail

Go back to the vendor and ask them when they'll update Tomcat to a
supported version that is secure.


p


 windows server 64 bit



 I found an article from somewhere in the world to commented out these line at 
 file tomcat/conf/web.xml


 servlet-mapping
 servlet-namejsp/servlet-name
 url-pattern*.jsp/url-pattern
 /servlet-mapping
 servlet-mapping
 servlet-namejsp/servlet-name
 url-pattern*.jspx/url-pattern
 /servlet-mapping

 welcome-file-list
 welcome-fileindex.html/welcome-file
 welcome-fileindex.htm/welcome-file
 welcome-fileindex.jsp/welcome-file
 /welcome-file-list


 I also have commented out this line from file 
 tomcat/webapps/root/WEB-INF/web.xml

 welcome-file-list
 welcome-fileindex.htm/welcome-file
 /welcome-file-list

 But still not working. Tomcat default page still there.

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



Re: (OT) Hibernate question

2013-01-04 Thread Pid *
On 3 Jan 2013, at 23:04, Martin Gainty mgai...@hotmail.com wrote:

 Martin
 __ If computers were self-aware 
 they would'nt need human beingsAuthor Unknown


Indeed.

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



Re: worker not marked as in error when shutdown with ping mode enabled

2013-01-04 Thread Pid
On 04/01/2013 20:08, Christopher Schultz wrote:
 On 1/3/13 10:54 AM, John Rellis wrote:
  I am using apache 2.2.3 and mod_jk as a load balancer for two
  tomcat 7 instances over AJP 1.3.
 Which exact version of mod_jk are you using? I'm guessing you are
 stuck on httpd 2.2.3 because of your package-manager? That's quite old.

Some package managers report 2.2.3 despite it being a newer patch.


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Secure AJP load balancing problem

2013-01-04 Thread Pid
On 03/01/2013 21:52, Igor Cicimov wrote:
 On 04/01/2013 2:25 AM, Arunkumar Janarthanan arunkumar.webad...@gmail.com
 wrote:

 Thanks Mark, I am working on parallely setting up another environment with
 Tomcat 6.x, however to clear an urgent audit I need to show the Apache
 connector uses secure protocol to exchange the data between Apache and
 tomcat. Both these servers are in DMZ and on different servers.

 Hello Chris,

 Thanks for your valuable advice, here is how my configuration looks like.

 *Apache conf:*

 ProxyPassMatch ^/(.*\.jsp|.*\.do)(;jsessionid=.*)?$
 balancer://lb1/$1

 *Balancer Conf:*

 Proxy balancer://lb1
 BalancerMember https://tomcat02.us.rdigest.com:8443
 BalancerMember https://tomcat02.us.rdigest.com:8543
 ProxySet stickysession=JSESSIONID
 ProxySet nofailover=Off
 /Proxy

 
 Since you have sticky sessions dont you need to set up the jvmRoute in the
 tomcat connectors?

The jvmRoute attribute is set on the Engine element, not the Connectors.


p


 *Tomcat conf:*

 Tomcat1:

 Connector port=8443 maxHttpHeaderSize=8192
maxThreads=150 minSpareThreads=25 maxSpareThreads=75
enableLookups=false disableUploadTimeout=true
acceptCount=100 scheme=https secure=true
clientAuth=false sslProtocol=TLS
 /

 Tomcat2:

 Connector port=8543 maxHttpHeaderSize=8192
maxThreads=150 minSpareThreads=25 maxSpareThreads=75
enableLookups=false disableUploadTimeout=true
acceptCount=100 scheme=https secure=true
clientAuth=false sslProtocol=TLS
 /


 Thanks again for your assistance extended.

 Regards,
 Arun Janarthanan

 On Wed, Jan 2, 2013 at 10:38 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 Arun,
 
 On 1/2/13 4:45 PM, Arunkumar Janarthanan wrote:
 I have Apache 2.2.22 and Tomcat 5.5 running on SSL 8443, I have
 tried my balancer members to use HTTPS port
 
 So you are trying to use HTTPS over AJP? Did you mean APR?
 
 Please post your Connectors from server.xml and your relevant httpd
 configuration (e.g. ProxyPass). It would also be helpful if you were
 to describe any transport-guarantee that you may have in your web
 application(s).
 
 and finds the JSP pages doing ok for some reason the struts /
 action servlets would not accept secure protocol instead it
 redirects infinitely with the Tomcat server hostname and non-ssl
 port.
 
 Try a protocol trace using something like Mozilla Firefox's web
 console or similar tools for other web browsers. This will show you
 the request as sent by the browser and the response as seen by the
 browser: it should show the pattern you describe above with more detail.
 
 Anybody had similar experience try configuring secure connectors on
 such environment ?
 
 FWIW, I use stunnel to secure the back-channel between httpd and
 Tomcat (using an AJP connector). While I haven't actually
 performance-tested the two configurations against each other, my
 rationale for this configuration was to reduce the number of SSL
 handshakes that occur between httpd and Tomcat. Also, I've always used
 AJP to tunneling AJP made more sense for us than switching-over to
 HTTPS reverse-proxying.
 
 -chris

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


 

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: [jdbc-pool] Transaction left open by the connection validation mechanism ?

2013-01-04 Thread Pid
On 04/01/2013 20:34, Christopher Schultz wrote:
 Pascal,
 
 On 1/3/13 12:49 PM, Davoust, Pascal wrote:
 I'm using the tomcat jdbc connection pool (7.0.34) to connect
 against a PostgreSQL database (version 8.4 - jdbc driver 9.0.801)
 and I'm having a potentially dodgy situation with the validation
 mechanism.
 
 The code I'm using does change the transaction isolation level of
 a connection that has been newly borrowed from the pool (before
 doing anything else) but sometimes gets an error while doing so,
 such as:
 
 org.postgresql.util.PSQLException: Cannot change transaction
 isolation level in the middle of a transaction.
 
 I've been investigating the code for a while to check whether any 
 transaction was left open (read: without any commit or rollback)
 before being returned to the pool, but no chance, everything looks
 clean.
 
 When returning a Connection to the pool, jdbc-pool should be following
 the JDBC spec and committing any uncommitted transaction. The problem
 is likely during/after check-out and not with a check-in. THere could
 be bugs, of course.
 
 Then I suspected the validation mechanism which validates the
 connection. Mine was set to validate the connection every 30 s
 while idle, using a SELECT 1 statement.
 
 Indeed, I disabled the validation mechanism and tadaa, no error at
 all!
 
 Good to know, but surprising.
 
 I then had a look at the corresponding code into the tomcat jdbc
 pool (source 7.0.34), and more specifically in class
 org.apache.tomcat.jdbc.pool.PooledConnection, method public
 boolean validate(int validateAction,String sql) at line 452
 (excerpt below):
 
 Statement stmt = null; try { stmt = connection.createStatement(); 
 stmt.execute(query); stmt.close(); this.lastValidated = now; return
 true; } catch (Exception ex) { if
 (getPoolProperties().getLogValidationErrors()) { log.warn(SQL
 Validation error, ex); } else if (log.isDebugEnabled()) { 
 log.debug(Unable to validate object:,ex); } if (stmt!=null) try {
 stmt.close();} catch (Exception ignore2){/*NOOP*/} } return false;
 
 You (may) have a resource leak: you are not closing your statement in
 the case of an exception. You need a 'finally' block.

I think Pascal is saying that the above snippet is in the Tomcat JDBC
code, not his.


p

 http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/
 
 It looks to me that there is a mistake here: if the connection to
 validate does not have autoCommit set to true, then the transaction
 is started and left open by this code.
 
 I would tend to agree. Can you check the status of
 Connection.getAutoCommit after fetching a connection from the pool?
 
 Also, is your altered transaction isolation level not appropriate for
 all transactions?
 
 Which explains the errors I was experiencing, since once the
 connection has been validated, then the transaction isolation level
 cannot be changed since a transaction is still ongoing!
 
 Did I miss something or is this a real bug which I should file?
 
 It may be a bug. Please create a minimal test case and attach it to a
 bug report. Try to use the pool outside of Tomcat to simplify the
 test-case even further.
 
 -chris
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: No print service found error on Apache Tomcat 6.0.35 running on FreeBSD using CUPS when trying to print via Jasper.

2012-12-31 Thread Pid *
On 31 Dec 2012, at 08:05, Cahir King cahirk...@googlemail.com wrote:

 Hello all,

 I am running a web application (OpenVPMS) on Tomcat 6.0.35 on a FreeBSD 9.0 
 server. The webapp has a Mysql database backend. I have installed CUPS and 
 have several printers on the local network (mainly HP).  The JVM is openjdk 
 6.0 (1.6.0_32-b26), downloaded and installed from ports in BSD.

 One feature of the webapp is that it is supposed to send label printouts 
 directly to a printer using jasper. However, when I try to do this, the 
 following error comes up:

 Failed to generate report: No suitable print service found.

 I can print from the BSD server using other programs like gedit. I just can't 
 get the tomcat server to print directly. I am assuming that the jasper bit 
 was installed automatically with the tomcat port on BSD, so I don't think I 
 need any additional programs. I have also made sure that the tomcat user is a 
 member of the cups group.

Apache Tomcat's Jasper component is not the same as Jasper Reports.
Perhaps this is causing some confusion?


p


 I am a novice in all of this, so if anyone can point me in the right 
 direction, I would be most grateful. The error log is attached to this 
 message.

 Thank you.




 opv_print_error.txt

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

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



Re: some clarification about context.

2012-12-30 Thread Pid *
On 29 Dec 2012, at 13:21, Mauro mrsan...@gmail.com wrote:

 On 29 December 2012 13:04, Konstantin Kolinko knst.koli...@gmail.com wrote:
 2012/12/29 Mauro mrsan...@gmail.com:
 Hello.
 I've various web applications running under tomcat6.

 Which one of many 6.0.x versions?

 6.0.35


 One of those use jndi, say the name of webapp is my_app.
 I put a my_app.xml under Catalina/localhost/ with a context section in
 which I put:

 Resource name=jdbc/my_app auth=Container type=javax.sql.DataSource
 maxActive=100 maxIdle=30 maxWait=1
 username=xxx password=xxx 
 driverClassName=org.postgresql.Driver
 url=jdbc:postgresql://svsopsql01.comune.cagliari.loc:5432/my_app/

 The jndi connection work well but
 I deploy another web application that uses jndi, say my_app1.
 Put a my_app1.xml under Catalina/localhost/


 Resource name=jdbc/my_app1 auth=Container type=javax.sql.DataSource
 maxActive=100 maxIdle=30 maxWait=1
 username=xxx password=xxx 
 driverClassName=org.postgresql.Driver
 
 url=jdbc:postgresql://svsopsql01.comune.cagliari.loc:5432/my_app1/


 This second application does not work and I must investigate on it but
 the problem is that also the jndi connection of the first application,
 my_app, does not work.
 Why?
 I'm correct on putting my_app.xml and my_app1.xml under Catalina/localhost?

 So, if it is one application then it works. If you deploy the second
 application then both the first and the second do not work?

 Yes, the second application has a problem and I must investigate on it
 but it is strange to me that also the first application doesn't work.
 Here what I do:
 Deploy the second application, it does not work, the first application works.
 To connect the second application via jndi I create my_app1.xml with a
 resource section and put under Catalina/localhost.
 So under Catalina/localhost i have my_app.xml and my_app1.xml.
 Redeploy the second and the forst applications, the second still does
 not work but now does not work also the first application.


 What do you mean by does not work?
 What are the symptoms, messages etc.

 Here is the message error of the first application:

 org.jruby.rack.RackInitializationException: The driver encountered an
 unknown error: Cannot create JDBC driver of class
 'org.postgresql.Driver' for connect URL



 Where did you place your JDBC drivers?
 I'd say that they should be in $CATALINA_BASE/lib, and NOT in any of your 
 wars.

 My drivers are under $CATALINA_BASE/lib, I use only postgres.

Are you setting path or docBase in your Context XML?

Can you post the exact file content, password redacted etc?


p




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


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



Re: Odd behavior observed on Eclipse's tomcat: added webapp silently ignored...

2012-12-17 Thread Pid *
On 16 Dec 2012, at 22:03, Julien Martin bal...@gmail.com wrote:

 Hello,

 After adding a webapp (war) to my Eclipse's Tomcat (7.0.34), I
 unfortunately noticed that tomcat does add it to the server but doesn't
 attempt to deploy it!!

 The only suspicious log was the following one:

 *ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
 property 'source' to 'org.eclipse.jst.jee.server:kadjoukor' did not find a
 matching property*

It is not a problem, it's just a warning.

Eclipse adds this property to Context elements for its own purposes.


p



 *
 *
 FYI, this started occuring after I added the latest tomcat server (7.0.34)
 to eclipse. Also my app is called *kadkjoukor*.

 Can anyone please help?

 Regards,

 Julien.
 *
 *

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



Re: Tomcat 6.0 - http client

2012-12-14 Thread Pid
On 14/12/2012 11:03, vicky007aggar...@yahoo.co.in wrote:
 Hello Guys,
 
 I am facing response latency issue when i am invoking the web service call ( 
 deployed  on tomcat 6.x) from an http client.
 
 Can some body please share /let me know what are recommended configuration 
 settings which i need to take care of at the http client  at the tomcat 
 level.
 I guess that is the issue.

Maybe your webservice is just really slow?


p

 Secondly, which tomcat threads i need to monitor, as in threads dumps i am 
 seeing different types of threads like http ,TP,scheduler etc. it will be 
 great if you guys can suggest how to analyze these thread dumps
 
 Thanks
 Vicky
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat uses only a single Core

2012-12-13 Thread Pid
On 13/12/2012 19:44, spr...@gmx.eu wrote:
 Hi,
 
 I have an application running on Tomcat 7 on a 8-Core Linux 64 bit System.
 
 Unfortunately it uses only a single core. I have googled alot about this
 fact but did not found a solution, even not a clear reason for it.
 
 What can be the problem here?

Your app is single threaded?


p

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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 6.0 CLASSPATH query

2012-12-09 Thread Pid *
On 8 Dec 2012, at 20:57, vicky007aggar...@yahoo.co.in
vicky007aggar...@yahoo.co.in wrote:

 Thanks Mark

 Sorry for the confusion i created related to my requirements.
 5 Out of 6  requirements you stated below are correct. The last point i.e 
 $CATALINA_BASE is writable. I can manipulate/write files to this location.
 So now do you have anything more to add to your proposed solution as you 
 suggested below

1. Please stop top-posting.
2. Put your resources in CATALINA_BASE/lib


p







 Thanks,
 Vicky



 On Dec 9, 2012, at 2:09 AM, Mark Eggers its_toas...@yahoo.com wrote:

 See at the end for a truly spectacularly bad potential solution. Note that I 
 have not tried this, so your mileage may vary.

 On 12/8/2012 11:51 AM, vicky wrote:
 Thanks Mark for your valuable suggestions.

 But in my project i have a requirement to share one
 resource/properties file  across 10 applications deployed on single
 tomcat instance

 We cannot afford to add the same properties file to all archives as
 its contents keep changing.

 Another restriction which i have is that i cannot place any file
 under $CATALINA_HOME directories , these are read only for us.

 Based on afore said concerns, do you have any better way out ..please
 suggest.

 Appreciated all of your help

 Thanks for ur time Vicky


  From: Mark Eggers
 its_toas...@yahoo.com To: Tomcat Users List
 users@tomcat.apache.org Sent: Sunday, 9 December 2012 12:23 AM
 Subject: Re: Tomcat 6.0 CLASSPATH query

 Comments inline below (a bit fuzzy from the move yet).

 On 12/8/2012 9:58 AM, vicky wrote:

 I have read the Tomcat 6.0 classloader documentation(below link),
 from this what i understood is that the
 classes/jar/resource/properties file get loaded  from the
 following locations

 1.Bootstrap classes of your JVM  ($JAVA_HOME/jre/lib/ext).
 2.System class loader classes  ( Add bootstrap.jar 
 tomcat-juli.jar to CLASSPATH variable) 3.Common class loader
 classes ( refers $CATALINA_BASE/lib   $CATALINA_HOME/lib )  uses
 $CATALINA_BASE/conf/catalina.properties 4. /WEB-INF/classes of
 your web application 5. /WEB-INF/lib/*.jar of your web application

 The thing which is still puzzling me is that how my
 resource/properties files get loaded to Tomcat CLASSPATH when i
 add them to $CATALINA_BASE/bin directory  When i move the same
 files to $CATALINA_BASE/conf directory then it doesn't get added to
 Tomcat CLASSPATH.

 My deployed applications needproperties/resource files , Can
 someone please help me in understand the optimal way of adding
 these files to Tomcat CLASSPATH. Does placing the files under
 CATALINA_BASE/bin is the right approach.Please suggest

 Why in the world are you adding these resource files to Tomcat's
 CLASSPATH? If the resources are application - specific, you don't
 need to do this at all.

 Just add the files to your local application. In Maven, there's a
 special directory for that:

 src/main/resources

 In NetBeans, I normally create a separate package for all of my
 configuration files.

 I think in Eclipse you'll have to make a subdirectory under
 WEB-INF/classes and copy the files there. That's unpleasant. Eclipse
 will include that in the build of the WAR file when you do an
 export.

 Then, just do the following in your code to reference the resource.

 InputStream in =
 this.getClass().getClassLoader().getResourceAsStream(configfile);

 Where configfile is the complete classpath to your resource.

 This is nice. It works in exploded WARs, it works in WAR files, it
 works in JARs.

 No mucking about with CLASSPATH. No polluting other applications or
 Tomcat with spurious application - specific resources. This enables
 you to run several copies of the same web application in the same
 container, all with different configurations.

 Just search for getResourceAsStream() for more explanation.

 In my organisation i cannot add anything to $CATALINA_HOME/lib or
 bin location ,these are read only directories

 http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
 Thanks for your help Vicky

 Not needed.



  From: Pid * p...@pidster.com To:
 Tomcat Users List users@tomcat.apache.org Sent: Saturday, 8
 December 2012 10:34 PM Subject: Re: Tomcat 6.0 CLASSPATH query

 On 8 Dec 2012, at 03:29, vicky007aggar...@yahoo.co.in
 vicky007aggar...@yahoo.co.in wrote:

 Application is deployed under tomcat webapps directory . It
 tries to refer to application specific properties file from
 tomcat classpath, for that we copied it under tomcat bin
 directory.

 My query is that does this is the right way to add properties
 file to tomcat classpath?

 Did you try putting it in tomcat/lib?


 p





 Thanks for ur help, Vicky



 On Dec 8, 2012, at 2:11 AM, Christopher Schultz
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE- Hash: SHA256

 Vicky,

 On 12/7/12 11:48 AM, vicky wrote:
 I have a requirement in which i need to add couple of
 properties files

Re: Tomcat 6.0 CLASSPATH query

2012-12-09 Thread Pid *
On 9 Dec 2012, at 16:58, Christopher Schultz
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Pid,

 On 12/9/12 4:31 AM, Pid * wrote:
 On 8 Dec 2012, at 20:57, vicky007aggar...@yahoo.co.in
 vicky007aggar...@yahoo.co.in wrote:

 Thanks Mark

 Sorry for the confusion i created related to my requirements. 5
 Out of 6  requirements you stated below are correct. The last
 point i.e $CATALINA_BASE is writable. I can manipulate/write
 files to this location. So now do you have anything more to add
 to your proposed solution as you suggested below

 1. Please stop top-posting. 2. Put your resources in
 CATALINA_BASE/lib

 Another option is to use a VirtualClassLoader and add some random path
 (/etc/myawesomewebapps/) to it in all webapps.

 Honestly, I think there are better ways to load shared configuration
 than trying to share a .properties file on the disk.

If the OP is able to edit files in CATALINA_BASE/lib, then editing
catalina.properties and appending a fixed path to common.loader in
each instance would also work.


p


 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with undefined - http://www.enigmail.net/

 iEYEAREIAAYFAlDEwocACgkQ9CaO5/Lv0PDc7gCfUvtH3K16UuRR/PlRzjfeMYin
 jbcAoMB15SHyQq/MDRnwr7Ws8CpWoY6h
 =E9GV
 -END PGP SIGNATURE-

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


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



Re: Tomcat users

2012-12-08 Thread Pid *
On 8 Dec 2012, at 11:00, Raf Roger raf.n...@gmail.com wrote:

 Hi,

 Where can i find a very good documentation or tutorial/video about users
 and roles for tomcat 7.x ?
 i'm new and i must say i'm a little bit confused :(
 thx

 --
 Alain
 ---
 Windows 7 x64 / Fedora 17 x64
 MySQL 5.5.28
 Apache 2.4.3 / OpenSSL 1.0.1c
 Tomcat 7.17

Don't use this version, (presumably you meant 7.0.17), use the latest
version. 7.0.33 or 7.0.34 depending on when you read this.


p


 PHP 5.4.8




 --
 Alain
 ---
 Windows 7 x64 / Fedora 17 x64
 MySQL 5.5.28
 Apache 2.4.3 / OpenSSL 1.0.1c
 Tomcat 7.17
 PHP 5.4.8

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



Re: Tomcat 6.0 CLASSPATH query

2012-12-08 Thread Pid *
On 8 Dec 2012, at 03:29, vicky007aggar...@yahoo.co.in
vicky007aggar...@yahoo.co.in wrote:

 Application is deployed under tomcat webapps directory . It tries to refer to 
 application specific properties file from tomcat classpath, for that we 
 copied it under tomcat bin directory.

 My query is that does this is the right way to add properties file to tomcat 
 classpath?

Did you try putting it in tomcat/lib?


p




 Thanks for ur help,
 Vicky



 On Dec 8, 2012, at 2:11 AM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Vicky,

 On 12/7/12 11:48 AM, vicky wrote:
 I have a requirement in which i need to add couple of properties
 files to tomcat CLASSPATH as these are needed for my application
 deployed in Tomcat 6.0.

 One strange thing is that, i need to add the all my properties
 files to CATALINA_BASE/bin directory else these all wont get
 added to Tomcat classpath.

 Where does the code live that attempts to load those properties files?

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with undefined - http://www.enigmail.net/

 iEYEAREIAAYFAlDCVJcACgkQ9CaO5/Lv0PBTogCgoXLXbB5jx///m6qC+ZxO0f20
 xO8An2SZPU8E0LuiPpQRCZPVw8v/T66L
 =Jmvq
 -END PGP SIGNATURE-

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

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


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



Re: Z/OS CICS Support

2012-12-08 Thread Pid *
On 6 Dec 2012, at 15:33, Shaik Jani - Cincinnati-AMIG jsh...@amig.com wrote:

 What I meant was can we access mainframe resources in Tomcat?

Depending on how those resources are really exposed, the usual answer is yes.

Sometimes those resources are really exposed using web services or JMS
queues, in which case the standard means of accessing those resources
is the same as it would be if they were not on a mainframe.

Alternatively you might just need to use the Java library provided by
the vendor.


p




 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com]
 Sent: Thursday, December 06, 2012 10:30 AM
 To: Tomcat Users List
 Subject: Re: Z/OS CICS Support

 Shaik Jani - Cincinnati-AMIG wrote:
 Hi,



 We are replacing websphere application server, so would like to know whether 
 tomcat has CICS support to access mainframe resources.

 Should you not be asking IBM for this ?
 (that's only after Googling for CICS Support)


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


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


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



Re: Suggestion for improving Tomcat startup performance...

2012-12-05 Thread Pid
On 05/12/2012 01:05, Tony Anecito wrote:
 Also, if there is some other email group I should be using for technical 
 questions about use of Tomcat please let me know.

No, this is it.


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Veritas Clustering for Tomcat

2012-12-03 Thread Pid *
On 3 Dec 2012, at 06:53, Sameera, Shaakunthala
shaakunth...@millenniumit.com wrote:

 Hi Pid,

 Please see my responses in-line below.

 Thanks!
 -- Shaakunthala

 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: Friday, November 30, 2012 5:17 PM
 To: Tomcat Users List
 Subject: Re: Veritas Clustering for Tomcat

 On 30/11/2012 06:36, Sameera, Shaakunthala wrote:
 Hi,

 Is there a Veritas clustering agent available for Tomcat?

 A what?  What does it do?

 [Shaakunthala: ] Veritas is a high availability clustering software by 
 Symantec. My  actual requirement is to integrate JIRA with Veritas and run in 
 high availability mode. And, JIRA is only supported on Tomcat.

 An agent is a component which monitors the application and perform the 
 failover whenever a problem occurs.


 As per the following page, currently there's no agent available.
 https://sort.symantec.com/agents

 Symantec want me to accept some kind of license agreement before looking at 
 their website, which as I'm disinclined to use my time doing, I can't see 
 what you're referring to.

 [Shaakunthala: ] Sorry about that. I found it on Wikipedia [ 
 http://en.wikipedia.org/wiki/Veritas_Cluster_Server ].
 Veritas clustering agents are available for Apache, JBoss and few other open 
 source software as well. Wondering why there's no agent for Tomcat. Perhaps 
 it's Symantec's job to develop the agent?

Yup.
I have not heard of their solution before.


p


 Are there any alternatives?

 Perhaps you could explain what it is, what you're trying to achieve, give us 
 a bit of context and then we can help.


 p




 --

 [key:62590808]



 This e-mail transmission (inclusive of any attachments) is strictly 
 confidential and intended solely for the ordinary user of the e-mail address 
 to which it was addressed. It may contain legally privileged and/or 
 CONFIDENTIAL information. The unauthorized use, disclosure, distribution 
 printing and/or copying of this e-mail or any information it contains is 
 prohibited and could, in certain circumstances, constitute an offence. If you 
 have received this e-mail in error or are not an intended recipient please 
 inform the sender of the email and MillenniumIT immediately by return e-mail 
 or telephone (+94-11) 2416000. We advise that in keeping with good computing 
 practice, the recipient of this e-mail should ensure that it is virus free. 
 We do not accept responsibility for any virus that may be transferred by way 
 of this e-mail. E-mail may be susceptible to data corruption, interception 
 and unauthorized amendment, and we do not accept liability for any such 
 corruption, interception or amendment or any consequences thereof.  
 www.millenniumit.com


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



Re: 答复: Re:Tomcat7.0-Setting property 'threadPriority' did not find a matching property

2012-12-03 Thread Pid *
On 3 Dec 2012, at 05:43, Weixiang kurt.weixi...@huawei.com wrote:

 Thank you, after I changed 'java.lang.Thread#MAX_PRIORITY' to integer '10', 
 the warning disappeared in tomcat 7.

 But I user 'java.lang.Thread#MAX_PRIORITY' in tomcat 6.0.35 and there's no 
 any warning.

 So I was wondering whether the tomcat 6 block this warning or not?

I'd be interested to hear about the load profile and application
behaviour you are attempting to modify (improve?).


p



 -邮件原件-
 发件人: xueshengzj [mailto:xueshen...@163.com]
 发送时间: 2012年12月3日 13:36
 收件人: Tomcat Users List
 主题: Re:Tomcat7.0-Setting property 'threadPriority' did not find a matching 
 property

 Hi, have you seen the error that show it. It tell us that the property is not 
 matched.  The thread priority for threads in the executor, the default is 
 Thread.NORM_PRIORITY. It should return integer.






 在 2012-12-03 12:53:08,Weixiang kurt.weixi...@huawei.com 写道:


 Tomcat version:7.0.29



 Question:

 I config in my server.xml for a HTTP Connector named “MGMT”:



 threadPriority=java.lang.Thread#Thread.MAX_PRIORITY



 When application is starting up,the catalina.out gives some warning 
 information:



 WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 
 'threadPriority' to 'java.lang.Thread#MAX_PRIORITY' did not find a matching 
 property.



 I search on google and did not get any useful help;



 I also search documentation on the apache.org and make sure that 
 'threadPriority' is a legal attribute for HTTP Connector,so I wonder why 
 would this warning information will come up.



 Please tell me what’s wrong, Thank you!



  Patch my server.xml for more information:



 ?xml version='1.0' encoding='utf-8'?

 !--

  Licensed to the Apache Software Foundation (ASF) under one or more

  contributor license agreements.  See the NOTICE file distributed with

  this work for additional information regarding copyright ownership.

  The ASF licenses this file to You under the Apache License, Version 2.0

  (the License); you may not use this file except in compliance with

  the License.  You may obtain a copy of the License at



  http://www.apache.org/licenses/LICENSE-2.0



  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an AS IS BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

 --

 !-- Note:  A Server is not itself a Container, so you may not

 define subcomponents such as Valves at this level.

Documentation at /docs/config/server.html

 --

 Server port=-1 shutdown=SHUTDOWN

  !-- Security listener. Documentation at /docs/config/listeners.html

  Listener className=org.apache.catalina.security.SecurityListener /

  --

  !--APR library loader. Documentation at /docs/apr.html --

  Listener className=org.apache.catalina.core.AprLifecycleListener 
 SSLEngine=on /

  !--Initialize Jasper prior to webapps are loaded. Documentation at 
 /docs/jasper-howto.html --

  Listener className=org.apache.catalina.core.JasperListener /

  !-- Prevent memory leaks due to use of particular java/javax APIs--

  Listener 
 className=org.apache.catalina.core.JreMemoryLeakPreventionListener /

  Listener 
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

  Listener 
 className=org.apache.catalina.core.ThreadLocalLeakPreventionListener /

  !-- Global JNDI resources

   Documentation at /docs/jndi-resources-howto.html

  --

  GlobalNamingResources

!-- Editable user database that can also be used by

 UserDatabaseRealm to authenticate users

--

Resource name=UserDatabase auth=Container

  type=org.apache.catalina.UserDatabase

  description=User database that can be updated and saved

  factory=org.apache.catalina.users.MemoryUserDatabaseFactory

  pathname=conf/tomcat-users.xml /

  /GlobalNamingResources



  !-- A Service is a collection of one or more Connectors that share

   a single Container Note:  A Service is not itself a Container,

   so you may not define subcomponents such as Valves at this level.

   Documentation at /docs/config/service.html

   --

  Service name=Catalina



!--The connectors can use a shared executor, you can define one or more 
 named thread pools--

!--

Executor name=tomcatThreadPool namePrefix=catalina-exec-

maxThreads=150 minSpareThreads=4/

--



!-- A Connector represents an endpoint by which requests are received

 and responses are returned. Documentation at :

 Java HTTP Connector: /docs/config/http.html (blocking  non-blocking)

 Java AJP  Connector: /docs/config/ajp.html

 APR (HTTP/AJP) Connector: /docs/apr.html

 Define a non-SSL HTTP/1.1 Connector on port 8080

--




Re: 答复: Re:Tomcat7.0-Setting property 'threadPriority' did not find a matching property

2012-12-03 Thread Pid
On 03/12/2012 15:31, Christopher Schultz wrote:
 Pid,
 
 On 12/3/12 3:35 AM, Pid * wrote:
 On 3 Dec 2012, at 05:43, Weixiang kurt.weixi...@huawei.com
 wrote:
 
 Thank you, after I changed 'java.lang.Thread#MAX_PRIORITY' to
 integer '10', the warning disappeared in tomcat 7.

 But I user 'java.lang.Thread#MAX_PRIORITY' in tomcat 6.0.35 and
 there's no any warning.

 So I was wondering whether the tomcat 6 block this warning or
 not?
 
 I'd be interested to hear about the load profile and application 
 behaviour you are attempting to modify (improve?).
 
 If you increase the thread priority, the threads will run faster. Duh.

Quite.  Alternatively, it might be the case that setting the thread
priority will have no measurable effect at all.  If any effect.


The OP is trying to set the thread priority on what appears to be an
HTTP connector (marked in a comment for 'management').

Of the 3 connectors configured, the config is as follows:

 port   protocol   threads  accept
 13089  BIO+HTTP   120  200
 13080  NIO+HTTP   1200 2000
 13443  NIO+HTTPS  200  2000

The value of the acceptCount attributes are bonkers, IMHO.  This should
never be larger than the number of threads in the pool - if the apps
really need to support 1200 inbounds, either increase the number of
threads or add another Tomcat instance.

The HTTPS thread count value (being the default) *may* be
accurate/appropriate or it might not, but it seems low given the other
numbers.


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: tomcat 7 udp connector

2012-12-01 Thread Pid
On 01/12/2012 17:22, Mark Eggers wrote:
 On 12/1/2012 5:16 AM, Jost Boekemeier wrote:
 Hello,

 I am developing a JEE web application which has to handle HTTP, TCP
 and UDP connections.

 Can Tomcat = 7 handle raw TCP and UDP connections? Are there
 extensions (connectors?) available which can handle them?

 *I am aware of mina.apache.org, and I can write my own socket server,
 so please don't point me to these solutions. The requirement is a JEE
 (Tomcat) web app.*


 I think persistent TCP connections should easy to implement. But what
 about UDP?


 Any pointers welcome.


 Regards, Jost Bökemeier

 
 Jost,
 
 I wrote up a nice analysis of how you can accomplish your goals. Then I
 read the following lines:
 
 *I am aware of mina.apache.org, and I can write my own socket server,
 so please don't point me to these solutions. The requirement is a JEE
 (Tomcat) web app.*
 
 I glanced at the Tomcat code, and it seems to be built in complete
 protocol stacks (HTTP, AJP, clustering). So without major Tomcat surgery
 I don't think so.
 
 I was thinking of a command and control application along with a
 stand-alone server, much like Derby has:
 
 http://db.apache.org/derby/docs/10.1/adminguide/cadminservlet98430.html
 
 However, the above constraint eliminates that approach.
 
 There are some really interesting hackish ways to approach this (JNDI
 beans for clients, ServletContextListener to start servers), but that's
 far off the beaten path.
 
 Maybe if you stepped back and wrote what you're trying to accomplish
 people can suggest some approaches.
 
 All of that is probably quite a bit off-topic from the mailing list.

Well, that saves me some work.

I'll just add the following: it's really important to comprehend that
Tomcat is a Servlet Container and by extension, to understand what a
Servlet Container is.

Reading an appropriate version of the Servlet Specification is therefore
a good idea.


p




-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: tomcat 7 udp connector

2012-12-01 Thread Pid
On 01/12/2012 21:15, Jost Boekemeier wrote:
 Hi,
 
 I don't think tomcat is hard-wired the way you suggest.

[sigh] Suggest?

Tomcat, as does the Servlet Spec, focuses on web applications, ie ones
served over HTTP.

The Connector implementations are configurable, but there is no UDP
implementation shipped with Tomcat.  Nor is there a raw Servlet, TCP
implementation.


 And the servlet spec doesn't require http. 

What a strange statement.

The javax.servlet.http package, (being part of the spec), does rather
seem to focus on it and the 3.0 spec mentions HTTP on a fairly large
number of it's pages.


 In the past I've written a
 servlet container which uses raw tcp instead of http.

Smashing.


 The tomcat jee container is needed by php java bridge to rund php code from
 Java.

Is that the context of your problem, or just some random info?


 Probably the tomcat dev ml is more appropriate.

Ahh, the dismissal.  Bueno.


p


 Am 01.12.2012 21:50 schrieb Pid p...@pidster.com:
 
 On 01/12/2012 17:22, Mark Eggers wrote:
 On 12/1/2012 5:16 AM, Jost Boekemeier wrote:
 Hello,

 I am developing a JEE web application which has to handle HTTP, TCP
 and UDP connections.

 Can Tomcat = 7 handle raw TCP and UDP connections? Are there
 extensions (connectors?) available which can handle them?

 *I am aware of mina.apache.org, and I can write my own socket server,
 so please don't point me to these solutions. The requirement is a JEE
 (Tomcat) web app.*


 I think persistent TCP connections should easy to implement. But what
 about UDP?


 Any pointers welcome.


 Regards, Jost Bökemeier


 Jost,

 I wrote up a nice analysis of how you can accomplish your goals. Then I
 read the following lines:

 *I am aware of mina.apache.org, and I can write my own socket server,
 so please don't point me to these solutions. The requirement is a JEE
 (Tomcat) web app.*

 I glanced at the Tomcat code, and it seems to be built in complete
 protocol stacks (HTTP, AJP, clustering). So without major Tomcat surgery
 I don't think so.

 I was thinking of a command and control application along with a
 stand-alone server, much like Derby has:

 http://db.apache.org/derby/docs/10.1/adminguide/cadminservlet98430.html

 However, the above constraint eliminates that approach.

 There are some really interesting hackish ways to approach this (JNDI
 beans for clients, ServletContextListener to start servers), but that's
 far off the beaten path.

 Maybe if you stepped back and wrote what you're trying to accomplish
 people can suggest some approaches.

 All of that is probably quite a bit off-topic from the mailing list.

 Well, that saves me some work.

 I'll just add the following: it's really important to comprehend that
 Tomcat is a Servlet Container and by extension, to understand what a
 Servlet Container is.

 Reading an appropriate version of the Servlet Specification is therefore
 a good idea.


 p




 --

 [key:62590808]


 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Veritas Clustering for Tomcat

2012-11-30 Thread Pid
On 30/11/2012 06:36, Sameera, Shaakunthala wrote:
 Hi,
 
 Is there a Veritas clustering agent available for Tomcat?

A what?  What does it do?


 As per the following page, currently there's no agent available.
 https://sort.symantec.com/agents

Symantec want me to accept some kind of license agreement before looking
at their website, which as I'm disinclined to use my time doing, I can't
see what you're referring to.


 Are there any alternatives?

Perhaps you could explain what it is, what you're trying to achieve,
give us a bit of context and then we can help.


p


 Thanks in advance.
 
 
 With thanks and best regards,
 
 Sameera Shaakunthala | Systems Administrator - Management Information Systems
 MillenniumIT | A member of the London Stock Exchange Group
 No 1, Millennium Drive, Malabe, Sri Lanka
 * Mobile: +94 77 737 4799 | +94 71 601 1924 | Work: +94 11 241 6000 ext. 26182
 Email: shaakunth...@millenniumit.commailto:shaakunth...@millenniumit.com| 
 Web: www.millenniumit.comhttp://www.millenniumit.com/
 
 
 
 This e-mail transmission (inclusive of any attachments) is strictly 
 confidential and intended solely for the ordinary user of the e-mail address 
 to which it was addressed. It may contain legally privileged and/or 
 CONFIDENTIAL information. The unauthorized use, disclosure, distribution 
 printing and/or copying of this e-mail or any information it contains is 
 prohibited and could, in certain circumstances, constitute an offence. If you 
 have received this e-mail in error or are not an intended recipient please 
 inform the sender of the email and MillenniumIT immediately by return e-mail 
 or telephone (+94-11) 2416000. We advise that in keeping with good computing 
 practice, the recipient of this e-mail should ensure that it is virus free. 
 We do not accept responsibility for any virus that may be transferred by way 
 of this e-mail. E-mail may be susceptible to data corruption, interception 
 and unauthorized amendment, and we do not accept liability for any such 
 corruption, interception or ame
ndment or any consequences thereof.  www.millenniumit.com 
 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Error page messages

2012-11-30 Thread Pid
On 30/11/2012 21:00, Leo Donahue - RDSA IT wrote:
 Are there standardized server responses that one should expect to see when 
 dealing with java.lang, javax.servlet and javax.faces exceptions that should 
 be displayed to the client?

You mean status codes or error pages?

If an exception isn't handled* by the app then it's 500 and a stacktrace
if you haven't configured a custom error page.  Those packages probably
have a few tens of exceptions that could be thrown.


 I don't know that I would expect to see any of these on a public website, as 
 I am likely not to care what happens on the server I'm browsing, as long as 
 the server can recover/redirect.

Catch them at the appropriate point in your code, or configure a custom
error page.


p


* uncaught exception is the usual term.

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Error page messages

2012-11-30 Thread Pid
On 30/11/2012 22:09, Leo Donahue - RDSA IT wrote:
 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: Friday, November 30, 2012 3:04 PM
 To: Tomcat Users List
 Subject: Re: Error page messages

 On 30/11/2012 21:00, Leo Donahue - RDSA IT wrote:
 Are there standardized server responses that one should expect to see
 when dealing with java.lang, javax.servlet and javax.faces exceptions that
 should be displayed to the client?

 You mean status codes or error pages?
 
 Error pages.
 

 If an exception isn't handled* by the app then it's 500 and a stacktrace if 
 you
 haven't configured a custom error page.  Those packages probably have a few
 tens of exceptions that could be thrown.


 I don't know that I would expect to see any of these on a public website, 
 as I
 am likely not to care what happens on the server I'm browsing, as long as the
 server can recover/redirect.

 Catch them at the appropriate point in your code, or configure a custom 
 error page.
 
 And what kind of information does one show the user in a custom error page?  
 I don't know of any public facing websites, off hand, that show uncaught 
 exception messages.  I was just trying to decide what I would show, if 
 anything, if I configured a custom error page for certain types of 
 exceptions, such as java.lang, or javax.servlet, or javax.faces.

A polite message saying oops, or a fail whale, or a unicorn...


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Upgrading from Apache Tomcat 7.0.22 to 7.0.32

2012-11-24 Thread Pid
On 23/11/2012 11:50, Aditi Sinha wrote:
 Hi,
 
 What is the best way to upgrade from Tomcat version 7.0.22 to 7.0.32?
 I have gone through the link http://tomcat.apache.org/migration.html but not
 sure what steps should be followed for upgrade.
 We are installing Tomcat using the zip way.

Install a new Tomcat alongside the old one.

Compare the configuration, adjust the new one as required and as per
the docs. NB don't blindly copy old config files.

Stop the old one.

Start the new one.

Deploy your app to it.


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: two questions about websocket in tomcat7.0.30

2012-11-23 Thread Pid *
On 23 Nov 2012, at 03:06, zane_zh...@wistronits.com
zane_zh...@wistronits.com wrote:

 Dears,
  My PC environment are windows XP professional Version 2002 Service Pack 3, 
 JDK1.6, Tomcat7.0.30.
 my Java web project is an internet online chat-room based on websocket. I run 
 the local-host service in Tomcat and then connect my chat-room in chrome,
 if the connection between server and browser is OK, the websocket client side 
 function onopen() will pop up a message open.
  But, the point is if I open several pages at same time, I can see all of 
 pages pop up the message open, it means every connection of page to server 
 is OK.
 but when I try to send some words to server, The server has no response ( in 
 the other word, the server side function onTextMessage() is not called),
 it happen in part of the pages not all of them. I would like to know if you 
 encounter the same problem.
  Excuse me, the second question: how to set the maximum idle time of 
 connection of websocket.
 The set up in server.xml does not work:
 Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=5000
   redirectPort=8443 /
!-- A Connector using the shared thread pool--
!--
Connector executor=tomcatThreadPool
   port=8080 protocol=HTTP/1.1
   connectionTimeout=5000
   redirectPort=8443 /
--


 These is part of the client side code:
 function startWebSocket() {
if ('WebSocket' in window)
{ws = new WebSocket(ws://localhost:8080/MyWebSocket/mywebsocket.do);
}
else if ('MozWebSocket' in window)
{ws = new 
 MozWebSocket(ws://localhost:8080/MyWebSocket/mywebsocket.do);
}
else
alert(not support);

ws.onmessage = function(evt) {
alert(evt.data);
};
ws.onopen = function(evt) {
alert(open);
};
ws.onclose = function(evt) {
alert(close);
};

 }

How have you configured the WebSocket Servlet?


p

 And part of the server side code:
 public class MyMessageInbound extends MessageInbound {

@Override
protected void onBinaryMessage(ByteBuffer arg0) throws IOException {
// TODO Auto-generated method stub

   }

@Override
protected void onTextMessage(CharBuffer msg) throws IOException {
System.out.println(msg.toString());
for (MessageInbound messageInbound : InitServlet.getSocketList()) {
WsOutbound outbound = messageInbound.getWsOutbound();
CharBuffer buffer = CharBuffer.wrap(msg);
outbound.writeTextMessage(buffer);
outbound.flush();
}
}

@Override
protected void onClose(int status) {
InitServlet.getSocketList().remove(this);
super.onClose(status);
System.out.println(getTime()+ connection is closed);
}

@Override
protected void onOpen(WsOutbound outbound) {
super.onOpen(outbound);
InitServlet.getSocketList().add(this);
System.out.println(getTime()+ connection is open);
}

public  String getTime(){
Date now = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat(/MM/dd 
 HH:mm:ss);
String NowTime = dateFormat.format( now );
return NowTime;
}

 }

  I would eagerly look forward to your reply.
 **
 This e-mail is confidential for WistronITS corp. It may be legally 
 privileged. If you are not the Addressee you may not copy,
 forward, disclose or use any part of it. If you have received this message in 
 error, please delete it and all copies from your
 system and notify the sender immediately by return e-mail.Internet 
 communications cannot be guaranteed to be timely,
 secure, error or virus-free. The sender does not accept liability for any 
 errors or omissions.
 ***

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


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



Re: Apache Tomcat upgrade from 6.0.20 to 6.0.36

2012-11-22 Thread Pid *
Read the Tomcat docs for installation and install a new Tomcat
alongside the old one.

Compare the configuration, adjust the new one as required and as per
the docs. NB don't blindly copy old config files.

Stop the old one.

Start the new one.

Deploy your app to it.


p


On 22 Nov 2012, at 08:10, Pankaj Dahiya pankaj_dah...@infosys.com wrote:

 Saw some links on internet.

 We will be making the upgrade on Linux. It was deployed long back so not sure 
 how was this completed earlier.

 Regards,
 Pankaj Dahiya | Infosys, Chandigarh | +91 172 5021100 x 6536, +91 9646338213 
 | www.infosys.com


 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com]
 Sent: Wednesday, November 21, 2012 5:11 PM
 To: Tomcat Users List
 Subject: Re: Apache Tomcat upgrade from 6.0.20 to 6.0.36

 Pankaj Dahiya wrote:
 Dear All,

 We would want to upgrade from Apache Tomcat 6.0.20 to 6.0.36.
 I did see some information in this regard

 where ?

 but could not find the exact steps. If someone can, please list down the 
 required steps
 that will be really appreciable.

 If you want some focused help, tell us on which platform you'd like to do 
 this.
 The procedure is obviously different under Windows compared to Unix/Linux.
 Also, how was your current Tomcat version installed ?


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


  CAUTION - Disclaimer *
 This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
 for the use of the addressee(s). If you are not the intended recipient, please
 notify the sender by e-mail and delete the original message. Further, you are 
 not
 to copy, disclose, or distribute this e-mail or its contents to any other 
 person and
 any such actions are unlawful. This e-mail may contain viruses. Infosys has 
 taken
 every reasonable precaution to minimize this risk, but is not liable for any 
 damage
 you may sustain as a result of any virus in this e-mail. You should carry out 
 your
 own virus checks before opening the e-mail or attachment. Infosys reserves the
 right to monitor and review the content of all messages sent to or from this 
 e-mail
 address. Messages sent to or from this e-mail address may be stored on the
 Infosys e-mail system.
 ***INFOSYS End of Disclaimer INFOSYS***
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


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



Re: Tomcat 6.0.18 Caching Question

2012-11-22 Thread Pid *
On 22 Nov 2012, at 07:15, Sekar, Vasanth vasanth.se...@supervalu.com wrote:

 Hello-
 I am working on a project where we are migrating a web app from JRUN 4.0
 to Tomcat 6.0 and facing some sort of caching problem with one of the
 functionality.

You refer to Tomcat 6.0.18 in the subject, why would you 'upgrade' to
a really old version of Tomcat when 6.0.36 is available with very many
important fixes?


 The same jsp:include code works fine in JRUN server but
 in Tomcat for the page to work properly I have to clear the cache under
 work/catalina before accessing the page every time.

 I thought initially it was some browser cache but that doesn't seem to
 be the case. Clearing the browser cache did not help and only emptying
 the contents in work/catalina seems to do the trick. I understand that
 there is a way to prevent this caching under work/catalina but trying to
 figure out if there is a way where I can explicitly tell Tomcat to
 recompile this particular jsp file upon each request. I looked at JRUN
 to see if it was caching that particular JSP page and even it does it as
 well.

 Issue details:
 We are having a list that populates the data from database. For example:
 page number field with values 0,1,2,3,4 

Ok so far.

 On first time, it does show the proper page selected value - say 4.

Not enough information to understand what this means. Can you post
code or explain in more detail please?


 The
 next time when we try to access it the selected value does not show up
 correctly and it just defaults the first record in the drop down - 0.

 I did view source of the html and see the select tag not present upon
 future requests.

So the entire SELECT form element is missing?


 When I empty the content in nwork/catalina (no tomcat
 restart) then it recompiles the file and would show up the proper value.

Still pretty vague as to what you are doing...


p


 The same code works fine in JRUN and am trying to figure out how to get
 this working in Tomcat without having to clear Tomcat cache.

 If anyone has some thoughts to debug this situation further, please shed
 some light.

 Thank you,
 Regards,
 Vasanth Sekar



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


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



Re: Need help to understand CVE-2007-0450

2012-11-22 Thread Pid *
On 22 Nov 2012, at 07:34, Aditi Sinha adisinha0...@gmail.com wrote:

 Hi Mark, Chuck,

 Thanks for the explanation.

 On checking found that, below system properties are set to true by our
 application for a requirement.
 org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH:
 true

 org.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH: true

 Is there any other workaround/solution which can help us make our
 application secure w.r.t this vulnerability?

Maybe I'm missing something, but I'm  not sure I've seen evidence that
there is a vulnerability and that this isn't a false positive.


p





 Thanks  Regards,
 Aditi

 On Wed, Nov 21, 2012 at 8:00 PM, Mark Thomas ma...@apache.org wrote:

 On 21/11/2012 13:40, Aditi Sinha wrote:
 Hi,

 We have a web server hosted on Tomcat 7.0.22.

 There are two connectors defined server.xml listening at port 8080 and
 8443.
 During vulnerability scan a 3rd party tool reported  CVE-2007-0450
 “Apache
 Tomcat Directory Traversal Attack” on both ports 8080 and 8443.
 The tool was able to access the Tomcat manager application with the
 following URL :
 http://localhost:8080/scripts/\../manager/html

 As per Tomcat security documents the issue is not present in Tomcat 7.

 First of all, a clean Tomcat 7.0.22 install will return 400 Bad
 Request if you try accessing that install.

 The problem is that \ is not a valid character in a URL so Tomcat -
 rightly - complains.

 It is possible to get Tomcat to treat \ as / by setting the
 following system property:
 -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true

 There is a reason that property is in the security section and that the
 default is false. Setting it to true can have unexpected
 consequences (CVE-2010-0450) when Tomcat is used in conjunction with
 reverse proxies.

 If a value of true is used then Tomcat will retreat the URL above as
 http://localhost:8080/scripts//../manager/html

 which will be normalized to:
 http://localhost:8080/manager/html

 Given you appear to be accessing Tomcat directly, even with
 ALLOW_BACKSLASH=true this is not a directory traversal. It is a
 non-normalized URL that is being normalized which is perfectly normal.

 Mark


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



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



Re: Need help to understand CVE-2007-0450

2012-11-22 Thread Pid
On 22/11/2012 09:52, Aditi Sinha wrote:
 Hi Andre,
 
 Agree with your points.
 
 Just wanted to know more about  “Directory Traversal Attack.
 Can it lead to access of directories outside Tomcat/webapps folder also

For the last time, this is in all probability a false positive due to a
crappy implementation of a vulnerability scanner.

Test it yourself.  Are you able to access a directory or file below the
level of the webapps directory, simply by using a specially crafted request?

If the answer is no, you have your answer.


p


  or can it just try to access the applications within Tomcat/webapps
 folder only?
 
 
 Thanks  Regards,
 Aditi
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 6.0.18 Caching Question

2012-11-22 Thread Pid
On 22/11/2012 16:29, Mark Thomas wrote:
 On 22/11/2012 15:39, Sekar, Vasanth wrote:
 That's the standard version that we have inside our environment for Prod 
 move at this point.
 Tomcat 7.0.8 build is underway but not in our Prod environment yet. So, for 
 now
 I have to use the current standard version and hence using this particular 
 version 6.0.18.

If the Tomcat 7.x build is still underway, why don't pop over to
whoever's desk it is that's doing the work and point out that 7.0.33,
(that's *thirty-three* on the end there), is 25 releases after the out
of date one that they're planning to install... ?


 6.0.18 and 7.0.8?
 
 Have you read the security vulnerability pages?

Maybe he's emailing us from the year 2008.


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Need help to understand CVE-2007-0450

2012-11-21 Thread Pid *
On 21 Nov 2012, at 14:59, André Warnier a...@ice-sa.com wrote:

 Caldarale, Charles R wrote:
 From: Aditi Sinha [mailto:adisinha0...@gmail.com] Subject: Need help to 
 understand CVE-2007-0450
 We have a web server hosted on Tomcat 7.0.22.
 The tool was able to access the Tomcat manager application with the
 following URL :

What scanning tool, exactly?
How can I reproduce this?


 http://localhost:8080/scripts/\../manager/html
 As per Tomcat security documents the issue is not present in Tomcat 7.
 Is there anything wrong in our web application deployment?
 As documented here:
 http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10
 there are two Java system properties that control behavior of Tomcat with 
 regard to such URLs.  Make sure neither is enabled.

 Just barging in here with my own question : is the above really to be 
 considered as a Tomcat failure ?

Such automated scanning tools are notorious for false positives.


p

 The call is made directly to Tomcat from localhost (obviously), which is 
 allowed for the Manager application.
 The URL, as stated, seems valid to me.  It will just result in 
 /scripts/../manager/ being equivalent to /manager/, and the resulting URL 
 is correct and allowed.

 I fail to see the problem (but I may be missing something).

 The special properties mentioned above address an issue where there is a 
 front-end Apache server proxying to Tomcat, and which would have only 
 /scripts/ proxied to Tomcat.
 This would allow the call to be proxied (because it matches /scripts, and 
 then resolved by Tomcat to a non-proxied (but valid) context.
 But I think that the case above is different, as there is apparently no proxy 
 involved.

 (And anyway, if this was ever an issue, in my opinion it would have more to 
 do with a proxy module weakness - or a lax configuration - than with Tomcat 
 per se).




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


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



Re: Tomcat ROOT webapp homepage

2012-11-20 Thread Pid
On 15/11/2012 21:33, Leo Donahue - RDSA IT wrote:
 -Original Message-
 From: Pid * [mailto:p...@pidster.com]
 Sent: Thursday, November 15, 2012 2:25 PM
 Subject: Re: Tomcat ROOT webapp homepage

 On 15 Nov 2012, at 18:06, Leo Donahue - RDSA IT
 leodona...@mail.maricopa.gov wrote:

 Who designed the Tomcat ROOT webapp homepage?

 Which version? 7.0 = me.
 
 Yes, sorry. 7.0.32
 
 Was it just notepad as the design tool?

 Not notepad, why?
 
 I like the layout and wanted to know how you came up with the rounded divs 
 that look nice in Firefox.  I saw the css page that specified the rounded 
 nature of those lower boxes (answered that myself since original post).  Too 
 bad IE9 can't get on the wagon and display those right.
 
 What did you use to visualize the overall layout?  Or did you just sketch it 
 out in your head?  Either way, nice work.

I used a TextMate  a browser.  HTML + CSS + F5 == instant feedback, no
need for a GUI tool.


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: TC 6.0.2*: Dynamically-compiled jsps/tags not being loaded

2012-11-20 Thread Pid *
On 20 Nov 2012, at 13:42, Jim open...@gmail.com wrote:

 Thanks for the question -- I worded that part awkwardly.

 Our project has a root-level /src directory with the web app's Java files, 
 and a root-level /war directory with the exploded non-Java files (static 
 assets, JSPs, etc.).  When developing, Eclipse compiles the /src directory 
 into the /war/WEB-INF/classes directory, and then copies any changed files 
 from /war into its embedded Tomcat instance.

 When we switch Git branches, that could change the .jsp/.tag files inside the 
 /war directory, but depending on the branch, those changed files might have 
 an earlier modified-timestamp than the .jsp/.tag files that have already been 
 copied over to the embedded Tomcat's exploded webapp directory.  So my 
 thought was that those files would not, then, be recompiled, and so at 
 runtime, Tomcat would be using the older versions of those files that are 
 cached in Tomcat's /work directory.  I think that theory is countered, 
 however, by my colleague's claim that she clears out /work before deploying 
 a new branch, and also my own experience wherein I watched Tomcat re-compile 
 the .tag file into the /work directory, yet still claim the tag's class 
 cannot be resolved.

 But to clarify: no part of Tomcat itself, including /work, is kept under 
 version control.

 -- Jim


 On 11/20/12 2:18 AM, Pid * wrote:
 On 19 Nov 2012, at 23:58, Jim open...@gmail.com wrote:

 Hello!

 My team has been having an issue wherein our application occasionally fails 
 to start up because Tomcat claims it can't find find a dynamically-created 
 classfile.  This doesn't happen all the time, and restarting Tomcat (albeit 
 more than once, sometimes) resolves it.

 For example, I just started my Tomcat 6.0.26 instance (via Eclipse WTP, on 
 OS 10.7.5), tried to load a page, and got:

 ** snip **

 An error occurred at line: 1 in the jsp file: 
 /WEB-INF/jsp/about/about_impact.jsp
 org.apache.jsp.tag.web.about_tag cannot be resolved to a type
 1: %@ include file=../common/constants.jsp %templates:about

 ** snip/ **

 The constants.jsp referenced above contains:
 %@ taglib prefix=templates tagdir=/WEB-INF/tags %

 ... and /WEB-INF/tags contains the about.tag file.

 The $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web 
 directory exists, and it contains both about_tag.class and about_tag.java, 
 with timestamps corresponding to when I loaded the page.

 I then deleted those files, and refreshed the page in my browser. 
 about_tag.class and about_tag.java get recreated in that directory, but I 
 still get the above error claiming about_tag can't be resolved.

 I then restarted Tomcat, refreshed the page in my browser, and all is well.


 I've also seen this happen regularly for my Windows-using colleagues, as 
 well as in a non-Eclipse Linux-based 6.0.29 instance, and (hearsay) a 
 colleague reported it happening in his Tomcat 7. Thinking it was a runtime 
 race condition, we also tried telling Tomcat to load the JSP on startup via 
 the web.xml, and while we did see the .java and .class files being created 
 on startup, we still ran into the issue.  We haven't yet tried 
 pre-compiling our JSPs/TAGs before starting Tomcat -- but that shouldn't be 
 necessary, right?

 I'd love some advice/insight in how I might investigate this further, or if 
 there's a gotcha I might be running into.  It feels like a race 
 condition in the classloader, but I don't want to submit a bug report 
 without a reliable test case, of course. Since we can't reliably recreate 
 the situation, I'm having trouble putting that together.

 This seems to happen more often for me when I'm switching between 
 substantially-different Git branches, so I thought it might have to do with 
 the /work directory having older versions of the JSPs/TAGs, but one of my 
 colleagues claims to clean her /work directory every time she switches 
 branches, and before starting Tomcat, and still getting the issue.
 What is the relationship between Git and Tomcat, exactly?

 Does Tomcat load an app (or its files) directly from a version
 controlled file system?


 p



 Thanks in advance for any help!
 Jim

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

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



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

Is any part of the compiled output, under /war in version control?
(It should not be).


p

-
To unsubscribe, e-mail: users-unsubscr

Re: TC 6.0.2*: Dynamically-compiled jsps/tags not being loaded

2012-11-20 Thread Pid *
On 20 Nov 2012, at 19:44, Jim open...@gmail.com wrote:

 No -- the /war/WEB-INF/classes directory is .gitignored, and empty until we 
 deploy, at which point we copy in the compiled .java files, etc.

 I suppose my core question is: if 
 $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class
  exists, what situations could cause Tomcat to give the following error:

 An error occurred at line: 1 in the jsp file: 
 /WEB-INF/jsp/about/about_impact.jsp
 org.apache.jsp.tag.web.about_tag cannot be resolved to a type
 1: %@ include file=../common/constants.jsp %templates:about

 If I delete 
 $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class,
  and re-visit /WEB-INF/jsp/about/about_impact.jsp, 
 $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class
  gets re-created, but I still get the above error.

 So, Tomcat appears to be compiling the JSP fine, but that compiled JSP does 
 not appear to be making it into the classloader?

 -- Jim


 On 11/20/12 2:34 PM, Pid * wrote:
 On 20 Nov 2012, at 13:42, Jim open...@gmail.com wrote:

 Thanks for the question -- I worded that part awkwardly.

 Our project has a root-level /src directory with the web app's Java 
 files, and a root-level /war directory with the exploded non-Java files 
 (static assets, JSPs, etc.).  When developing, Eclipse compiles the /src 
 directory into the /war/WEB-INF/classes directory, and then copies any 
 changed files from /war into its embedded Tomcat instance.

 When we switch Git branches, that could change the .jsp/.tag files inside 
 the /war directory, but depending on the branch, those changed files 
 might have an earlier modified-timestamp than the .jsp/.tag files that have 
 already been copied over to the embedded Tomcat's exploded webapp 
 directory.  So my thought was that those files would not, then, be 
 recompiled, and so at runtime, Tomcat would be using the older versions of 
 those files that are cached in Tomcat's /work directory.  I think that 
 theory is countered, however, by my colleague's claim that she clears out 
 /work before deploying a new branch, and also my own experience wherein I 
 watched Tomcat re-compile the .tag file into the /work directory, yet 
 still claim the tag's class cannot be resolved.

 But to clarify: no part of Tomcat itself, including /work, is kept under 
 version control.

 -- Jim


 On 11/20/12 2:18 AM, Pid * wrote:
 On 19 Nov 2012, at 23:58, Jim open...@gmail.com wrote:

 Hello!

 My team has been having an issue wherein our application occasionally 
 fails to start up because Tomcat claims it can't find find a 
 dynamically-created classfile.  This doesn't happen all the time, and 
 restarting Tomcat (albeit more than once, sometimes) resolves it.

 For example, I just started my Tomcat 6.0.26 instance (via Eclipse WTP, 
 on OS 10.7.5), tried to load a page, and got:

 ** snip **

 An error occurred at line: 1 in the jsp file: 
 /WEB-INF/jsp/about/about_impact.jsp
 org.apache.jsp.tag.web.about_tag cannot be resolved to a type
 1: %@ include file=../common/constants.jsp %templates:about

 ** snip/ **

 The constants.jsp referenced above contains:
 %@ taglib prefix=templates tagdir=/WEB-INF/tags %

 ... and /WEB-INF/tags contains the about.tag file.

 The $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web 
 directory exists, and it contains both about_tag.class and 
 about_tag.java, with timestamps corresponding to when I loaded the page.

 I then deleted those files, and refreshed the page in my browser. 
 about_tag.class and about_tag.java get recreated in that directory, but I 
 still get the above error claiming about_tag can't be resolved.

 I then restarted Tomcat, refreshed the page in my browser, and all is 
 well.


 I've also seen this happen regularly for my Windows-using colleagues, as 
 well as in a non-Eclipse Linux-based 6.0.29 instance, and (hearsay) a 
 colleague reported it happening in his Tomcat 7. Thinking it was a 
 runtime race condition, we also tried telling Tomcat to load the JSP on 
 startup via the web.xml, and while we did see the .java and .class files 
 being created on startup, we still ran into the issue.  We haven't yet 
 tried pre-compiling our JSPs/TAGs before starting Tomcat -- but that 
 shouldn't be necessary, right?

 I'd love some advice/insight in how I might investigate this further, or 
 if there's a gotcha I might be running into.  It feels like a race 
 condition in the classloader, but I don't want to submit a bug report 
 without a reliable test case, of course. Since we can't reliably recreate 
 the situation, I'm having trouble putting that together.

 This seems to happen more often for me when I'm switching between 
 substantially-different Git branches, so I thought it might have to do 
 with the /work directory having older versions of the JSPs/TAGs, but one 
 of my colleagues claims to clean her /work directory every time she 
 switches

Re: TC 6.0.2*: Dynamically-compiled jsps/tags not being loaded

2012-11-20 Thread Pid *
On 20 Nov 2012, at 21:44, Jim open...@gmail.com wrote:

 What I'm getting at is this: your release process should produce a
 .war (or exploded directory) that is copied to Tomcat and that Tomcat
 should not be reading any part of the app from the /war directory - a
 source controlled directory.
 Right: we produce an exploded directory which is then copied to Tomcat.  The 
 exploded /war directory in our project is copied into 
 $CATALINA_HOME/webapps/[name of app].  All of Tomcat, including the /work 
 and /webapps directories, is separate from our source-controlled project.

 To clarify one thing: the JSPs /are/ being compiled, and recompiled.  I will 
 see the classfile for the JSP/tag appear in Tomcat's /work directory, but 
 Tomcat claims it can't find it. If I remove the .class file in the /work 
 directory, and re-visit the JSP, Tomcat will re-compile the .class file, but 
 the page will still fail to load with the same error about not being able to 
 resolve the class.  That latter behavior makes me think that Git/timestamps 
 are a red herring; my problem seems to be that the compilation occurs 
 correctly, but that the classes are sometimes not loaded into the 
 classloader.  Also, when this error happens, restarting Tomcat -- without 
 changing the contents of /webapp/[name of app] at all -- resolves the 
 issue, which hints at some sort of classloading race condition.

 -- Jim

 On 11/20/12 3:40 PM, Pid * wrote:
 On 20 Nov 2012, at 19:44, Jim open...@gmail.com wrote:

 No -- the /war/WEB-INF/classes directory is .gitignored, and empty until we 
 deploy, at which point we copy in the compiled .java files, etc.

 I suppose my core question is: if 
 $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class
  exists, what situations could cause Tomcat to give the following error:

 An error occurred at line: 1 in the jsp file: 
 /WEB-INF/jsp/about/about_impact.jsp
 org.apache.jsp.tag.web.about_tag cannot be resolved to a type
 1: %@ include file=../common/constants.jsp %templates:about

 If I delete 
 $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class,
  and re-visit /WEB-INF/jsp/about/about_impact.jsp, 
 $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class
  gets re-created, but I still get the above error.

 So, Tomcat appears to be compiling the JSP fine, but that compiled JSP does 
 not appear to be making it into the classloader?

 -- Jim


 On 11/20/12 2:34 PM, Pid * wrote:
 On 20 Nov 2012, at 13:42, Jim open...@gmail.com wrote:

 Thanks for the question -- I worded that part awkwardly.

 Our project has a root-level /src directory with the web app's Java 
 files, and a root-level /war directory with the exploded non-Java files 
 (static assets, JSPs, etc.).  When developing, Eclipse compiles the 
 /src directory into the /war/WEB-INF/classes directory, and then 
 copies any changed files from /war into its embedded Tomcat instance.

 When we switch Git branches, that could change the .jsp/.tag files inside 
 the /war directory, but depending on the branch, those changed files 
 might have an earlier modified-timestamp than the .jsp/.tag files that 
 have already been copied over to the embedded Tomcat's exploded webapp 
 directory.  So my thought was that those files would not, then, be 
 recompiled, and so at runtime, Tomcat would be using the older versions 
 of those files that are cached in Tomcat's /work directory.  I think 
 that theory is countered, however, by my colleague's claim that she 
 clears out /work before deploying a new branch, and also my own 
 experience wherein I watched Tomcat re-compile the .tag file into the 
 /work directory, yet still claim the tag's class cannot be resolved.

 But to clarify: no part of Tomcat itself, including /work, is kept 
 under version control.

 -- Jim


 On 11/20/12 2:18 AM, Pid * wrote:
 On 19 Nov 2012, at 23:58, Jim open...@gmail.com wrote:

 Hello!

 My team has been having an issue wherein our application occasionally 
 fails to start up because Tomcat claims it can't find find a 
 dynamically-created classfile.  This doesn't happen all the time, and 
 restarting Tomcat (albeit more than once, sometimes) resolves it.

 For example, I just started my Tomcat 6.0.26 instance (via Eclipse WTP, 
 on OS 10.7.5), tried to load a page, and got:

 ** snip **

 An error occurred at line: 1 in the jsp file: 
 /WEB-INF/jsp/about/about_impact.jsp
 org.apache.jsp.tag.web.about_tag cannot be resolved to a type
 1: %@ include file=../common/constants.jsp %templates:about

 ** snip/ **

 The constants.jsp referenced above contains:
 %@ taglib prefix=templates tagdir=/WEB-INF/tags %

 ... and /WEB-INF/tags contains the about.tag file.

 The $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web 
 directory exists, and it contains both about_tag.class and 
 about_tag.java, with timestamps corresponding to when I loaded the page.

 I then deleted those files

Re: TC 6.0.2*: Dynamically-compiled jsps/tags not being loaded

2012-11-19 Thread Pid *
On 19 Nov 2012, at 23:58, Jim open...@gmail.com wrote:

 Hello!

 My team has been having an issue wherein our application occasionally fails 
 to start up because Tomcat claims it can't find find a dynamically-created 
 classfile.  This doesn't happen all the time, and restarting Tomcat (albeit 
 more than once, sometimes) resolves it.

 For example, I just started my Tomcat 6.0.26 instance (via Eclipse WTP, on OS 
 10.7.5), tried to load a page, and got:

 ** snip **

 An error occurred at line: 1 in the jsp file: 
 /WEB-INF/jsp/about/about_impact.jsp
 org.apache.jsp.tag.web.about_tag cannot be resolved to a type
 1: %@ include file=../common/constants.jsp %templates:about

 ** snip/ **

 The constants.jsp referenced above contains:
 %@ taglib prefix=templates tagdir=/WEB-INF/tags %

 ... and /WEB-INF/tags contains the about.tag file.

 The $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web 
 directory exists, and it contains both about_tag.class and about_tag.java, 
 with timestamps corresponding to when I loaded the page.

 I then deleted those files, and refreshed the page in my browser. 
 about_tag.class and about_tag.java get recreated in that directory, but I 
 still get the above error claiming about_tag can't be resolved.

 I then restarted Tomcat, refreshed the page in my browser, and all is well.


 I've also seen this happen regularly for my Windows-using colleagues, as well 
 as in a non-Eclipse Linux-based 6.0.29 instance, and (hearsay) a colleague 
 reported it happening in his Tomcat 7. Thinking it was a runtime race 
 condition, we also tried telling Tomcat to load the JSP on startup via the 
 web.xml, and while we did see the .java and .class files being created on 
 startup, we still ran into the issue.  We haven't yet tried pre-compiling our 
 JSPs/TAGs before starting Tomcat -- but that shouldn't be necessary, right?

 I'd love some advice/insight in how I might investigate this further, or if 
 there's a gotcha I might be running into.  It feels like a race condition 
 in the classloader, but I don't want to submit a bug report without a 
 reliable test case, of course. Since we can't reliably recreate the 
 situation, I'm having trouble putting that together.

 This seems to happen more often for me when I'm switching between 
 substantially-different Git branches, so I thought it might have to do with 
 the /work directory having older versions of the JSPs/TAGs, but one of my 
 colleagues claims to clean her /work directory every time she switches 
 branches, and before starting Tomcat, and still getting the issue.

What is the relationship between Git and Tomcat, exactly?

Does Tomcat load an app (or its files) directly from a version
controlled file system?


p



 Thanks in advance for any help!
 Jim

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


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



Re: Tomcat ROOT webapp homepage

2012-11-15 Thread Pid *
On 15 Nov 2012, at 18:06, Leo Donahue - RDSA IT
leodona...@mail.maricopa.gov wrote:

 Who designed the Tomcat ROOT webapp homepage?

Which version? 7.0 = me.

 Was it just notepad as the design tool?

Not notepad, why?


p


 Leo

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



Re: Handling requests when under load - ACCEPT and RST vs non-ACCEPT

2012-11-11 Thread Pid
On 10/11/2012 04:52, Asankha C. Perera wrote:
 Hi Chris
 processing 1 connection through completion
 (there are 99 others still running), re-binding, accepting a single
 connection into the application plus 100 others into the backlog, then
 choking again and dropping 100 connections, then processing another
 single connection. That's a huge waste of time unbinding and
 re-binding to the port, killing the backlog over and over again... and
 all for 1-connection-at-a-time pumping. Insanity.
 I'm sorry but you've misunderstood what I was saying. Yes the example I
 used showed it for one connection to make it easier to understand what I
 was proposing. But in reality you would not stop and start at each
 connection. Remember the two thresholds I was talking about? You could
 stop listening at 4K connections, and start listening again when the
 connections drops to say 3K - and these could be user specified
 parameters based on the deployment.
 
 HTTP keep-alive from a load balancer in front would work extremely well
 under these conditions as established TCP connections are re-used. Any
 production grade load balancer could immediately fail-over only the
 failing requests to another Tomcat when one is under too much load - and
 this would work for even non-idempotent services.

If there's an LB in front, it should be protecting the Tomcat instance
from an excessive number of connections, no?



p



 You want to add all this extra complexity to the code and, IMO, shitty
 handling of your incoming connections just so you can say well,
 you're getting 'connection refused' instead of hanging... isn't that
 better?. I assert that it is *not* better. Clients can set TCP
 handshake timeouts and survive. Your server will perform much better
 without all this foolishness.
 If you can, try to understand what I said better.. Its ok to not accept
 this proposal and/or not understand it..
 
 regards
 asankha
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Windows Server 2003 - Apache Tomcat 6.0.14 is shutting down 5 seconds after started

2012-11-11 Thread Pid
On 11/11/2012 19:06, Camilo Diaz wrote:
 Hello:
 
 Recently I'm having an issue with Tomcat. 5 seconds after I started the
 service it shuts down automatically. I do not see any error in the logs and
 I already checked many things that may interrupt the correct behavior of
 Tomcat such as the lack of the file msvcr71.dll in Windows/System32.

Can you start up Tomcat with your application(s) and the same
configuration using the bin/startup.bat scripts?


 System configuration is:
 Windows Server  2003 R2
 Apache tomcat 6.0.14

That's a really old version of Tomcat that you should upgrade urgently.

 Java 1.6.12

Ditto.


 I'll appreciate any help.

When did this behaviour start?  Has it just started happening to a
previously stable application, and if so - what changed?


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Windows Server 2003 - Apache Tomcat 6.0.14 is shutting down 5 seconds after started

2012-11-11 Thread Pid *
On 11 Nov 2012, at 22:52, Camilo Diaz k.dia...@gmail.com wrote:

 Hello. Thank you for your answer.

 Unfortunately the software installed in the server brings its own Tomcat
 installation (the one in the case) and I can't upgrade it without knowing
 if it may affect that software.
 The only thing i see that could be why automatically shutting down Tomcat
 is that when I type in the command prompt:

 java -version:
 C:\Program
 Files\Autodesk\MapGuideEnterprise2010\WebServerExtensions\Tomcat\binjava
 -version
 java version 1.6.0_35
 Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
 Java HotSpot(TM) Client VM (build 20.10-b01, mixed mode, sharing)

 And when I execute startup.bat it says.

 Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_12

 should I uninstall Java 1.6.0_35 ?

 Thank you so much for the help.

 On Sun, Nov 11, 2012 at 5:15 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

 From: Camilo Diaz [mailto:k.dia...@gmail.com]
 Subject: Re: Windows Server 2003 - Apache Tomcat 6.0.14 is shutting down
 5 seconds after started

 When I use the the startup.bat command

 When it finished all seems to be normal and I am able to see
 tomcat.exe in the task manager processes list.

 Something's very wrong in what you're doing; if Tomcat is initiated by
 startup.bat, it does not use tomcat.exe; you will instead see java.exe in
 the process list.  The tomcat.exe program is used only when Tomcat is
 running as a service. You can't run Tomcat as both as service and from a
 batch script at the same time, using the same server.xml.

 Also, as Pid noted, you really, really, really need to upgrade your
 environment.  It is irresponsible to be using a Tomcat version that's over
 five years old.

 You best course of action may well be to deinstall all copies of Tomcat
 that you have, download a current one, and install that.

 - Chuck


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


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


 --
 Kmilo

Are we to guess that you have installed a commercial product from AutoDesk?

If so and it includes a version of Tomcat you should ask them to
verify that a current version of Tomcat is supported, then you can
upgrade. Do the same with the Java version.

If it's a commercial product does it have a license? What is the
expected behaviour if the license expires or is not available?

Is this a new installation or was it running OK before and has stopped
working recently?
If the latter, what else changed?


p

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



Re: Tomcat Components

2012-11-09 Thread Pid
On 09/11/2012 08:17, Casper Wandahl Schmidt wrote:
 
 Den 08-11-2012 23:54, Christopher Schultz skrev:
 Ram,
 
 On 11/8/12 12:06 PM, Ram Laxman wrote:
 I want to know what are components of Tomcat 7?
 Well, first you've got yourself a T. That's the most important,
 which makes sense, because it's first one listed. Why wouldn't you put
 your best foot forward? And T is a really top-notch letter. Not like
 I. I is a really bad choice when getting started. Sorry, Apple.
 
 After that, you have an o. The crazy thing about that is that it
 doesn't sound like O. No! It sounds like ah. Mind = blown. And
 we're just at the second component of Tomcat at this point. I'm not
 sure you will be able to make it to the end without literally
 exploding with excitement.
 
 m is next and really starts building the intensity. You get to
 really mash your lips together -- maybe get a little tooth-tapping
 action goin' on, too. It also gives you the opportunity to pause and
 reflect on the great community Tomcat has surrounding it: all the
 volunteer programmers and people who post to the list. Those folks are
 great, and wasting their time would be ... a shame. m also gets used
 a lot in Muse's recent Madness single which ... kind of disappointed
 me. Alas, Origin of Symmetry is probably impossible to top so I'm glad
 they aren't even trying.
 
 We've arrived at c. Lots of people hate the c word for some
 reason. I don't like cats themselves in general (there was one cat I
 really did like, but that one acted like a dog, so it wasn't really a
 cat except for the sneezing), but the word cat isn't a big deal for
 me. I don't understand what all the fuss is about.
 
 Now for the a. Like the o, this one doesn't really sound like A
 (like ay or eh). Alas! Instead, it sounds like .. hmm. Like the
 a in grab. I think of grab because that's a very verby-sounding
 word. And Tomcat verbs things... verbs them very well. This is a great
 addition to Tomcat's architecture because it brings an element of
 mystique... it's tough to explain how to pronounce it, for instance.
 
 Now for the coup de grâce, and it's going to shatter your skull:
 another t. This one is small... diminutive, even. Much less fuss
 than that /other/ T at the beginning, the one with all the
 excitement. This one is much more understated. Demure. Silent to some,
 who tend to skip the final consonant in such cases -- where it sounds
 more like Tomca'h than Tomcat.
 
 Then there's this weird 7. I think that's the version number.
 Oh I laughed very hard :)

Well played sir.


 As mentioned in wiki ,  tomcat 4 has Catalina,Coyote and Jasper
 components!!!
 The later versions of Tomcat have fewer exclamation points. That must
 be why everyone prefers Tomcat 4. Little known fact: Tomcat's
 performance is inversely proportional to the number of exclamation
 marks used in sentences. So, every time you type one, Tomcat get
 slower. And God kills a lolcat.
 +1
 
 But  as I searched through the tomcat change notes I have observed
 several others such as Cluster, Web Application but not getting fix
 no in this release !!
 That will likely be fixed in Tomcat 8. Stay tuned.
 If it hasn't been fixed from 4 - 7, why would you expect it to be fixed
 in 8?

The devs only fix one thing per release.  It's to do with the lifecycle
of Tomcat modules.


p


 -chris

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

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

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: rotation of catalina.out on restart but no truncation

2012-11-09 Thread Pid
On 09/11/2012 06:40, Meik Suchlich wrote:
 Hi,
 
 we've got an effekt on catalina.out.
 We don't use hot deployment. Instead we stop and start our tomcat for 
 installing new Version.
 The restart causes rotation of catalina.out, but does not truncate.
 How can we solve this?

You could start by not hijacking other people's threads...


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat Components

2012-11-08 Thread Pid
On 08/11/2012 17:06, Ram Laxman wrote:
 Hi,
 
  I want to know what are components of Tomcat 7?
 
  As mentioned in wiki ,  tomcat 4 has Catalina,Coyote and Jasper components!!!
 
 But  as I searched through the tomcat change notes I have observed several 
 others 
 
 such as Cluster, Web Application but not getting fix no in this release !!
 
 Help !!
 
 --
 
 CHEERS,
 
 MAYUR.

Is this your homework?


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Handling requests when under load - ACCEPT and RST vs non-ACCEPT

2012-11-08 Thread Pid
On 08/11/2012 15:03, Asankha C. Perera wrote:
 Hi Mark
 what happens if some other process grabs the port in the meantime:
 what is Tomcat supposed to do then?
 In reality I do not know of a single client production deployment that
 would allocate the same port to possibly conflicting services, that may
 grab another's port when its suffering under load.
 Just because it wouldn't cause a problem for a limited subset of Tomcat
 users - your clients - does not mean that it would not cause problems
 for other Tomcat users.
 I cannot see any other issues of turning off accepting - and I am
 curious to know if anyone else could share their views on this -
 considering real production deployments
 The problems have already been explained to you. Another process could
 use the port.
 I would consider such production deployment as a risk - a Tomcat crash,
 or even a restart might end up in a soup if another process starts using
 the port in the mean time..

It is not uncommon for monitoring tools to attempt to (re)start a
service when it is observed not to be listening on its designated port.


p

 Having reviewed this thread the problem you seem to be trying to solve
 is this:
 - a load-balancer is in use
 - Tomcat is under load
 - a client attempts a connection
 - the connection is added to the TCP backlog
 - Tomcat does not process the connection before it times out
 - the connection is reset when it times out
 - the client can't differentiate between the above and when an error
 occurs during processing resulting in a connection reset
 - the client doesn't know whether to replay the request or not
 Yes, this is correct
 First of all, it is extremely rare for Tomcat to reset a connection once
 processing has started. The only circumstances where I am aware that
 would happen is if Tomcat is shutting down and a long running request
 failed to complete or if Tomcat crashes. All other error cases should
 receive an appropriate HTTP error code. In a controlled shut down load
 can be moved off the Tomcat node before it is shut down. That leaves
 differentiating a Tomcat crash during request processing and the request
 timing out in the backlog.
 For GET requests this should be a non-issue since GET requests are meant
 to be idmepotent. GET requests can always be re-tried after a TCP reset.

 For POST requests, use of the 100 Continue status can enable the client
 to determine if the headers have been received. A TCP reset before the
 100 continue response means the request needs to be re-tried. A TCP
 reset after the 100 continue response means it is unknown if a retry is
 necessary (there is no way for the client to determine the correct
 answer in this case).

 Given the above I don't see any reason to change Tomcat's current
 behaviour.
 Ok, thank you for considering my proposal. I respect the decision of the
 Tomcat community.
 
 Hopefully someone else will find this thread useful in future to
 understand the issue better and to overcome it
 
 regards
 asankha
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Specify order in which war files are deployed under tomcat

2012-11-08 Thread Pid
On 07/11/2012 21:32, Jose H. Martinez wrote:
 Hello,
 
 I am running two applications under tomcat. One application is a web
 service and the other is a web app that depends on the web service to be
 started first before it can be initialized. The problem I am having is that
 the web app is starting before the web service. Is there a way to tell
 tomcat the order in which the war files should be deployed?
 
 Note: In the future we will deploy the applications on different servers
 but for now that's not an option.
 

Use Tomcat 7.0.x and enable multi-threaded deployment, then one won't
block and prevent the other from starting.


p

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: About deciding the lifetime of project module

2012-11-07 Thread Pid *
On 7 Nov 2012, at 13:20, Ram Laxman ram.laxman241...@yahoo.com wrote:

 Hi there,

I want to ask that how to decide lifetime of project module in Tomcat??

Can you explain what you mean by lifetime?

When you say 'project module' do you mean a Web Application as
described in the Servlet Specification, or something else?


Or which factor should consider while designing it ??

Designing what? What does your 'module' do?
The intended function and use will be rather important when
considering factors that influence the design.


p



   Thanks.

 --

 Cheers,

 Mayur.

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



Re: Mystery migrating from tomcat 6 to 7

2012-11-07 Thread Pid
On 02/11/2012 19:27, Fred Toth wrote:
 Context docBase=/mnt/data_arch/DATA

Is your application mounted on an NFS share?


p

(hint: don't do that.)



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: CSRF on multiple tomcat instances

2012-11-07 Thread Pid
On 06/11/2012 03:59, Christopher Schultz wrote:
 Wilfred,
 
 On 11/5/12 4:08 AM, Wilfred Duizers wrote:
 When a user clicks a link in the webapplication running on Tomcat 
 instance 1 (portal) an application running on Tomcat instance 2 is 
 opened. Is it possible to send the nonce with the link? Because
 it's running another instance.
 
 Do you see a solution anywayboth tomcat instances use the same
  domain https://www.example.com
 
 They use isapi
 
 I'm not sure ISAPI is relevant, here, but good to know.
 
 So, first of all -- have you tried it? The CSRFPreventionFilter stores
 its nonce cache (a Serializable object) in the session. If you are
 using clustered sessions, then it should Just Work.

If they are not the same apps it won't.

The alternative is to write a similar component that works as a Valve,
which has access to the Session (not the same as the HttpSession) and
see if you can use the same mechanism as the SSOValve uses, storing the
nonce in a 'note'.

I *think* that might work, but I'm guessing a bit there...


p

 If you have other (as yet undisclosed) requirements, I'm guessing that
 Tomcat's built-in CSRFPreventionFilter isn't going to meet your needs,
 though it should be trivial to subclass it and customize the parts
 that you need to work differently. If your improvements are decent, I
 would encourage you to contribute back to the community.
 
 If I had to do this, I would look at modifying the existing
 CSRFPreventionFilter such that its storage mechanism was pluggable, so
 you could specify a class that did something simple like:
 
public LruCacheString getNonceCache(HttpSession)
public void setNonceCache(HttpSession,LruCache)
 
 If you wanted to make it a bit more high-throughput, you could make
 the methods more fine-grained so you didn't have to push-and-pull the
 whole cache each time. The code is more complicated, but potentially
 more flexible.
 
 Once that's done, just implement a global nonce cache using something
 like webcache or your favorite key-value store (where the key is
 something like session id + .csrfCache). Just remember to expire the
 nonce caches when the user's session dies or you will end up with a
 big, fat, messy database (and might even exhaust system resources if
 you are using an in-memory solution like webcache).
 
 -chris
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: CSRF on multiple tomcat instances

2012-11-05 Thread Pid *
On 2 Nov 2012, at 14:23, Wilfred Duizers wilfred.duiz...@indicia.nl wrote:

 Hello,

 I am running 2 Tomcat instances on 1 server. So far nothing special :-)
 Both:
 Apache Tomcat/7.0.25
 JVM 1.6.0_20-b02

 When a user clicks a link in the webapplication running on Tomcat instance 1 
 (portal) an application running on Tomcat instance 2 is opened. Is it 
 possible to send the nonce with the link? Because it's running another 
 instance...

Would defeat the point if you sent all of the info in the same request, no?


p



 Kind regards,
 Wilfred

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



Re: AW: AW: AW: AW: tomcat 6.0.32 stops expiring sessions

2012-11-05 Thread Pid
On 05/11/2012 15:27, Altmeier, Christian wrote:
 Yes I think so:
 
 Session Id  Guessed Locale  Guessed User name   Creation Time   Last 
 Accessed Time  Used Time   Inactive Time   TTL
 9B33CA0CA59049557CEA6B4938FA98DB2012-11-02 12:42:38   
   2012-11-02 12:42:38 00:00:0075:44:05-74:38:05
 D4E1E89D5758A7695A39D404C42290772012-11-02 12:39:36   
   2012-11-02 12:44:41 00:05:0575:42:01-74:36:01
 2ECEF959105BC59118EC462A37FA62AA2012-11-05 01:10:58   
   2012-11-05 01:54:09 00:43:1014:32:34-13:26:34
 ...

Are you holding a reference to the session object anywhere?


p


 -Ursprüngliche Nachricht-
 Von: David kerber [mailto:dcker...@verizon.net]
 Gesendet: Montag, 5. November 2012 16:20
 An: Tomcat Users List
 Betreff: Re: AW: AW: AW: tomcat 6.0.32 stops expiring sessions
 
 On 11/5/2012 10:07 AM, Altmeier, Christian wrote:
 No, sorry. Default should be 30 Minutes We set it to 66 Minutes But
 the sessions didn't even expire after 75 hours inactive time.
 
 Are you sure they're really inactive that entire time, and don't have some 
 kind of keepalive going on?
 
 

 -Ursprüngliche Nachricht-
 Von: Igor Cicimov [mailto:icici...@gmail.com]
 Gesendet: Montag, 5. November 2012 14:01
 An: Tomcat Users List
 Betreff: Re: AW: AW: tomcat 6.0.32 stops expiring sessions

 On 05/11/2012 10:01 PM, Altmeier, Christian  
 christian.altme...@softwareag.com  wrote:

 Yes we are using SSL.

 The default session timeout for ssl in tomcat6 is 24 hours, maybe that 
 explains why.

 Tomcat 6.0.32
 Our connector config:
 Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2
 redirectPort=8443 scheme=https secure=true proxyName=..xx
 proxyPort=443/

 -Ursprüngliche Nachricht-
 Von: Igor Cicimov [mailto:icici...@gmail.com]
 Gesendet: Montag, 5. November 2012 10:56
 An: Tomcat Users List
 Betreff: Re: AW: tomcat 6.0.32 stops expiring sessions

 On 05/11/2012 8:41 PM, Altmeier, Christian
 christian.altme...@softwareag.com  wrote:

 No that's OK, I don't mean the time a user stays inactive for some
 minutes.
 The session timeout is set to 66 minutes.
 I have sessions which are inactive for 70 hours ...

 Which tomcat version? Are they SSL sessions by some chance? Actually
 can you post here your Connector config please?

 -Ursprüngliche Nachricht-
 Von: Igor Cicimov [mailto:icici...@gmail.com]
 Gesendet: Montag, 5. November 2012 10:26
 An: Tomcat Users List
 Betreff: Re: tomcat 6.0.32 stops expiring sessions

 On 05/11/2012 6:50 PM, Altmeier, Christian
 christian.altme...@softwareag.com  wrote:

 Hi,
 I have a big problem. After some time, tomcat stops expiring sessions.
 We have enabled logging for org.apache.catalina.session.ManagerBase.
 So
 we see that at first everything works fine and suddenly sessions
 didn't
 expire anymore.
 Before tomcat stops expiring sessions, it is noticeable that some
 sessions need a lot of time to expire (10 - 30 minutes). In this
 time,
 other session expire as expected.

 Isnt that what you would expect if some users stay active for longer?
 Have you confirmed that the long lasting sessions are idle? I think
 default
 session timeout in tomcat is 30 minutes so are you saying you have
 changed that to a lower value but its not working?

 I hope someone has an idea.

 Tomcat runs  on a 64bit Linux server.

 Greeting
 IDS Scheer Consulting GmbH
 Gesch?ftsf?hrer/Managing Directors: Michael Rehm, Ivo Totev
 Sitz/Registered office: Altenkesseler Stra?e 17, 66115
 Saarbr?cken,
 Germany - Registergericht/Commercial register: Saarbr?cken HRB 19681
 http://www.ids-scheer-consulting.com

 IDS Scheer Consulting GmbH
 Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
 Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken,
 Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
 http://www.ids-scheer-consulting.com


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

 IDS Scheer Consulting GmbH
 Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
 Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken,
 Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
 http://www.ids-scheer-consulting.com


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

 IDS Scheer Consulting GmbH
 Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
 Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany 
 - Registergericht/Commercial register: Saarbrücken HRB 19681
 http://www.ids-scheer-consulting.com


 

Re: Document root element web-app, must match DOCTYPE root null-- Error

2012-10-30 Thread Pid
On 30/10/2012 02:51, MOHAMMAD SULAIMAN wrote:
 Thanks chris for revert.
 
 Installing a new software requires certain approvals and as it already has
 some application running on it, we haven't upgraded it.
 
 Is there any way to resolve this issue ??

Yes.

Don't upload directly to webapps, Tomcat can't tell when an application
has completely uploaded.

You have a broken application in the webapps directory.  Move it
somewhere else.  Restart Tomcat.  Report back here.


p


 On Mon, Oct 29, 2012 at 1:56 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:
 
 Mohammad,
 
 On 10/29/12 12:37 PM, MOHAMMAD SULAIMAN wrote:
 Dear All,



 jakarta-tomcat-4.1.31 is installed on my system (OS: solaris).
 There were some applications running on this server. Now, we
 tried to deploy a new application in webapps directory by
 putting application directory through FTP. After that, other
 applications on this server are also not working. While
 starting tomcat, we are getting below error.



 Now, I have deleted newly FTPed application but of no use.
 Still we are getting below error while restarting tomcat.



 Please help as I am not able to find any solution online.



 *Logs:*

 Oct 29, 2012 11:55:01 AM org.apache.coyote.http11.Http11Protocol
 init

 INFO: Initializing Coyote HTTP/1.1 on http-9014

 Starting service Tomcat-Standalone

 Apache Tomcat/4.1.31

 Oct 29, 2012 11:55:07 AM org.apache.commons.digester.Digester
 error

 SEVERE: Parse Error at line 2 column 225: Document root
 element web-app, must match DOCTYPE root null.

 org.xml.sax.SAXParseException: Document root element web-app,
 must match DOCTYPE root null.

 at

 org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown


 Source)

 at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
 Source)

 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
 Source)

 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
 Source)

 at
 org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown


 Source)

 at
 org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown


 Source)

 at
 org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
 Source)

 at

 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown


 Source)

 at

 org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown


 Source)

 at

 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown


 Source)

 at

 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown


 Source)

 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
 Source)

 at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
 Source)

 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
 Source)

 at
 org.apache.commons.digester.Digester.parse(Digester.java:1548)

 at

 org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:220)



 at
 org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:579)



 at

 org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:181)



 at

 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)



 at

 org.apache.catalina.core.StandardContext.start(StandardContext.java:3523)



 at

 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774)



 at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)



 at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548)



 at

 org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260)



 at
 org.apache.catalina.core.StandardHost.install(StandardHost.java:741)



 at
 org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:445)



 at
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:353)



 at
 org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)



 at

 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)



 at

 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)



 at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)



 at
 org.apache.catalina.core.StandardHost.start(StandardHost.java:707)



 at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)



 at
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)



 at

 org.apache.catalina.core.StandardService.start(StandardService.java:450)



 at
 org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)



 at org.apache.catalina.startup.Catalina.start(Catalina.java:463)

 at
 org.apache.catalina.startup.Catalina.execute(Catalina.java:350)



 at org.apache.catalina.startup.Catalina.process(Catalina.java:129)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Re: redirects https only for one app

2012-10-30 Thread Pid
On 29/10/2012 23:28, Ted Smith wrote:
 Hello:
 
 I have several web apps (war files) under single host and webapps dir.

That's nice.
Tomcat version? Java version, OS ver... oh well.


 I need to force HTTPS only for one of them and leave others unchanged.
 config web.xml does not work as it applies to all apps.

What about the web.xml in each application?

You shouldn't be making changes to the tomcat/conf/web.xml file.


 I feel there must be a way to config this using server config instead of
 modifying a war file.

Why?  Servlet applications are supposed to be self-contained.


p


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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: redirects https only for one app

2012-10-30 Thread Pid
On 30/10/2012 13:29, Ted Smith wrote:
 None of these alternatives is suitable for my situation.

Why?


p


 I wonder since tomcat knows the contextname for each app,  if it is
 possible to have a context specific web.xml
 in the conf file in addition to the one for all web.xml,   such as  
 web_contextname.xml
 that can be applied to contextname only.
 
 
 
 
 On 10/30/2012 8:22 AM, Daniel Mikusa wrote:
 On Oct 29, 2012, at 7:28 PM, Ted Smith wrote:

 Hello:

 I have several web apps (war files) under single host and webapps dir.
 I need to force HTTPS only for one of them and leave others unchanged.
 My opinion is that the easiest fix would be to modify
 secure-app.war/WEB-INF/web.xml.

 config web.xml does not work as it applies to all apps.
 I feel there must be a way to config this using server config instead
 of modifying
 a war file.
 Couple other thoughts that might work for you…

 1.) Use UrlRewriteFilter.  http://tuckey.org/urlrewrite/

 2.) Write a custom valve. 
 https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

 3.) Install Apache HTTPD on the same machine as Tomcat.  Set it up as
 a reverse proxy to Tomcat.  Configure HTTPD to handle HTTPS.

 Dan


 Thanks in advance.





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


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


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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: redirects https only for one app

2012-10-30 Thread Pid
On 30/10/2012 20:04, Ted Smith wrote:
 It is a site specific scenario that those options can not be used.

It is an entirely unexplained site specific scenario that you can't
modify a .war files configuration to get it to meet a site specific
requirement?

;)


 Just feel having a app specific web.xml in conf dir would be reasoon,
 context.xml allow specifying context/app name.

That's not the way the Servlet Spec works, have a read of it -  it's
actually mostly readable.

You can always extract the web.xml from the .war and update it, before
adding it back again.  A .war is a special type of .jar - so you can use
the JDK 'jar' command to operate on it.


p

 On 10/30/2012 3:45 PM, Pid wrote:
 On 30/10/2012 13:29, Ted Smith wrote:
 None of these alternatives is suitable for my situation.
 Why?


 p


 I wonder since tomcat knows the contextname for each app,  if it is
 possible to have a context specific web.xml
 in the conf file in addition to the one for all web.xml,   such as
 web_contextname.xml
 that can be applied to contextname only.




 On 10/30/2012 8:22 AM, Daniel Mikusa wrote:
 On Oct 29, 2012, at 7:28 PM, Ted Smith wrote:

 Hello:

 I have several web apps (war files) under single host and webapps dir.
 I need to force HTTPS only for one of them and leave others unchanged.
 My opinion is that the easiest fix would be to modify
 secure-app.war/WEB-INF/web.xml.

 config web.xml does not work as it applies to all apps.
 I feel there must be a way to config this using server config instead
 of modifying
 a war file.
 Couple other thoughts that might work for you…

 1.) Use UrlRewriteFilter.  http://tuckey.org/urlrewrite/

 2.) Write a custom valve.
 https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

 3.) Install Apache HTTPD on the same machine as Tomcat.  Set it up as
 a reverse proxy to Tomcat.  Configure HTTPD to handle HTTPS.

 Dan


 Thanks in advance.





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

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



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


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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat Linux/Windows Performance Question

2012-10-29 Thread Pid

 Thank you, This is very completed answer and I found it really useful, and
 hopeful!
 Application is under heavy developing, app has some page ( I call it page,
 I don't know java or serverlet) with very high latency occurs for now, some
 times we got out of memory error message.
 This is test server with windows 2003 x86 and tomcat 6.x. Chief developer
 believe Linux maybe solve this problem. We need some good reason to install
 and configure centos.

#fail


 It seems application need more memory than 1.5GB. If set more memory like 2
 or 3GB tomcat fail to start.

Are you running on 32bit Windows?


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat Linux/Windows Performance Question

2012-10-28 Thread Pid *
On 28 Oct 2012, at 11:39, Ashkan Rahmani ashkan...@gmail.com wrote:

 Hi,
 Now I have a windows 2003 server and a Tomcat 6.x on it.
 Our application has many many parts and it's very big.

 Actually we are not happy with tomcat performance, (We are working very
 hard on developing that software and improving
 performance)  .
 We want  to improve application performance (working on it now) and tomcat
 (by tuning and we are doing now and using latest stable version) and
 finally OS, for this we want to remove (damn) windows and come back to
 centos 6 and maybe some hardware upgrade.
 My question from you is: is here anyone have some experience with tomcat on
 windows and Linux which running same things? which has better performance?

Your app is usually responsible for 95% of the tunable overhead, the
rest usually comes down to choosing the right number of threads per
Tomcat instance and the appropriate JVM memory and GC configuration.

There are reasons people prefer Linux to Windows but I think you'd see
a fairly  substantial debate about whether the OS choice has an effect
on raw performance.

Can you tell us anything about the app?

Are you using a profiler and VisualVM or JConsole to monitor Tomcat
and app behaviour?


p

 --
 Best Regards,
 Ashkan R

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



Re: Tomcat 7 manager quirk?

2012-10-27 Thread Pid
On 27/10/2012 04:45, Caldarale, Charles R wrote:
 From: Josh Gooding [mailto:josh.good...@gmail.com] 
 Subject: Tomcat 7 manager quirk?
 
 Is there a way that I can get tomcat to NOT start auto-deploying
 immediately when the manager is invoked with a deploy / update command?
 
 When I run the command: curl -k --upload-file ROOT.war
 
 The usual trick is to upload the file with a different extension, then rename 
 it to .war - but that might be difficult if your only access is via curl.

I don't like the idea of .war uploads via the Manager app to a
production server, myself...


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Max Threads - Worker Threads clarification

2012-10-23 Thread Pid
On 23/10/2012 19:46, Charles Richard wrote:
 With wc removed, it looked like the following:
 
 tcp0  0 127.0.0.1:8009  127.0.0.1:37744
 ESTABLISHED
 tcp0  0 127.0.0.1:8009  127.0.0.1:36976
 ESTABLISHED
 tcp0  0 127.0.0.1:8009  127.0.0.1:35695
 ESTABLISHED
 tcp0  0 127.0.0.1:8009  127.0.0.1:39022
 ESTABLISHED
 
 At the exception of a few close_wait and a few fin_wait2.
 
 If in my jstack analysis, all worker threads are running and all GC threads
 are running and my server was CPU bound, would i be correct in assuming
 Garbage collection was killing tomcat?  Tomcat would eventually not respond
 anymore which I was trying to understand why as my jstack dump shows
 TP-Processor threads waiting.

One thread dump from jstack is interesting but not particularly informative.

If you see the same in a series of thread dumps, taken a few seconds
apart then you can tell what's happening.

Alternatively... like Daniel suggested, you do all of the above and more
in a nice shiny GUI, where you don't have to guess what the threads are
doing  where you can see a GC graph alongside at the same time.

We _strongly_ recommend getting JMX set up  using VisualVM to see
what's happening...


p


 Thanks!
 
 Cheers,
 Charles
 
 On Tue, Oct 23, 2012 at 2:22 PM, Daniel Mikusa dmik...@vmware.com wrote:
 
 On Oct 23, 2012, at 12:10 PM, Charles Richard wrote:

 Hi,

 Thanks for the reply!

 The command was the following:

 [root@mysandbox tmp]# netstat -an | grep 8009 | wc
8565136   76184

 What output do you get if you remove the wc command?


 How should i interpret this?  I thought this meant that 856 threads were
 open while my MaxThreads is 750.

 This is not going to accurately give you a count of thread use.  Don't use
 this command for that purpose.  If you want to see thread usage, look at
 jvisualvm, jstack, or jconsole.  All of these will give you accurate counts.


  I'm trying to understand if all my
 workerThreads are busy (hence trying the jstack dump) and then if they
 are,
 not sure how I would do this but try to figure out on what they're busy.

 To figure out what is going on you have a couple choices:

 1.) Use a profiler.  YourKit is a good one, but not free.
 2.) Use top -H in combination with jstack (or kill -3).

 In most cases a profiler is the best way to go.  The top method is mainly
 useful when something is consistently consuming a large portion of the CPU.

 Dan



 My OS is CentOS 5.8 for my sandbox and Red Hat 5.8 for my production
 boxes.

 Thanks,
 Charles

 On Tue, Oct 23, 2012 at 12:25 PM, Daniel Mikusa dmik...@vmware.com
 wrote:

 Hi,

 I'm testing performance of our Java application in Tomcat (6.0.30) and
 we
 have maxThreads set to 750.  I noticed that when i did a netstat -an |
 grep
 my_ajp_port, i saw around 860 connections.

 That does not necessarily mean that you have 860 threads running.  What
 are you trying to determine by running this command?  If you want to see
 the number of threads, use jconsole, jvisualvm or jstack.

 Also, if you include the output of netstat -an | grep my_ajp_port and
 what OS you are running, someone on the list might be able to better
 explain the output from the command.


 I was expecting to see  750 Worker Threads in my stack since some
 extra
 worker threads are needed by Tomcat.  What i saw was around 60 worker
 threads in the trace.

 This would be the correct number of threads in use.

 Dan



 Any suggestions/ideas on why that would be?

 Cheers,
 Charles



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




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


 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: any servlets to implement sort of a google-play-like functionality for android and other types of mobile devices?

2012-10-23 Thread Pid
On 23/10/2012 12:28, David kerber wrote:
 On 10/23/2012 4:39 AM, Albretch Mueller wrote:
 Unless you are talking about setting up some kind of app store and
 using Tomcat to do that? but in such a case, the issue would not be
 about Tomcat, but about creating an app store webapp running under
 Tomcat. Or?
 ~
   Exactly! Where is an (or the?) app store webapp running under Tomcat?
 
 ...
 
 ~
   So, again, where is the app store webapp running under Tomcat,
 Jetty, or any other servlet container?
 ~
   Are we starting such a project?
 ~
   lbrtchx
 
 I'm not; are you?

Is he asking if Tomcat has an AppStore for JNLP apps?

:/


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 6.0 - JNDI resource caching over virtual hosts

2012-10-23 Thread Pid
On 23/10/2012 16:55, Jan Kostelansky wrote:
 I am using Tomcat 6.0.18 deployed as web service on Windows XP SP3.
 
  
 
 I created additional Host element in conf/server.xml, so I have two
 virtual hosts: localhost (default) and janko
 
 Host name=jankoappBase=itsapps
 
 !-- Access log processes all example.
 
  Documentation at: /docs/config/valve.html
 
  --
 
 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  
 
prefix=its_access_log. suffix=.txt pattern=common
 resolveHosts=false/
 
 /Host
 
  
 
 I deployed the same web applications in both hosts. The first web
 application is main, the other one is hypersonic database as storage for
 the web application. The main web application defines access to
 hypersonic database as resource.
 
 Then localhost web application points to hypersonic listening on port
 9002
 
 Resource 
 
 name=jdbc/profile 
 
 auth=Container 
 
 uniqueResourceName=jdbc/profile
 
 type=com.atomikos.jdbc.nonxa.NonXADataSourceBean
 
 factory=org.apache.naming.factory.BeanFactory
 
 connectionTimeout=30
 
 poolSize=3
 
 user=sa 
 
 password=
 
 driverClassName=org.hsqldb.jdbcDriver
 
 url=jdbc:hsqldb:hsql://localhost:9002 
 
 /
 
 Then janko web application points to hypersonic listening on port 9003
 
 Resource 
 
 name=jdbc/profile 
 
 auth=Container 
 
 uniqueResourceName=jdbc/profile
 
 type=com.atomikos.jdbc.nonxa.NonXADataSourceBean
 
 factory=org.apache.naming.factory.BeanFactory
 
 connectionTimeout=30
 
 poolSize=3
 
 user=sa 
 
 password=
 
 driverClassName=org.hsqldb.jdbcDriver
 
 url=jdbc:hsqldb:hsql://janko:9003 
 
 /
 
 The deployment descriptors are defined in conf/Catalina/localhost and
 conf/Catalina/janko folders. docBase points outside of tomcat_home.
 
  
 
 However when accessing both web applications only one data source is
 used by both web applications depending which one is used first. It
 looks to me that JNDI name jdbc/profile is shared across web
 applications.

That's because you can't give the same JNDI name to two different DBs.
What about trying to use two different names for the resources?


p


 The application uses log4j for logging. Before both web applications
 were deployed under the same context name. The side effect was that both
 applications logged to the same file. When I renamed web application on
 the janko virtual host, the log4j issue was solved. Looks like the same
 log4j class instance was used for applications with the same context
 name.
 
  
 
 I do not use global resources in server.xml. Resources are defined in
 application context file only. Based on documentation resource elements
 defined in context is private to that context only.
 
  
 
 Thank you in advance for any help,
 
 Jan
 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: any servlets to implement sort of a google-play-like functionality for android and other types of mobile devices?

2012-10-23 Thread Pid
On 23/10/2012 20:13, David kerber wrote:
 On 10/23/2012 2:58 PM, Pid wrote:
 On 23/10/2012 12:28, David kerber wrote:
 On 10/23/2012 4:39 AM, Albretch Mueller wrote:
 Unless you are talking about setting up some kind of app store and
 using Tomcat to do that? but in such a case, the issue would not be
 about Tomcat, but about creating an app store webapp running under
 Tomcat. Or?
 ~
Exactly! Where is an (or the?) app store webapp running under
 Tomcat?

 ...

 ~
So, again, where is the app store webapp running under Tomcat,
 Jetty, or any other servlet container?
 ~
Are we starting such a project?
 ~
lbrtchx

 I'm not; are you?

 Is he asking if Tomcat has an AppStore for JNLP apps?
 
 I *think* he's asking if anybody has started a project to create an app
 store that runs under TC, as an open-source project.  I.E. he's looking
 for code to make his own app store.

For JNLP.  Right...


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: any servlets to implement sort of a google-play-like functionality for android and other types of mobile devices?

2012-10-23 Thread Pid
On 23/10/2012 21:14, Albretch Mueller wrote:
 Using Java Web Start does not require any Java on the backend
 whatsoever. You can serve a Java Web Start app from a vanilla IIS with
 no dynamic content at all. So, Tomcat itself has really nothing to do
 with it all.
 ~
  Not quite. The JNLP/java did most of the work itself, but if you use
 advanced server support with elaborate versioning descriptors you have
 to declare and handle the logical (URL) to physical (file system)
 mapping, declare new mime types for jardiff functionality, handle
 Locale related issues, ...

All of that seems like things that can be handled with Apache HTTPD.


  If using Java Web Start would not require any Java on the back end
 whatsoever, then Marinilli on this JNLP wouldn't have dedicated a
 chapter to it ;-)

I'm curious - what functionality is required to serve JNLP apps - is
there something more than HTTP requests?


p

 Is he asking if Tomcat has an AppStore for JNLP apps?
 ~
 I *think* he's asking if anybody has started a project to create an app
 store that runs under TC, as an open-source project.  I.E. he's looking
 for code to make his own app store.
 ~
 For JNLP.  Right...
 ~
  No exactly. I do have two things in mind. I have developed a full
 blown application based on Swing (its features are a bit too
 complicated for a mobile device) and there are some light
 functionalities with a nails and thumbs kind of GUI for client mobile
 devices
 ~
  I have noticed (and confirmed by your reactions) that this is
 something that most people are not interested in
 ~
  lbrtchx
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Tomcat 6.0 - JNDI resource caching over virtual hosts

2012-10-23 Thread Pid
On 23/10/2012 21:54, Christopher Schultz wrote:
 Pid,
 
 On 10/23/12 3:00 PM, Pid wrote:
 On 23/10/2012 16:55, Jan Kostelansky wrote:
 I am using Tomcat 6.0.18 deployed as web service on Windows XP
 SP3.



 I created additional Host element in conf/server.xml, so I have
 two virtual hosts: localhost (default) and janko

 Host name=jankoappBase=itsapps

 !-- Access log processes all example.

 Documentation at: /docs/config/valve.html

 --

 Valve className=org.apache.catalina.valves.AccessLogValve 
 directory=logs

 prefix=its_access_log. suffix=.txt pattern=common 
 resolveHosts=false/

 /Host



 I deployed the same web applications in both hosts. The first
 web application is main, the other one is hypersonic database as
 storage for the web application. The main web application defines
 access to hypersonic database as resource.

 Then localhost web application points to hypersonic listening on
 port 9002

 Resource

 name=jdbc/profile

 auth=Container

 uniqueResourceName=jdbc/profile

 type=com.atomikos.jdbc.nonxa.NonXADataSourceBean

 factory=org.apache.naming.factory.BeanFactory

 connectionTimeout=30

 poolSize=3

 user=sa

 password=

 driverClassName=org.hsqldb.jdbcDriver

 url=jdbc:hsqldb:hsql://localhost:9002

 /

 Then janko web application points to hypersonic listening on port
 9003

 Resource

 name=jdbc/profile

 auth=Container

 uniqueResourceName=jdbc/profile

 type=com.atomikos.jdbc.nonxa.NonXADataSourceBean

 factory=org.apache.naming.factory.BeanFactory

 connectionTimeout=30

 poolSize=3

 user=sa

 password=

 driverClassName=org.hsqldb.jdbcDriver

 url=jdbc:hsqldb:hsql://janko:9003

 /

 The deployment descriptors are defined in conf/Catalina/localhost
 and conf/Catalina/janko folders. docBase points outside of
 tomcat_home.



 However when accessing both web applications only one data source
 is used by both web applications depending which one is used
 first. It looks to me that JNDI name jdbc/profile is shared
 across web applications.
 
 That's because you can't give the same JNDI name to two different
 DBs. What about trying to use two different names for the
 resources?
 
 I thought locally-defined JNDI resources were essentially private to a
 particular webapp. Is that not the case? I suppose not, since a JNDI
 DataSource will outlive the webapp that caused it to be created, and a
 newly-deployed webapp can inherit the old one, so... I guess I
 shouldn't have been surprised.

I can't find docs to support my position, but I'm (was?) sure it's the
case.  Obscure bug, deliberate design or one of us has the wrong end of
(possibly the wrong) stick?

Interesting.  Might put that on the backlog to have a sniff around the code.


p

 Jan, you ought to be able to change the name of the JNDI name and then
 use resource-link to map it over to what your webapp expects.
 
 I noticed that you are using the uniqueResourceName attribute in
 Resource... what is that?
 
 Thanks,
 -chris
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: tomcat jdbc

2012-10-22 Thread Pid
On 22/10/2012 15:37, S Ahmed wrote:
 I was thinking of using this: https://github.com/codahale/metrics
 
 Much easier to have this keep track of stats, and not having to rely on
 jconsole just to get in insight.

Why is it easier to instrument Tomcat's code than to just use the JMX
info that's already exposed?

VisualVM  JConsole are not monitoring tools, they just display the info
that's already exposed.  Strongly recommend you at least familiarise
yourself with what's in the Tomcat MBeans before you proceed.


p

 On Fri, Oct 19, 2012 at 5:37 PM, Pid p...@pidster.com wrote:
 
 On 19/10/2012 16:18, Daniel Mikusa wrote:
 On Oct 18, 2012, at 2:51 PM, S Ahmed wrote:

 Hi,

 When using the jdbc connection pool library, would it be possible to
 somehow record the # of connections that are being used,
 when the # of connections in the pool are being saturated etc., or is
 that something that
 would have to be modified in the library itself?

 The connection pool publishes some statistics to JMX.  An easy way to
 see them is connect with jconsole.  If you need more advanced statistics,
 you could check / monitor them programmatically or use an existing
 monitoring tool.

 +1  Use VisualVM with the MBeans plugin or JConsole.


 p

 Dan



 i.e. assuming I have can keep track of these counters, is there a way to
 monitor these events in the library or would the jdbc library itself
 need
 to be modified to expose these events?



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



 --

 [key:62590808]


 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: tomcat question

2012-10-22 Thread Pid
On 22/10/2012 14:18, Wiley, Maxie wrote:
 ALL,
 
 Is it possible to remove an installation of a compiler on a production web 
 server(tomcat)? If there is a way to remove the compiler or is it required in 
 order for the system to function properly.  Could you please send me a  
 precise summary of why and any steps that can be taken to mitigate any 
 potential risk associated with the compiler remaining in place.This is for s 
 security issue on my production system.

Why does this enhance security?

If someone has sufficient access to the machine to use the compiler
shipped with Tomcat, you are already in a lot more trouble than they
will be able to inflict just by having access to Tomcat's JDT compiler.


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: tomcat jdbc

2012-10-19 Thread Pid
On 19/10/2012 16:18, Daniel Mikusa wrote:
 On Oct 18, 2012, at 2:51 PM, S Ahmed wrote:
 
 Hi,

 When using the jdbc connection pool library, would it be possible to
 somehow record the # of connections that are being used,
 when the # of connections in the pool are being saturated etc., or is that 
 something that
 would have to be modified in the library itself?
 
 The connection pool publishes some statistics to JMX.  An easy way to see 
 them is connect with jconsole.  If you need more advanced statistics, you 
 could check / monitor them programmatically or use an existing monitoring 
 tool.

+1  Use VisualVM with the MBeans plugin or JConsole.


p

 Dan
 
 

 i.e. assuming I have can keep track of these counters, is there a way to
 monitor these events in the library or would the jdbc library itself need
 to be modified to expose these events?
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Thread related MBean questions

2012-10-19 Thread Pid
On 18/10/2012 14:39, Shanti Suresh wrote:
 Hi Pid,
 
 Thanks for your comments!
 
 I would like a representative metric of how many active threads are in
 Tomcat at a given time.  currentBusyThreads may or may not be a good
 counter because at the time of poll, there is one current operation or none
 - giving me a value or 1 or 0 consistently.  And again, that may just
 be the case.  In the middle of the night, though, I sometimes get a
 currentBusyThreads=50 value, perhaps due to a spidering of the site or
 another batch operation on the server.
 
 What is DaemonThreadCount=85 please?  

Which MBean are you reading that on?

 Is that the current size of the ThreadPool?  

Tomcat has lots of MBeans and more than one way to create a thread pool.
The JVM has threads and can contain multiple thread pools.

 I looked at our server.xml, and an Executor ThreadPool is not
 in use for the 8080 and 8443 HTTP connectors.  Could that mean that idle
 threads are not expired properly?  So at one point, the thread pool size
 could have gone up to 85.

Yes, as of Tomcat 6.0.x, without an Executor the Connectors will have a
pool each, and this will not decrease in size when idle.


 --server.xml snippet:---
 Connector port=8443
clientAuth=false
connectionTimeout=6
disableUploadTimeout=true
emptySessionPath=true
enableLookups=false
maxHttpHeaderSize=8192
maxSpareThreads=75
maxThreads=256
minSpareThreads=25
protocol=HTTP/1.1
scheme=https
secure=true
SSLEnabled=true
sslProtocol=TLS
URIEncoding=UTF-8
acceptCount=100
SSLCertificateFile=cert.cer
SSLCertificateKeyFile=cert_key.key
 
/
 
 --end of snippet--
 
 A quick browse on Google showed up the following discussion:
 http://tomcat.10.n6.nabble.com/Managing-Tomcat-6-threads-How-to-make-tomcat-destroy-threads-when-idle-td2114714.html
 
 I might need to change the server.xml to use the executor Thread Pool, I
 think.

Enable the Executor to manage the thread pool size when idle, yes.


p

 Thanks.
 
   -Shanti
 
 On Wed, Oct 17, 2012 at 9:07 AM, Pid p...@pidster.com wrote:
 
 On 16/10/2012 17:52, Shanti Suresh wrote:
 Greetings.

 I have some questions on finding the number of active threads in Tomcat.
 (1) On our QA system, I notice that the currenthreadsBusy MBean is
 either zero or one for the 8443 and 8080 connectors.

  ThreadCount != currentThreadsBusy

 One is the count of threads, one is the threads that are doing work.


 Why then is ThreadCount = 93 when there is not much going on on QA?

 Because you've previously done enough work for Tomcat to maintain 93
 threads.


 (2) When I want to graph the thread activity in Tomcat (the thread
 Pool usage), which is a better counter to look at - currentThreadsBusy
 or ThreadCount?

 Depends what you want know.


 It seems like ThreadCount is what JConsole displays as Live Threads.
 (3) Why is TotalStartedThreadCount: 264?  Is that a cumulative total
 since Tomcat was restarted?

 Yes.


 p

 --Thread-related MBean snippet:-

 Name: Catalina:type=ThreadPool,name=http-apr-8443
 currentThreadsBusy: 1
 ...

 Name: Catalina:type=ThreadPool,name=http-apr-8080
 currentThreadsBusy: 0
 ...

 Name: java.lang:type=Threading
 DaemonThreadCount: 85
 PeakThreadCount: 99
 AllThreadIds: Array[long] of length 93
   135
   119
   118
   117
 ...

 CurrentThreadCpuTime: 46
 CurrentThreadUserTime: 402000
 ThreadCount: 93
 TotalStartedThreadCount: 264
 ThreadCpuTimeSupported: true
 ...
 ---end of snippet

 Thanks!

  -Shanti



 --

 [key:62590808]


 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: question about krb5.conf file

2012-10-19 Thread Pid
On 18/10/2012 21:15, Mead, Jen L wrote:
 Hi,
 
 I am trying to get my AIX box configured to use Windows Authentication from 
 the tomcat server (web browser).   I have been relying on the example that is 
 at 
 http://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html#Tomcat_instance.
   Here is my question.  The example is using all windows and not unix, so I 
 am not 100% sure on my syntax AND I have two domains I am working with.  One 
 for the tomcat server and one for the windows domain controller.  The example 
 shows them all on the same domain and I have tried a few different 
 configurations and they haven't worked.  So I am hoping to get an answer here.


New topic; new thread please.  Don't just edit your previous one.


p

 This is my info:
 
 AIX 6100-04-11-1140
 apache-tomcat-7.0.27
 tomcat server domain: CON-WAY.COM
 windows AD domain: CONWAY.PROD.CON-WAY.COM
 
 Here is what I currently have in the krb5.conf file (it has changed many 
 times LOL):
 [libdefaults]
 default_realm = CONWAY.PROD.CON-WAY.COM
 default_keytab_name = FILE:/opt/apache-tomcat-7.0.27/conf/tomcat.keytab
 default_tkt_enctypes = des-cbc-md5 des-cbc-crc
 default_tgs_enctypes = des-cbc-md5 des-cbc-crc
 forwardable=true
 
 [realms]
 CONWAY.PROD.CON-WAY.COM = {
 kdc = ciits003.conway.prod.con-way.com:88
 }
 
 [domain_realm]
 con-way.com = CONWAY.PROD.CON-WAY.COM
 .con-way.com = CONWAY.PROD.CON-WAY.COM
 
 [logging]
 kdc = FILE:/var/krb5/log/krb5kdc.log
 admin_server = FILE:/var/krb5/log/kadmin.log
 default = FILE:/var/krb5/log/krb5lib.log
 
 Anyone see any blaring errors?  I am not sure I need to put the word FILE in 
 front of all file locations, but it was in the Windows example
 Jen
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: asking advice for tomcat 7 config

2012-10-19 Thread Pid
On 19/10/2012 08:43, Romain Van der Keilen wrote:
 Hi Guys,
 
 After that, I looked deeper into the database configuration, as I saw 
 in the tests that non db relative actions were responding very fast 
 (50ms for a 1000 users basis). I finally found an OracleDataSource in 
 the Oracle Driver, which reacts far way better than the 
 BasicDataSource I was using before (12s for 150 users for the basic 
 data source, 1.5s for the oracle one, same test).
 
 I'd be interested to see the difference in configuration. I've never had 
 problems with Tomcat's (really commons-dbcp's) BasicDataSource.
 Perhaps when you switched, you changed some essential configuration option?
 
 
 In fact, I do not use the datasource directly in the tomcat config, but as a 
 Spring Bean. Maybe the difference is there. 
 As point of comparisons, here are the new and old configurations:
 
 bean id=dataSource class=oracle.jdbc.pool.OracleDataSource 
 destroy-method=close
 property name=URL value=${alea.cesardb.jdbc.url} /
 property name=user value=${alea.cesardb.jdbc.login}/
 property name=password value=${alea.cesardb.jdbc.password} /
 property name=connectionCachingEnabled value=true /
 property name=connectionCacheProperties
 value
 MinLimit:5
 MaxLimit:200
 InitialLimit:5
 ConnectionWaitTimeout:1200
 InactivityTimeout:1080
 ValidateConnection:true
 /value
 /property
 /bean
 
 bean id=dataSource class=org.apache.commons.dbcp.BasicDataSource 
 destroy-method=close

Exactly which version of commons DBCP are you using?

That class is not one shipped with Tomcat - it's a dependency of your
application.  If it's an old version, it's probably the heavily
synchronised DBCP  this might account in part for the difference in
performance.


 property name=driverClassName value=${alea.cesardb.jdbc.driver}/
 property name=url value=${alea.cesardb.jdbc.url}/
 property name=username value=${alea.cesardb.jdbc.login}/
 property name=password value=${alea.cesardb.jdbc.password}/
 property name=initialSize value=10 /
 property name=minIdle value=10 /
 property name=maxIdle value=20/
 property name=maxActive value=150/

Not the same 150 != 200.

 property name=maxWait value=1/
 property name=validationQuery value=select * from dual/
 property name=testOnBorrow value=false/
 property name=testWhileIdle value=true/
 property name=timeBetweenEvictionRunsMillis value=120/
 property name=minEvictableIdleTimeMillis value=180/
 property name=numTestsPerEvictionRun value=5/
 property name=defaultAutoCommit value=true/
 /bean
 
 
 I did the same tests with only that bean changed, and what I saw on an excel 
 graphic with mean response time is speechless. I changed my test config to an 
 Ubuntu 12.04 with latest JMeter version and OpenJDK 7.
 What I could see is that with the BasicDatasource, the load of the oracle 
 database was a 5-6 (for a 128VProc solaris machine), and the response time 
 was exponentially increasing. With the Oracle datasource, the response time 
 is linearly increasing and the load of the database server is at 61 when I 
 simulate 200 concurrent sessions. 
 
 As previously mentioned by Mark (who is one of the Tomcat developers), I was 
 wrong and the changes to timeouts and keepAlive that I recommended should 
 not have made a difference, considering that you are using the NIO connector 
 in your configuration.
 (My comments were only valid in the case of a BIO connector).
 Yet you seem to indicate 2-3 s. improvement over 15 s., which is about 20%.
 That is puzzling.
 Are you sure, and can you reproduce this consistently ?
 
 In fact, those changes were not the only ones :-) I also changed the 
 acceptCount parameter (set it to 200), the executor configuration and  the 
 compression parameters (I removed the compression config). 

Good plan, change a bunch of things  then compare the results...


p

 After those changes, what I also could see is that before, my JMeter graphic 
 result was very chaotic. Now, response time is almost a straight line in 
 charge, which is for me, a good sign of an healthy configuration...
 Maybe it's still not perfect, but it's much more better than before ...
 
 Romain.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Context fails to load during start of Tomcat, and stalls tomcat startup

2012-10-19 Thread Pid
On 19/10/2012 20:50, Christopher Schultz wrote:
 Steffen,
 
 On 10/19/12 7:13 AM, Steffen Schumacher wrote:
 It attempts to initialize a port to a local soap service, which has
 not yet been deployed - this is detected by the fact that a HTTP
 GET is made locally for the wsdl of said service, which is never
 responded to (expectedly so).
 
 So I guess this is the smoking gun I've been looking for, and the
 only option for me is to implement better handling of this, so that
 timeout occurs reasonably fast, and an attempt is made later on if
 the wsdl wasn't available at the time of tomcat-startup.
 
 Right.
 
 This is kind of a perennial problem for folks who have services that
 rely on each other: you end up having to orchestrate the startup
 ordering of all the services in order to get it all working.
 
 Of course that doesn't work in the real world when services can go
 down unexpectedly, etc.
 
 You might want to lazily-initialize your service, though it is likely
 to diminish performance ever so slightly for the non-startup cases.
 
 Also, if this is just a WSDL document that you need to load, perhaps
 you could use a non-HTTP URL -- say, a file: URL that doesn't require
 a loopback HTTP connection.

Multi-threaded deployment might help:

 http://tomcat.apache.org/tomcat-7.0-doc/config/host.html
 @see startStopThreads


p

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

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Bundle Tomcat and Test in Eclipse

2012-10-18 Thread Pid
On 17/10/2012 21:12, Jason Aleski wrote:
 I am working on a project with specifications to bundle Tomcat7 with a
 Web Application.  I am having trouble with the initial package setup, as
 this is my first time bundling Tomcat7.   I've developed WAR files that
 have been deployed before.
 
 I'm trying to start basic and get the bundle instance of Tomcat7 working
 in Eclipse.  That way, when I compile, it will launch using my version
 of Tomcat.
 
 I've searched online, but have not found exactly what I need to
 accomplish this.  I'm sure my keywords are wrong.  I see a lot of items
 on embedding Tomcat, but this is not what I need.
 
 Additional Information
 Assumptions
 1)Users will install the appropriate Java version (due to
 distribution legal)
 
 Needs
 1)Deliver custom instance of tomcat with various JDBC and tools
 included in the libraries.
 
 Expectations
 1)Users will download a ZIP file or pull it via Git/SVN.  No
 install required other than unpacking the files.
 2)There will be some minor configuration changes to various Tomcat
 configs based on the users environment (LDAP, sFTP, databases, etc.)
 3)The same file can be downloaded via Linux, Windows or Mac and
 Tomcat will execute and launch the web application/web services.

So take a tomcat zip install, unpack it, add stuff and zip it back up again.

 4)All development is to be done in Eclipse.  Upon testing, Eclipse
 will launch the bundled version of Tomcat.

Development of what, the bundle?  So write a build script to unpack,
modify  zip it up.

This sounds like an Eclipse question rather than a Tomcat one.


p

 Can anyone offer any guidance on what I should be looking for?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


  1   2   3   4   5   6   7   8   9   10   >