6.0.x Windows XP

2011-05-13 Thread Abhay Adgurwar
*Problem :-   * Tomcat service stops automatically and gives the following
errors in log files when try to start it



 *In Catalina File*
org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundExceptionhttp://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html:
org.apache.catalina.core.AprLifecycleListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.misc.Launcher$ExtClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:204)
at org.apache.commons.digester.Rule.begin(Rule.java:152)
at org.apache.commons.digester.Digester.startElement(Digester.java:1286)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1572)
at org.apache.catalina.startup.Catalina.start(Catalina.java:451)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)

---
*In Stderr File*
org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundExceptionhttp://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html:
org.apache.catalina.core.AprLifecycleListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.misc.Launcher$ExtClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:204)
at org.apache.commons.digester.Rule.begin(Rule.java:152)
at org.apache.commons.digester.Digester.startElement(Digester.java:1286)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1572)
at org.apache.catalina.startup.Catalina.start(Catalina.java:451)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 

[ANN] Apache Tomcat 7.0.14 released

2011-05-13 Thread markt
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 7.0.14.

Apache Tomcat 7.0.14 includes bug fixes and the following new features
compared to version 7.0.12:
- new StuckThreadDetectionValve to identify long running requests
- JAAS authentication support for the JMXRemoteLifecycleListener
- updated MIME type mappings to align with those of Apache httpd

Please refer to the change log for the list of changes:
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Note that this version has 4 zip binaries: a generic one and three
bundled with Tomcat native binaries for Windows operating systems
running on different CPU architectures.

Downloads:
http://tomcat.apache.org/download-70.cgi

Migration guide from Apache Tomcat 5.5.x and 6.0.x:
http://tomcat.apache.org/migration.html

Thank you,

-- The Apache Tomcat Team





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



Re: 6.0.x Windows XP

2011-05-13 Thread André Warnier

Abhay Adgurwar wrote:

*Problem :-   * Tomcat service stops automatically and gives the following
errors in log files when try to start it

Step #1 : use an XML-aware editor, and verify that all the .xml files in the conf 
directory of Tomcat are correct, XML-wise.


Step #2 : as downloaded from the Tomcat website, Tomcat 6.0 for Windows works out of the 
box.  So what did you change ?



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



Re: Multiple context paths for single deployment

2011-05-13 Thread Pid
On 12/05/2011 11:28, JanAa wrote:
 
 Hi,
 
 I want to have more than one context path for a single deployment in Tomcat
 5.5.28. Whatever I do I seem to get multiple deployments.
 In server.xml I have:
   Host name=localhost appBase=webapps
unpackWARs=true autoDeploy=false deployIgnore=alternative
xmlValidation=false xmlNamespaceAware=false
 
 In conf/Catalina/localhost I have two .xml files (primary.xml and
 alternative.xml) both containing:
 Context docBase=/opt/tomcat/multiapps/primary
 /Context
 
 In /opt/tomcat/multiapps/primary the web app resides.

By defining multiple contexts, you are getting exactly that.


 In the web app I want to be able to use getContextPath() and get response
 based on what URL used to access (either www.mydomain.com/primary or
 www.mydomain.com/alternative)

What are you getting now?


p

 Can anyone help?




signature.asc
Description: OpenPGP digital signature


Re: Multiple context paths for single deployment

2011-05-13 Thread JanAa

Hi,

thanks for replying.

What I want is an alias for the context so that more than one url can be
used for the same application and that the url used is reflected in
HttpServletRequest.getContextPath(). 

Currently I get two deployments, then getContextPath() returns those two
values as expected. I want to get rid of the double deployment but still get
the proper context path.

-Jan 


Pid * wrote:
 
 On 12/05/2011 11:28, JanAa wrote:
 
 Hi,
 
 I want to have more than one context path for a single deployment in
 Tomcat
 5.5.28. Whatever I do I seem to get multiple deployments.
 In server.xml I have:
   Host name=localhost appBase=webapps
unpackWARs=true autoDeploy=false deployIgnore=alternative
xmlValidation=false xmlNamespaceAware=false
 
 In conf/Catalina/localhost I have two .xml files (primary.xml and
 alternative.xml) both containing:
 Context docBase=/opt/tomcat/multiapps/primary
 /Context
 
 In /opt/tomcat/multiapps/primary the web app resides.
 
 By defining multiple contexts, you are getting exactly that.
 
 
 In the web app I want to be able to use getContextPath() and get response
 based on what URL used to access (either www.mydomain.com/primary or
 www.mydomain.com/alternative)
 
 What are you getting now?
 
 
 p
 
 Can anyone help?
 
 
 
  
 

-- 
View this message in context: 
http://old.nabble.com/Multiple-context-paths-for-single-deployment-tp31601866p31610033.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Deploying with JMX (but not with manager app) when autodeploy is disabled

2011-05-13 Thread Luca Gervasi
Hello,

I have this bit of information from the server.xml

Host
name=${host.defaulthost}
appBase=${host.appbase}
unpackWARs=false
autoDeploy=false
xmlValidation=false
xmlNamespaceAware=false


I haven't manager, host-manager, psi-probe or similar webapps. Is it
possible, using ONLY JVisualVM/JConsole, deploying and start an
application i already copied in the webapps dir?

Thanks

Luca

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



Re: Deploying with JMX (but not with manager app) when autodeploy is disabled

2011-05-13 Thread Mark Thomas
On 13/05/2011 11:25, Luca Gervasi wrote:
 Hello,
 
 I have this bit of information from the server.xml
 
 Host
 name=${host.defaulthost}
 appBase=${host.appbase}
 unpackWARs=false
 autoDeploy=false
 xmlValidation=false
 xmlNamespaceAware=false
 
 
 I haven't manager, host-manager, psi-probe or similar webapps. Is it
 possible, using ONLY JVisualVM/JConsole, deploying and start an
 application i already copied in the webapps dir?

With Tomcat 7, that should be possible.

Mark



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



Re: Possible Servlet 3.0 AsyncContext bug in Tomcat 7.0.x

