Re: problem with tomcat 5.5 and apache AJP

2010-02-12 Thread David Delbecq
A bit late, but we made progress in identifying the culprit. It seems
that, for some reason, the password we used for AJP connection was the
problem. Remove the password both side and everything works happily. We
will try less complicated password, assuming that some special caracters
were problematic (we stayed in US ASCII range however)

 Le 22/01/10 14:20, André Warnier a écrit :
 David Delbecq wrote:

  Connector
 port=8019
 protocol=AJP/1.3 request.secret=MyPass
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
 redirectPort=443
 /Connector


 and apache is configured as follow:
 worker.list=lbJboss,lbOld,lbTomcat,status


 # Define jbossBoromir
 # modify the host as your host IP or DNS name.
 worker.jbossBoromir.port=8009
 worker.jbossBoromir.host=localhost
 worker.jbossBoromir.type=ajp13
 worker.jbossBoromir.lbfactor=1
 worker.jbossBoromir.prepost_timeout=1 #Not required if using
 ping_mode=A
 worker.jbossBoromir.connect_timeout=1 #Not required if using
 ping_mode=A
 worker.jbossBoromir.secret=MyPass
 #worker.tomcatBoromir.ping_mode=A #As of mod_jk 1.2.27
 # worker.tomcatBoromir.connection_pool_size=10 (1)



 worker.tomcatBoromir.port=8019
 worker.tomcatBoromir.host=localhost
 worker.tomcatBoromir.type=ajp13
 worker.tomcatBoromir.lbfactor=1
 worker.tomcatBoromir.prepost_timeout=1 #Not required if using
 ping_mode=A
 worker.tomcatBoromir.connect_timeout=1 #Not required if using
 ping_mode=A
 worker.tomcatBoromir.secret=MyPass
 #worker.tomcatBoromir.ping_mode=A #As of mod_jk 1.2.27
 #worker.tomcatBoromir.connection_pool_size=10 (1)


 worker.tomcatIlluin.port=8019
 worker.tomcatIlluin.host=illuin
 worker.tomcatIlluin.type=ajp13
 worker.tomcatIlluin.lbfactor=1
 worker.tomcatIlluin.prepost_timeout=1 #Not required if using
 ping_mode=A
 worker.tomcatIlluin.connect_timeout=1 #Not required if using
 ping_mode=A
 worker.tomcatIlluin.secret=MyPass

 # Load-balancing behaviour
 worker.lbJboss.type=lb
 worker.lbJboss.balance_workers=jbossBoromir


 worker.lbTomcat.type=lb
 worker.lbTomcat.balance_workers=tomcatBoromir


 worker.lbOld.type=lb
 worker.lbOld.balance_workers=tomcatIlluin

 # Status worker for managing load balancer
 worker.status.type=status


 Hi.
 (In the hope that solving this will help improve the weather in Belgium)

 About your main issue : in my own experience, whenever we
 get the kind of error messages which you indicate, they are right.
 It really means that
 the back-end Tomcat is for some reason not responding to Apache/mod_jk
 within a certain limit of time.  That can be because it is really down,
 or because it is very busy doing something else (all threads are already
 processing requests, or the requested webapp is busy starting up, or
 something like that). Or, you may be having network connectivity
 problems (but that would normally not be the case if both Apache and
 Tomcat are on the same host).
 But maybe the confusion below about load balancing is the root cause of
 the problems.


 I don't know if I am understanding your quoted configuration correctly,
 but if I do, it puzzles me a bit.

 You seem to have 3 separate servlet engines : on localhost, you have a
 jBoss and a Tomcat and on illuin, you have a Tomcat.

 The jBoss on localhost has an AJP Connector listening on port 8009.
 The corresponding worker is named jbossBoromir.

 The Tomcat on localhost has an AJP Connector listening on port 8019.
 The corresponding worker is named tomcatBoromir.

 The Tomcat on illuin has an AJP Connector listening on port 8019.
 The corresponding worker is named tomcatIlluin.

 Then for each one, you have an additional load balancer worker.
 So each load balancer worker only balances a single Tomcat/jBoss.
 This seems a bit counter-intuitive.

 Why not have
 worker.list=jbossBoromir,tomcatBoromir,tomcatIlluin,status
 directly, and take the load balancer workers out of the equation, since
 they each balance only 1 back-end ?

 Or, if your idea is really to balance all requests between all 3
 back-ends, then use one single load-balancer worker, but have it balance
  all 3 real workers. Like :

 worker.list=lb,status
 worker.lb.balance_workers=jbossBoromir,tomcatBoromir,tomcatIlluin

 The point is, in my understanding, a load balancer worker only makes
 sense if it balances at least 2 real workers (tomcat or jboss).
 Otherwise it seems pretty pointless. Or is it only in order to be able
 to use the status worker ?

 What do your JkMount lines at the Apache level look like ?
 That may allow us to figure out what you are trying to achieve.


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


-- 
David Delbecq
ICT
Institut Royal Météorologique
Ext:557


-
To unsubscribe, e-mail: users-unsubscr

problem with tomcat 5.5 and apache AJP

2010-01-22 Thread David Delbecq
Hello,

we are trying to get a working configuration of tomcat behind apache
httpd using AJP. This has worked well, for a while. But after some time,
the apache httpd server replies with one of those two message, it
changes randomly but we are unable to get the tomcat pages to show:

Service Temporarily Unavailable, The server is temporarily unable to
service your request due to maintenance downtime or capacity
problems. Please try again later.

or

Bad Gateway, The proxy server received an invalid response from an
upstream server.


What we don't understand is that it pops up and out randomly without any
changes to configuration. Restarting apache httpd does not solve issue.
Restarting tomcat does not either. We have no clue as why it doesn't
work or why it worked in the past. Can someone telle what's wrong with
this configuration?
Server Version: Apache/2.2.13 (Unix) mod_jk/1.2.28 PHP/5.3.1   
Server Time:Fri, 22 Jan 2010 10:05:26 UTC
JK Version: mod_jk/1.2.28


note jkstatus page says everything is ok :/

thank you.



The tomcat logs show this, which proves apache is connected to the right
tomcat instance:

INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: MyPass
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: MyPass
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: MyPass
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: MyPass
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: MyPass
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: MyPass
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: MyPass
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: MyPass
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2
INFO TP-Processor3 org.apache.jk.common.HandlerRequest - Secret: MyPass
WARN TP-Processor3 org.apache.jk.common.ChannelSocket - processCallbacks
status 2

our access logs (which is driven by a tomcat valve) show no connection
at all from any client, so it seems messages does not reach catalina.
Tomcat ajp is configured as follow:

 Connector
port=8019
protocol=AJP/1.3 request.secret=MyPass
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
redirectPort=443
/Connector


and apache is configured as follow:
worker.list=lbJboss,lbOld,lbTomcat,status


# Define jbossBoromir
# modify the host as your host IP or DNS name.
worker.jbossBoromir.port=8009
worker.jbossBoromir.host=localhost
worker.jbossBoromir.type=ajp13
worker.jbossBoromir.lbfactor=1
worker.jbossBoromir.prepost_timeout=1 #Not required if using ping_mode=A
worker.jbossBoromir.connect_timeout=1 #Not required if using ping_mode=A
worker.jbossBoromir.secret=MyPass
#worker.tomcatBoromir.ping_mode=A #As of mod_jk 1.2.27
# worker.tomcatBoromir.connection_pool_size=10 (1)



worker.tomcatBoromir.port=8019
worker.tomcatBoromir.host=localhost
worker.tomcatBoromir.type=ajp13
worker.tomcatBoromir.lbfactor=1
worker.tomcatBoromir.prepost_timeout=1 #Not required if using
ping_mode=A
worker.tomcatBoromir.connect_timeout=1 #Not required if using
ping_mode=A
worker.tomcatBoromir.secret=MyPass
#worker.tomcatBoromir.ping_mode=A #As of mod_jk 1.2.27
#worker.tomcatBoromir.connection_pool_size=10 (1)


worker.tomcatIlluin.port=8019
worker.tomcatIlluin.host=illuin
worker.tomcatIlluin.type=ajp13
worker.tomcatIlluin.lbfactor=1
worker.tomcatIlluin.prepost_timeout=1 #Not required if using ping_mode=A
worker.tomcatIlluin.connect_timeout=1 #Not required if using ping_mode=A
worker.tomcatIlluin.secret=MyPass

# Load-balancing behaviour
worker.lbJboss.type=lb
worker.lbJboss.balance_workers=jbossBoromir


worker.lbTomcat.type=lb
worker.lbTomcat.balance_workers=tomcatBoromir


worker.lbOld.type=lb
worker.lbOld.balance_workers=tomcatIlluin

# Status worker for managing load balancer
worker.status.type=status

-- 
David Delbecq
ICT
Institut Royal Météorologique
Ext:557



Re: setting JAVA_OPT in Tomcat

2008-06-06 Thread David Delbecq

En l'instant précis du 06/06/08 09:42, luke l s'exprimait en ces termes:

Hi,

I must start Tomcat setting a value for this attribute
com.sun.CORBA.transport.ORBTCPReadTimeouts (it set a Timeout for a corba
socket).
I've tried to add com.sun.CORBA.transport.ORBTCPReadTimeouts in JAVA_OPTS
Tomcat variable in catalina.sh script:

JAVA_OPTS=$JAVA_OPTS
..-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=1:30:50:10 

but Tomcat can't start:


Unrecognized option:
-J-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:3:500:10
Could not create the Java virtual machine.

Any suggestion???
thanks in advance

  



Don't forget to add a space between $JAVA_OPTS and your additionnal 
option. In your case, you joined -J and -D parameters without a space, 
as a result the jvm does not recognize an option named J-D :)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fwd: setting JAVA_OPT in Tomcat

2008-06-06 Thread David Delbecq

En l'instant précis du 06/06/08 10:23, luke l s'exprimait en ces termes:

*Don't forget to add a space between $JAVA_OPTS and your additionnal option.
In your case, you joined -J and -D parameters without a space, as a result
the jvm does not recognize an option named J-D :)*

I've again an error

Unrecognized option:
-J-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:3:500:10
Could not create the Java virtual machine.
Unrecognized option:
-J-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:3:500:10
Could not create the Java virtual machine.
and Tomcat doesn't start

thanks

  

They are still joined, put a space!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Environment Variables

2008-06-06 Thread David Delbecq
Tomcat does not use CLASSPATH. The list of variables used by tomcat is 
written at the top of catalina.sh script.



En l'instant précis du 06/06/08 10:46, [EMAIL PROTECTED] 
s'exprimait en ces termes:

Hi,

Can anybody tell me which environment variables tomcat uses? I am pretty
sure it uses JAVA_HOME for core java, and I am guessing it uses the web
application directories for classes belonging to web apps under it.

The reason I am asking this is that I have a jar file clash on my
development machine, and when I try to run a certain class I get the error:
java.lang.LinkageError: loader constraints violated when linking
javax/xml/rpc/Service class.

I am pretty sure this is because I have 2 copies of a class located in
different jar files, I googled this and a lot of links point to CLASSPATH,
but my CLASSPATH variable doesn't really have anything in it:

C:\Program Files\gemplus\gac\GATicket.jar;C:\Program
Files\gemplus\gac\iaikPkcs11Wrapper.jar

Appreciate any help.

Thanks,

Paul Ockleford



**
This message  may  contain  confidential  and  privileged information.
If you are not  the intended  recipient please  accept our  apologies.
Please do not disclose, copy or distribute  information in this e-mail
or take any  action in reliance on its  contents: to do so is strictly
prohibited and may be unlawful. Please inform us that this message has
gone  astray  before  deleting it.  Thank  you for  your co-operation.

NHSmail is used daily by over 100,000 staff in the NHS. Over a million
messages  are sent every day by the system.  To find  out why more and
more NHS personnel are  switching to  this NHS  Connecting  for Health
system please visit www.connectingforhealth.nhs.uk/nhsmail
**


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fwd: setting JAVA_OPT in Tomcat

2008-06-06 Thread David Delbecq

I see several errors below:

1) you put  at what look like random magic places. Just put a  in the 
begin and a  in the end.
2) you problem is the you didn't put a space between $JAVA_OPTS and the 
first argument following it when you construct the new JAVA_OPTS

3) you don't want a linefeed (that's the reason of your command not found).

Correct format is as follow
JAVA_OPTS=$JAVA_OPTS -Dsomekey=someValue -Dsomeotherkey=someothervalue
Notice the space between the S of $JAVA_OPTS and the - of -Dsomekey. 
Notice also i don't put linefeeds an only one pair of double quotes.



En l'instant précis du 06/06/08 14:27, luke l s'exprimait en ces termes:

Putting a space in catalina.sh as follow
JAVA_OPTS=$JAVA_OPTS
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties
  -Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:3:500:10 
this error is raised:
usr/local/tom6/bin/catalina.sh: line 184:
-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:3:500:10 : command not
found

Anyway other JAVA_OPT defined (java.util.logging) works properly without a
space

thanks

-- Forwarded message --
From: luke l [EMAIL PROTECTED]
Date: Jun 6, 2008 10:23 AM
Subject: Fwd: setting JAVA_OPT in Tomcat
To: users@tomcat.apache.org



*Don't forget to add a space between $JAVA_OPTS and your additionnal option.
In your case, you joined -J and -D parameters without a space, as a result
the jvm does not recognize an option named J-D :)*

I've again an error

Unrecognized option:
-J-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:3:500:10
Could not create the Java virtual machine.
Unrecognized option:
-J-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:3:500:10
Could not create the Java virtual machine.
and Tomcat doesn't start

thanks

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Possible to assign different class loader for each web app with tomcat

2008-05-09 Thread David Delbecq
This all depends on your webapp structure. If your config class is on the 
common or system class loader, it's shared by all webapps. Otherwise, (that 
mean if class is in WEB-INF/lib or WEB-INF/classes), it shouldn't be shared.

Unless, of course, you specified a specific classloader to use by tomcat in 
your context.xml.