2011-05-13 Thread Dan Checkoway
Mark,

I wanted to let you know that 7.0.14 (I dl'd the official release this
morning) changed the behavior slightly, but it didn't fix the bug.  The
behavior I'm seeing now is:

response.sendError - seems to close the connection immediately (doesn't wait
to time out like 7.0.12 did), but you get no headers or content of any kind.

response.sendRedirect - no change, still just times out, and you get no
headers or content of any kind.

Should I open a ticket for this?  It's not a showstopper for me, since I can
work around it with .setStatus and .setHeader, but I do think it's a legit
bug...unless you think I've missed something about AsyncContext usage and
I'm doing something wrong.

Again, my easily reproducible test case is here:

https://github.com/dcheckoway/async-test

Thanks,
Dan

On Thu, May 12, 2011 at 1:00 PM, Dan Checkoway dchecko...@gmail.com wrote:

 Ah, excellent.  Glad to know I wasn't on crack.  :-)  Thanks for the quick
 reply!

 Dan


 On Thu, May 12, 2011 at 12:51 PM, Mark Thomas ma...@apache.org wrote:

 On 12/05/2011 17:33, Dan Checkoway wrote:
  Hello,
 
  I recently started working with Servlet 3.0 async stuff with Tomcat
 7.0.12,
  and I bumped into what may be a serious bug.  Or it may be that I'm just
  doing something dumb.  :-)
 
  For some reason, response.sendRedirect and response.sendError are not
  producing expected behavior when using an AsyncContext.  The async
 request
  completes normally, and everything looks hunky dory on the server side,
 but
  the client never gets ANY response from the server.  It appears that
 Tomcat
  simply times out after the default 10 seconds and closes the connection.
  No
  headers are returned, no content, nothing.  I've confirmed with thread
 dumps
  that the server isn't stuck.
 
  Yet...if you use response.setStatus and response.setHeader instead, it
 works
  absolutely fine.  The client gets the response every time.
 
  I put together a very simple test that isolates the issue reliably:
  https://github.com/dcheckoway/async-test
 
  See the README in there for details.
 
  Please let me know if I've missed something simple!  I'm relatively new
 to
  Servlet 3.0...

 Similar to a known issue that has already been fixed.

 The fix is in 7.0.14. The official 7.0.14 release should be available
 later tonight. If you are in a hurry, you can get the release candidate
 from here:
 http://people.apache.org/~markt/dev/tomcat-7/v7.0.14/

 Mark



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





Re: Possible Servlet 3.0 AsyncContext bug in Tomcat 7.0.x

2011-05-13 Thread markt
Dan Checkoway dchecko...@gmail.com wrote:

Mark,

I wanted to let you know that 7.0.14 (I dl'd the official release this
morning) changed the behavior slightly, but it didn't fix the bug.  The
behavior I'm seeing now is:

response.sendError - seems to close the connection immediately (doesn't
wait
to time out like 7.0.12 did), but you get no headers or content of any
kind.

response.sendRedirect - no change, still just times out, and you get no
headers or content of any kind.

Should I open a ticket for this?  It's not a showstopper for me, since
I can
work around it with .setStatus and .setHeader, but I do think it's a
legit
bug...unless you think I've missed something about AsyncContext usage
and
I'm doing something wrong.

Again, my easily reproducible test case is here:

https://github.com/dcheckoway/async-test

Thanks,
Dan

On Thu, May 12, 2011 at 1:00 PM, Dan Checkoway dchecko...@gmail.com
wrote:

 Ah, excellent.  Glad to know I wasn't on crack.  :-)  Thanks for the
quick
 reply!

 Dan


 On Thu, May 12, 2011 at 12:51 PM, Mark Thomas ma...@apache.org
wrote:

 On 12/05/2011 17:33, Dan Checkoway wrote:
  Hello,
 
  I recently started working with Servlet 3.0 async stuff with
Tomcat
 7.0.12,
  and I bumped into what may be a serious bug.  Or it may be that
I'm just
  doing something dumb.  :-)
 
  For some reason, response.sendRedirect and response.sendError are
not
  producing expected behavior when using an AsyncContext.  The async
 request
  completes normally, and everything looks hunky dory on the server
side,
 but
  the client never gets ANY response from the server.  It appears
that
 Tomcat
  simply times out after the default 10 seconds and closes the
connection.
  No
  headers are returned, no content, nothing.  I've confirmed with
thread
 dumps
  that the server isn't stuck.
 
  Yet...if you use response.setStatus and response.setHeader
instead, it
 works
  absolutely fine.  The client gets the response every time.
 
  I put together a very simple test that isolates the issue
reliably:
  https://github.com/dcheckoway/async-test
 
  See the README in there for details.
 
  Please let me know if I've missed something simple!  I'm
relatively new
 to
  Servlet 3.0...

 Similar to a known issue that has already been fixed.

 The fix is in 7.0.14. The official 7.0.14 release should be
available
 later tonight. If you are in a hurry, you can get the release
candidate
 from here:
 http://people.apache.org/~markt/dev/tomcat-7/v7.0.14/

 Mark




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




Yes, please open a bugzilla issue for this.

Cheers,

Mark



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



multiple Loadbalancer workers - found each other webapps?

2011-05-13 Thread Alexander Diedler
Hello,

Why see one tomcat the apps of another tomcat?

We have two servers with two installed Apache Tomcats 6.0.32 and one Apache
Webserver 2.2.14.

Server A:

Tomcat1 hosts App1 and App2 

Tomcat2 hosts App3

 

Server B:

Tomcat1 hosts App1 and App2 

Tomcat2 hosts App3

 

In the worker.properties we define two loadbalancer worker, but it seems,
that they found each other “cluster”.

 

Message from catalina log : 

[…]

13.05.2011 14:29:15 org.apache.catalina.startup.Catalina start

INFO: Server startup in 5793 ms

13.05.2011 14:29:18 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:article_finder_admin#

13.05.2011 14:29:19 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:article_finder_admin#

13.05.2011 14:29:31 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:article_finder_admin#