Le Friday 09 May 2008 12:16:23 [EMAIL PROTECTED], vous avez écrit :
 Ok, that's strange because yesterday I had a small problem, and I assumed
 that it was due to the same class being loaded on startup by 2 web apps.

 I had a url endpoint loaded into a config class on startup from the
 web.xml, for some reason no messages were reaching the correct end point.
 This config class is also loaded by a test version of the app running under
 the same tomcat as pre prod. When the second web app was loaded and its
 config class was loaded and the parameter read in from the web.xml it
 changed the value for both web apps.

 I have not being using java or tomcat for all that long, but I would have
 thought if a class loader was assigned for each web app then they would
 each have their own copy of the config class? Meaning that web app1 should
 not have been pointing at the end point for web app 2? If not then could
 you tell me why?

 Thanks

 -Original Message-
 From: Mark Thomas [mailto:[EMAIL PROTECTED]
 Sent: 09 May 2008 11:10
 To: Tomcat Users List
 Subject: Re: Possible to assign different class loader for each web app
 with tomcat

 [EMAIL PROTECTED] wrote:
  Hi,
 
  Is it possible to configure a separate class loader for each web app
  running under tomcat? A colleague has informed that he can do this
  with web sphere and I am wondering if it is possible with tomcat.

 This is the case by default. No configuration is required.

 Mark


 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 **
 This message  may  contain  confidential  and  privileged information.
 If you are not  the intended  recipient please  accept our  apologies.
 Please do not disclose, copy or distribute  information in this e-mail
 or take any  action in reliance on its  contents: to do so is strictly
 prohibited and may be unlawful. Please inform us that this message has
 gone  astray  before  deleting it.  Thank  you for  your co-operation.

 NHSmail is used daily by over 100,000 staff in the NHS. Over a million
 messages  are sent every day by the system.  To find  out why more and
 more NHS personnel are  switching to  this NHS  Connecting  for Health
 system please visit www.connectingforhealth.nhs.uk/nhsmail
 **


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hackers sending long URLs to probe site?

2008-04-30 Thread David Delbecq

DIGLLOYD INC a écrit :

Christopher,

Thank you.  This is helpful.  Sorry about the hijacked thread, I 
didn't think of that.


Yes, I've double-checked that my site isn't generating the bad links. 
It's all static HTML and I've searched for any duplications, ../../ 
type things, etc. I don't currently generate any URLs, and the sheer 
length of the duplication rules out any basic mistakes in static html.


I have directory indexes turned off, confirmed by seeing 404 codes on 
certain directories in which I don't have index files (intentionally).


Lloyd 
A bit late to respond, but it might also be a worm infected computer 
trying to probe your server to check if it can be used as an attack 
vector. However, am more used to worms checking for urls containing 
cmd.exe, which probes for security holes in IIS.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to stop having to put :8080 in the url?

2008-04-11 Thread David Delbecq
En l'instant précis du 11/04/08 14:55, Gary Opela (Corporate) 
s'exprimait en ces termes:


 Now I can access my application by going to http://localhost/arsys 
without specifying the port. However, now if I go to http://localhost, 
then it redirects me to Tomcat's default page. Is there a way to leave 
the above line referencing port 8080, as that's where I want tomcat to 
run from, but then tell IIS to redirect my localhost/arsys traffic to 
reference port 8080?


 Thanks,



See the proxy support from tomcat. Basically, you instruct iis to act as 
a proxy for http://server/arsys* urls and to forward them to your 
internal tomcat on port 8080. You only have to instrcut tomcat about the 
server and port the end-user is seeing, so that servelt / jsps that 
build urls build them properly.



http://tomcat.apache.org/tomcat-5.5-doc/config/http.html#Proxy%20Support




--
David Delbecq
Institut Royal Météorologique
Ext:557

--
http://www.devlog.be (a belgian developer's logs)




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tags not being executed on first request...

2008-03-25 Thread david delbecq
It's probably that tag A you use has conditional logic that is false 
upon first request. Making it skip it's content. Difficult to tell more 
without knowing the taglibs involved and the associated conditions

Nathan Wilhelmi a écrit :
Hello - We are using Tomcat 6.0.14, we have some pages that use some 
nested tags, such as Page A - Tag A - Tab B, it's not reclusive 
problem. We are using the JSP.tag files for this. The problem is on 
the first request, Page A - Tag A works fine, however Tag B never 
appears to be rendered. Now on the second request Page A - Tag A - 
Tab B is all properly executed. Is this a know issue, are there any 
workarounds, are we doing something that isn't supported/allowed?


Thanks!

-Nate


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error Page Question

2008-03-19 Thread David Delbecq

The easiest way i found out here was to use the 404 of the ROOT web
application ^^ to display a 'site under maintenance'.

You could also create a ROOT/webappname/index.html  to get same result



En l'instant précis du 19/03/08 11:55, Peter Stavrinides s'exprimait en
ces termes:

Hi all,

How do I display a friendly error  page (503 site under maintenance) 
if my application is taken off-line? I understand how to override 
error pages with my application running, but can I, and where do I 
configure a 503 when its down, but Tomcat is still running.


Thanks
Peter




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
http://www.devlog.be (a belgian developer's logs)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Making the most of 8G of RAM

2008-03-17 Thread David Delbecq

Stephen Nelson-Smith a écrit :

Hi,

I have a new machine with 8G of RAM, running a 32 bit 2.6 kernel
(CentOS 5).  It is running an application inside 4.1.37 with Java
1.4.2.

Given that we only have a 32 bit address space, is it fair to say that
I can't use more than 2G of RAM for my Java virtual machine?

I tried to prove this with:

export CATALINA_OPTS=-server -Xms2512m -Xmx2512m

but so far I've not seen memory usage go over 1G.

What's the best way to make to most of the RAM?

S.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  


Not fair to say that. The maximum space depends on several factor (see 
mailing list archives, this has already been discussed).

To get most of your 8G machine, I recommend 64bits OS + 64bits jvm.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Detecting traffic level programmatically

2008-03-10 Thread david delbecq

Paranoid_Fabio a écrit :

Hello. I'm developing an application for a small company.
The company has got only one server, from wich users can download data
uploaded  by providers.
Data can be uploaded in zip archives and it can be several MB large. I don't
want users to experience slow down in the download, so I would like to
implement a daemon that asynchronously upload data provided by the
providers, when the traffic is low.

Is there a way to do that using Tomcat 5? Can I actually get information
about current traffic etc.. programmatically? 


Thank you very much for any answer.
  

I'd recommend using OS specific informations to scale traffic.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 8080 only works on localhost

2008-03-10 Thread david delbecq

banderson a écrit :

I have an application running on tomcat 5.5 and I can access it no problem
from http://localhost:8080.  However, when I use another computer to try and
connect via IP address (192.168.1.2:8080), the browser states that it can't
establish a connection.  Any ideas what I might be missing?
  
also check you didn't explicitly tell tomcat to listen only on 
127.0.0.1:8080, this is configurable by address field of http connector 
in server.xml:
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html . By default 
tomcat listen on all interfaces.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: weird log output

2008-03-05 Thread David Delbecq
En l'instant précis du 05/03/08 06:10, Lessie Z. Mitch s'exprimait en 
ces termes:
 


Running TC5.5.23 as lone web server on RHE4 box
  
Official tomcat, or redhat provided tomcat. In second case, get rid of 
it and download a clean official tomcat, mailing list won't offer much 
help on refurbished tomcats some distros are using.


 


My apps are starting fine, logs are nice and clean, and then… this weird
string appears within a few seconds:

 


ßsnipà

Mar 4, 2008 10:58:23 PM org.apache.coyote.http11.Http11BaseProtocol start

INFO: Starting Coyote HTTP/1.1 on http-80

Mar 4, 2008 10:58:23 PM org.apache.catalina.storeconfig.StoreLoader load

INFO: Find registry server-registry.xml at classpath resource

Mar 4, 2008 10:58:23 PM org.apache.catalina.startup.Catalina start

INFO: Server startup in 52007 ms

---2823

ßend snipà

  

nice, since you are on tomcat, did you try a

grep -R -e '--'  *

if it's not in a jar, you might locate the cullprit ;)
Could it be you configured a logger to put regular timstamps in logs?
 


That last line in the snip… what is that? What does it mean? How do I make
it go away?!? It only started appearing after upgraded from TC5.5.16. My
webapps run fine and dandy, but that string appears every so often and it is
driving me nuts!  *is a lonely girl, she reads her log files like books*

 

 


~LZM~

 



No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.4/1310 - Release Date: 3/4/2008

8:35 AM
 

  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: weird log output

2008-03-05 Thread David Delbecq
En l'instant précis du 05/03/08 09:50, David Delbecq s'exprimait en ces 
termes:
 
nice, since you are on tomcat, did you try a 

Please read since you are on linux

--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Encoding at server level - apache-tomcat-5.5.23\conf\web.xml

2008-03-03 Thread David Delbecq
First, that's the encoding used *only* for reading that specific xml 
file. All xml files have such processor directive.


Second, ISO-8859-2 is not a standard java provided encoding. As such, 
you will most probably need to find third party libraries that provide 
that encoding to your jvm (see 
http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/Charset.html 
for list of officially supported charset in java).


As a response i tend to say, there will be absolutely no impact, 
considering, AFAIK, that this processor directive is not even considered 
by tomcat.


En l'instant précis du 03/03/08 14:27, Raghuveer s'exprimait en ces termes:

I need to setup tomcat operating in central European region.

All my Windows Systems Operate on Polish /PL language

 


Default encoding

?xml version=1.0 encoding=ISO-8859-1?

 


Modified encoding

 


?xml version=1.0 encoding=ISO-8859-2?

 

 


Clarification 1

 


Does there will be any impact on my other applications if I change default
encoding from ISO-8859-1 to ISO-8859-2 in
\apache-tomcat-5.5.23\conf\web.xml

 

 

 



  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuring DataSourceRealm using Oracle

2008-03-03 Thread David Delbecq

Jason Ling a écrit :


I changed the Realm element in the server.xml file, and it became:

  Realm  className=org.apache.catalina.realm.DataSourceRealm
 dataSourceName=jdbc/webappDB
 driverName=oracle.jdbc.OracleDriver
  connectionURL=jdbc:oracle:thin:@sb.lehman.cuny.edu:1521:idm0
 connectionName=webappdb connectionPassword=GreenHorn
  userTable=users userNameCol=user_name
userCredCol=user_pass
  userRoleTable=user_roles roleNameCol=role_name /

  
your are using the datasourcerealm with parameters from the jdbcrealm, 
those are two separate realms. For datasource realm, you need to define 
a datasource that matches the one specified in


dataSourceName=jdbc/webappDB

To get more information on how to configure a datasource, please go 
there:  
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuring DataSourceRealm using Oracle

2008-03-03 Thread david delbecq
And, actually, you didn't do the part where you configure the datasource 
that your realm will use, information that is provided in the link i 
pointed you to. If you did actually configure the datasource (which is 
separate from the datasourcerealm), you wouldn't say



I still wonder
how Tomcat would know where to go
moreover none of the configuration statements you pasted show any track 
of your datasource configuration, which agina is separate from the realm.



Jason Ling a écrit :

Thank you, David.

Sorry, I sent this message two times, each time only the quoted message was
sent, but not my reply.  This is another try.

Actually I did read the document you provided the link to.  In that document
(The Realm Component) the following attributes are listed for the
DataSourceRealm:

   dataSourceName
   roleNameCol
   userCredCol
   userNameCol
   userRoleTable
   userTable

and I actually used all of them in my first attempted configuration as shown
in my original email:

   First attempt:
   ++
   I replaced the above-mentioned Realm element with the following one,
mimicking the example for mySQL in the documentation:

  Realm  className=org.apache.catalina.realm.DataSourceRealm
 dataSourceName=jdbc/webappDB
  userTable=users userNameCol=user_name
userCredCol=user_pass
  userRoleTable=user_roles roleNameCol=role_name /

And that did not work out, you know, as I mentioned.  I still do not know
what was wrong with my configuration for DataSourceRealm.  I still wonder
how Tomcat would know where to go to look for the users table and the
user_roles table, which are on the Oracle server which is sb.lehman.cuny.edu,
and is not in any of the attributes listed above.  Did I miss any components
in the configuration that I tried?


Jason



On Mon, Mar 3, 2008 at 1:11 PM, David Delbecq [EMAIL PROTECTED] wrote:

  

Jason Ling a écrit :


I changed the Realm element in the server.xml file, and it became:

  Realm  className=org.apache.catalina.realm.DataSourceRealm
 dataSourceName=jdbc/webappDB
 driverName=oracle.jdbc.OracleDriver
  connectionURL=jdbc:oracle:thin:@sb.lehman.cuny.edu:1521:idm0
 connectionName=webappdb connectionPassword=GreenHorn
  userTable=users userNameCol=user_name
userCredCol=user_pass
  userRoleTable=user_roles roleNameCol=role_name /


  

your are using the datasourcerealm with parameters from the jdbcrealm,
those are two separate realms. For datasource realm, you need to define
a datasource that matches the one specified in

dataSourceName=jdbc/webappDB

To get more information on how to configure a datasource, please go
there:

http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuring DataSourceRealm using Oracle

2008-03-03 Thread david delbecq
What is in the web.xml is not tomcat specific. The realm you see in 
web.xml is related to the notion of realm used by http protocol, that is 
a string showed to user when the login with http basic authentification, 
and which server for browser to seperate login in different realms for 
a same server (eg an admin realm, a shopping realm, a clerk realms)


The link between a webapplication and a tomcat realm (that is, a source 
for users passwords and roles) is done in a context.xml file, which is 
tomcat specific. The file can be either located in META-INF/context.xml 
in your webapp for auto configuration or be put manually in tomcat 
config (conf/Catalina/host/webapp.xml)

Jason Ling a écrit :

Thank you, David.  Now it works!

I looked back into the documentation for DataSource, and then configured one
in the server.xml file as a JNDI Resource.  It seems to me that the
Realm gets associated with the Resource by jdbc/webappDB, and that tells
tomcat server where to find the Oracle server.

Nevertheless, I still still have a few questions:

What is the the realm-name sub-element of login-config for in the
application's web.xml file, when and how is it used?  Suppose I configure
more than one Realm in server.xml, is that the scenario where I need to
use the real-name tag to specify which Realm to use?  In that case,
realm-namewhat is the name/realm-name  for the realm?

Thanks a lot for your guide!


Jason



On Mon, Mar 3, 2008 at 3:11 PM, david delbecq [EMAIL PROTECTED] wrote:

  

And, actually, you didn't do the part where you configure the datasource
that your realm will use, information that is provided in the link i
pointed you to. If you did actually configure the datasource (which is
separate from the datasourcerealm), you wouldn't say



I still wonder
how Tomcat would know where to go
  

moreover none of the configuration statements you pasted show any track
of your datasource configuration, which agina is separate from the realm.


Jason Ling a écrit :


Thank you, David.

Sorry, I sent this message two times, each time only the quoted message
  

was


sent, but not my reply.  This is another try.

Actually I did read the document you provided the link to.  In that
  

document


(The Realm Component) the following attributes are listed for the
DataSourceRealm:

   dataSourceName
   roleNameCol
   userCredCol
   userNameCol
   userRoleTable
   userTable

and I actually used all of them in my first attempted configuration as
  

shown


in my original email:

   First attempt:
   ++
   I replaced the above-mentioned Realm element with the following
  

one,


mimicking the example for mySQL in the documentation:

  Realm  className=org.apache.catalina.realm.DataSourceRealm
 dataSourceName=jdbc/webappDB
  userTable=users userNameCol=user_name
userCredCol=user_pass
  userRoleTable=user_roles roleNameCol=role_name /

And that did not work out, you know, as I mentioned.  I still do not
  

know


what was wrong with my configuration for DataSourceRealm.  I still
  

wonder


how Tomcat would know where to go to look for the users table and the
user_roles table, which are on the Oracle server which is
  

sb.lehman.cuny.edu,


and is not in any of the attributes listed above.  Did I miss any
  

components


in the configuration that I tried?


Jason



On Mon, Mar 3, 2008 at 1:11 PM, David Delbecq [EMAIL PROTECTED]
  

wrote:

  

Jason Ling a écrit :



I changed the Realm element in the server.xml file, and it became:

  Realm  className=org.apache.catalina.realm.DataSourceRealm
 dataSourceName=jdbc/webappDB
 driverName=oracle.jdbc.OracleDriver
  connectionURL=jdbc:oracle:thin:@sb.lehman.cuny.edu:1521
  

:idm0


 connectionName=webappdb connectionPassword=GreenHorn
  userTable=users userNameCol=user_name
userCredCol=user_pass
  userRoleTable=user_roles roleNameCol=role_name /



  

your are using the datasourcerealm with parameters from the jdbcrealm,
those are two separate realms. For datasource realm, you need to define
a datasource that matches the one specified in

dataSourceName=jdbc/webappDB

To get more information on how to configure a datasource, please go
there:




http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED

Re: Frustrating Issue with default host

2008-02-28 Thread david delbecq

[EMAIL PROTECTED] a écrit :

I m trying to setup tomcat as below. The host blocks have ips in them.
I have a proxy configured in front of the tomcat with an external ip
which receives all the request for the sites from the external world
and contacts the tomcat (with different hosts configured). The problem
is with /Host Host name=10.7.0.81, 10.7.0.82  10.7.0.83 which are
accesed via connector 8080 by the proxy server. When I use the
http://x.x.x.x (external-ip), it works just fine and all three sites
related to the three hostname above open but when I try accessing the
sites via the dns name instead of the ips, all sites are defaulted to
the defaulthost. Please suggest.
  
Which is correct behaviour, since you didn't configure any host that 
match hosts used by browser. The hosts that tomcat uses have little to 
do with dns, and tomcat will not attempt to make any dns resolution. It 
will just match the Connector to the port/network interface used for 
the contact, and inside that connector look for a host that matches 
the browser send host HTTP 1/1 header. If you want several host names 
to serve the same thing, use the aliases inside host. See Alias section 
on http://tomcat.apache.org/tomcat-5.5-doc/config/host.html


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: java memory question -Xmx2048m

2008-02-25 Thread David Delbecq

En l'instant précis du 25/02/08 13:51, Dave s'exprimait en ces termes:

Our Linux(FC) machine has 8G physical memory and 12G swap size.  I am using JDK 
1.5.   I tried to set the Java option -Xmx to set max heap size for best 
performance,   the allowed max heap size is 2048M .  Does that mean that the 
JVM can not use all the physical memory (8G) ?  Thanks.
  Dave

   
-

Never miss a thing.   Make Yahoo your homepage.
  
The maximum memory the JVM can use depends on the maximum size of 
continuous memory segment the OS you run on allows you to reserve.
On 32 bits linux, it's about 2G (that is 4G minus memory area reserved 
for kernel, minus memory area used by libraries minus other thingies jvm 
might use). To get more you will need a 64bits JVM + a 64 bits OS. Note 
it's a limitation of hardware architecture and OS more than a limitation 
of JVM.


PS: if you plan to swap-out 12G of datas, i hope your disks are fast :)


--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to package common lib and ear file

2008-02-25 Thread David Delbecq
Classes shared between webapps go in shared/ folder. server/ folder is 
for server specific (invisible to webapps) classes.


PS: that information is for tomcat, since you seem to use jboss, you 
better ask jboss mailing list, as jboss might use different folders


Dave a écrit :

I have an ear application with entity,business and web modules.
  application ...
  module
  ejbfoo.par/ejb
/module
  module
  ejbbar.ejb3/ejb
/module
  module
web
web-uribaz.war/web-uri
context-root//context-root
/web
/module
  /application

  The .par, .ejb3 and war files use classes in common.jar.  I put the common.jar 
under JBOSS/server/default/lib.
   
  In the common.jar,  
   
  String className = System.getProperty(FooClassName);

Class.forName(className).newInstance();
   
  trying to instantiate the class package.Foo that is defined in web module inside the ear file,  throws a exception:
   
   java.lang.ClassNotFoundException: No ClassLoaders found for: package.Foo
   
  the class package.Foo is application specific and  can not be put into common.jar that is a common library. However the common lib needs to instantiate the application specific class.
   
  How to solve this issue?   is classloader the answer? 
  
Thanks for any help.

Dave


   
-

Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Class and Object sharing across domain and its sub-domains

2008-02-25 Thread david delbecq
Since your 3 webapps need to share classes code, object instances and 
session information, i don't see why you want to make 3 webapps instead 
of just one. So my advise would be to make a single webapp.

Kristin Coles a écrit :

I use Apache Tomcat (5.5.9) to host the website (xyz.com) along with a
couple of sub-domains (photos.xyz.com and documents.xyz.com). You can find
the relevant portion of server.xml file below.

Hosting the websites in this way has lead to two main headaches.
1. I cannot share my Java code between xyz.com, photos.xyz.com and
documents.xyz.com:
For example, if I have written a simple Java Bean Class and its deployed in
Tomcat/webapps/xyz/WEB-INF/classes, the Class is not available to
photos.xyz.com and documents.xyz.com. The only way to make it available to
all three domains is deploying the Java Bean class in Tomcat/shared/lib or
Tomcat/common/lib directories.

2. Problems with session sharing across the domain (xyz.com) and its
sub-domains:
For example, when a user performs a search on xyz.com, I store the search
results in a Java Bean Object in the session. Lets say the user clicks on
one of the search results and ends up on a page at documents.xyz.com. Here I
won't have access to the Search Results Java Bean object, which I would love
to have.


These two problems should be pretty common, right? I am wondering how should
I structure my application(s) to take care of the above two. Please advise!

Thank you,
Kristin

/* server.xml */
Host name=xyz.com appBase=webapps
Context path= docbase=xyz
/Context
/Host

Host name=photos.xyz.com appBase=webapps
Context path= docbase=photos
/Context
/Host

Host name=documents.xyz.com appBase=webapps
Context path= docbase=documents
/Context
/Host

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: do I need to install Binary Distributions or Source Code Distributions for tomcat5.5

2008-02-22 Thread David Delbecq
Unless you plan to compile your tomcat and play with it's internals, you 
don't need the source
En l'instant précis du 22/02/08 11:36, Sneha Manohar s'exprimait en ces 
termes:

Hi ,
  I am new to tomcat. I have window vista OS   jdk1.6. Which version of
   tomcat 5.5 i.e Binary Distributions  or Source Code Distributions.
  Please help me .
   
  Thank you

  sneha
   
   

   
-

 Unlimited freedom, unlimited storage. Get it now
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Trying to know why tomcat shuts down

2008-02-20 Thread David Delbecq

Hello,

our tomcat, in a test environment, is shutting down unexpectedly. There 
is no messages about stopping webapp, or even receiving SHUTDOWN message 
from management port. It's just normal webapp behaviour in logs and 
that's all. We notice this when someone comes in and says reserver does 
not respond, whe check processes (a linux 32bits box), and no track of 
the jvm. No specific operation seems to trigger it. The jvm is not 
dying, cause that would have led to the presence of a pid.log file and 
messages in catalina.out. It's not the webapp calling System.exit, 
because tomcat runs with a security manager that forbids system.exit 
from webapps.


We have no clue on how to get reason of this shutdown. I have attached 
now a shutdown hook that will call an external script that itself will 
ask jvm for a dumpstack (kill -3), in the hope we get some information. 
But our tries with regular shutdown seems to point that jvm ignore 
such request when it's processing the shutdown hooks.


Any suggestion on tracking this greatly appreciated.

--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Trying to know why tomcat shuts down

2008-02-20 Thread David Delbecq
Everyday, learning something new, today is check linux system logs if 
your tomcat disappear



[30575826.592000] Out of Memory: Killed process 734 (java)



Thanks for your help, you got it right. That server might need a bit of 
additional memory ^^


En l'instant précis du 20/02/08 14:29, Peter Crowther s'exprimait en ces 
termes:

From: David Delbecq [mailto:[EMAIL PROTECTED]
our tomcat, in a test environment, is shutting down
unexpectedly.


[...]
  

(a linux 32bits box)



Which Linux, and have you disabled the kernel option that nukes the largest 
process if the kernel can't allocate itself some memory?  Can't remember its 
name, but I know it's been mentioned previously on this list.

Just a thought, and probably completely off the mark!

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JNDI Realm and Password Encryption

2008-02-13 Thread david delbecq

Sniffing protocol would probably give you an idea about this :)

Jeff Marendo a écrit :

Hello,

I'm using the JNDI realm and communicating with a
Novell eDirectory (LDAP) server for authentication and
authorization purposes.  We're communicating on port
389, which is non-secure.  I know the user ID and
password is stored in plain text (within
/conf/server.xml), but what I'm not sure about is if
the password is encrypted in any way when Tomcat tries
to establish an initial connection to the eDirectory. 
My guess is that it isn't but would be, if we were

using HTTPs over port 636.

Does anyone have any ideas on this or know for certain
how the JNDI realm works in this regard?

Jeff

p.s. I'm using Tomcat 5.0.28


  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RES: Tomcat6 classloader problem

2008-02-12 Thread David Delbecq
From http://tomcat.apache.org/tomcat-6.0-doc/logging.html :  Tomcat 
6.0 uses Commons Logging http://commons.apache.org/logging throughout 
its internal code allowing the developer to choose a logging 
configuration that suits their needs,


Could it be this class is exposed to webapps?

En l'instant précis du 12/02/08 13:51, Rogerio Baldini das Neves 
s'exprimait en ces termes:

Hi David,

In truth ,I have a library in tomcat lib directory to communicate both 
applications. Using the resource:
	Resource name=jcpbatch/plugin-server 
	type=com.powerlogic.jcpbatch.pluginservice.JBatchPluginService


factory=com.powerlogic.jcpbatch.pluginservice.JBatchPluginServiceFactory/

There are 2 'org.apache.commons.logging.Log' visible. One in app1 and another 
in app2.
But no one in tomcat lib directory. I don't want to put in there because of 
possible collateral effects with others apps.

The message received doesn't come from tomcat but from commons-logging, that is 
the same used in Tomcat 5.5.9.

Isn't it correct that Tomcat should have kept compatibility in this case.
Theorically everything working in Tomcat 5.5.x should work in Tomcat 6.x, or am 
I wrong ?


Thanks a lot,

Rogerio Baldini
jCompany Suite - Product Owner
+55 (31) 3555-0050
[EMAIL PROTECTED]
Powerlogic S.A.



-Mensagem original-
De: David Delbecq [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 12 de fevereiro de 2008 09:20

Para: Tomcat Users List
Assunto: Re: Tomcat6 classloader problem

Root of your problem is that: You have more than one version of 
'org.apache.commons.logging.Log' visible


You say app1 access app2 which access back app1. Webapps in a container 
should not be able to see each other's classes. Can you tell us which 
method you used to have those 2 webapps see each other? That could 
explain why there is 2  Log visible in classloader. Also, it may be that 
the message comes from commons-logging provided with tomcat, which may 
not be the same as the one in tomcat 5.5.9. So it may be that the mixup 
problem was already there but unnoticed in tomcat 5.5.9




En l'instant précis du 12/02/08 12:17, Rogerio Baldini das Neves 
s'exprimait en ces termes:
  

Hi,

 


I am passing through this problem nowadays in Tomcat6:

 

org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException:


Invalid class loader hierarchy.  You have more than one version of 
'org.apache.commons.logging.Log' visible, which is not allowed.


(Caused by org.apache.commons.logging.LogConfigurationException: 
Invalid class loader hierarchy.  You have more than one version of 
'org.apache.commons.logging.Log' visible, which is not allowed.)


 


This is my context:

-  App1 accessing App2 to start a service, and App2 accessing 
back App1 to get some information.


-  Problem occurs when App2 is accessing back App1.

I have this configuration in server.xml

Resource name=jcpbatch/plugin-server

   
type=com.powerlogic.jcpbatch.pluginservice.JBatchPluginService


   
factory=com.powerlogic.jcpbatch.pluginservice.JBatchPluginServiceFactory/


 


and this one in web.xml:

resource-env-ref

description JBatchPluginService/description 


resource-env-ref-namejcpbatch/plugin-server/resource-env-ref-name 


resource-env-ref-typecom.powerlogic.jcpbatch.pluginservice.JBatchPluginService/resource-env-ref-type 



/resource-env-ref

 


-  Both of them have commons-logging-1.0.4.jar in the WEB-INF/lib

 


VERY IMPORTANT: It has worked perfectly in Tomcat 5.5.9

 


Any ideas ?

Thanks

 

 


Rogerio Baldini

jCompany Suite - Product Owner

+55 (31) 3555-0050

[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]


Powerlogic S.A.

 


img

 





  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat6 classloader problem

2008-02-12 Thread David Delbecq
Root of your problem is that: You have more than one version of 
'org.apache.commons.logging.Log' visible


You say app1 access app2 which access back app1. Webapps in a container 
should not be able to see each other's classes. Can you tell us which 
method you used to have those 2 webapps see each other? That could 
explain why there is 2  Log visible in classloader. Also, it may be that 
the message comes from commons-logging provided with tomcat, which may 
not be the same as the one in tomcat 5.5.9. So it may be that the mixup 
problem was already there but unnoticed in tomcat 5.5.9




En l'instant précis du 12/02/08 12:17, Rogerio Baldini das Neves 
s'exprimait en ces termes:


Hi,

 


I am passing through this problem nowadays in Tomcat6:

 

org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException:


Invalid class loader hierarchy.  You have more than one version of 
'org.apache.commons.logging.Log' visible, which is not allowed.


(Caused by org.apache.commons.logging.LogConfigurationException: 
Invalid class loader hierarchy.  You have more than one version of 
'org.apache.commons.logging.Log' visible, which is not allowed.)


 


This is my context:

-  App1 accessing App2 to start a service, and App2 accessing 
back App1 to get some information.


-  Problem occurs when App2 is accessing back App1.

I have this configuration in server.xml

Resource name=jcpbatch/plugin-server

   
type=com.powerlogic.jcpbatch.pluginservice.JBatchPluginService


   
factory=com.powerlogic.jcpbatch.pluginservice.JBatchPluginServiceFactory/


 


and this one in web.xml:

resource-env-ref

description JBatchPluginService/description 


resource-env-ref-namejcpbatch/plugin-server/resource-env-ref-name 


resource-env-ref-typecom.powerlogic.jcpbatch.pluginservice.JBatchPluginService/resource-env-ref-type 



/resource-env-ref

 


-  Both of them have commons-logging-1.0.4.jar in the WEB-INF/lib

 


VERY IMPORTANT: It has worked perfectly in Tomcat 5.5.9

 


Any ideas ?

Thanks

 

 


Rogerio Baldini

jCompany Suite - Product Owner

+55 (31) 3555-0050

[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]


Powerlogic S.A.

 


img

 




--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to avoid session fixation?

2008-02-11 Thread david delbecq

Christopher Schultz a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

David Delbecq wrote:
| I think this is worth submitting a security issue request on tracker,
| to ask that, at least, the container links the requester IP to the
| session.

I'm pretty sure that nobody will want to do this -- at least not without
the ability to turn the feature off. You'll break a lot of users if you
This won't be the first fix in tomcat that would potentially break other 
application, in the past tomcat team have always made such change 
optionnal. IT wold anywa be good for system administrator if they can 
prevent such issue.


| Changing session ID upon login in container would be a good thing
| imho, it would ensure ID become unknown to attacker after login,
| wouldn't destroy user session (keep session, only change it's
| identifier) and would work whatever authentication mechanism is used.
|
I completely agree. Christopher, I think your valve might be more
attractive if it was able to change the id of the session and leave it
at that. I'm not familiar enough with the Tomcat API to know if this is
possible and/or a good idea.

| Draw back is that webapp that rely on session id for some session
| tracking mechanism would break.

True, although most webapps probably use whatever session id is
currently in use. If you did a lot of AJAX where the session id
available to the page becomes out-of-date after a login, you will have
to make special considerations for that. I think you'll find that this
is not much of a problem.
I would more be thinking about applications that plays with 
sessionlistener and maintain list of active session (to track number of 
users / who is logged in, etc). Like ip-session id matching, a change 
id on the fly could also break at several levels and should be 
optional.Also, for example, of non-cookies enabled user, for which url 
previous to login would become useless (or at least would point to an 
inexistant session).


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

iEYEARECAAYFAkewsO8ACgkQ9CaO5/Lv0PBWXQCggsMZA1AGkdzSDvBmYeHC2JED
iU4An15g6IGrG/yU4mgWokKnVkXdnW0O
=eLbx
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: rotating catalina.out using log4j

2008-02-11 Thread David Delbecq
catalina.out is just the sink for System.out and System.err, it's not 
managed by logging facilities. It's not even seen by jvm, as the 
redirection is done in the startup script (using the shell '' 
redirector). If you configure a log4j logger for tomcat that uses an 
other file (see below our simple config) and teach all your webapps to 
not use stdout and stderr, you shouldn't see anymore things appear in 
catalina.out. If you still need rolling of file during startup, you will 
need to ask external tools (like unix logrotate) to do it for you.


..common/classes# cat log4j.properties
log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=./logs/tomcat.log
log4j.appender.R.MaxFileSize=30MB
log4j.appender.R.MaxBackupIndex=20
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n


En l'instant précis du 11/02/08 17:39, Amir Fadaghi s'exprimait en ces 
termes:

Hi,

I am trying to implement the catalina.out log rotation in the development 
environment (for now and will implement to other environments once I figure 
this out) using log4j.  I am running apache-tomcat version 5.5.25 and 
downloaded the apache-log4j-1.2.15 and commons-logging-1.1.1.  I copied the 
log4j.jar and commons-logging.jar into the $CATALINA_HOME/lib and created the 
log4j.properties in the common/classes.  However, when I stop and start the 
apache-tomcat the cataline.out is not rotating.

 Here is the my directory listings in the commons/lib direcotry and 
commons/classes directory:

/usr/local/apache-tomcat-5.5.25/common:
ls lib
commons-el.jar jasper-runtime.jar naming-factory.jar
commons-logging-1.1.1.jar  jsp-api.jarnaming-resources.jar
jasper-compiler-jdt.jarlog4j-1.2.15.jar   servlet-api.jar
jasper-compiler.jarnaming-factory-dbcp.jar

should I change the highlighted filenames to commons-logging.jar and, log4j.jar?

/usr/local/apache-tomcat-5.5.25/common:
ls classes
log4j.properties

tail classes/log4j.properties

#
# Application logging options
#
#log4j.logger.org.apache=DEBUG
log4j.logger.org.apache=INFO
#log4j.logger.org.apache.struts=DEBUG
#log4j.logger.org.apache.struts=INFO

is the above line uncommented correct for rotating catalina.out rotation?

My environment is:
Sun Solaris 10

I thank you for any help you provide.



-
Email messages cannot be guaranteed to be secure or error-free as
transmitted information can be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
Centers for Medicare  Medicaid Services therefore does not accept
liability for any error or omissions in the contents of this
message, which arise as a result of email transmission.

CONFIDENTIALITY NOTICE: This communication, including any
attachments, may contain confidential information and is intended
only for the individual or entity to which it is addressed. Any
review, dissemination, or copying of this communication by anyone
other than the intended recipient is strictly prohibited. If you
are not the intended recipient, please contact the sender by reply
email and delete and destroy all copies of the original message.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to avoid session fixation?

2008-02-08 Thread David Delbecq
I think this is worth submitting a security issue request on tracker, to 
ask that, at least, the container links the requester IP to the session. 
Changing session ID upon login in container would be a good thing imho, 
it would ensure ID become unknown to attacker after login, wouldn't 
destroy user session (keep session, only change it's identifier) and 
would work whatever authentification mecanism is used. Draw back is that 
webapp that rely on session id for some session tracking mecanism would 
break.


btw, you hack is limited to form based authentification, i successfully 
shared an authentificated session on tomcat 5.5.7 using http basic 
authentification. One of computer had access to secured ressouce 
whithout ever being prompted for user/pass



En l'instant précis du 08/02/08 10:49, Christoph Lenggenhager 
s'exprimait en ces termes:

David, Christopher

Thank you for sharing your thoughts.

It seems to me that there is no standard solution to this problem, but you
agree with me that the problem exists.

As I mentioned before, I came up with a solution that looks promising.

Here's a rough description, I'd welcome your opinions/concerns:

- a custom valve contains the whole implementation
- requests to the servlet/URI j_security_check are intercepted
- for intercepted requests the current session is destroyed
  and a new one is created:

  -- snip --
  ...
  request.getSession().invalidate();
  request.getSession(true);
  ...
  -- snap --

- to have a proper redirect to the originally requested page
  the original request has to be copied from the old session
  to the new one.
  I filter out any references to the old session id, although I'm
  not sure whether this is really necessary.

Well, first of all, I'm in the comfortable situation that I'm not interested
in any session attributes that existed before the actual login, so
this make things easier.
Furthermore, it's clearly a homemade hack, but it seems to do the job.


Do you think it's worth to open a bug/feature request concerning this
issue? For I actually think
that this is clearly a task the container should take care of.

Thanks.

regards,
christoph

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Application Realm in Tomcat

2008-02-07 Thread david delbecq

Hello,

i happened in the past to be coding a specific real that had to provide 
extra informations to webapp (like user fullname, email, roles, etc). I 
could only do this using the userprincipal (created own subclass then 
typcasted it at webapp level).


You simple CAN't query the realm, because the realm is in a different 
classloader (server/lib) that is not accessible from webapp classloader. 
Your webapp has no way to see the realm.


What you can do, however, is to use the security filter (google for it) 
that is a webapp level implemented J2EE security specs implementation. 
It run the realms at webapp level (so it's not tomcat anymore that 
handle authentifcation) and allows you to cross the line between webapp 
and authentification mecanisms.



However, the easiest and cleanest solution would be to just configure 
you webapp so it so it knows what db to use :/





maux a écrit :

As Alan says, my purpose would be to query the database all the roles that it
contains. But i can´t do that if i don´t know what database an application
uses. So, my question is how can i know what database does an application
use? Maybe if i could know which realm the application is using, i could
access to the database. But how can i do this??

Thank you for all your help!!


mgainty wrote:
  

yes..Tough call without knowing what type of realm you will be
implementing
for (specifically would the realm be Memory or JDBC)

I found this jsp code for which will take the parameters role from the
request /verify / and output encoded string
% String role = request.getParameter(role); if (role == null) role =
;
if (role.length()  0) { if (request.isUserInRole(role)) { % You have
been
granted role %= util.HTMLFilter.filter(role) %

% }

which will output something like lt;admingt; assuming your are
requesting
admin access

HTH/
Martin--
- Original Message -
Wrom: YZUNNYCGPKYLEJGDGVCJVTLBXFGGMEP
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, February 07, 2008 2:40 PM
Subject: Re: Application Realm in Tomcat




Via the spec - you can't query all the roles a user has. But you can say
request.isUserInRole(rolename)

If you *need* access to the realm, things start to get ugly. You need to
  start coding against Tomcat internal specific classes.

-Tim

maux wrote:
  

Hi,
I am doing a Java code. This code have to access to the realm
that an application in Tomcat is using, after that the code have to


access


to
that realm and look for the roles that exist in that database.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Freez

2008-02-06 Thread David Delbecq
When it freezes, get a stack trace of all Thread in tomcat, by analysing 
those stacks, you can get an idea where it freeze and why.


Getting Threaddump on windows requires you, if i remember well, to type 
ctrl-z in the tomcat console.

En l'instant précis du 06/02/08 05:18, Suren s'exprimait en ces termes:

Hi,

I am using Tomcat 6.0.14 in Windows Environment 2003 R2. Using DBCP for
connection pooling, after 6-8Hrs of usage Tomcat hanges. It's connecting to
Oracle 10g R2 Database. The Application logic is everytime user comes with a
request that entire request is served using a single connection. ( when a
request received at Servlet side, it takes takes one connection the same is
used till the process is getting completed before the response the
connection is closed) is it causing the problem ??.

I am really in trouble. Please help me out on this.

Thanks 


G.Shajikumar
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to avoid session fixation?

2008-02-06 Thread david delbecq
Sorry Christopher, but i tried at work, it's very easy to force a user 
to use a specific sessionid, and later use yourself that session id to 
gain that user's credential, and for the whole session there is only one 
login, the one from the user you attempt to hijack. As such, tomcat is 
vulnerable to session fixation issues. Tomcat does not check where the 
session originates from (IP of requester is not associated with 
session). By passing a ;jssessionid= to a url and asking someone to 
check something on that url, you can, after that user logged in, use 
yourself the same url to gain that user's credential.


Note: we use tomcat 5.5.7, maybe this has been fixed in later versions


Christopher Schultz a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christoph,

Christoph Lenggenhager wrote:
| I'm currently trying to find a way to fight Session Fixation
| (http://www.owasp.org/index.php/Session_Fixation) in tomcat when using
| the built -in mechanisms to authenticate users of a servlet.

I don't believe that Tomcat suffers from this problem. Without trying
it, I would imagine that a user cannot authenticate twice using the
built-in mechanism.

When a remote user requests a protected resource, Tomcat checks to see
if the user has authenticated already. If she has, Tomcat checks for
authorization. If the user is not authorized, the request is rejected.

If the user was not authenticated, the user is challenged for
authentication and the process picks up after authentication.

If a login request comes in without Tomcat expecting it, the request is
rejected.

Ergo, there's no way to login once and then expect someone to login
afterward.

If you are using your own authenticator, then this could be a problem.

| In the
| environment in question, an own realm implementation is in place and
| we use the SingleSignOn feature as well.

Have you demonstrated this problem in your own environment? If so, how
did you do it?

| Or is it in fact not a problem at all?

See above.

| A common solution to fix the problem is to renew the session (or at
| least it's id) right before/after the user is authenticated (i.e. in
| the same request). I came up with a custom valve that kind of does the
| job, but I'm really not sure whether this is the way to go or if I'm
| messing too much with tomcat internals.

I would make sure it's a problem first, and then fix it.

This is interesting for the securityfilter project, which DOES allow
drive-by logins. Hmm. I'll have to think about this one. Thanks!

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

iEYEARECAAYFAkeqFawACgkQ9CaO5/Lv0PDMIQCfdE5LNfTtW1ZifQmW9us9QkuB
qFEAnRkWyeRSII8qJ4noef5uzzQ6u6tl
=YRiq
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to load a new jar file while server is running

2008-02-01 Thread David Delbecq
For webapp's WEB-INF/lib folder, just restart the webapp part, a new 
webappClassLoader will be used that include your .jar


For other locations, you will need to restart tomcat.

En l'instant précis du 01/02/08 12:17, kr1 s'exprimait en ces termes:

Hi,

I need to place a new jar file into lib while server is running.
How can we load this jar(entirely a new file) into tomcat's current
classpath without restarting the server.

Could you please suggest me how to do it?
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OutOfMemoryError: allocLargeObjectOrArray

2008-01-30 Thread David Delbecq
This is an internal jvm error. It seems you activated swallowoutput on 
your context which makes tomcat reidrect stdout and stderr to an 
internal buffer during servlet excecution and later pass it to a logger. 
Your servlet is making lots of outputs (75Megs of data) according to 
your error, and there is not anough room to convert that to a String 
prior to sending it to a logger. I suggest you remove that context 
attribute and then inspect catalina.out for the messages of your servlet.



En l'instant précis du 30/01/08 08:48, [EMAIL PROTECTED] s'exprimait 
en ces termes:

Dear all:
We have some problem with OutOfMemory error.
Environment
Tomcat: 5.5.25
JDK: jrockit-R27.4.0-jdk1.5.0_12


5130472 [TP-Processor29] ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Mainweb].[default]
 - Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size:
75333648, Num elements: 37666816
at java.lang.String.init(String.java:458)
at
java.io.ByteArrayOutputStream.toString(ByteArrayOutputStream.java:160)
at
org.apache.tomcat.util.log.CaptureLog.getCapture(CaptureLog.java:48)
at
org.apache.tomcat.util.log.SystemLogHandler.stopCapture(SystemLogHandler.java:109)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:207)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20)
at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
==
java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size:
75333648, Num elements: 37666816
   What does it mean about  allocLargeObjectOrArray ?
   I have tried to tune jvm options with -server -Xms768m -Xmx768m