13.05.2011 14:29:35 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:article_finder_admin#

13.05.2011 14:29:35 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:article_finder_admin#

13.05.2011 14:29:35 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:article_finder_admin#

13.05.2011 14:29:39 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:akademie#

13.05.2011 14:29:41 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:akademie#

13.05.2011 14:29:45 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:extranet#

13.05.2011 14:29:47 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:extranet#

13.05.2011 14:29:47 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:extranet#

13.05.2011 14:29:50 org.apache.catalina.ha.session.ClusterSessionListener
messageReceived

WARNUNG: Context manager doesn't exist:extranet#

 

The Context Managers for article_Finder_admin, akademie and extranet are
Virtual Hosts in LoadbalancerA and doesn´t exists in conf directory of
Tomcat2.

 

We define the Cluster Valve inside the Engine (remark, these block was eqal
on every server.xml, or have we to customize these valve???) :

 

 

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster

 channelSendOptions=8

 

  Manager className=org.apache.catalina.ha.session.DeltaManager

   expireSessionsOnShutdown=false

   notifyListenersOnReplication=true/

 

  Channel
className=org.apache.catalina.tribes.group.GroupChannel

Membership
className=org.apache.catalina.tribes.membership.McastService

address=228.0.0.4

port=45564

frequency=500

dropTime=3000/

Receiver
className=org.apache.catalina.tribes.transport.nio.NioReceiver

  address=auto

  port=4000

  autoBind=100

  selectorTimeout=5000

  maxThreads=6/

 

Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter

  Transport
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/

/Sender

Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
/

Interceptor
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15In
terceptor/

  /Channel

 

  Valve className=org.apache.catalina.ha.tcp.ReplicationValve

 filter=/

  Valve
className=org.apache.catalina.ha.session.JvmRouteBinderValve/

   !--

  Deployer
className=org.apache.catalina.ha.deploy.FarmWarDeployer

tempDir=/tmp/war-temp/

deployDir=/tmp/war-deploy/

watchDir=/tmp/war-listen/

watchEnabled=false/

   --

  ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/

  ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/

/Cluster

 

 

 

Worker.properties:

 

# 

# First worker

# 

worker.worker1.port=8010

worker.worker1.host=192.168.100.1

worker.worker1.type=ajp13

worker.worker1.lbfactor=75

worker.worker1.route=worker1

#worker.worker1.connection_pool_size=250

#worker.worker1.connection_pool_minsize=126


Re: Possible Servlet 3.0 AsyncContext bug in Tomcat 7.0.x

2011-05-13 Thread Dan Checkoway
https://issues.apache.org/bugzilla/show_bug.cgi?id=51197

Thanks Mark!

On Fri, May 13, 2011 at 8:33 AM, ma...@apache.org wrote:

 Dan Checkoway dchecko...@gmail.com wrote:

 Mark,
 
 I wanted to let you know that 7.0.14 (I dl'd the official release this
 morning) changed the behavior slightly, but it didn't fix the bug.  The
 behavior I'm seeing now is:
 
 response.sendError - seems to close the connection immediately (doesn't
 wait
 to time out like 7.0.12 did), but you get no headers or content of any
 kind.
 
 response.sendRedirect - no change, still just times out, and you get no
 headers or content of any kind.
 
 Should I open a ticket for this?  It's not a showstopper for me, since
 I can
 work around it with .setStatus and .setHeader, but I do think it's a
 legit
 bug...unless you think I've missed something about AsyncContext usage
 and
 I'm doing something wrong.
 
 Again, my easily reproducible test case is here:
 
 https://github.com/dcheckoway/async-test
 
 Thanks,
 Dan
 
 On Thu, May 12, 2011 at 1:00 PM, Dan Checkoway dchecko...@gmail.com
 wrote:
 
  Ah, excellent.  Glad to know I wasn't on crack.  :-)  Thanks for the
 quick
  reply!
 
  Dan
 
 
  On Thu, May 12, 2011 at 12:51 PM, Mark Thomas ma...@apache.org
 wrote:
 
  On 12/05/2011 17:33, Dan Checkoway wrote:
   Hello,
  
   I recently started working with Servlet 3.0 async stuff with
 Tomcat
  7.0.12,
   and I bumped into what may be a serious bug.  Or it may be that
 I'm just
   doing something dumb.  :-)
  
   For some reason, response.sendRedirect and response.sendError are
 not
   producing expected behavior when using an AsyncContext.  The async
  request
   completes normally, and everything looks hunky dory on the server
 side,
  but
   the client never gets ANY response from the server.  It appears
 that
  Tomcat
   simply times out after the default 10 seconds and closes the
 connection.
   No
   headers are returned, no content, nothing.  I've confirmed with
 thread
  dumps
   that the server isn't stuck.
  
   Yet...if you use response.setStatus and response.setHeader
 instead, it
  works
   absolutely fine.  The client gets the response every time.
  
   I put together a very simple test that isolates the issue
 reliably:
   https://github.com/dcheckoway/async-test
  
   See the README in there for details.
  
   Please let me know if I've missed something simple!  I'm
 relatively new
  to
   Servlet 3.0...
 
  Similar to a known issue that has already been fixed.
 
  The fix is in 7.0.14. The official 7.0.14 release should be
 available
  later tonight. If you are in a hurry, you can get the release
 candidate
  from here:
  http://people.apache.org/~markt/dev/tomcat-7/v7.0.14/
 
  Mark
 
 
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

 Yes, please open a bugzilla issue for this.

 Cheers,

 Mark



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




Re: Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader

2011-05-13 Thread Jim Seymour
On Wed, 11 May 2011 18:04:15 -0400
Jim Seymour jseym...@linxnet.com wrote:

 On Thu, 12 May 2011 01:16:43 +0400
 Konstantin Kolinko knst.koli...@gmail.com wrote:
 
  1) jsvc is not developed within Apache Tomcat project but within
  the Apache Commons - it belongs to Apache Commons Daemon, -- your
  question belongs there
  http://commons.apache.org/daemon/
 
 Thanks!  I'll subscribe there and re-post.
[snip]

Well, Konstantin, there was no joy over there, either, so I guess
I'll have to seek another solution.  Thanks for the pointer.

Regards,
Jim
-- 
Note: My mail server employs *very* aggressive anti-spam
filtering.  If you reply to this email and your email is
rejected, please accept my apologies and let me know via my
web form at http://jimsun.LinxNet.com/contact/scform.php.

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



Re: Deploying with JMX (but not with manager app) when autodeploy is disabled

2011-05-13 Thread Luca Gervasi
On 05/13/2011 12:28 PM, Mark Thomas wrote:
 On 13/05/2011 11:25, Luca Gervasi wrote:
 Hello,

 I have this bit of information from the server.xml

 Host
 name=${host.defaulthost}
 appBase=${host.appbase}
 unpackWARs=false
 autoDeploy=false
 xmlValidation=false
 xmlNamespaceAware=false
 

 I haven't manager, host-manager, psi-probe or similar webapps. Is it
 possible, using ONLY JVisualVM/JConsole, deploying and start an
 application i already copied in the webapps dir?
 
 With Tomcat 7, that should be possible.
 
 Mark
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 

My bad:

Server version: Apache Tomcat/6.0.29
Server built:   July 19 2010 1458
Server number:  6.0.0.29
OS Name:Linux
OS Version: 2.6.32-71.el6.x86_64
Architecture:   x86_64
JVM Version:1.5.0
JVM Vendor: Free Software Foundation, Inc.

Thanks!

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



Re: Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader

2011-05-13 Thread sebb
On 13 May 2011 13:56, Jim Seymour jseym...@linxnet.com wrote:
 On Wed, 11 May 2011 18:04:15 -0400
 Jim Seymour jseym...@linxnet.com wrote:

 On Thu, 12 May 2011 01:16:43 +0400
 Konstantin Kolinko knst.koli...@gmail.com wrote:

  1) jsvc is not developed within Apache Tomcat project but within
  the Apache Commons - it belongs to Apache Commons Daemon, -- your
  question belongs there
  http://commons.apache.org/daemon/

 Thanks!  I'll subscribe there and re-post.
 [snip]

 Well, Konstantin, there was no joy over there, either, so I guess
 I'll have to seek another solution.  Thanks for the pointer.

Or wait a bit longer - you only posted 2 days ago here.

 Regards,
 Jim
 --
 Note: My mail server employs *very* aggressive anti-spam
 filtering.  If you reply to this email and your email is
 rejected, please accept my apologies and let me know via my
 web form at http://jimsun.LinxNet.com/contact/scform.php.

 -
 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: Multiple context paths for single deployment

2011-05-13 Thread Caldarale, Charles R
 From: JanAa [mailto:jan.aage...@norse-solutions.com] 
 Subject: Re: Multiple context paths for single deployment

 What I want is an alias for the context so that more than 
 one url can be used for the same application and that the
 url used is reflected in HttpServletRequest.getContextPath(). 

Those are conflicting requirements.  Pick one or the other - you can't have 
both.

(Actually, you can, but it would be a major pain.  If you wrote a filter that 
wrapped every HttpServletRequest object and implemented your own 
getContextPath() method, you could choose to return whatever you want for the 
result.)

 - Chuck


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


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



Re: Multiple context paths for single deployment

2011-05-13 Thread Jess Holle

Hmm