-Xns256m
  But tomcat still throw out the same error
  Any suggestion will be appreciated ^^



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting SEVERE: Catalina.stop: java.net.ConnectException: Connection refused error

2008-01-30 Thread David Delbecq
Looks like you are trying, for whatever reason, to stop tomcat prior to 
starting it. This exception occurs cause there is no tomcat running that 
could answer that stop request.


En l'instant précis du 30/01/08 09:25, Meir Yanovich s'exprimait en ces 
termes:

Hello all
Im running with my tomcat 5.5 on SunOS 9 , but when I start tomcat im
getting this error The tomcat keeps running fine , but I like to know
how to eliminate this error :
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.init(Socket.java:366)
at java.net.Socket.init(Socket.java:179)
at
org.apache.catalina.startup.Catalina.stopServer(Catalina.java:394)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

Thanks 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting SEVERE: Catalina.stop: java.net.ConnectException: Connection refused error

2008-01-30 Thread David Delbecq
under linux, a combinaision of ps, grep and wc could tell you how much 
tomcat processes are active.


En l'instant précis du 30/01/08 09:44, Meir Yanovich s'exprimait en ces 
termes:
Yes you are right , there is in the tomcat script , first it is running the 
Shatt down the tomcat , is there any better way to do this ? 
Some kind of checking if the tomcat alive ? 
Thanks 


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 10:29 AM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

Looks like you are trying, for whatever reason, to stop tomcat prior to 
starting it. This exception occurs cause there is no tomcat running that 
could answer that stop request.


En l'instant précis du 30/01/08 09:25, Meir Yanovich s'exprimait en ces 
termes:
  

Hello all
Im running with my tomcat 5.5 on SunOS 9 , but when I start tomcat im
getting this error The tomcat keeps running fine , but I like to know
how to eliminate this error :
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.init(Socket.java:366)
at java.net.Socket.init(Socket.java:179)
at
org.apache.catalina.startup.Catalina.stopServer(Catalina.java:394)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

Thanks 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  




  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting SEVERE: Catalina.stop: java.net.ConnectException: Connection refused error

2008-01-30 Thread David Delbecq

ps -aex | grep tomcat | grep java

first part limit to tomcat processes, second part strip non java 
processes that are related to tomcat (like the grep tomcat of previous 
line ;)
If you need more explicit selection, include the home directory of 
tomcat in the grep calls. Here we use, as part of our stop/wait 2 
minutes/kill script, the following expression:


**kill -9  `ps -aex | grep tomcat | grep intranet | awk '{print $1}'`**


(tomcat being run inside a folder named intranet)


En l'instant précis du 30/01/08 12:37, Meir Yanovich s'exprimait en ces 
termes:
Well this is problematic abit 
When I do : ps -fu myUserName

Im getting something like this :
/opt/jdk1.5.0_11/jdk/bin/java -Xmn100M -Xms256M -Xmx256M -Djava.util.logging.ma

I have more java process that are running .. can I somhow get the tomcat name shown ? to be more unique , so I can grep it? 


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 12:47 PM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

under linux, a combinaision of ps, grep and wc could tell you how much 
tomcat processes are active.


En l'instant précis du 30/01/08 09:44, Meir Yanovich s'exprimait en ces 
termes:
  
Yes you are right , there is in the tomcat script , first it is running the 
Shatt down the tomcat , is there any better way to do this ? 
Some kind of checking if the tomcat alive ? 
Thanks 


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 10:29 AM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

Looks like you are trying, for whatever reason, to stop tomcat prior to 
starting it. This exception occurs cause there is no tomcat running that 
could answer that stop request.


En l'instant précis du 30/01/08 09:25, Meir Yanovich s'exprimait en ces 
termes:
  


Hello all
Im running with my tomcat 5.5 on SunOS 9 , but when I start tomcat im
getting this error The tomcat keeps running fine , but I like to know
how to eliminate this error :
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.init(Socket.java:366)
at java.net.Socket.init(Socket.java:179)
at
org.apache.catalina.startup.Catalina.stopServer(Catalina.java:394)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

Thanks 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  

  
  




  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IP Filters for subfolders

2008-01-30 Thread David Delbecq

En l'instant précis du 30/01/08 12:50, Ray Allen s'exprimait en ces termes:

I'm trying to restrict http access to a given folder.  All the documentation
points to appending the /conf/server.xml entry with the following text:

 Context path=/restricted ...
  ...
Valve className=org.apache.catalina.valves.RemoteAddrValve
allow=192.168.*.* /
  ...
  /Context
  
That is restricting access to a context name restricted, it's not the 
same a resrticting access to a folder of a specific webapp.
Also, the allow is a coma separated list of regular expression. You 
should probably use this for your allow:

allow=192\.168\..*



Unfortunately it doesn't work.  Does this text belong in a different
location; or is there something wrong with my syntax; or have I forgotten
something important?  The /restricted folder can't be seen with this change,
but the rule is not obeyed.  In fact I've found that the outcome of adding
the Context entry is the same with or without the Valve entry!  Tomcat
6.0 running on Windows.

Ray Allen





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IP Filters for subfolders

2008-01-30 Thread David Delbecq

En l'instant précis du 30/01/08 13:31, Ray Allen s'exprimait en ces termes:
I'm trying to restrict http access to a given folder.  All the 
documentation

points to appending the /conf/server.xml entry with the following text:

 Context path=/restricted ...
  ...
Valve className=org.apache.catalina.valves.RemoteAddrValve
allow=192.168.*.* /
  ...
  /Context



That is restricting access to a context name restricted, it's not the
same a resrticting access to a folder of a specific webapp.
Also, the allow is a coma separated list of regular expression. You
should probably use this for your allow:
allow=192\.168\..*