In Tomcat versions up through 6.0, I have cases where I have 1 expanded 
WAR directory (outside Tomcat's webapps, etc) and then numerous 
disparate Context XML files under Tomcat/conf, each with their own 
overrides to the original web.xml (e.g. each getting their own data 
sources, JNDI env values, context name, etc).


It was my understanding that the web.xml override capability of Context 
was broken in Tomcat 7 (and/or the most recent Tomcat 6??) -- at least 
for a while, hopefully this has been fixed.


Otherwise, however, this seems to work nicely -- 1 deployment, 'n' URLs 
with 'n' disparate context paths.  It does, of course, load 'n' copies 
of all the JSPs, etc, etc -- so there's definitely some downside in 
terms of overhead.  It is a quick and dirty way to deploy numerous 
instances of a web app which has unfortunate singletons, e.g. data 
sources, where you belatedly discover you want a cardinality of 'n' 
rather than 1.


--
Jess Holle

On 5/13/2011 8:56 AM, Caldarale, Charles R wrote:

From: JanAa [mailto:jan.aage...@norse-solutions.com]
Subject: Re: Multiple context paths for single deployment
What I want is an alias for the context so that more than
one url can be used for the same application and that the
url used is reflected in HttpServletRequest.getContextPath().

Those are conflicting requirements.  Pick one or the other - you can't have 
both.

(Actually, you can, but it would be a major pain.  If you wrote a filter that 
wrapped every HttpServletRequest object and implemented your own 
getContextPath() method, you could choose to return whatever you want for the 
result.)

  - 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


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



RE: Multiple context paths for single deployment

2011-05-13 Thread Caldarale, Charles R
 From: Jess Holle [mailto:je...@ptc.com] 
 Subject: Re: Multiple context paths for single deployment

 In Tomcat versions up through 6.0, I have cases where I have 1 expanded 
 WAR directory (outside Tomcat's webapps, etc) and then numerous 
 disparate Context XML files under Tomcat/conf, each with their own 
 overrides to the original web.xml (e.g. each getting their own data 
 sources, JNDI env values, context name, etc).

Yes, that still works fine - but it's not what the OP is asking for.  He 
specifically requested *one* application deployment, with multiple URL paths 
for the *same* application.  If what he really wants is multiple deployments 
using a single copy of the .war file, then keeping the .war outside of the 
Host appBase and pointing multiple Context elements at it from 
conf/Catalina/[host] would do nicely.  But these are still multiple 
deployments, and would not be the same application, even though they originate 
from the same location.

 - Chuck


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


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



RE: Multiple context paths for single deployment

2011-05-13 Thread JanAa

Thanks for replying.

I was under the impression that the difference between
HttpServletRequest.getContextPath and ServletContext.getContextPath() was
exactly that the first returned the context path used in the request while
the second returned the context path used when processing
(http://download.oracle.com/javaee/5/api/javax/servlet/ServletContext.html#getContextPath()).

I realise I have to find another route, I still need multiple urls to one
application, and I have to identify these in the code. I am thinking about
an urlrewritefilter that sets a request-attribute, and then use an
outbound-rule to not show this to the users. Any other/better proposal?

-Jan 


n828cl wrote:
 
 From: JanAa [mailto:jan.aage...@norse-solutions.com] 
 Subject: Re: Multiple context paths for single deployment
 
 What I want is an alias for the context so that more than 
 one url can be used for the same application and that the
 url used is reflected in HttpServletRequest.getContextPath(). 
 
 Those are conflicting requirements.  Pick one or the other - you can't
 have both.
 
 (Actually, you can, but it would be a major pain.  If you wrote a filter
 that wrapped every HttpServletRequest object and implemented your own
 getContextPath() method, you could choose to return whatever you want for
 the result.)
 
 

-- 
View this message in context: 
http://old.nabble.com/Multiple-context-paths-for-single-deployment-tp31601866p31611838.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Multiple context paths for single deployment

2011-05-13 Thread Caldarale, Charles R
 From: JanAa [mailto:jan.aage...@norse-solutions.com] 
 Subject: RE: Multiple context paths for single deployment

 What I want is an alias for the context so that more than 
 one url can be used for the same application and that the
 url used is reflected in HttpServletRequest.getContextPath().

I just realized that Tomcat 7 does have an alias capability that might be 
configured for what you want, but I haven't tried it.  Here's some of the 
description from:

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Standard_Implementation


aliases 

This attribute provides a list of external locations from which to load 
resources for this context. The list of aliases should be of the form 
/aliasPath1=docBase1,/aliasPath2=docBase2 where aliasPathN must include a 
leading '/' and docBaseN must be an absolute path to either a .war file or a 
directory.

A resource will be searched for in the first docBaseN for which aliasPathN is a 
leading path segment of the resource. If there is no such alias, then the 
resource will be searched in the usual way.


If you set each /aliasPath to the same .war file or directory, this may achieve 
your goal.

 - Chuck


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


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



Re: [OT] storing images

2011-05-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alexis,

Marking off-topic because this has nothing whatsoever to do with Tomcat.

On 5/11/2011 5:06 PM, alexis wrote:
 For real time purposes, im building images

I get it.

 We'll going to images, what i store in servletcontext is NOT
 practically the image, as those images are being constructed using
 jfreechart, what i store in memory is the JFreeChart object  (and
 inside the JFreeChart object i store some other objects like the
 dataseries, Custom Labels, etc)

Ouch. You may be storing much more in memory than necessary. When you
get new data, do you update the existing JFreeChart object, or do you
create one from scratch (new series, etc.) each time the image is
requested /and/ needs to be re-generated?

 after i store this object inside
 servletcontext, my servet returns out.println(img
 src=\getImage?img=skill1_239423948.png\); so the ajax script sets
 this as innerhtml for a div in the jsp, and the jsp calls getimage
 servlet requesting the image.

Okay.

 What happens here is
 
 1. _239423948 is a random value that i add to avoid browser caching
 of the image, so as i receive it, it's discarded

You could also use a random request parameter value, but there's little
practical difference.

 2. i read the JFreeChart object from the servletcontext regarding skill1

 3. i call a method from the object that is called writeChartAsJPEG
 (self explaining) , set the response type to image/jpeg and then i do
 out.println(JFreeChart); which renders the image that is finally shown
 by the browser.

Hopefully not println as that may corrupt your image and will
definitely add an unnecessary trailing newline.

So, you re-encode the image every time it's served to a client. I'm
suggesting that when you render the JFreeChart, you go all the way to a
JPEG (or image format of your choice) and store /that/ in the
ServletContext.

 It's working without any problem, im constantly profiling the webapp
 to see how it behaves and before/after the image implementation i
 have noticed no change at all on the memory and cpu usage.

I think you'll notice that CPU usage is reduced dramatically if you
aren't re-encoding the image upon every request. Inverse cosine
transforms aren't free ;)

 What i dont know exactly is how much memory uses a JFreeChart object
 stored in the servletcontext, if there's a way to know it please let me
 know so i can check it and let you know.

What profiler are you using? I use YourKit and it tells me the sizes of
object trees fairly easily.

If you store the raw bytes of the JPEG image in memory, they will take
up exactly the same size as the file does on disk. So if you look at the
image information from your web browser and it says, say, 180k for the
image, then that's how much memory it will take when it's sitting in
your ServletContext.

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

iEYEARECAAYFAk3NRJsACgkQ9CaO5/Lv0PCG8wCgqwxiCsRZSQkzHbyirOiJWJD2
SwoAnj4nOKAEV15cRi7hlb3aMlgB88+n
=xWLg
-END PGP SIGNATURE-

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



Re: 6.0.x Windows XP

2011-05-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Abhay,

On 5/13/2011 2:39 AM, Abhay Adgurwar wrote:
 *Problem :-   * Tomcat service stops automatically and gives the following
 errors in log files when try to start it
 
 SEVERE: Begin event threw exception
 java.lang.ClassNotFoundException: 
 org.apache.catalina.core.AprLifecycleListener

So it can't find the AprLifecycleListener class, which is a pretty
integral part of Tomcat.

How are you starting Tomcat? Can you run Tomcat from the command-line to
see if that changes anything?

Sometimes CNFE's are thrown not because the class isn't found but
because something the class needs is not being found. For instance,
AprLifecycleListener needs the APR native library to work properly,
though it's written such that it will catch any exception thrown when
the library fails to load. It's possible that something else is failing
to load.

Can you try completely re-installing Tomcat? I think that's likely to be
more fruitful than trying to determine exactly what has broken in your case.

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

iEYEARECAAYFAk3NSAAACgkQ9CaO5/Lv0PBdDACdGFBnt/+kuaU6fdXWMh/pVSIu
K9gAoIdVBGtMe0rDQ2bos4n7kHoOmhXM
=+1VN
-END PGP SIGNATURE-

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



Re: multiple Loadbalancer workers - found each other webapps?

2011-05-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alexander,

On 5/13/2011 8:40 AM, Alexander Diedler wrote:
 Why see one tomcat the apps of another tomcat?

Are you asking: why does one Tomcat see the webapps deployed on another
Tomcat?

 We have two servers with two installed Apache Tomcats 6.0.32 and one Apache
 Webserver 2.2.14.
 
 Server A:
 Tomcat1 hosts App1 and App2 
 Tomcat2 hosts App3
 
 Server B:
 Tomcat1 hosts App1 and App2 
 Tomcat2 hosts App3

So you have seemingly identical servers, each with two instances of Tomcat.

 In the worker.properties we define two loadbalancer worker, but it seems,
 that they found each other “cluster”.

 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=worker1,worker2

 worker.loadbalancertc.type=lb
 worker.loadbalancertc.balance_workers=worker6,worker7


 worker.worker1.port=8010
 worker.worker1.host=192.168.100.1
 worker.worker1.route=worker1

 worker.worker2.port=8010
 worker.worker2.host=192.168.100.2
 worker.worker2.route=worker2

 worker.worker6.port=8012
 worker.worker6.host=192.168.100.1

Missing 'route' setting, here.

 worker.worker7.port=8012
 worker.worker7.host=192.168.100.2

Missing 'route' setting, here. These missing 'route' settings probably
don't matter, as the default route is the name of the worker. It's not
much different from the rest of your workers.properties file where you
are explicitly setting these options to their defaults, etc. You might
want to consider using a template worker instead of repeating all this
stuff.

I also don't see a worker.list setting. Did you just omit that from
your post?

 WARNUNG: Context manager doesn't exist:article_finder_admin#
 WARNUNG: Context manager doesn't exist:article_finder_admin#
 WARNUNG: Context manager doesn't exist:article_finder_admin#
 WARNUNG: Context manager doesn't exist:article_finder_admin#
 WARNUNG: Context manager doesn't exist:article_finder_admin#
 WARNUNG: Context manager doesn't exist:article_finder_admin#
 WARNUNG: Context manager doesn't exist:akademie#
 WARNUNG: Context manager doesn't exist:akademie#
 WARNUNG: Context manager doesn't exist:extranet#
 WARNUNG: Context manager doesn't exist:extranet#
 WARNUNG: Context manager doesn't exist:extranet#
 WARNUNG: Context manager doesn't exist:extranet#

(Looks like there's a missing localized error message, there. What
version of TC are you running?)

 The Context Managers for article_Finder_admin, akademie and extranet are
 Virtual Hosts in LoadbalancerA and doesn´t exists in conf directory of
 Tomcat2.
 
 We define the Cluster Valve inside the Engine (remark, these block was eqal
 on every server.xml, or have we to customize these valve???) :

What about the Engine block? Have you properly set the jvmRoute for
each of those on their respective servers?

Also, the Membership should probably be different on each server...
you need to specify the address attribute differently, I think.

 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
  channelSendOptions=8
   Manager className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false
notifyListenersOnReplication=true/

So, you are doing both session stickiness /and/ session replication?

If all 4 TC instances are members of the same cluster, then you should
expect all the errors you are getting. Try re-reading
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html (I know
you've at least visited it, because your configuration is copy/pasted
directly from that page), especially this part:


Also when using the delta manager it will replicate to all nodes, even
nodes that don't have the application deployed.


You might want to consider configuring your clusters separately instead
of one large cluster.

There is another suggestion in that documentation for getting around
this problem. I'll let you read the docs to find it.

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

iEYEARECAAYFAk3NSpEACgkQ9CaO5/Lv0PAhRwCffV6nLRXH9bdr4q4P4x7a3sib
bPkAnizFQeyD7da1HUSHwLn+UWXbxRsA
=jGP/
-END PGP SIGNATURE-

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



Re: [OT] storing images

2011-05-13 Thread alexis

On May 13, 2011, at 11:47 AM, Christopher Schultz wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Alexis,
 
 Marking off-topic because this has nothing whatsoever to do with Tomcat.
 
 On 5/11/2011 5:06 PM, alexis wrote:
 For real time purposes, im building images
 
 I get it.
 
 We'll going to images, what i store in servletcontext is NOT
 practically the image, as those images are being constructed using
 jfreechart, what i store in memory is the JFreeChart object  (and
 inside the JFreeChart object i store some other objects like the
 dataseries, Custom Labels, etc)
 
 Ouch. You may be storing much more in memory than necessary. When you
 get new data, do you update the existing JFreeChart object, or do you
 create one from scratch (new series, etc.) each time the image is
 requested /and/ needs to be re-generated?
 

upon new data, what i only build new are the series, then i get the object on 
the servletcontext and set the new data inside this object (if exists, if not, 
the whole chart object is created)



 after i store this object inside
 servletcontext, my servet returns out.println(img
 src=\getImage?img=skill1_239423948.png\); so the ajax script sets
 this as innerhtml for a div in the jsp, and the jsp calls getimage
 servlet requesting the image.
 
 Okay.
 
 What happens here is
 
 1. _239423948 is a random value that i add to avoid browser caching
 of the image, so as i receive it, it's discarded
 
 You could also use a random request parameter value, but there's little
 practical difference.
 
 2. i read the JFreeChart object from the servletcontext regarding skill1
 
 3. i call a method from the object that is called writeChartAsJPEG
 (self explaining) , set the response type to image/jpeg and then i do
 out.println(JFreeChart); which renders the image that is finally shown
 by the browser.
 
 Hopefully not println as that may corrupt your image and will
 definitely add an unnecessary trailing newline.
 
 So, you re-encode the image every time it's served to a client. I'm
 suggesting that when you render the JFreeChart, you go all the way to a
 JPEG (or image format of your choice) and store /that/ in the
 ServletContext.

Yes, you're right 1 encoding against n encodings, no matter how small is the 
cpu save, it's saved n times so it makes the difference.

And yes, out.print it is and not out.prinln, changed :)


 
 It's working without any problem, im constantly profiling the webapp
 to see how it behaves and before/after the image implementation i
 have noticed no change at all on the memory and cpu usage.
 
 I think you'll notice that CPU usage is reduced dramatically if you
 aren't re-encoding the image upon every request. Inverse cosine
 transforms aren't free ;)


completely agree, ties to the above note.

 
 What i dont know exactly is how much memory uses a JFreeChart object
 stored in the servletcontext, if there's a way to know it please let me
 know so i can check it and let you know.
 
 What profiler are you using? I use YourKit and it tells me the sizes of
 object trees fairly easily.
 

jvisualvm from the standard jdk. i saw that a heap dump can be done and then 
find what uses the dumped heat.


 If you store the raw bytes of the JPEG image in memory, they will take
 up exactly the same size as the file does on disk. So if you look at the
 image information from your web browser and it says, say, 180k for the
 image, then that's how much memory it will take when it's sitting in
 your ServletContext.

Im modifying it right now and testing.

thanks again.


 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAk3NRJsACgkQ9CaO5/Lv0PCG8wCgqwxiCsRZSQkzHbyirOiJWJD2
 SwoAnj4nOKAEV15cRi7hlb3aMlgB88+n
 =xWLg
 -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: Multiple context paths for single deployment

2011-05-13 Thread André Warnier

JanAa wrote:

Thanks for replying.

I was under the impression that the difference between
HttpServletRequest.getContextPath and ServletContext.getContextPath() was
exactly that the first returned the context path used in the request while
the second returned the context path used when processing
(http://download.oracle.com/javaee/5/api/javax/servlet/ServletContext.html#getContextPath()).

I realise I have to find another route, I still need multiple urls to one
application, and I have to identify these in the code. I am thinking about
an urlrewritefilter that sets a request-attribute, and then use an
outbound-rule to not show this to the users. Any other/better proposal?


How about this :
- deploy your application as the ROOT (default) application
- create a Servlet Filter, which wraps the request in a 
HttpServletRequestWrapper
- the HttpServletRequestWrapper redefines the getContextPah method
- your getContextPath returns whatever you want, in function of the original 
request URL
That would be independent of the servlet engine version.
I'd still have a look at the above solution with urlrewritefilter though, because it can 
do many other things in addition to what you mention above, and you do not need to write it.



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



Re: Multiple context paths for single deployment

2011-05-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 5/13/2011 10:36 AM, Caldarale, Charles R wrote:
 
 This attribute provides a list of external locations from which to
 load resources for this context. The list of aliases should be of the
 form /aliasPath1=docBase1,/aliasPath2=docBase2 where aliasPathN
 must include a leading '/' and docBaseN must be an absolute path to
 either a .war file or a directory.
 
 A resource will be searched for in the first docBaseN for which
 aliasPathN is a leading path segment of the resource. If there is no
 such alias, then the resource will be searched in the usual way.
 
 
 If you set each /aliasPath to the same .war file or directory, this
 may achieve your goal.

A dirty little trick that might actually work.

However.

I would expect that the /aliasPathN would be rooted in the webapp's
context path URI space, so if you had a webapp deployed as, say /foo
and then aliased /bar to foo.war, you'd end up with the /foo webapp
being available on both /foo and /foo/bar.

This feature was designed to allow URI spaces to be mapped to a physical
directory outside of the deployed webapp, say, for static content stored
elsewhere. That's why I suspect that the context path will be required.

Now, one might still be able to use this technique if you deploy to ROOT
and alias /both/ URI prefixes you want to use, like this:

path=ROOT aliases=/foo=path/to/war, /bar=path/to/war

In this case, the webapp is available on all of these virtual context paths:

  /
  /foo
  /bar

I would also suspect that request.getContextPath would return  in all
uses.

It may be better for the OP to just use UrlRewrite.

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

iEYEARECAAYFAk3NTMQACgkQ9CaO5/Lv0PB81QCfXa74u/5auaLNdEjmF0aBXvHB
23MAnjmiQcqPLzJ4xmN8L4SnXV6TDP+r
=jrah
-END PGP SIGNATURE-

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



Re: [OT] storing images

2011-05-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alexis,

On 5/13/2011 11:14 AM, alexis wrote:
 upon new data, what i only build new are the series, then i get the
 object on the servletcontext and set the new data inside this object
 (if exists, if not, the whole chart object is created)

That's good to know, though the series is where the bulk of the data is
stored, of course. I'd be interested to see what the overhead of the
JFreeChart object is with no series data.

Also, if you discard the series data anyway when you re-build, are you
really buying yourself anything by keeping the JFreeChart object laying
around?

 On May 13, 2011, at 11:47 AM, Christopher Schultz wrote:
 Hopefully not println as that may corrupt your image and will
 definitely add an unnecessary trailing newline.
 
 So, you re-encode the image every time it's served to a client. I'm
 suggesting that when you render the JFreeChart, you go all the way to a
 JPEG (or image format of your choice) and store /that/ in the
 ServletContext.
 
 Yes, you're right 1 encoding against n encodings, no matter how 
 small is the cpu save, it's saved n times so it makes the
 difference.

 And yes, out.print it is and not out.prinln, changed :)

I would use write(byte[]), but that's just me.

 What profiler are you using? I use YourKit and it tells me the sizes of
 object trees fairly easily.
 
 
 jvisualvm from the standard jdk. i saw that a heap dump can be done
 and then find what uses the dumped [heap].

You could do that. I've never really used VisualVM so I'm unsure of it's
capabilities.

 If you store the raw bytes of the JPEG image in memory, they will take
 up exactly the same size as the file does on disk. So if you look at the
 image information from your web browser and it says, say, 180k for the
 image, then that's how much memory it will take when it's sitting in
 your ServletContext.
 
 Im modifying it right now and testing.

Cool. Let us know how it goes.

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

iEYEARECAAYFAk3NTaIACgkQ9CaO5/Lv0PAhsACgi7XX655a1/4Kof0/hRV4LZvH
NYAAn19mmPWgmWQjmYntH2aEE8C1bVhJ
=dvb7
-END PGP SIGNATURE-

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



RE: Multiple context paths for single deployment

2011-05-13 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: Multiple context paths for single deployment

 Now, one might still be able to use this technique if 
 you deploy to ROOT and alias /both/ URI prefixes you 
 want to use, like this:

 path=ROOT aliases=/foo=path/to/war, /bar=path/to/war

Yes, that's what I was thinking (other than the invalid path of ROOT that 
you've specified).

 I would also suspect that request.getContextPath would 
 return  in all uses.

That's the part that's unknown without experimentation.

 - Chuck


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



Re: multiple Loadbalancer workers - found each other webapps?

2011-05-13 Thread Mark Eggers

From: Alexander Diedler adied...@tecracer.de
To: users@tomcat.apache.org users@tomcat.apache.org
Sent: Friday, May 13, 2011 5:40 AM
Subject: multiple Loadbalancer workers - found each other webapps?


Hello,
Why see one tomcat the apps of another tomcat?
We have two servers with two installed Apache Tomcats 6.0.32 and one Apache 
Webserver 2.2.14.
Server A:
Tomcat1 hosts App1 and App2 
Tomcat2 hosts App3
 
Server B:
Tomcat1 hosts App1 and App2 
Tomcat2 hosts App3
 
In the worker.properties we define two loadbalancer worker, but it seems, that 
they found each other “cluster”.
 
Message from catalina log : 
[…]
13.05.2011 14:29:15 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5793 ms
13.05.2011 14:29:18 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:article_finder_admin#
13.05.2011 14:29:19 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:article_finder_admin#
13.05.2011 14:29:31 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:article_finder_admin#
13.05.2011 14:29:35 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:article_finder_admin#
13.05.2011 14:29:35 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:article_finder_admin#
13.05.2011 14:29:35 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:article_finder_admin#
13.05.2011 14:29:39 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:akademie#
13.05.2011 14:29:41 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:akademie#
13.05.2011 14:29:45 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:extranet#
13.05.2011 14:29:47 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:extranet#
13.05.2011 14:29:47 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:extranet#
13.05.2011 14:29:50 org.apache.catalina.ha.session.ClusterSessionListener 
messageReceived
WARNUNG: Context manager doesn't exist:extranet#
 
The Context Managers for article_Finder_admin, akademie and extranet are 
Virtual Hosts in LoadbalancerA and doesn´t exists in conf directory of Tomcat2.
 
We define the Cluster Valve inside the Engine (remark, these block was eqal on 
every server.xml, or have we to customize these valve???) :
 
  
Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=8
 
  Manager className=org.apache.catalina.ha.session.DeltaManager
   expireSessionsOnShutdown=false
   notifyListenersOnReplication=true/
 
  Channel className=org.apache.catalina.tribes.group.GroupChannel
    Membership 
className=org.apache.catalina.tribes.membership.McastService
    address=228.0.0.4
    port=45564
    frequency=500
    dropTime=3000/
    Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver
  address=auto
  port=4000
  autoBind=100
  selectorTimeout=5000
      maxThreads=6/
 
    Sender 
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
  Transport 
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
    /Sender
    Interceptor 
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
    Interceptor 
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
  /Channel
 
  Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 filter=/
  Valve 
className=org.apache.catalina.ha.session.JvmRouteBinderValve/
   !--
  Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
    tempDir=/tmp/war-temp/
    deployDir=/tmp/war-deploy/
    watchDir=/tmp/war-listen/
    watchEnabled=false/
   --
  ClusterListener 
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
  ClusterListener 
className=org.apache.catalina.ha.session.ClusterSessionListener/
    /Cluster
  
 
 
Worker.properties:
 
# 
# First worker
# 
worker.worker1.port=8010
worker.worker1.host=192.168.100.1

Re: High Availability in Tomcat?

2011-05-13 Thread Brian Braun
Hi Konstantin,

I have just read the manual regarding the parallel deployment and tested it.
IT IS A WONDERFUL FEATURE! And so easy to do!
At last my site won't stop every time I redeploy!

Thanks a lot for your advice, I wouldn't have noticed this new feature if
you hadn't told me to check it.



On Mon, May 9, 2011 at 7:13 AM, Konstantin Kolinko
knst.koli...@gmail.comwrote:

 2011/5/9 Brian Braun brianbr...@gmail.com:
  republishing the app
  will make it unavailable for at least 10 seconds while I do it.

 Take a look at the Parallel Deployment feature in Tomcat 7
 http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

 Best regards,
 Konstantin Kolinko

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




Tomcat startup error!

2011-05-13 Thread red phoenix
I use tomcat 7.0.12 with hibernate 3,when I startup first,it can work well
and no errors.then I shutdown tomcat,and startup again,it raise following
warning information:
Warn: Failed to scan JAR [jndi:/localhost/examples/WEB-INF/lib/standard.jar]
from WEB-INF/lib
java.io.FileNotFoundException:
c:\apache-tomcat-7.0.12\temp\jar_cache1803949900871975219.tmp (Another
program is using this file, process can't visit)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:127)
at java.util.jar.JarFile.init(JarFile.java:135)
at sun.net.www.protocol.jar.URLJarFile.init(URLJarFile.java:67)
at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:214)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:198)
at
sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:50)
at
sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:80)
at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
at
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
at
org.apache.catalina.startup.ContextConfig$FragmentJarScannerCallback.scan(ContextConfig.java:2313)
at
org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:234)
at
org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:159)
at
org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1738)
at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1223)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:882)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:317)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5081)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1055)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:978)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
2011-5-14 11:35:00 org.apache.catalina.startup.ContextConfig
processResourceJARs
Warn: Failed to processes JAR found at URL
[jar:jndi:/localhost/examples/WEB-INF/lib/standard.jar!/] for static
resources to be included in context with
name[jar:jndi:/localhost/examples/WEB-INF/lib/standard.jar!/]

I find some files