***Thanks for this advice.  I didn't realise about the need for backslash. 
Given that I shouldn't be using a context path to define the folder, what 
should I be doing?
Ray 

  
Either a custom valve that also inspect the requested folder, either use 
a servlet filter, mapped to restricted/* and which checks the IP. If you 
google for servlet ip filter, you should find plenty of existing filter 
ready for use.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting SEVERE: Catalina.stop: java.net.ConnectException: Connection refused error

2008-01-30 Thread David Delbecq
This is ps from HP-UX/linux, other version might use a different flag :) 
There are tons of flags, as long as you can get detailed command line, 
or working directory or perhaps environment variables, you should have 
enough to limit selection to one process.




En l'instant précis du 30/01/08 13:36, Meir Yanovich s'exprimait en ces 
termes:
Hi and thanks for the fast reply but my version of ps  
Don't have the x flag, any other way ?


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 2:22 PM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

ps -aex | grep tomcat | grep java

first part limit to tomcat processes, second part strip non java 
processes that are related to tomcat (like the grep tomcat of previous 
line ;)
If you need more explicit selection, include the home directory of 
tomcat in the grep calls. Here we use, as part of our stop/wait 2 
minutes/kill script, the following expression:


**kill -9  `ps -aex | grep tomcat | grep intranet | awk '{print $1}'`**


(tomcat being run inside a folder named intranet)


En l'instant précis du 30/01/08 12:37, Meir Yanovich s'exprimait en ces 
termes:
  
Well this is problematic abit 
When I do : ps -fu myUserName

Im getting something like this :
/opt/jdk1.5.0_11/jdk/bin/java -Xmn100M -Xms256M -Xmx256M -Djava.util.logging.ma

I have more java process that are running .. can I somhow get the tomcat name shown ? to be more unique , so I can grep it? 


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 12:47 PM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

under linux, a combinaision of ps, grep and wc could tell you how much 
tomcat processes are active.


En l'instant précis du 30/01/08 09:44, Meir Yanovich s'exprimait en ces 
termes:
  

Yes you are right , there is in the tomcat script , first it is running the 
Shatt down the tomcat , is there any better way to do this ? 
Some kind of checking if the tomcat alive ? 
Thanks 


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 10:29 AM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

Looks like you are trying, for whatever reason, to stop tomcat prior to 
starting it. This exception occurs cause there is no tomcat running that 
could answer that stop request.


En l'instant précis du 30/01/08 09:25, Meir Yanovich s'exprimait en ces 
termes:
  

  

Hello all
Im running with my tomcat 5.5 on SunOS 9 , but when I start tomcat im
getting this error The tomcat keeps running fine , but I like to know
how to eliminate this error :
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.init(Socket.java:366)
at java.net.Socket.init(Socket.java:179)
at
org.apache.catalina.startup.Catalina.stopServer(Catalina.java:394)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

Thanks 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  

  

  

  
  




  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to kill a (stucked) Tomcat thread

2008-01-30 Thread David Delbecq
There no OOTB way to terminate a Thread. Actually, java in itself does 
not provide an OOTB way to kill a Thread! If the Thread is stuck 
processing request, your best solution is to stop and restart tomcat. 
Only way a Thread can exit in java is to exit the run() method of the 
Thread. If it's a tomcat Http Thread, it will also stop working a start 
sleeping when the servlet code has finished exectution (normaly or by 
throwing an uncatched exception). You could try your own methods that 
attempts to send a ThreadDeathException to a specific jvm thread, but 
methods for this are deprecated in java


Note that, if your application is suck in Thread but request was 
disconnected, you should revise it's code so that is somehow detect it, 
or refuse too long operations.


En l'instant précis du 30/01/08 13:23, [EMAIL PROTECTED] 
s'exprimait en ces termes:

Hi ,all

The system is Tomcat 5.0.28 started as  service, Win2003 . 
When I look at http://APPHOST/manager/status

There is a thread that is obviously stucked  - it's TIME column  grows up and 
up - much more than a number written in tomcat/webapp's web.xml.
I know the client who started it , and it's safe to terminate it.

Is there OOTB in Tomcat a way to kill a thread?
Or another manager/webapp/whatever which can make that sort of things - killing 
threads/sessions by force/hand ?

С уважение, / Best Regards,
ЯНКО МАРКОВ / YANKO MARKOV


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting SEVERE: Catalina.stop: java.net.ConnectException: Connection refused error

2008-01-30 Thread David Delbecq


http://docsun.cites.uiuc.edu/sun_docs/C/solaris_9/SUNWaman/hman1b/ps.1b.html

-e
   Displays the environment as well as the arguments to the command.

??


En l'instant précis du 30/01/08 13:50, Meir Yanovich s'exprimait en ces 
termes:
Yes I can see it has x in hp 
-x Shows the command line in extended format.

Someone knows what is the equivalent in sunOs?
Thanks 


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 2:41 PM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

This is ps from HP-UX/linux, other version might use a different flag :) 
There are tons of flags, as long as you can get detailed command line, 
or working directory or perhaps environment variables, you should have 
enough to limit selection to one process.




En l'instant précis du 30/01/08 13:36, Meir Yanovich s'exprimait en ces 
termes:
  
Hi and thanks for the fast reply but my version of ps  
Don't have the x flag, any other way ?


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 2:22 PM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

ps -aex | grep tomcat | grep java

first part limit to tomcat processes, second part strip non java 
processes that are related to tomcat (like the grep tomcat of previous 
line ;)
If you need more explicit selection, include the home directory of 
tomcat in the grep calls. Here we use, as part of our stop/wait 2 
minutes/kill script, the following expression:


**kill -9  `ps -aex | grep tomcat | grep intranet | awk '{print $1}'`**


(tomcat being run inside a folder named intranet)


En l'instant précis du 30/01/08 12:37, Meir Yanovich s'exprimait en ces 
termes:
  

Well this is problematic abit 
When I do : ps -fu myUserName

Im getting something like this :
/opt/jdk1.5.0_11/jdk/bin/java -Xmn100M -Xms256M -Xmx256M -Djava.util.logging.ma

I have more java process that are running .. can I somhow get the tomcat name shown ? to be more unique , so I can grep it? 


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 12:47 PM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

under linux, a combinaision of ps, grep and wc could tell you how much 
tomcat processes are active.


En l'instant précis du 30/01/08 09:44, Meir Yanovich s'exprimait en ces 
termes:
  

  
Yes you are right , there is in the tomcat script , first it is running the 
Shatt down the tomcat , is there any better way to do this ? 
Some kind of checking if the tomcat alive ? 
Thanks 


-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 10:29 AM

To: Tomcat Users List
Subject: Re: getting SEVERE: Catalina.stop: java.net.ConnectException: 
Connection refused error

Looks like you are trying, for whatever reason, to stop tomcat prior to 
starting it. This exception occurs cause there is no tomcat running that 
could answer that stop request.


En l'instant précis du 30/01/08 09:25, Meir Yanovich s'exprimait en ces 
termes:
  

  


Hello all
Im running with my tomcat 5.5 on SunOS 9 , but when I start tomcat im
getting this error The tomcat keeps running fine , but I like to know
how to eliminate this error :
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.init(Socket.java:366)
at java.net.Socket.init(Socket.java:179)
at
org.apache.catalina.startup.Catalina.stopServer(Catalina.java:394)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

Thanks 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED

Re: Xmx and Xms size

2008-01-30 Thread David Delbecq
The answer is in the question, use the results of your load test to find 
optimal values for you.
En l'instant précis du 30/01/08 15:19, Julio Cesar Leiva s'exprimait en 
ces termes:

Hi all

We have an app on a m linux box dual processor dual core , 16GB RAM
We are wondering what could be the ideal size for Xmx and Xms (Java 
Heap Size)
We have a load test that hits our server with 800 clients sending 
request every sec.

Thanks for your tips.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect HOST to HOST:PORT

2008-01-30 Thread David Delbecq
Just use the same trick you already do. This time, instead of putting 
your index.html at ROOT, put it under the root folder of an apache httpd 
server for that host. This assumes you run an apache httpd server on 
that server and it listens to port 80.


[EMAIL PROTECTED] a écrit :

I'm running tomcat 5.0 in a SUSE environment.
To access the webapp the user has to enter in a web browser
app.server:8443 and it automatically redirects to
https://app.server:8443/myapp/servlet/login; (this is made with an
index.htm in the ROOT context). What I have been looking for is to avoid
the user to enter the port, so he just enters app.server and the
redirect to work the same. But I cant find the way to do this.

I've been working on this locally, trying to make localhost to jump to
http://localhost:8080/myapp/servlet/login; with no good results. Locally
I don't use HTTPS. 


I know it doesn't make much diference because most users have bookmarks,
but setting up new workstations gets a little easier for the helpdesk team
and supporting the rest of the users too. For them to remember the port is
a little awkward because the concept is not clear.

Thanks in advance,
Federico.



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect HOST to HOST:PORT

2008-01-30 Thread David Delbecq
apache httpd server is not related to tomcat. It's a classical web 
server (http://httpd.apache.org/). Tomcat is a java application server. 
If you are under linux, there most probably an already existing package 
for this. If you are under windows, you can simply have your tomcat 
listen to port 80.


[EMAIL PROTECTED] a écrit :

Thanks a lot for such a fast answer but actually I'm a newbie and really
don't know how to do what you proposed.

How can I find out if I have an Apache HTTPD server??? Or if it listens to
port 80???

The folders under my Tomcat goes like this (very simlilar to the one in
SUSE):

+ Tomcat
+ bin
+ common
+ conf
· web.xml
· server.xml
+ logs
	+ server 
	+ shared

+ webapps
+ myapp
· index.htm (here is another redirect to the login
page)
+ ROOT
· index.htm (this one has the redirect I mentioned
in the first mail)
+ work

This is all local, and I don't think I have anything else installed.

Do I require more software in order to solve this problem???

Thanks again,
Federico.

-Mensaje original-
De: David Delbecq [mailto:[EMAIL PROTECTED] 
Enviado el: Wednesday, January 30, 2008 15:16

Para: Tomcat Users List
Asunto: Re: Redirect HOST to HOST:PORT

Just use the same trick you already do. This time, instead of putting your
index.html at ROOT, put it under the root folder of an apache httpd server
for that host. This assumes you run an apache httpd server on that server
and it listens to port 80.

[EMAIL PROTECTED] a écrit :
  

I'm running tomcat 5.0 in a SUSE environment.
To access the webapp the user has to enter in a web browser 
app.server:8443 and it automatically redirects to 
https://app.server:8443/myapp/servlet/login; (this is made with an 
index.htm in the ROOT context). What I have been looking for is to 
avoid the user to enter the port, so he just enters app.server and 
the redirect to work the same. But I cant find the way to do this.


I've been working on this locally, trying to make localhost to jump 
to http://localhost:8080/myapp/servlet/login; with no good results. 
Locally I don't use HTTPS.


I know it doesn't make much diference because most users have 
bookmarks, but setting up new workstations gets a little easier for 
the helpdesk team and supporting the rest of the users too. For them 
to remember the port is a little awkward because the concept is not
  

clear.
  

Thanks in advance,
Federico.

  
  




-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sharing session cookies across sub-domains - how?

2008-01-30 Thread David Delbecq
It's technically possible that cookies get shared accros domains, 
setting the cookie domaine to .mydomain.com. However, it will be of no 
help to you, because each subdomain runs it's own set of webapps in 
tomcat. The session can't be shared across webapps. If you need to 
shared datas with your subdomain, you would need a way to pass an 
identifier (a cookie) accross domains your self and get yourself shared 
datas from some common repository of data (a database for example).


As for just authentification, a valve like the signle sign on valve 
could be useful. But valves won't magically make your session datas shared.



Steve Parker a écrit :

Guys,

I am using several sub-domains that all point to the same app (they 
cause different content to be displayed, depending on the 
sub-domain).  For example, I have:


content1.myapp.com
content2.myapp.com
content3.myapp.com
..etc...

I need the session data to be shared across these subdomains, so that 
when a user is clicking around the app, crossing across sub-domains, 
they won't lose the session state (e.g., if they're logged in, etc).


I understand that Tomcat uses session cookies to associate server 
session with the client request.  And I understand that the default 
behavior of this causes these session cookies to be specific to a 
domain/sub-domain.


My question:

How can I make the session cookies get written so that they are 
relevant to ALL sub-domains under the main domain.  I have read a few 
things that say that if you set the domain of the cookie to be 
.mydomain.com, it will be associated with all sub-domains of that 
primary domain.  But, not sure how to do this since tomcat has some 
built in way of setting these cookies...  I saw something with valves, 
but need more info.


Any help here, or suggestions for a different approach altogether for 
sharing session state across sub-domains, would be very much appreciated.


thx,
steve

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is relation of JSESSIONID and HttpSession?

2008-01-30 Thread David Delbecq
Always use httpSession *and* url rewriting together. The container takes 
care to track session either using url either using cookies, depending 
on client configuration. Whatever case, your code is the same, just do 
url rewriting everywhere you output links.


legolas a écrit :

Hi
Thank you for reading my post
Can some one clear my doubt about this subject?

- We can add some attribute to HttpSession in our servlet and then retrieve
it when we need them from the session. This information are kept in the
server. If this statement is correct, How does each session is bindded to a
visitor?

  

Session id (cookie/url)

-There is something named JSESSIONID which can be used, it will add only one
parameter to the url named JSessionID. It can help to identify each session
which is stored in  server memory is assigned to which client.
Is it correct?

  

Yes

I can not understand, do we use HttpSession and URL rewriting (this
JSessionID thingy) together or we use JSessionID when we are sure that the
visitor browser set cookie using to OFF.

  

You don't use JSESSIONID, the container manage it.

Thanks
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: server configuration - shared appBase in multiple Host elements

2008-01-29 Thread David Delbecq

Hi,

i think there is no big troubles in having multiple host or even 
multiple tomcat instances share a common webapp repository, as long as 
the webapp are properly coded.


Tomcat will not write to the webapp base, unless you deploy using tomcat 
manager. Only exception is when you put a .war there, tomcat will 
explode and install it. If multiple tomcat/host are trying to do that at 
the same time, you can run into troubles :)


Mind however that those webapp do no try to write in their webapp 
directory for whatever reasons. And also, do *not* share the work/ 
directory, each tomcat should have his own :p



Note that, if you fear it fail, you can still have a stupid dump script 
that replicate a central webapp directory to each host's separate webapp 
directory.


Here, we have a common webapp shared between 2 host, we simply used a 
symbolic link for the webapp on second host (unix environment).

Chris Beckey a écrit :

The question: has anyone tried to share a web application (appBase) between
multiple virtual hosts?

Background: the project I'm working on is a number of web applications that
front a number (100's) of instances of a legacy application accessed through
a custom protocol.  The number of Tomcat hosts will be less than the number
of legacy data stores (i.e. one Tomcat host will front N instances of the
legacy application).  Each legacy app instance has its own authentication
and authorization data store, which must be passed through so that the
Tomcat applications use that for its AA.  A custom Realm has been coded and
is working (it must know which legacy application instance to connect to).
There are multiple web applications, dependent on the interface provided to
their clients (apps have different protocols and function).  The number of
interfaces (web applications) will increase over time.
The plan of record is to have a virtual host per legacy app, and web apps
for each interface provided.  The core of all of the applications resides in
shared, common or server.
Deployed conventionally, each host would have its own appbase, into which
multiple web applications would be deployed.  If a particular host fronts 3
legacy applications, each of which has 4 web apps then there would be total
of 12 web apps to deploy, maintain, update, etc ...  multiplied by 100's of
servers makes maintenance rather more difficult than desired (our
development group of 4 will probably end up doing much of the maintenance
and installation).
To reduce the number of deployed applications while still maintaining the
relation of Realm to legacy application instance, I tried deploying all of
the web apps to a single directory and declaring multiple hosts with the
same appBase value.  Each host has its own Realm configured for it.
Initial testing was positive but its the kind of thing that just looks like
it could cause trouble.  So back to the original question, has anyone tried
this under load/production and how did it work?

Thanks

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wrong path to servlets

2008-01-29 Thread david delbecq

Difficult to say, without the actual jsp code

Emmanuel Milou a écrit :

Hi,
I would like to have your input on this problem. It is quite tricky 
and I hope you will be able to help me.
Here is my configuration: JDK 1.6.0_03, Apache-Tomcat5.5.25, connector 
ajp13.
When I click on an option in the menu bar of my home page, JSP code is 
executed to call the servlet. It looks like that:  
/getServletContext().getRequestDispatcher(/servlet/path_to_servlet).forward(request,response); 

/The problem is that before the page is displayed, the path is 
modified, and if the JSP file was in a subdirectory (for instance 
named toto), the name of the directory is added to the path, and 
finally the browser looks for /toto/servlet/path_to_servlet, /which 
doesn't exist and I get an 404 Not Found Error. The right URL is 
/servlet/path_to_servlet, it works when I manually test.

It gives the same result for each JSP file saved in a subdirectory.
You must know that I used to run Tomcat 5.5 with the same 
configuration and it worked fine.

Thanks for your help.

Emmanuel




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Empty log files

2008-01-29 Thread david delbecq
http://tomcat.apache.org/tomcat-5.5-doc/logging.html might be a good 
starting place. I don't know what logging configuration you have, but 
look like ou use some rolling file appender based on date pattern. It 
creates new files upon new dates. Change your logging configuration if 
you don't want rolling file.


If your problem is that ther should be something in those files, maybe 
you set the threshold level of information to high (crtitical only probably)

Jonathan Mast a écrit :

Tomcat is generating a lot of empty log files of at least to types:
manager.date.log  and
host-manager.date.log


I googled [empty log files tomcat] and did not find satisfactory answers
(or any answers for that matter).

thanks

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wrong path to servlets

2008-01-29 Thread david delbecq
According to sun's doc: The pathname must begin with a / and is 
interpreted as relative to the current context root.
is /servlet actually in the same webapplication as your jsp? Or did you 
put your jsp inside ROOT and your servlets inside a separate servlet 
webapp?
In later case, you should use 
getContext(servlet).getRequestDispatcher(org...).forward(...);



Emmanuel Milou a écrit :

The jsp code is very basic. Here is the content of each jsp file:
%
getServletContext().getRequestDispatcher(/servlet/org.capella.intranet.agenda.AgendaServlet).forward(request,response); 


%

Of course, each jsp file calls the right servlet... like I said 
before, if the jsp file is in a sub directory, the name of the sub 
directory is preprended to the path .



david delbecq wrote:

Difficult to say, without the actual jsp code

Emmanuel Milou a écrit :

Hi,
I would like to have your input on this problem. It is quite tricky 
and I hope you will be able to help me.
Here is my configuration: JDK 1.6.0_03, Apache-Tomcat5.5.25, 
connector ajp13.
When I click on an option in the menu bar of my home page, JSP code 
is executed to call the servlet. It looks like that:  
/getServletContext().getRequestDispatcher(/servlet/path_to_servlet).forward(request,response); 

/The problem is that before the page is displayed, the path is 
modified, and if the JSP file was in a subdirectory (for instance 
named toto), the name of the directory is added to the path, and 
finally the browser looks for /toto/servlet/path_to_servlet, /which 
doesn't exist and I get an 404 Not Found Error. The right URL is 
/servlet/path_to_servlet, it works when I manually test.

It gives the same result for each JSP file saved in a subdirectory.
You must know that I used to run Tomcat 5.5 with the same 
configuration and it worked fine.

Thanks for your help.

Emmanuel




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Reload modifed servlet

2008-01-27 Thread david delbecq
Since you need to do a clean/rebuild, which is an operation that occurs 
on the webapp building side, i'll tend to say it's not related to tomcat 
but more on the way your build process workd, it may be that it fails to 
see the servlet need a recompilation on the developer's IDE. Compiling 
servlet is outside of tomcat scopes.


Note: on windows environments, the .class files, when they are opened by 
tomcat won't be rewritable unless you stop tomcat. To update a webapp 
you have to unload it first. If you have classloader leak in your 
webapp, you even have to stop tomcat after that before updating files. 
There is a config option in context.xml to prevent this (i don't 
remember it's name) and allows updating on running tomcat on windows 
platforms. It's due to the way OS automatically locks files when you 
open them (you don't have such problems on other paltforms)

Bob Riaz a écrit :

Hello all,

My environment:
Windows XP-Pro
Tomcat 6
JDK 6
Eclipse JEE IDE

I find that whenever I make a change to my servlet, I need to
Clean/Rebuild the project in order for the changes to take effect. Even
restarting Tomcat doesn't take the change. It didn't used to be this way!!
I've set reloadable=true in Context.xml - doesn't help. This is the
situation on one machine. On a different machine using the same environment
I don't have this problem. Something about the way Tomcat was configured on
this machine then?
If anybody's had this probelm, please share your thoughts!

Many thanks.

Bob



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems with jars or else.

2008-01-23 Thread David Delbecq
Don't put your jars at duplicate locations (shared/lib and 
webapp/WEB-INF/lib) it should be enought to put the in your 
WEB-INF/lib folder.

[EMAIL PROTECTED] a écrit :

Hi all,

I've build a Web Service that should reload me Axis due to an Ant project file, 
the service calls Main.main() (included on ant library) with the arguments -f 
C:\\anthome\\axis.xml reload, the target.

When I call the service by the Client the st_out log file says to me that the 
file axis.xml is processed but then happens something, throws me an Exception 
and Tomcat service stops itself.

java.lang.NoClassDefFoundError: org/apache/tools/ant/util/DateUtils
at org.apache.tools.ant.DefaultLogger.formatTime(DefaultLogger.java:305)
at 
org.apache.tools.ant.DefaultLogger.buildFinished(DefaultLogger.java:158)
at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2008)
at org.apache.tools.ant.Main.runBuild(Main.java:718)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.Main.start(Main.java:161)
at org.apache.tools.ant.Main.main(Main.java:250)
at man.ServerManager.reloadAxisMainAnt(ServerManager.java:92)
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:585)
at 
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at 
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at 
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at 
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at 
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at 
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

that was the exception...

I've put on CATALINA_HOME\shared\lib and on axis\WEB-INF\lib all ant jars 
file...

What shoul I do?

Thank you


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5 won't start up anymore after adding/removing webapps

2008-01-22 Thread david delbecq
Those are just serialized session of users generated when webapps stop. 
There shouldn't be any reference to myface except in your personal 
webapps. The fact it's present in other apps make me think you did more 
than deploy webapp, like modifying the common web.xml that is shared 
across all webapps (and where default servlet is defined that browse 
directories) and putting jars in common/lib or alter in any other way 
the different apps. Since you were just playing with experimental 
apps, i'd recommend you remove your tomcat and start with a fresh one, 
obviously you played a little too much and did break something :)

Note that a webapp not starting should stop tomcat itself from starting.
Karr, David a écrit :

There weren't any files corresponding to those apps in the conf tree.  However, 
when I just tried grepping for that class name in the entire tree, I found it 
in the following files:

 ./work/Catalina/localhost/jsp-examples/tldCache.ser
 ./work/Catalina/localhost/servlets-examples/tldCache.ser
 ./work/Catalina/localhost/tomcat-docs/tldCache.ser
 ./work/Catalina/localhost/webdav/tldCache.ser
 ./work/Catalina/localhost/_/tldCache.ser 

  

-Original Message-
From: david delbecq [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 22, 2008 10:08 AM

To: Tomcat Users List
Subject: Re: Tomcat 5.5 won't start up anymore after 
adding/removing webapps


To manually undeploy a webapp, when tomcat is stopped, remove 
webapps/webappname* remove work/Catalina/localhost/webappname

remove conf/Catalina/localhost/webappname.xml

Karr, David a écrit :

I installed v5.5.25.  I installed the admin app (although the 
instructions on doing this seem uncertain).  I used it for a few 
hours, deploying and undeploying some experimental apps 
  
using MyFaces 

and RichFaces.  Now, for some reason, I'm finding that Tomcat won't 
start up at all, and I've undeployed all the apps (except the admin 
app) that I had deployed.  I first only removed the war and 
  
exploded 

dir from the webapps dir, but then I tried removing them from the 
work/Catalina/localhost directory also.


The error I'm seeing in the localhost log is this:

java.lang.ClassNotFoundException:
org.apache.myfaces.webapp.StartupServletContextListener
at

  

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoad


er
java:1362)
at

  

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoad


er
java:1208)
at

  

org.apache.catalina.core.StandardContext.listenerStart(StandardContext


.j
ava:3712)
at

  

org.apache.catalina.core.StandardContext.start(StandardContext.java:42


16
)

Obviously, since something is still trying to reference MyFaces, 
there's some remnant of one of my deployed apps lying around in a 
place that I'm not aware of.



  

-

To start a new topic, e-mail: users@tomcat.apache.org To 
  
unsubscribe, 


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

  
  

-
To start a new topic, e-mail: users@tomcat.apache.org To 
unsubscribe, e-mail: [EMAIL PROTECTED]

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





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5 won't start up anymore after adding/removing webapps

2008-01-22 Thread david delbecq

To manually undeploy a webapp, when tomcat is stopped,
remove webapps/webappname*
remove work/Catalina/localhost/webappname
remove conf/Catalina/localhost/webappname.xml

Karr, David a écrit :

I installed v5.5.25.  I installed the admin app (although the
instructions on doing this seem uncertain).  I used it for a few hours,
deploying and undeploying some experimental apps using MyFaces and
RichFaces.  Now, for some reason, I'm finding that Tomcat won't start up
at all, and I've undeployed all the apps (except the admin app) that I
had deployed.  I first only removed the war and exploded dir from the
webapps dir, but then I tried removing them from the
work/Catalina/localhost directory also.

The error I'm seeing in the localhost log is this:

java.lang.ClassNotFoundException:
org.apache.myfaces.webapp.StartupServletContextListener
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
java:1362)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
java:1208)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
ava:3712)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216
)

Obviously, since something is still trying to reference MyFaces, there's
some remnant of one of my deployed apps lying around in a place that I'm
not aware of.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Applets and Sessions

2008-01-21 Thread david delbecq
Applet are client side, they are not related to tomcat. If you applet 
request ressources from server, the fact it creates or not session 
depend on the way it access it and on the fact ressource requires or not 
a user session.



Charlie Wingate a écrit :
 


Hi All,

At every user instance of an applet is there a session
started as reported by tomcat manager for that application?

 


Charlie

 






---
This message is a CONFIDENTIAL communication.  If you are not the intended 
recipient, please do not read, copy, or use it, and do not disclose it to 
others.  Please notify the sender of the delivery error by replying to this 
message, and then delete it from your system.  Thank you.
 


This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals  computer 
viruses.




  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat App becomes Unresponsive

2008-01-20 Thread David Delbecq
If you are on a UNIX jvm, issue a signal 3 (SIGQUIT) to the jvm process 
when tomcat stops responding. It will dump on standard-out (normaly 
redirected to catalina.out) the list of Threads with a stacktrace for 
each. By invstigating stacktrace you will get clues as where the problem 
is. I don't know if mysql is protected against deadlocks, but it may be 
user1 locks ressource X, user2 locks ressource Y, user1 wait for Y to 
free, user2 wait for X to free, all other users are waiting for X to 
free, filling in the ThreadQueue, tomcat then look like unresponsive.


Of course the same kind of concurrency issue can occurs with 
synchronized{} blocks


Note, you can also get such dump on windows, it requires you to press 
magic key combinaison in JVM terminal (don't remember which)

tc a écrit :

I have been asked to investigate a tomcat/java application.

The basic problem is that this application sometimes becomes unresponsive
if more than one user uses it at a time.  Restarting Tomcat clears the
problem.  I don't think it has ever occurred when only one person was
using the app.

It is a fairly straight forward data-entry app; the data is stored in a
mysql database.

The developers think there may some issue with the database.  They have
also done multi-user testing without being able to reproduce the problem.

I'm looking for pointers to any resources on the web or elsewhere that can
help me track down the problem, or ideas about where to look, or what we
can do to improve post-freeze diagnosis of this problem.

I am also a developer, but I don't have a lot of experience with Java or
Tomcat.  I'm trying to bring a fresh perspective to this problem.

Thanks.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Impossible to use multi threading with Tomcat by using a DLL ?

2008-01-19 Thread david delbecq
You mean in all cases it runs client-side? Then it's not a tomcat 
related problem. Applet, to be able to run JNI, must be properly signed 
and run with security authorisation needed. Moreover, the JNI libraries 
must be installed on client.

Claire Dugenet a écrit :

Hello,

In the two case (with or without Tomcat), we call it with a button 
because we use the same applet. Normally, the applet is independant of 
Tomcat but it makes a difference when we use this applet with Tomcat 
(http://localhost:8080 ...) or whithout Tomcat (file:///C:/ ...).


We have try to call the DLL with and without the servlet, and it's the 
same result : it doesn't work when we use Tomcat.


david delbecq a écrit :
If your applet code is called from button actions, all calsl to your 
dll will be made from the same AWT thread. If you call it from a 
servlet in tomcat , a random thread from the HttpThread pool will be 
used, that's probably your difference that make it work one side and 
not the other.

Claire Dugenet a écrit :
In fact, some of the fonctions of the DLL works except the ones 
which call

the threads.

To test my DLL, I have created an applet which call the two DLL and 
it works
very well when I don't use Tomcat. And when I call exactly the same 
applet

with Tomcat, that doesn't work : there is no error but the thread are
blocked.


2008/1/18, david delbecq [EMAIL PROTECTED]:
 
Tomcat does not block multi threading. There is not such thing i 
think
in the JVM anyway, so i don't see how it could prevent your native 
code

from creating threads. When you say you are having same call without
tomcat, you mean in a spearate jvm, using the same jni libraries? 
Maybe

you are just misuing your system library? Or not calling it at all?
There is not restriction in JNI that rpevent multiple thread to call
native code, nor is it restriction as to what thread natvie code 
create.

It can even create java threads as far a i know!

Claire Dugenet a écrit :
  

Hello,



I realize a web application using Struts with Tomcat. In this
  

application, I
  
call a DLL (created with JNI) which call an other DLL (in language 
C).
  

The
  

last one is in the directory system32 of windows et it use several
threads.



There is no error but according to the log files, no thread are 
called.
  

I
  

have call the same DLLs without Tomcat, and it works.


Does Tomcat block the multi-threading ? Is there a solution to 
authorize
  

the
  

multi-threading ?

Thanks,
Claire.


  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: application startup problem

2008-01-18 Thread david delbecq

Jannetta Steyn a écrit :

Hi David

Thanks for your response. 

  

At least one class file in your war requires a jvm which's version
should be higher than the one running tomcat. It generally 
occurs when 
you try to load a java 5 compiled class file using a java 1.4 
or earlier 
jvm. I'll check twice the version tomcat is actually using to 
run. It is 
most probably not what you said, because tomcat requires a 
JDK, and not 
a JRE! Since tomcat did not refuse to start mentionning it's 
not a jdk, 
it certainly did not use JRE1.5.0_14 in your server.





Having had problems with this server before, I uninstalled every JDK and JRE I 
could find and installed the JRE mentioned. When I installed Tomcat 5.5, I 
selected that JRE. Tomcat seems to run fine and a previous version of my 
application also seems to be running quite happily. Why does Tomcat 5.5 need a 
JDK (only answer, if it is not RTFM, because I obviously haven't done it 
properly)

  
Try a java 6, just to be sure? :) Am not used a lot to tomcat under 
windows, and the way it locates it's jvm under that os. As for your 
question, tomcat officially only support jdks, because it needs a 
compiler to compile JSPs. However, wiki states that if JSPs are 
precompiled, you can use a simple jre, at your own risks. It's not 
impossible oracle's jvms interfers with your tomcat. Also ensure your 
.war is in fact build to work with java 5 or later. You should perhaps 
also check your log files, around tomcat startup, to get informations 
about tomcat startup, and maybe about which jvm it uses. As far as i 
remember, it should at least show  warning about using a jre.




There are a few JREs left in Oracle directories and because I don't know what 
they are I have had to leave them since the server is also used by others.

Below is the server path:


D:\Program Files\PHP\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Progr
am Files\Dell\OpenManage\Array Manager;C:\Program Files\Common Files\Network Ass
ociates\VirusScan Engine\4.0.xx\;C:\Program Files\Microsoft SQL Server\80\Tools\
Binn\;C:\Program Files\DataDirect\ODBC32v50\Drivers;D:\oracle9i\OPatch;D:\San_Fr
ancisco\Products\SIST\bin;D:\Edits\products\EDITS\bin;D:\oracle9i\jre\1.4.2\bin\
client;D:\oracle9i\jre\1.4.2\bin;D:\oracle9i\bin;C:\Program Files\Oracle\jre\1.3
1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;D:\oracle10g\product\OraDb10gHome\j
re\1.4.2\bin\client;D:\oracle10g\product\OraDb10gHome\jre\1.4.2\bin;C:\Program F
iles\Java\jre1.5.0_14\bin;\bin;C:\Program Files\Oracle\jre\1.1.7\bin;D:\Edits\pr
oducts\EDITS\Apache\Perl\5.00503\bin\mswin32-x86;C:\Program Files\MySQL\MySQL Se
rver 5.0\bin;Ø

The truth is, that from what I can see, this server is in a very iffy state, but 
unfortunately I have no control over it and I'll have to request our IT department to 
re-do the server which will probably take weeks (I'm not allowed to do it myself - I 
wouldn't have used Windows in the first place, but there you go ... ).

Before going the re-do way I wanted to try and resolve the problem if possible. 
I'll start by moving my path to jre1.5.0 to the front of the path. But if 
anyone spots anything else that could help resolve the problem, I'd appreciate 
some pointers.

Regards
Jannetta



This e-mail and any attachments are for the intended addressee(s) only
and may contain confidential and/or privileged material. If you are not a
named addressee, do not use, retain or disclose such information.
This email is not guaranteed to be free from viruses and does not bind
Serco in any contract or obligation.
Serco Limited. Registered in England and Wales. No: 242246
Registered Office: Serco House,16 Bartley Wood Business Park, Hook,
Hampshire RG27 9UY United Kingdom.

Help cut carbon...please don’t print this e-mail unless you really need to.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: application startup problem

2008-01-18 Thread david delbecq
At least one class file in your war requires a jvm which's version 
should be higher than the one running tomcat. It generally occurs when 
you try to load a java 5 compiled class file using a java 1.4 or earlier 
jvm. I'll check twice the version tomcat is actually using to run. It is 
most probably not what you said, because tomcat requires a JDK, and not 
a JRE! Since tomcat did not refuse to start mentionning it's not a jdk, 
it certainly did not use JRE1.5.0_14 in your server.



Jannetta Steyn a écrit :

Hi All
 
I hope someone can point me in the right direction. I am at a bit of a

loss.
 
I am having a problem deploying an application to a Windows 2000 server,
running Tomcat 5.5 and JRE1.5.0_14. 
 
I am getting a java.lang.UnsupportedClassVersionError: Bad version

number in .class file error in the catalina log file, but I'm not
making any sense of it. 
 
The application runs perfectly on my Windows XP workstation
 
Can anybody perhaps help. If I have not provided enough or the

appropriate information, please just ask and I'll post it. The full
entry in the log is pasted below.
 
Many thanks

Jannetta
 
The error in the log is :
 
Jan 18, 2008 10:55:17 AM org.apache.catalina.startup.HostConfig

deployWAR
INFO: Deploying web application archive EDITS_v2.0.0.war
Jan 18, 2008 10:55:19 AM org.apache.catalina.startup.HostConfig
deployWAR
SEVERE: Error deploying web application archive EDITS_v2.0.0.war
java.lang.UnsupportedClassVersionError: Bad version number in .class
file
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
ssLoader.java:1852)
 at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
.java:876)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1329)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1208)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:1068)
 at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3956)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4230
)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:760)
 at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
 at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
 at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
 at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220)
 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.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458
)
 at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(Unknown Source)
 at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(Unknown Source)
 at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
Source)
 at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
 at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:139
4)
 at
org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet
.java:213)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:174)
 at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:525)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:108)
 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
4)
 at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
 at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
 at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool

Re: Custom initialization after startup

2008-01-18 Thread david delbecq

Jonadan a écrit :

Is there any way I can perform custom initialization IMMEDIATELY after Tomcat
startup automatically? 
  

use lifecycle listener
http://tomcat.apache.org/tomcat-5.5-doc/config/engine.html


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Impossible to use multi threading with Tomcat by using a DLL ?

2008-01-18 Thread david delbecq
Tomcat does not block multi threading. There is not such thing i think 
in the JVM anyway, so i don't see how it could prevent your native code 
from creating threads. When you say you are having same call without 
tomcat, you mean in a spearate jvm, using the same jni libraries? Maybe 
you are just misuing your system library? Or not calling it at all? 
There is not restriction in JNI that rpevent multiple thread to call 
native code, nor is it restriction as to what thread natvie code create. 
It can even create java threads as far a i know!


Claire Dugenet a écrit :

Hello,



I realize a web application using Struts with Tomcat. In this application, I
call a DLL (created with JNI) which call an other DLL (in language C). The
last one is in the directory system32 of windows et it use several
threads.



There is no error but according to the log files, no thread are called. I
have call the same DLLs without Tomcat, and it works.


Does Tomcat block the multi-threading ? Is there a solution to authorize the
multi-threading ?

Thanks,
Claire.

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Impossible to use multi threading with Tomcat by using a DLL ?

2008-01-18 Thread david delbecq
If your applet code is called from button actions, all calsl to your dll 
will be made from the same AWT thread. If you call it from a servlet 
in tomcat , a random thread from the HttpThread pool will be used, 
that's probably your difference that make it work one side and not the 
other.

Claire Dugenet a écrit :

In fact, some of the fonctions of the DLL works except the ones which call
the threads.

To test my DLL, I have created an applet which call the two DLL and it works
very well when I don't use Tomcat. And when I call exactly the same applet
with Tomcat, that doesn't work : there is no error but the thread are
blocked.


2008/1/18, david delbecq [EMAIL PROTECTED]:
  

Tomcat does not block multi threading. There is not such thing i think
in the JVM anyway, so i don't see how it could prevent your native code
from creating threads. When you say you are having same call without
tomcat, you mean in a spearate jvm, using the same jni libraries? Maybe
you are just misuing your system library? Or not calling it at all?
There is not restriction in JNI that rpevent multiple thread to call
native code, nor is it restriction as to what thread natvie code create.
It can even create java threads as far a i know!

Claire Dugenet a écrit :


Hello,



I realize a web application using Struts with Tomcat. In this
  

application, I


call a DLL (created with JNI) which call an other DLL (in language C).
  

The


last one is in the directory system32 of windows et it use several
threads.



There is no error but according to the log files, no thread are called.
  

I


have call the same DLLs without Tomcat, and it works.


Does Tomcat block the multi-threading ? Is there a solution to authorize
  

the


multi-threading ?

Thanks,
Claire.


  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to trap exceptions

2008-01-18 Thread david delbecq

lanchez a écrit :


All,

I have a web application and I want to create a generic exception
handler/listener which will listen to all the exceptions (checked and
runtime) which are thrown by web application.
  
If they reach level of tomcat, just write a servlet filter, and manage 
it there (try { chain.doFiter(...) } (catch .) {}

During a debug sessions I want to enable this listener and bring Tomcat to a
screeching halt if there is an exception thrown so I need a listener for any
/ all exceptions.  I have a large code base that I inherited and an
exception is being thrown and buried somewhere so there is no stack trace
from the exception in any of the tomcat logs.

Any idea how can I do this? 
  
If you want to bring tomcat to a streching halt when an exception is 
thrown somewhere (whever or not it is catched), i suggest you run tomcat 
in eclipse debugger - supend on exception... However! You will quickly 
notice it's not manageable unless you know which exception you want to 
look at. This is because in the normal exception of application tons of 
exception are thrown and catched as part of normal application execution.
Regards. 
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fwd:Tomcat Manager Problems

2008-01-18 Thread david delbecq
Check the tomcat use use did not get corrupted / truncated during 
download. Between installs / reinstall, ensure you also redownloaded 
tomcat jar (not from browser cache!)

[EMAIL PROTECTED] a écrit :

Hi all,

I've a serious problem, I've installed Tomcat on my PC and when I started the 
service my manager page (http://localhost:8080/manager/html) doesn't show me 
any information, I've tried to unistall and re-install my Tomcat 5.5.17. I 
haven't made any further operation on my PC. This is what my catalina log file 
show me:

What should I do?

18-gen-2008 15.34.44 org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in 
production environments was not found on the java.library.path: C:\Tomcat 
5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Programmi\MiKTeX 
2.6\miktex\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\File
 
comuni\Adobe\AGL;C:\Lindoapi\bin\win32;C:\apache-ant-1.7.0\bin;C:\gwt-windows-1.4.61\;C:\Programmi\QuickTime\QTSystem\;
18-gen-2008 15.34.44 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
18-gen-2008 15.34.44 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 844 ms
18-gen-2008 15.34.44 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
18-gen-2008 15.34.44 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
18-gen-2008 15.34.44 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
18-gen-2008 15.34.46 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
18-gen-2008 15.34.47 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
18-gen-2008 15.34.47 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15  config=null
18-gen-2008 15.34.47 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
18-gen-2008 15.34.47 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2438 ms
18-gen-2008 15.35.08 org.apache.catalina.connector.CoyoteAdapter service
GRAVE: An exception or error occurred in the container during the request 
processing
java.lang.NoClassDefFoundError: org/apache/tomcat/util/buf/ByteChunk
at org.apache.catalina.util.Base64.decode(Base64.java:213)
at 
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:164)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
18-gen-2008 15.35.10 org.apache.catalina.connector.CoyoteAdapter service
GRAVE: An exception or error occurred in the container during the request 
processing
java.lang.NoClassDefFoundError: org/apache/tomcat/util/buf/ByteChunk
at org.apache.catalina.util.Base64.decode(Base64.java:213)
at 
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:164)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
18-gen-2008 15.35.10 org.apache.catalina.connector.CoyoteAdapter service
GRAVE: An exception or error 

Re: Automatic Thread Dump configuration

2008-01-17 Thread David Delbecq
En l'instant précis du 17/01/08 15:46, Chad Kellerman s'exprimait en ces 
termes:

Tomcat Users,
I have been googling Tomcat thread dumps and have not seen what I want
to accomplish anywhere...

   Is there a way to configure Tomcat to execute a thread dump whenever
there is an Out Of Memory issue or if an app reached the max thread count?
  
When there is an OutOfMemory, it's impossible to make a ThreadDump. The 
reason is that, since you lack memory, it can be seen as useless to try 
allocating  StackTrace object and stuff it in a new Error(). Moreover, 
from my experience, when you are out of memory, the location where you 
are out if generally irrelevant, as it's most of the time cause by a 
memory leak somewhere else.
As for you max ThreadDump, you could still try feeding the tomcat output 
to an external tool that sends a Kill -3 to tomcat Thre when it sees 
some keyword.


Note that, in both cases, it's not tomcat's job to make a ThreadDump, 
it's more related to jvm behaviour. Other vendors than sun might have 
some facilities for that?

   I am using Tomcat 5.5.25 on RHEL 5. with jdk1.5.0_13

   Thanks for the help,
Chad

  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No Authentication Dialog appears for Tomcat Manager

2008-01-14 Thread David Delbecq
The message you see in browser, namely HTTP Status 401 - appear 
probably because your browser for an unknown reason does not support 
basic authentification or has it disabled (securities in browser that 
prevent basic auth outside of ssl?). The text you see is normaly sent by 
tomcat along with http 401 code + basic auth headers. In my browser it 
appear only if i click cancel in my authentification popup. Could you 
sniff your connection to ensure the basic auth headers are correctly 
sent to browser by tomcat? And indeed, manager/html is the html 
interface to tomcat manager.



En l'instant précis du 14/01/08 03:09, Mark Riggins s'exprimait en ces 
termes:

I'm trying to access http://localhost/manager/html, which I believe is an
HTML interface into the Tomcat Manager.  


Maybe it would be easier to edit build.xml and replace the deploy with a
simple copy.   I can't get the Manager working.

!-- Copy Build into Tomcat/webapps --
mkdir dir=${catalina.home}/webapps/SE/
copy todir=${catalina.home}/webapps/SE
  fileset dir=${build.home}/
/copy

!-- MDR use copy instead of Tomcat Manager App
deploy url=${manager.url}
   username=${manager.username}
   password=${manager.password}
   path=${app.path}
   localWar=file://${build.home}/
--


Are you using a browser to access that url? 'cause you mention ANT, but 
ant is not a browser and will surely not show a dialog when accessing 
the manager...


  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No Authentication Dialog appears for Tomcat Manager

2008-01-13 Thread david delbecq
Are you using a browser to access that url? 'cause you mention ANT, but 
ant is not a browser and will surely not show a dialog when accessing 
the manager...

Mark Riggins a écrit :

Instead of a basic-authentication dialog box, I get the following error
message instead.

HTTP Status 401 -

type Status report

message

   description This request requires HTTP authentication ().
   Apache Tomcat/6.0.13

My tomcat-users.xml file looks like this:
?xml version='1.0' encoding='utf-8'?

tomcat-users

  role rolename=tomcat/

  role rolename=manager/

  role rolename=admin/

  user username=tomcat password=tomcat roles=tomcat/

  user username=manager password=manager roles=manager/

  user username=admin password=admin roles=admin/

/tomcat-users


From web.xml I have:
  !-- Define the Login Configuration for this Application --
  login-config
auth-methodBASIC/auth-method
realm-nameTomcat Manager Application/realm-name
  /login-config

  !-- Security roles referenced by this web application --
  security-role
description
  The role that is required to log in to the Manager Application
/description
role-namemanager/role-name
  /security-role

But the dialog NEVER APPEARS.

Any help would be greatly appreciated.  I can't get ANT to work without
this.
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question of separate catalina.out

2008-01-12 Thread David Delbecq
Well technically, tomcat does not write to catalina.out, it writes by 
default to standard output. The startup script does a redirect of tomcat 
stdout and stderr to catalina.out using the '' operator.


Now, on unix system, when a file is opened and a handle is retrieved 
(here by invoking shell cause of ''), if you rename / move the file in 
filesystem, the opened handler follow it. Physically, despite the move 
it's still the same file, you just renamed it. If you want control of 
tomcat output, you should follow rules here, that describe out to setup 
tomcat log facilities (to avoid using of stdout).


http://tomcat.apache.org/tomcat-5.5-doc/logging.html

As for signal, since it's the jvm that intercept signals, tomcat has no 
use of it. The only usefull signal in jvm is QUIT, which forces jvm to 
dump thread as debugging information.



latteye a écrit :

I have a question of separate tomcat logfile catalina.out.

I use newsyslog to create a new catalina.out every midnight. And the old log
file move to catalina.out.0.
But Tomcat always write the log to the old file catalina.out.0.  Unless I
restart my tomcat, it will write the log to new file which newsyslog
created.

It's not a good idea to restart tomcat with crontab everynight.

And I had tried to send a sighup to tomcat process with cmd : kill -HUP pid.
It shutdown.

I wanna find a way to make tomcat write log to new logfile ,so newsyslog can
work.

Thanks.

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: memory usage increases on application stop

2008-01-11 Thread David Delbecq
En l'instant précis du 11/01/08 09:34, Morten Matras s'exprimait en ces 
termes:

Case:

I've deployed an application on a Tomcat 6.0 (current release). The
application is a Hibernate / Stripes application.


Almost no memory is allocated due to the deployed application.


Setting:


-Xmx64m -XX:MaxPermSize=128m
  
According to memory below, those settings are not take into account, or 
you wouldn't go over about 70M total space (java heap space of 64M max + 
jvm code of a few megs). Note that the PermSize is taken from the heap, 
so it should be lower than max heap size.


Tomcat without application uses: 27,5M (real memory) and 349M (virtual
memory)
Tomcat with application uses: 133M (real memory) and 367M (Virtual memory)


Now if I stop this application (using the manager) the memory profile
becomes:


Tomcat with stopped application: 128M (real memory) and 679M (virtual
memory)


So stopping the application increases the virtual memory usage from 367 to
679 m and stays there!
  
The increase is probably due to specific code your application executes 
when it is stopped. It seems to do memory intesive things there :) You 
have to be aware a JVM memory never decrease in terms of system memory 
size. It can only grow up to the -Xmx size. (See sun's jvm docs for 
details). To get an idea of what memory size is really available for 
your jvm, you must check the values inside the jvm (use the system 
class, or a easy to use tool like lambda probe).


If, even after a GC, memory is not release inside the java heap, then go 
check for memory leaks in your webapp.




Undeploying a stopped application doesn't change the numbers.


Why does stopping (or undeploying) a webapplication cause a dramatic
increase in memory usage?


My guesses:
 - Some ressources are not freed? (database connections)
 - Some hibernate related stuff are trapped in a circular relation circle?
 - Tomcat punishes me for stopping something it really liked :-)



  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deploying on a Remote Tomcat Servers

2008-01-10 Thread david delbecq

There are several way to automate it.

One is to install on that remote tomcat, the tomcat manager webapp, 
which let you deploy war. There is also a ant task that can be used with 
it to submit the compiled war file to that manager.
Another is to install lambdaprobe, which can also do deployement, but i 
don't think there are ant task to automate it. You'll have to use interface.
Yet another solution is to scp, ftp or window share the war file to 
destination server, or use any server specific appropriate method to 
send a file to tomcat folder.


Richard G. Reyes a écrit :

Hi Guys,

May I ask how you guys deploy on a remote tomcat servers? Is there a 
way to automate deployment?


Regards,
Richard

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 UTF-8 GET and POST - please Help..

2008-01-10 Thread David Delbecq
As you might infer, URIEncoding=UTF-8 only work on the Uri part, and 
thus affect only GET. The post is decoded using the browser provided 
content-encoding. Most borwser don't bother to set that header. 
Behaviour of tomcat is to then use some default (ISO-8859-1). Best way 
to ensure tomcat will use UTF-8 for post decoding is to force it using 
request.setCharacterEncoding(UTF-8), before any call to 
getParameter(s). a filter or a valve might be a good place :)


btw, be carefull, struts (i see you use struts) tends to also have his 
default behaviour when decoding POST :)




Aleksandar Matijaca a écrit :

Hi there,

I am having some issue with submitting foreign language fonts in HTML form
to Tomcat.
If I set up the FORM with method=GET everything works just fine.  However,
when I use
POST, things don't work -  I get garbled characters in my servlet from the
FORM.
In the example below, I am showing the headers for both
GET and POST - the character being sent is a single lower case letter f in
cyrillic.




The POST method does not work - gives garbled characters - please note that
the mytext is PROPERLY ENCODED IN BOTH methods - GET and POST,
so I don't think that it is a browser issue (i think that my HTML is ok
too).


http://localhost:8080/Inter/takeText.do

POST /Inter/takeText.do HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11)
Gecko/20071127 Firefox/2.0.0.11
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.8,sr;q=0.5,hi;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8080/Inter/takeText.do
Cookie: JSESSIONID=yhhvgybm2jfa; sensitivity=1000.0;
JSESSIONID=AF8D24C63CE9C16D5DF78E5CDDE26146
Content-Type: application/x-www-form-urlencoded
Content-Length: 13
mytext=%D1%84




This is the request using GET - this works just fine - the servlet gets
mytext nicely decoded...


http://localhost:8080/Inter/takeText.do?mytext=%D1%84

GET /Inter/takeText.do?mytext=%D1%84 HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11)
Gecko/20071127 Firefox/2.0.0.11
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.8,sr;q=0.5,hi;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8080/Inter/takeText.do?mytext=%D1%84
Cookie: JSESSIONID=yhhvgybm2jfa; sensitivity=1000.0;
JSESSIONID=AF8D24C63CE9C16D5DF78E5CDDE26146



***
My HTML (rendered from the JSP)


html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /

/head
body
form name=InputLanguageForm method=POST
action=/Inter/takeText.do accept-charset=UTF-8 
input type=text name=mytext value=
input type=submit value=Do it
/form
/body
/html



This is the configuration of the Tomcat Connector - if I REMOVE URIEncoding,
both GET and POST don't work any more.

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2 URIEncoding=UTF-8
   redirectPort=8443 /




Thanks for any insight you can give me here...  I really don't want to
change ALL my forms to GET - there should be
an easier (and more natural) fix for this.

Thanks, Alex.

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 UTF-8 GET and POST - please Help..

2008-01-10 Thread david delbecq

Aleksandar Matijaca a écrit :

I will try the filter, and let you know -- I don't think that Struts is too
worried about
the encoding, while debugging, I saw that things go wrong much earlier,
above
struts, in the regular servlet layer on which Struts Action sits...
  
Well, you saw it using getParameter probably, which activates the 
default iso-8859-1 behaviour if no character encoding provided. Now, i 
know struts has a similar code somewhere to default to iso-8859-1 when 
nothing else is specified

Thanks for the suggestion..  You know, it is really disappointing, that one
has
to do custom programming (filter) depending on what kind of a container
engine is
used - in the ideal world, this should just work for all different
application servers..
  
In ideal world it would have been defined in the servlet specs how to 
set default chaset for post decoding :) In ideal world, browser would 
write in their request header what encoding the request was made in :) 
In ideal world, there wouldn't exist more than one, universal, charset. 
In the ideal world, my pay would be bigger ^^



God only knows, what if anything I would have to do for Websphere, Weblogic,
Oracle server etc...
  
Thought top manager of those companies may be near to that position at 
some point, i don't think God has anything to do with it ;)

Thanks for your help.

Alex.


On Jan 10, 2008 2:12 PM, David Delbecq [EMAIL PROTECTED] wrote:

  

As you might infer, URIEncoding=UTF-8 only work on the Uri part, and
thus affect only GET. The post is decoded using the browser provided
content-encoding. Most borwser don't bother to set that header.
Behaviour of tomcat is to then use some default (ISO-8859-1). Best way
to ensure tomcat will use UTF-8 for post decoding is to force it using
request.setCharacterEncoding(UTF-8), before any call to
getParameter(s). a filter or a valve might be a good place :)

btw, be carefull, struts (i see you use struts) tends to also have his
default behaviour when decoding POST :)



Aleksandar Matijaca a écrit :


Hi there,

I am having some issue with submitting foreign language fonts in HTML
  

form


to Tomcat.
If I set up the FORM with method=GET everything works just fine.
  

 However,


when I use
POST, things don't work -  I get garbled characters in my servlet from
  

the


FORM.
In the example below, I am showing the headers for both
GET and POST - the character being sent is a single lower case letter
  

f in


cyrillic.




The POST method does not work - gives garbled characters - please note
  

that


the mytext is PROPERLY ENCODED IN BOTH methods - GET and POST,
so I don't think that it is a browser issue (i think that my HTML is ok
too).


http://localhost:8080/Inter/takeText.do

POST /Inter/takeText.do HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11)
Gecko/20071127 Firefox/2.0.0.11
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.8,sr;q=0.5,hi;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8080/Inter/takeText.do
Cookie: JSESSIONID=yhhvgybm2jfa; sensitivity=1000.0;
JSESSIONID=AF8D24C63CE9C16D5DF78E5CDDE26146
Content-Type: application/x-www-form-urlencoded
Content-Length: 13
mytext=%D1%84




This is the request using GET - this works just fine - the servlet gets
mytext nicely decoded...


http://localhost:8080/Inter/takeText.do?mytext=%D1%84

GET /Inter/takeText.do?mytext=%D1%84 HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11)
Gecko/20071127 Firefox/2.0.0.11
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.8,sr;q=0.5,hi;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8080/Inter/takeText.do?mytext=%D1%84
Cookie: JSESSIONID=yhhvgybm2jfa; sensitivity=1000.0;
JSESSIONID=AF8D24C63CE9C16D5DF78E5CDDE26146



***
My HTML (rendered from the JSP)


html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
  

/


/head
body
form name=InputLanguageForm method=POST
action=/Inter/takeText.do accept-charset=UTF-8 
input type=text name=mytext value=
input type=submit value=Do it
/form
/body
/html



This is the configuration of the Tomcat Connector - if I REMOVE
  

URIEncoding,


both GET and POST don't work any more.

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout

Re: Error when shutting down Tomcat

2008-01-10 Thread david delbecq
Tomcat use a localhost binded port to receive SHUTDOWN request. However, 
i think it does start listening on that port only after the startup 
sequence is finished. What you see is not a message from the running 
tomcat, but a message from the shutdown script, that says it can't 
connect to tomcat administrative port and thus can't send the shutdown 
instruction. Your guess is correct, tomcat is still running totally 
unaffected. Just rerun shutdown command when tomcat has finished 
starting up.

Jim Brikman (ybrikman) a écrit :

If I start Tomcat and let it run for ~30 seconds (ie, let my webapp load
completely), I can shut it down without any errors. However, if I start
Tomcat and very shortly after try to shut it down again (before my
webapp has finished loading), I get the following error in the logs:
 
: : Oct 26 2007 14:00:44.124 -0400: %_--: Catalina.stop:  
java.net.ConnectException: Connection refused: connect

 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
 at java.net.Socket.connect(Socket.java:519)
 at java.net.Socket.connect(Socket.java:469)
 at java.net.Socket.init(Socket.java:366)
 at java.net.Socket.init(Socket.java:179)
 at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

Nothing else appears in the logs afterwards, so I have no idea what's
happening, but I'm pretty sure Tomcat keeps running and my webapp's
shutdown code is never called. 
 
Any ideas?
 
Thanks,

Jim

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get tomcat to decode %26

2008-01-10 Thread David Delbecq
%XX in the url requested by a browser are already converted by tomcat to 
their corresponding characters, according to the http specs. You don't 
have to do anything special for that.

En l'instant précis du 10/01/08 18:02, Vackar s'exprimait en ces termes:

Hi,

Does anyone know how to get tomcat to interpret %26 as an ampersand
character ()

Thanks,
Vackar
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error: server\webapps\manager does not exist or is not a readable directory...

2008-01-10 Thread David Delbecq
Did you actually install the admin webapp? It must be downloaded and 
installed separately.
En l'instant précis du 11/01/08 08:15, Thomas Chang s'exprimait en ces 
termes:

Hi all,

I copy the whole dir of the Tomcat 5.5.17 which runs quite well at home to the computer in my 
office. As I start the Tomcat, I got error as follow. Though I can open the first page of Tomcat, 
but as I want to open the Manager link I got error of HTTP Status 404 - 
/manager/html

Somebody has idea?

Regards

Thomas


SCHWERWIEGEND: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Programme\Apache Software F
oundation\apache-tomcat-5.5.17\server\webapps\admin does not exist or is not a r
eadable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.
java:140)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardConte
xt.java:3814)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
985)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
9)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
va:608)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
ava:535)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470
)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
50)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
11.01.2008 08:09:01 org.apache.catalina.core.StandardContext start

   
-
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem  neuen Yahoo! Mail. 
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: response.sendRedirect() failing mysteriously in struts application

2008-01-09 Thread David Delbecq
The illegalStateException while sendRedirect happens because some 
content has already been submitted to client, thus the http code (OK) 
was already send and it's too late to change headers. Check your action 
don't do make output in the action.


Thomas Okken wrote:

Hi all,

I'm running into a problem in a struts application I'm working on.
In my struts-config.xml, I have this action-mapping:

  action path=/register
  scope=session
  name=RegistrationForm
  type=com.foo.RegistrationAction
  forward name=success path=/index.jsp redirect=true/
  forward name=failure path=/register.jsp redirect=true/
  /action

The RegistrationAction.execute() method takes several request 
parameters and uses them to create an account; when this is 
successful, it returns mapping.findForward(success), and otherwise, 
it returns mapping.findForward(failure).
For reasons I have not been able to determine, the redirection often 
fails. RegistrationAction.execute() will run successfully, the 
mapping.findForward() succeeds and finds the correct forward, which is 
then returned -- but an exception is thrown while the redirect is sent 
to the client. This is the full log output:


Jan 9, 2008 11:11:35 AM org.apache.catalina.core.StandardWrapperValve 
invoke

SEVERE: Servlet.service() for servlet action threw exception
java.lang.IllegalStateException
  at 
org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435) 

  at 
org.apache.struts.chain.commands.servlet.PerformForward.handleAsRedirect(PerformForward.java:125) 

  at 
org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:94) 

  at 
org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54) 

  at 
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) 


  at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
  at 
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) 


  at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
  at 
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) 

  at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
  at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 

  at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 

  at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 

  at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) 

  at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 

  at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 

  at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 

  at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) 

  at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 

  at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) 

  at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

  at java.lang.Thread.run(Thread.java:595)
Jan 9, 2008 11:11:35 AM org.apache.catalina.core.StandardHostValve custom
SEVERE: Exception Processing 
ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp]

java.lang.IllegalStateException
  at org.apache.coyote.Response.reset(Response.java:297)
  at org.apache.catalina.connector.Response.reset(Response.java:652)
  at org.apache.catalina.connector.Response.reset(Response.java:916)
  at 
org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:417) 

  at 
org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:271) 

  at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) 

  at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 

  at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 

  at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) 

  at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 

  at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) 

  at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

  at java.lang.Thread.run(Thread.java:595)

I understand that the second exception happens because, after sending 
a redirect, it is no longer possible to forward to the error page, but 
what is a complete mystery to me is why the first exception 

Re: TomCat -Catalina.out : Application failing with java.net.SocketException

2008-01-07 Thread David Delbecq
It's probably a timeout between the front end http server (apache?) and 
the back end tomcat installation, related to mod_jk. IThe java 
application takes too long to start generating an answer and the http 
server (apache?) considers there is a problem and closes connection. 
What you see in catalina.out is the result when the webapp starts to 
write output and the connection has already been closed. This is just my 
opinion, could be something else :)


En l'instant précis du 07/01/08 06:01, micro_learner s'exprimait en ces 
termes:

I've volunteered to maintain a Java based application for a non-profit org.

Specs: Apache TomCat 4.1.24
Database : Mysql 4.X
Application : Java,VTL,Torgue and Turbine

The application used to gather reports works well for a small date range (
lesser time) and fails (not always) for bigger date range (more time , but
does not fail always.wks sometimes) with a
org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code
java.net.SocketException: Broken pipe on the Catalina.out.

The funny thing is that this same thing works on my Local machine (almost
same config but on Tomcat 5.3).

Also, even when the app. works fine the Catalina.out has this message (dont
know if it is benign)

##
an 3, 2008 1:08:07 PM org.apache.jk.common.ChannelSocket processConnection
INFO: server has been restarted or reset this connection
##


The Excepion on Catalina is as follows.


##

qJan 3, 2008 12:50:13 PM org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code
java.net.SocketException: Broken pipe
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
  at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
  at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599)
  at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:372)
  at org.apache.coyote.Response.action(Response.java:222)
  at org.apache.coyote.Response.finish(Response.java:343)
  at org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:326)
  at
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:500)
  at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224)
  at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
  at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
  at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
  at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
  at java.lang.Thread.run(Thread.java:595)
Jan 3, 2008 12:50:13 PM org.apache.jk.common.ChannelSocket processConnection
INFO: server has been restarted or reset this connection
Jan 3, 2008 12:50:13 PM org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code
java.net.SocketException: Broken pipe
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
  at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
  at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599)
  at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:372)
  at org.apache.coyote.Response.action(Response.java:222)
  at org.apache.coyote.Response.finish(Response.java:343)
  at org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:326)
  at
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:500)
  at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224)
  at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
  at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
  at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
  at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
  at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
  at java.lang.Thread.run(Thread.java:595)
Jan 3, 2008 12:50:13 PM org.apache.jk.common.ChannelSocket processConnection
INFO: server has been restarted or reset this connection
Jan 3, 2008 12:50:13 PM org.apache.jk.common.ChannelSocket processConnection
INFO: server has been restarted or reset this connection
Jan 3, 2008 12:50:13 PM org.apache.jk.common.ChannelSocket 

Re: java.lang.NoClassDefFoundError: org/apache/catalina/loader/WebappClassLoader

2008-01-07 Thread David Delbecq
Your download is most probably corrupted, redownload the file from 
server, and extract it to a fresh new folder.
This kind of error can happen when one of the tomcat jar file is either 
corrupted or just missing.



En l'instant précis du 07/01/08 11:21, Thomas Chang s'exprimait en ces 
termes:

Hi all,
   
  I just download and install the Tomcat 5.5.23. As I try to deploy my web application (a war file), I got exceptions as follow. Someone knows why?
   
  **

  07.01.2008 11:02:33 org.apache.catalina.loader.WebappLoader start
SCHWERWIEGEND: LifecycleException 
java.lang.NoClassDefFoundError: org/apache/catalina/loader/WebappClassLoader

 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:164)
 at 
org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:795)
 at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:667)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4108)
 at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220)
 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:585)
 at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:457)
 at 
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
 at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
 at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
 at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
 at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1397)
 at 
org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:214)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
 at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
 at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
 at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
 at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
 at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
 at java.lang.Thread.run(Thread.java:595)

   
-
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem  neuen Yahoo! Mail. 
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.lang.NoClassDefFoundError: org/apache/catalina/loader/WebappClassLoader

2008-01-07 Thread David Delbecq
common/lib is not the good place to put your war's required jar files 
(like spring.jar). You war's required jar should go to WEB-INF/lib

http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html


En l'instant précis du 07/01/08 11:54, Thomas Chang s'exprimait en ces 
termes:

I download the Tomcat 5.5.17 and I got the same exception.
   
  I am not sure it is really the downloaded file is corrupt. The war I deploy is a spring application. At the beginning as I deploy it, I got exception like:
   
  java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException:  start: :  java.lang.ClassNotFoundException: org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader

..
   
  Then I copy the spring.jar onto /tomcat_home/commond/lib and reploy my war again. Then I got the exception as mentioned earlier.
   
   
   
  **
  Your download is most probably corrupted, redownload the file from 
server, and extract it to a fresh new folder.

This kind of error can happen when one of the tomcat jar file is either
 
corrupted or just missing.



En l'instant précis du 07/01/08 11:21, Thomas Chang s'exprimait en ces 
termes:
  

Hi all,
   
  I just download and install the Tomcat 5.5.23. As I try to deploy


 my web application (a war file), I got exceptions as follow. Someone
 knows why?
  
   
  **

  07.01.2008 11:02:33 org.apache.catalina.loader.WebappLoader start
SCHWERWIEGEND: LifecycleException 
java.lang.NoClassDefFoundError:


 org/apache/catalina/loader/WebappClassLoader
  

 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 at


 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
  

 at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:164)
 at


 
org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:795)
  

 at


 org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:667)
  

 at


 org.apache.catalina.core.StandardContext.start(StandardContext.java:4108)
  

 at


 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
  

 at


 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
  

 at


 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
  

 at


 org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
  

 at


 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
  

 at


 org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220)
  

 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:585)
 at


 org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:457)
  

 at


 
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
  

 at


 com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
  

 at


 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
  

 at


 com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
  

 at


 org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1397)
  

 at


 
org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:214)
  

 at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at


 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
  

 at


 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
  

 at


 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
  

 at


 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
  

 at


 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
  

 at


 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  

 at


 

Re: java.lang.NoSuchMethodError: org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest

2008-01-07 Thread David Delbecq
Check you don't have 2 versions of commons fileupload. Also, provide a 
more complete stacktrace to get meaningful answers :)


En l'instant précis du 07/01/08 12:09, Christian Aschoff s'exprimait en 
ces termes:

Hi,

i have a webapplication developed with NetBeans 5.5. Everything is 
fine. But when i recompile it with NetBeans 6.01, i get a


2008-01-07 10:13:51,244 ERROR [http-8084-2] (RetrobibAction.java:89) - 
Exception in Action
java.lang.NoSuchMethodError: 
org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(Lorg/apache/commons/fileupload/RequestContext;)Ljava/util/List; 

at 
org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126) 



Exception when uploading files (via apache.commons.fileupload). I 
upgraded all librarys (io/collections/fileupload) but this does not 
helped.


Any hint for me?

Regards,
Christian

---
Dipl. Ing. (FH) Christian Aschoff

Büro:
Universität Ulm
Kommunikations- und Informationszentrum
Abt. Informationssysteme
Raum O26/5403
Albert-Einstein-Allee 11
89081 Ulm

Tel. 0731 50-22432
Fax. 0731 50-22471
[EMAIL PROTECTED]

Privat:
Fabristr. 13
89075 Ulm
Deutschland/Old Europe

Tel. 0731 602 803 60
Fax. 0731 602 803 61
Mob. 0171 272 03 04
[EMAIL PROTECTED]

Helfen Sie mit: http://www.retrobibliothek.de





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: fifo queue

2008-01-04 Thread David Delbecq
Reduce the max http request threads to 1.

However,

1) the admin request will be queued like user ones
2) it's not a fifo, the socket that are served, one at a time, by http
thread are, i think, in the same order as the thread get notified by jvm
En l'instant précis du 04/01/08 12:12, Marco Caldirola s'exprimait en
ces termes:
 Hi, 
 I need to create on my tomcat 6.0 server a fifo queue of my http requests.
 I want to process a single request at a time. 
 Do you have an idea?
 Thanks in advance.
 Marco




   ___ 
 L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
 http://it.docs.yahoo.com/nowyoucan.html
   


-- 
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Subdomain Virtual Hosting.

2007-12-27 Thread david delbecq

Ishtiaq Ahmed a écrit :

Hi,
Now we want it But when we tried it for *.mydomain2.com (Notice that * )
if I go like under, it doesn't work. Kindly shed some light into it.

Host name=*.mydomain2.com

 appBase=/usr/local/tomcat6/webapps/APPx
 unpackWARs=true
 autoDeploy=true
 xmlValidation=false
 xmlNamespaceAware=false
  Context path= docBase=/usr/local/tomcat6/webapps/APPx
 debug=0 reloadable=false/

/Host

I hope you understand my problem its about * (Subdomains) to be routed 
to different context path.


Simply put, you can't. If you want to redirect users of unconfigured 
domains to a specific webapp, use the defaultHost attribute of the 
Engine context. The name attribute of the Host context is Network name 
of this virtual host, as registered in your Domain Name Service 
server., as mentionned in docs. If you want more complex rules, you 
might need to configure an appache httpd front-end that does the 
dispatching.

Regards,

Ishtiaq Ahmed

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Subdomain Virtual Hosting.

2007-12-27 Thread david delbecq
Use an apache http proxy that does *.mydomain2.com to 
http://internaltomcat/appX proxying and *.mydomain3.com to 
http://internaltomcat/appY then. Tomcat in itself has no such rules 
support i know of.


Note that you are not forced to use the ROOT for defualtHost :)

Ishtiaq Ahmed a écrit :

Good Day David,

Its nice to see your reply. I tried the ROOT folder for all 
unconfigured domain names but developers are not satisfied with the 
settings. I need to redirect *.mydomain2.com's traffic to that 
specific context of $CATALINA_HOME/webapps/APPx. As the same server 
would be serving for *.mydomain3.com's requests in future too.


Looking Forward for resolution from you...

Regards,

Ishtiaq Ahmed



david delbecq wrote:

Ishtiaq Ahmed a écrit :

Hi,
Now we want it But when we tried it for *.mydomain2.com (Notice that 
* )

if I go like under, it doesn't work. Kindly shed some light into it.

Host name=*.mydomain2.com

 appBase=/usr/local/tomcat6/webapps/APPx
 unpackWARs=true
 autoDeploy=true
 xmlValidation=false
 xmlNamespaceAware=false
  Context path= docBase=/usr/local/tomcat6/webapps/APPx
 debug=0 reloadable=false/

/Host

I hope you understand my problem its about * (Subdomains) to be 
routed to different context path.


Simply put, you can't. If you want to redirect users of unconfigured 
domains to a specific webapp, use the defaultHost attribute of the 
Engine context. The name attribute of the Host context is Network 
name of this virtual host, as registered in your Domain Name Service 
server., as mentionned in docs. If you want more complex rules, you 
might need to configure an appache httpd front-end that does the 
dispatching.

Regards,

Ishtiaq Ahmed

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSF and SSI

2007-12-27 Thread david delbecq

Shannon Scott a écrit :

Hello,
We have been trying to use JSF as a Server Side Include (SSI - .shtml ).

What you mean by SSI (in the context of tomcat)?
The problem is that the jsf adds an extra set of HTML tags to the page 
( breaking the page ). We have successfully used jsp pages for SSI in 
the past.
What extra set do you mean? JSF does render what it is asked to render 
(a form, various input and maybe some javascript, depending on 
implementation)
Is there a way to stop tomcat from generating these extra tags when 
rendering the jsf?

Tomcat does not generate extra tag, except if asked to do with jsf rules.
I have been looking through the source code.  Can anyone point me to 
where in the source this HTML tag gets inserted?

Thank you for any advice or pointers.
Take care.
Shannon


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Regarding setting log size

2007-12-25 Thread david delbecq
catalina.out it the output of stdio and stderr, for this file, it's not 
easy to logrotate it, unless you stop tomcat at night. For the others 
ones, using log4j, i suggest you take a look at log4j documentation, it 
explains how to do rotating log for the log4j appenders.

abdul razack a écrit :

Hi,
  
We are using tomcat apache-tomcat-5.5.23 for development purpose.

We  want the same tomcat to push for Production in Window 2000 server.
   
  Our web application log level is low.
  
All logs would be created in directory D:\apache-tomcat-5.5.23\logs.

The log file names are as,
 1.localhost.2007-12-24.log
 2.catalina.2007-12-24.log
 3.manager.2007-12-24.log
 4.host-manager.2007-12-24.log
 5.admin.2007-12-24.log
   
  But log  size would increase in production day by day. 
   
  We want that tomcat automatically archives the log files and

create a new one once a certains size is reached.
   
  we are not using log4j properties.
   
  Please help us what needs to set in logging.properties file.
   
  Thanks  Regards

-Abdul Razack
   

   
-

Never miss a thing.   Make Yahoo your homepage.
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where to store classpath resources outside of WAR

2007-12-21 Thread David Delbecq
In custom context.xml, you can define the ressource, that is mainly 
Datasources that are linked with jndi. Just define a datasource and 
store your config in the database. Or if you want more complicated 
things, store other tyes of objects in your jndi, by defining them in 
your context.xml.


Note that, even if you provide a custom context.xml, this one will be 
overriden by the one in META-INF/context.xml during deployement of 
webapp! In general, i would say, if you want to store things outside the 
war, just make it accessible either from database or from JNDI.


As to your suggestion, i think it will bring more complexity and is more 
error prone than embedding config in war. Some commercial application i 
have seen (JIRA for example), just provide a folder you unpack on your 
development station, you configure it, then type ant war and you get a 
ready to deploy webapp. No need to tocuh anything server side.



lightbulb432 wrote:

Similar to how you can specify an mycontext.xml in conf/Catalina/localhost to
specify the context without having to modify prepackaged WAR files, can you
so something like place files in context-specific folders (i.e.
conf/Catalina/localhost/mycontext/resource1.properties) that would be
accessible from the classpath of the web app?

If it doesn't exist, would it be a good feature request? It would accomplish
multiple things:
- Wouldn't expose the classpath resources to more web applications than
intended (which would be the case if you put it in CATALINA_HOME/lib).
- Would allow deployers to not have to modify the web.xml and place the
classpath resource in WEB-INF/classes or WEB-INF/lib.
- Would prevent developers from having to code using absolute filenames.

First of all, is a feature similar to what I'm suggesting available in
Tomcat? If not, what do you think of such a feature request?

Thanks.



lightbulb432 wrote:
  

When deploying a WAR file whose code uses information stored in classpath
configuration resources, where should you store these configuration files
if outside of the WAR file?

If you want to keep these configuration files outside of the WAR file to
make for easier deployment in multiple environments, isn't the only other
classpath available to Tomcat within its own lib folder? And in that case,
the configuration file would be available in all contexts. So where should
such a file be stored (i.e. available to the webapp as a resource but not
available to all contexts)?

Thanks.




  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Response.SendRedirect problems

2007-12-16 Thread david delbecq

ashwin soorkeea a écrit :

Hello all,
 
I have a problem for my application and this prob is causing an entire netw=

ork of users from using my application. I will appreciate
if you guys can help me solve my prob.
 
It concerns the servlet response.sendRedirect(...) method.
 
When using the response.sendRedirect(/myexample) in my java class, i do n=

ot want the servlet engine to reconstruct
an absolute URL, before sending the response to the browser. I want it to b=
e handle by the browser keeping it relative throughout
the application. I know it's possible, but i dunno how to do it. Can you he=
lp ?=20
  

If you use sendRedirect, it's not possible:


 sendRedirect

public void *sendRedirect*(java.lang.String location)
 throws java.io.IOException

Sends a temporary redirect response to the client using the specified 
redirect location URL. This method can accept relative URLs; the servlet 
container _must convert the relative URL to an absolute URL before 
sending the response to the client_. If the location is relative without 
a leading '/' the container interprets it as relative to the current 
request URI. If the location is relative with a leading '/' the 
container interprets it as relative to the servlet container root.
 
The URL reconstruction by the servlet engine during a redirection is causin=

g some problems in my application.
  

It shouldn't unless either application or tomcat has bugs. :)
 
Example:

I have this link on browser http://127.0.0.1:port_number, when performing=
 a sendRedirect, i'm losing the port_number
during the url reconstruction by the servlet engine.
  
That's probably because tomcat is not aware, for various reason, of the 
correct port number (behind a proxy or apache for example). You can 
specify in tomcat configuration which port number to use when 
reconstructing urls:
http://tomcat.apache.org/tomcat-4.1-doc/config/http11.html   (see 
'redirectPort')



On the other hand, i have another application that is interconnected, but i=
n this application, the url is relative throughout, even though
it passes through the response.sendRedirect(...) and consequently, i do not=
 have this prob in this application.
  
If it's relative, it's not using sendRedirect , but it's setting by 
itself the response header (response.addHeader() )
 
Im using tomcat-4.1 and i'm checking the URL redirection using the HTTP liv=

e header plugins for firefox.
  

Maybe try to upgrade? ;)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: extra field in form-based authentication

2007-12-13 Thread David Delbecq
Providing a separate form to choose layout would be far easier to do and
maintain.

Login form should contains only login informations (cf J2EE specs). If
you want to play with customization of login form that go beyong what is
allowed  by j2EE security model, just forget container managed
authentification and provide your own one.
En l'instant précis du 13/12/07 14:06, dirk ooms s'exprimait en ces termes:
 On Thursday 13 December 2007 13:54, Tim Funk wrote:
   
 in that case ... wouldn't the User-Agent header do the trick?
 

 AFAIK not, the screenwidth is the main thing i want to adapt to and i can 
 have 
 Firefox/Linux running on a webtablet with 800px screen, but also on a desktop 
 with 1900px.

   
 -Tim

 dirk ooms wrote:
 
 interesting suggestion, but in my case the extra field is not related to
 the username. i would like to have a field where the user indicates on
 what type of device he/she works, so we can offer the appropriate
 stylesheet.

 On Thursday 13 December 2007 13:00, David Delbecq wrote:
   
 Or have the username in a hidden field and have javascript build it from
 to fields.

 example:
 j_username=Domain\\user
 j_password=*

 Most pragmatic way imho. javascript disabled user could still enter the
 \\ manually :)
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   


-- 
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDNI Resource not reusable

2007-12-12 Thread David Delbecq
Hello,

ho did you create your ldap object (not ldap/ox) ? For ox to be pool,
the ldap object must be a pool, that return a new object each time a
child object is requested. envCtx.lookup(ldap/ox) actually request
object ox from object ldap. It ldap is not a pool, it will return
a single object, always the same.


En l'instant précis du 12/12/07 16:32, Sebastian Gerdes s'exprimait en
ces termes:
 Hello,

 in my context.xml/server.xml I setup a JDNI resource which I access via:

 Context newCtx = new InitialContext();
 Context envCtx = (Context) newCtx.lookup(java:comp/env);
 DirContext ctx = (DirContext) envCtx.lookup(ldap/ox);

 I use this context and then I close it via ctx.close().

 The next time I want to access my LDAP I do a lookup again the
 DirContext object is the same (i.e.
 [EMAIL PROTECTED], so it is one out of a
 pool I guess). But the context cannot be used.

 But when I do _not_ close() the context, I can use it several times,
 until i am inactive for about 5 minutes. Then it seems it get closed
 automatically and is not reusable anymore.

 (Using com.sun.jndi.ldap.connect.pool=true did not work and true did
 not work either.)

 If I hardcode my connection settings in my java class, everything works
 fine. Every time I use the LDAP I do setup a new environment and I get a
 new connection.

 My problem only occurs when I use the resource via lookup from tomcat.

 Anybody knows why? Atleast how do reuse the context or disable the
 pooling?

 Thank you for an answer in advance

 Kind regards,
 Sebastian

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
David Delbecq
Institut Royal Météorologique
Ext:557

-- 
http://www.devlog.be (a belgian developer's logs)




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: post new service request

2007-12-11 Thread David Delbecq
What do you mean by service request? Tomcat serves requestx on the
port it is listening to (most probably 8080) using http protocol, see
server.xml for your configuration specificities. You can add web
services by either coding them yourself, buying them from companies, or
using open source ones you can gather on the web...

Please be more precise in your question and develop a bit more :)


En l'instant précis du 11/12/07 15:46, Kovacs, Robert s'exprimait en ces
termes:
 Hello, 
  
 How can I post new service request for TomCat version 5.5 ? 
  
 Thanks: 
 Robert
  

   


-- 
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ques abt DDL

2007-12-11 Thread david delbecq

oracle sql developper and tora both have a data/schema extraction feature

minky arora a écrit :

Hi Gurus,

I know this is a Tomcat mailing list..I have a basic question about
DDL and am hoping someone would give me an answer.

I have been given a schema of a DB which will eventually be deployed
on Tomcat Server.Now I need to extract the DDL for this.I am very new
to Oracle.This schema has been developed by a different set of
programmers .Could you please tell me what tool I can use to generate
the DDL for this?

Thanks so much,

Min

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: error with javac

2007-12-03 Thread David Delbecq
Put your classes in packages. Specs forbid the use of package-less 
classes in web container.


En l'instant précis du 03/12/07 09:14, rameau rameau1982 s'exprimait en 
ces termes:
hi, I have 2 java classes in the same directory. One of them 
(SlateServlet.java) creates a new object from the other class 
(UsersDB.java). When I compile UsersDB, everything is correct and the 
.class archive is in the same path as the other .java archives. But 
when I want to compile the SlateServletjava archive it gives me 3 
errors telling that it doesn't knows the class UsersDB when it tries 
to create an object UserDB.
What am I doing wrong? I've put the codes for this two java classes. 
Thankyou



Tecnología, moda, motor, viajes,…suscríbete a nuestros boletines para 
estar a la última MSN Newsletters 
http://newsletters.msn.com/hm/maintenanceeses.asp?L=ESC=ESP=WCMaintenanceBrand=WLRU=http%3a%2f%2fmail.live.com 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Java file name is displayed when the JSP file is accessed.

2007-11-27 Thread david delbecq
You are probably trying to display a value in you jsp coming from a 
class that does not overrride 'toString', as the result java's default 
value for toString is packagename.classname@identifier


example:

[EMAIL PROTECTED]

Ognjen Blagojevic a écrit :

Pavan Singaraju wrote:

i have a web application which is deployed on Tomcat 5.0.18.
Sometimes when i am navigating to a page using menu of my application,
it is displaying a java file name with full package name. The java
file is a business logic processing location on the application. Why
is that happening. Could anybody guide me why its happening?


Could you give an example of the generated page?

Regards,
Ognjen

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Obtaining IE identification token

2007-11-23 Thread David Delbecq
Samba team provide means in java to handle windows based SSO 
authentification. The server does not

have to be a windows station, nor to sit behind IIS.

http://jcifs.samba.org/src/docs/ntlmhttpauth.html

En l'instant précis du 23/11/07 10:08, Frank Biel Knudsen s'exprimait en 
ces termes:

IIS and IE (Internet Explorer) both support a protocol for identifying
the user if already logged into the domain. Basically, IE passes an
identification token to IIS, and IIS validates the token and obtains
the user ID.
I know that this is possible with Tomcat, when it is used en together
with ISS through Jakarta. But are there other ways to obtain IE
identification token? Ways that does not involve ISS?

/Frank

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



--
http://www.devlog.be (a belgian developer's logs)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Questions about sometime slowness of tomcat

2007-11-20 Thread david delbecq
First request is slower to respond to client becaus tomcat do have to
initialize your servlet before first request and, probably, to compile
your jsp

Jun Zhang a écrit :
 Hi,

 I really do not know which mail alias is the correct one to post this
 topic. So I send it to all.

 I am developing a web application using Tomcat, which uses a servlet to
 handle the request, which includes geting data from database and writing
 the data back to the client to display. When I restart the tomcat and
 begin this process, then the time would be 750ms for one request to get
 response. However when the client sends the request after the tomcat
 finish some requests, then the time would become about 200ms.

 I do not know why. I have exclude the affect of database. You know I do
 not know the working mechanism of tomcat. So if someone here could help
 me explain why and if there is some way to avoid it.

 Thanks a lot,

 Jun


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   3   4   5   >