Re: Class Loader Documentation

2008-06-17 Thread Johnny Kewl


- Original Message - 
From: Ole Ersoy [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Tuesday, June 17, 2008 4:41 AM
Subject: Class Loader Documentation



Hi,

Reading through the classloader documentation for 6.0 I noticed this:

...
However, the standard Tomcat 5 startup scripts ...

It seems like this should be:

the standard Tomcat 6 startup scripts

But I figured I'd check before filing a ticket.

Also it seems like this section could be simplified:


System - This class loader is normally initialized from the contents of 
the CLASSPATH environment variable. All such classes are visible to both 
Tomcat internal classes, and to web applications.



So this seems to be saying that normally all classes that should be 
visible to both Tomcat and webapps are placed in the CLASSPATH environment 
variable.  The second sentence seems to reinforce that placing the 
libraries in the CLASSPATH makes them visible to both Tomcat and the 
webapps.


Then reading a little further the text seems to be saying Forget all that 
stuff.  Tomcat does not do it this way


If I'm reading it right, would it be simpler to just replace the above 
mentioned text with,



System - The standard Tomcat 6 startup scripts 
($CATALINA_HOME/bin/catalina.sh or %CATALINA_HOME%\bin\catalina.bat) 
ignore the contents of the CLASSPATH environment variable (Unlike most 
java daemons and applications), and instead

build the system classloader from the following repositories:
...


Thoughts?



I think its because its just hard to explain, but maybe it could be made 
clearer.

I think *ignores* is the wrong word.

Especially if someone actually looks at catalina bat and sees this line.
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
Doesnt look like that script is ignoring CLASSPATH to me ;)


When Tomcat starts up, its internal system classes take *priority* over 
those in the normal system classloader CLASSPATH.
This is to prevent Java DLL hell, making sure that external applications 
do not see the internal tomcat engine, and making sure that tomcat does not 
use an external class (eg an xml parser), that may be incompatible with 
tomcat (Its trying to save your butt).



--- add your version here --- ;)

Actually look back at TC 5.5... it is getting simpler, believe it or not ;)

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---


-
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: mod_jk load balancing and cluster node health

2008-06-17 Thread Rainer Jung

Nathan E. Pilling wrote:

Is it possible to configure mod_jk to check node status by requesting
a specific web application path to see if a cluster node is healthy
(and should be included or excluded from the cluster)?

I have a web application that runs across multiple tomcat instances
and any request be processed by any tomcat node. If an instance of
the web app on one of the tomcat servers is not configured properly,
I want the connector to exclude it from the cluster.

I have written a servlet that returns a status of 503 if something is
wrong or 200 if everything is okay.


There's not the full story build in yet, but you can combine the various 
pieces to get the same result:


Write an external script, that refularly calls your servlet and add 
;jsessionid=.MYNODENAME to the end of the URL (but before the query 
string). The load balancer will then send the request to it's member 
named MYNODENAME (stickyness).


Now you set fail_on_status to 503 for all LB members. Then the load 
balancer should put the node into ERROR, whenever it sees a 503 coming 
back for any request.


See http://tomcat.apache.org/connectors-doc/reference/workers.html for 
fail_on_status.


Does that sound plausible?


Thanks, Nathan Pilling


Regards,

Rainer

-
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: SSL/HTTPS forwarding under Apache + mod_jk + tomcat

2008-06-17 Thread André Warnier


Bill Davidson wrote:

André Warnier wrote:
By the way, the reason why I can't try it right now is that I just 
don't have the application to try it with.  So whatever I mentioned 
before (but which apprently so far seems ok) was purely by attempting 
to understand the documentation. Beware.


I tried it today.  I disabled my cookie hack and set JkExtractSSL to off.
It seems to work fine.  Obviously, I want to do a lot more testing but
initially, it seems to look good.


Thanks for the confirmation.
I should get going on the WiKi article I promised to write about all 
this stuff.  Maybe if I repeat the promise here it will shame me into 
doing it before we all forget what this was all about.


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



Invalidate sessions

2008-06-17 Thread JLucas ZB

Hello,

i would like to invalidate the sessions.
Is there any way to do that ? 

J Lucas


Re: Invalidate sessions

2008-06-17 Thread Youssef Mohammed
call invalidate method on javax.servlet.http.HttpSession


On 6/17/08, JLucas ZB [EMAIL PROTECTED] wrote:


 Hello,

 i would like to invalidate the sessions.
 Is there any way to do that ?

 J Lucas




-- 
Regards, Youssef


Re: Servlet mapping error

2008-06-17 Thread Pid

Try just *., not /*., as below:

 url-pattern*.invoker/url-pattern

p


Amber wrote:

I write a very simple Spring HTTP invoker service, the servlet mapping
config in web.xml is :
servlet
description/description
display-nameTestServlet/display-name
servlet-nameTestServlet/servlet-name
servlet-classamber.TestServlet/servlet-class
/servlet
servlet-mapping
servlet-nameTestServlet/servlet-name
url-pattern/*.invoker/url-pattern
/servlet-mapping

The test application works well in Oracle OC4J, but when I deploy it to
Apache Tomcat6, the following exception occurs when Tomcat starts, I also
tried other patterns like /*.jss, neither works:


2008-6-14 21:36:34 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property
'source' to 'org.eclipse.jst.jee.server:test' did not find a matching
property.
2008-6-14 21:36:34 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: D:\pentaho\java\bin;.;C:\WINDOWS\system32;C:\WINDO
WS;D:\pentaho\java\bin\client;D:\pentaho\java\bin;
E:\Amber\Perl\site\bin;E:\Amber\Perl\bin;D:\pentah
o\java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO
WS\System32\Wbem;D:\Program Files\Zone
Labs\ZoneAlarm\MailFrontier;d:\Program Files\Microsoft SQL
Server\90\Tools\binn\;D:\JavaTool\Ant170\bin;D:\Pr ogram
Files\gawk\bin;E:\Amber\MySQL\bin;D:\Program Files\SSH Communications
Security\SSH Secure Shell
2008-6-14 21:36:34 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2008-6-14 21:36:34 org.apache.catalina.startup.Catalina load
信息: Initialization processed in  ms
2008-6-14 21:36:34 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2008-6-14 21:36:34 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.16
2008-6-14 21:36:34 org.apache.tomcat.util.digester.Digester endElement
严重: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tomcat.util.IntrospectionUtils.callMeth
odN(IntrospectionUtils.java:953)
at org.apache.catalina.startup.CallMethodMultiRule.en d(WebRuleSet.java:792)
at org.apache.tomcat.util.digester.Rule.end(Rule.java :229)
at org.apache.tomcat.util.digester.Digester.endElemen t(Digester.java:1140)
at com.sun.org.apache.xerces.internal.parsers.Abstrac
tSAXParser.endElement(AbstractSAXParser.java:633)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen
tFragmentScannerImpl.scanEndElement(XMLDocumentFra
gmentScannerImpl.java:1241)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen
tFragmentScannerImpl$FragmentContentDispatcher.dis
patch(XMLDocumentFragmentScannerImpl.java:1685)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen
tFragmentScannerImpl.scanDocument(XMLDocumentFragm entScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Co
nfiguration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Co
nfiguration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLPars
er.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.Abstrac
tSAXParser.parse(AbstractSAXParser.java:1242)
at org.apache.tomcat.util.digester.Digester.parse(Dig ester.java:1644)
at org.apache.catalina.startup.ContextConfig.applicat
ionWebConfig(ContextConfig.java:369)
at org.apache.catalina.startup.ContextConfig.start(Co ntextConfig.java:1062)
at org.apache.catalina.startup.ContextConfig.lifecycl
eEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLife
cycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardContext.start(Sta
ndardContext.java:4252)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
at 

RE: Tomcat Custom Connector

2008-06-17 Thread Simon Aquilina

Hi Bill,
 
Thanks again for your reply. Your comments are very helpfull :) I will 
definitly have other questions in the future but for now I think I can move 
forward :)
 
Thanks again,
Simon J. To: users@tomcat.apache.org From: [EMAIL PROTECTED] Subject: Re: 
Tomcat Custom Connector Date: Fri, 13 Jun 2008 19:51:35 -0700  The Adapter 
is set in the initialize method of the Connector  
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/connector/Connector.html).
  You can pretty much just trust that Tomcat will give you an Adapter instance 
 before the first request comes through, since that is the contract. Yes,  
the current implementation only will give you an instance of CoyoteAdapter,  
but programming your ProtocolHandler around this is dangerous, since the  
contract only promises an instance of Adapter.  The Adapter is the bridge 
between your ProtocolHandler and the Tomcat  Servlet Container. Once you hand 
off your Request and Response objects to  the Adapter, you can trust that 
Tomcat will handle all of the Servlet-Spec  parts by itself, including finding 
the Servlet to send the request to. At  that point, you are only responsible 
for communicating with the client over  the wire via the InputBuffer and 
OutputBuffer interfaces. For example, the  various AJP/1.3 Connectors  
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ajp/AjpProcessor.html)
  convert the message into AJP/1.3 format before sending it over the wire to  
Apache httpd.  Once you have figured out how to initialize the Request and 
Response objects  to look enough like the wire protocol was HTTP, the rest is 
really pretty  easy :). For non-HTTP protocols (e.g. trying to make Tomcat 
look like an  FTP server), this is the hard part.  Simon Aquilina [EMAIL 
PROTECTED] wrote in message  news:[EMAIL PROTECTED]  Hi,  I have checked 
the code in Tomcat again, and although it is very confusing I  feel I did 
understand something here and there :)  However I have a question - where is 
the adapter being set? No Adapter is  being initialized in the 'JIoEndPoint', 
'Http11Protocol' and  'Http11Processor'. I also checked the 'server.xml' file 
and this is not  being set! From the API documentation I found out the 
'CoyoteAdapter'; so is  this the default being used for Tomcat? Is it the 
CoyoteAdapter which is  responsible to find the servlet for which the request 
is? or?  Thanks for any comments, Simon J.  To: users@tomcat.apache.org 
From: [EMAIL PROTECTED] Subject: Re:   Tomcat Custom Connector Date: Tue, 3 
Jun 2008 19:17:03 -0700  AFAIK,   there isn't a lot of documentation. But 
there isn't that much too  it.   You need to implement a ProtocolHandler   
 
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ProtocolHandler.html)
This class is responsible for managing the transport (e.g. ServerSocket) 
  and  request threads (but the various EndPoint classes in
org.apache.tomcat.util.net may simplify this aspect for you). For best
results, this class may implement ActionHook as well
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/ActionHook.html).
When a new request comes in, it is the ProtocolHandler's job to   
initialize a  Request
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Request.html)  
  and a Response
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Response.html)  
  objects for it, making certain that they get valid InputBuffer
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/InputBuffer.html)
and OutputBuffer
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/OutputBuffer.html)
instances to comunicate with the client. Then within the thread, you   
hand  the Request and Response off to the service method of the Adapter
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/coyote/Adapter.html)  
  that Tomcat will give to the ProtocolHandler. And that is pretty much it  
  :).  Using the standard server.xml (as opposed to Embedding), you   
would configure  Tomcat to use your Connector with an element like:   
Connector protocol=com.myfirm.mypackage.MyProtocolHandler ... / Any   
other attributes in the Connector / tag will be passed JavaBean style
to the ProtocolHandler to handle init options.  For the simplest   example, 
look at  org.apache.coyote.memory.MemoryProtocolHandler (but   this one is 
mostly  useful for unit testing).  Simon Aquilina   [EMAIL PROTECTED] 
wrote in messagenews:[EMAIL PROTECTED]  Hi, I am   interested in 
building a custom connector for Tomcat. I have checked  the   Tomcat source 
code and found the source code for the ‘http11’ and ‘ajp’connectors. I 
thought of trying to understand the code of these twoconnectors and then 
try to implement mine based on these. However I am noexpert and was 
wondering if there is any good documentation/tutorial on   how  a connector 
can be developed for Tomcat (I would later use 

problem with javac

2008-06-17 Thread Robert Welz

Hello.

I am not familiar with javac and tried the following as in the manpage:

javac -classpath /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/ 
classes/; /opt/jakarta-tomcat-3.3.1a//webapps/ROOT/WEB-INF/classes/com/ 
oreilly/servlet  /home/welz/develop/fundus/StingRay/Develop/Servlets/ 
stingray_backup.java


but I get an invalid flag error.

Q: I want to fix some compile errors:
like

[EMAIL PROTECTED]:/opt/stingray# javac /home/welz/develop/fundus/StingRay/ 
Develop/Servlets/stingray_backup.java/home/welz/develop/fundus/ 
StingRay/Develop/Servlets/stingray_backup.java:3: package  
javax.servlet does not exist

import javax.servlet.*;

my classpaths are /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/ 
classes/com/oreilly/servlet/ and descendants

/opt/jakarta-tomcat-3.3.1a/webapps/examples/jsp/
/opt/jakarta-tomcat-3.3.1a/webapps/examples/servlets
/opt/jakarta-tomcat-3.3.1a/webapps/examples/WEB-INF/classes/

how do I give javac those paths?




/opt/jakarta-tomcat-3.3.1a/lib/common/servlet.jar
/opt/jakarta-tomcat-3.3.1a/webapps/admin/WEB-INF/scripts/watchdog- 
servlet.xml

/opt/jakarta-tomcat-3.3.1a/webapps/admin/test/watchdog-servlet.jsp
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/Base64Decoder.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/Base64Encoder.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/CacheHttpServlet.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/CacheHttpServletResponse.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/CacheServletOutputStream.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/CookieNotFoundException.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/CookieParser.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/Daemon.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/DaemonHttpServlet.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/HttpMessage.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/HttpsMessage.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/LocaleNegotiator.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/LocaleToCharsetMap.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/MailMessage.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/MailPrintStream.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/MultipartFilter.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/MultipartRequest.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/MultipartResponse.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/MultipartWrapper.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/ParameterNotFoundException.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/ParameterParser.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/RemoteDaemonHttpServlet.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/RemoteHttpServlet.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/ServletUtils.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/UploadedFile.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/VersionDetector.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart/BufferedServletInputStream.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart/DefaultFileRenamePolicy.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart/FilePart.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart/FileRenamePolicy.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart/LimitedServletInputStream.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart/MacBinaryDecoderOutputStream.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart/MultipartParser.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart/ParamPart.class
/opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/ 
servlet/multipart/Part.class

Jrockit Vs Sun

2008-06-17 Thread James Law
Ok not quite a Vs question, however I'm intrigued by BEA claim that
Jrockit is the industry leading solutions.

Does anyone have any experience in Jrockit, I know some of you will say
if its not broke etc J.

I've no issues with Sun's JVM just interested in hearing some views of
Jrockit

Thanks

James

 

 




Search all of our current vacancies at www.generic-software.com


The information contained within this message is intended for the addressee 
only and may contain confidential and/or privileged information. If you are 
not the addressee, please delete this message and notify the sender - you 
should not copy, distribute or disclose its contents to other parties.
 
Any images, documents, views or opinions expressed in this message are 
those of the sender and do not necessarily represent those of Generic 
Software Consultants Ltd or any of its affiliates. No reliance may be 
placed on this message without written confirmation from an authorised 
company representative, and no actions should be taken based on its 
contents.
 
Generic Software Consultants Ltd Registered in England No. 2830109 @ 
St. Andrews House, Caldecotte Lake Drive, Caldecotte Business Park, 
Milton Keynes. MK7 8LE
Tel: 01908 278450
VAT Registered No: 608 6625 28




Re: Using PHP4 with Tomcat5.5

2008-06-17 Thread Martin

Andre-

I found this link helpful..
http://hi.baidu.com/kuch/blog/item/d8c41ef44231c16bdcc474ac.html

make sure your
/net/php/servlet.properties contains this library specification e.g.
library=php5srvlt

and
/net/php/reflect.properties contains this library specification e.g.
library=php5srvlt

where php5srvlt.dll is located in the folder which java_opts environment 
variable specifies thru java.library.path e.g.

SET JAVA_OPTS=-Djava.library.path=F:\PHP
export JAVA_OPTS

HTH
Martin


- Original Message - 
From: André Warnier [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, June 16, 2008 2:50 PM
Subject: Re: Using PHP4 with Tomcat5.5





Jonathan Mast wrote:



[...]


How difficult is it to set up apache on windows?

Not difficult at all.

  It doesn't come as a

binary as i recall,
Wrong, it does. Download the appropriate msi installer from the Apache 
website, save it, double-click on it, and there you go.


http://mirror.serversupportforum.de/apache/httpd/binaries/win32/apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi



-
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: Jrockit Vs Sun

2008-06-17 Thread André Warnier


James Law wrote:


xyz is the industry leading solution.


That's not exactly a precise scientific or technical expression.
I suppose that when marketing guys get together to create literature 
about a product, the conversation goes about like this :
- Ok guys, we need to claim something in order to get some attention.  I 
find that Industry-leading solution would be nice.  So what can we 
claim to be leading with ?

- the highest sales figure ?  Well no, everyone knows that's HAL Inc.
- the highest version number ? No, ABC's BigJawa is at v. 132.34
- the largest number of installations ? No, Tomcat beats us by 1,203,765 
there.  We'd need to qualify that. But maybe we can do it in tiny 
letters at the bottom ?
- the largest number of licenses ?  Do we include trials, developers and 
educational licenses too ?
- the largest number of paid licenses ? Do we count per site or per 
workstation ?
- the largest memory footprint ?  Woaw, good point that one !  But it 
won't work with the techies.

- the most expensive ? Well, maybe, if we count the consultancy.
- Wait, where is this for ? Portugal ? That's Southern Europe, right ? 
Does anyone have the phone number of our guy in Rome ? Maybe he has an 
idea ?


They do a tremendous job of course, and without them we would'nt earn 
these big bonuses.



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



logging with multiple web applications

2008-06-17 Thread Jamie

Hi Everyone

Does anyone know how to configure Tomcat such that logging writes to 
separate log files for each web application? When we deploy several 
instances of our web application, for some reason, the logging output 
from all web applications is merged into a single debug.log file. 
Apparently, Tomcat uses an extended the log4j package (JULI) to support 
logging across multiple web applications, but we are unsure on how to 
activate it. I have a feeling we may not be using the right 
packages/configuration and would appreciate your guidance.


In our example, each web application has its own log4j.properties file 
stored in WEB-INF/classes. The log4j.properties file specifies an 
appender with the the location of the debug.log file as follows:


log4j.appender.archivadebug.File=${catalina.home}/logs/debug.log

Even if we specify a different file name for each web application, it 
only seems to pickup the first one. It combines logging output from all 
web applications into a single log file. Any ideas on why this might be 
the same?


Throughout my web application code, I use the following:

import org.apache.log4j.Logger;
..
protected static final Logger logger = Logger.getLogger(Config.class);
..
logger.debug(this is a test log output);

The jar log4j-1.2.14.jar is bundled with the web application and is 
located in WEB-INF/lib


How does one make it such that each web application will have its own 
log file? For example, say I had the web applications webapp1, and 
webapp2 - the debug log file for each could be debug-webapp1.log and 
debug-webapp2.log, respectively. Do I need to

import catalina's version of log4j? What is the import line?

Many thanks in advance for your guidance

Jamie

PS: My log4.properties file located in WEB-INF/classes currently looks 
like this:


# logging levels
log4j.logger.com.stimulus.archiva.audit=info,archivaaudit
log4j.logger.com.stimulus=DEBUG, archivadebug
#log4j.rootLogger=INFO,archivadebug
#log4j.logger.com.stimulus=warn, mail
#log4j.logger.org.apache.struts=INFO, tomcat
#log4j.logger.org.apache.struts.action=INFO, tomcat
#log4j.logger.org.apache=INFO, tomcat
#log4j.logger.org.apache.commons.digester.Digester= INFO, tomcat
#log4j.logger.org.subethamail.smtp=debug,archivadebug

# debug log
log4j.appender.archivadebug=org.apache.log4j.RollingFileAppender
log4j.appender.archivadebug.File=${catalina.home}/logs/debug.log
log4j.appender.archivadebug.MaxFileSize=200480KB
log4j.appender.archivadebug.layout=org.apache.log4j.PatternLayout
log4j.appender.archivadebug.layout.ConversionPattern=%5p %d{MMM/dd 
HH:mm:ss} - %m%n

log4j.appender.archivaaudit.MaxBackupIndex=7

# audit log
log4j.appender.archivaaudit=org.apache.log4j.DailyRollingFileAppender
log4j.appender.archivaaudit.File=${catalina.home}/logs/audit.log
log4j.appender.archivaaudit.layout=org.apache.log4j.PatternLayout
log4j.appender.archivaaudit.layout.ConversionPattern=%5p %d{MMM/dd 
HH:mm:ss} - %m%n

log4j.appender.archivaaudit.DatePattern=.-MM-dd
log4j.appender.archivaaudit.MaxBackupIndex=1

# tomcat log
log4j.appender.tomcat=org.apache.log4j.RollingFileAppender
log4j.appender.tomcat.File=${catalina.home}/logs/tomcat.log
log4j.appender.tomcat.MaxFileSize=1KB
log4j.appender.tomcat.layout=org.apache.log4j.PatternLayout
log4j.appender.tomcat.layout.ConversionPattern=%5p %d{MMM/dd HH:mm:ss} - 
%m%n



-
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: problem with javac

2008-06-17 Thread Hassan Schroeder
On Tue, Jun 17, 2008 at 1:54 AM, Robert Welz [EMAIL PROTECTED] wrote:

 how do I give javac those paths?

Time to learn Ant, I think :-)-- http://ant.apache.org/

A simple build.xml file uses wildcard paths to simplify compiling with
multiple dependencies.

FWIW,
-- 
Hassan Schroeder  [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: logging with multiple web applications

2008-06-17 Thread Jamie

That will be Tomcat version 6.0

Caldarale, Charles R wrote:

From: Jamie [mailto:[EMAIL PROTECTED]
Subject: logging with multiple web applications

Does anyone know how to configure Tomcat such that logging writes to
separate log files for each web application?



Care to tell anyone what version of Tomcat you're using?

 - Chuck


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

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

  



--
Stimulus Software - MailArchiva
Email Archiving And Compliance
USA Tel: +1-713-366-8072 ext 3
UK Tel: +44-20-80991035 ext 3
Email: [EMAIL PROTECTED]
Web: http://www.mailarchiva.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]



Re: problem with javac

2008-06-17 Thread Steve Ochani
Date sent:  Tue, 17 Jun 2008 10:54:06 +0200
From:   Robert Welz [EMAIL PROTECTED]
Subject:problem with javac
To: users@tomcat.apache.org
Send reply to:  Tomcat Users List users@tomcat.apache.org

 Hello.
 
 I am not familiar with javac and tried the following as in the
 manpage:
 
 javac -classpath /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/
 classes/;
 /opt/jakarta-tomcat-3.3.1a//webapps/ROOT/WEB-INF/classes/com/
 oreilly/servlet  /home/welz/develop/fundus/StingRay/Develop/Servlets/
 stingray_backup.java
 
 but I get an invalid flag error.
 
 Q: I want to fix some compile errors:
 like
 
 [EMAIL PROTECTED]:/opt/stingray# javac /home/welz/develop/fundus/StingRay/
 Develop/Servlets/stingray_backup.java/home/welz/develop/fundus/
 StingRay/Develop/Servlets/stingray_backup.java:3: package 
 javax.servlet does not exist import javax.servlet.*;
 


What version of jdk are you using? Seems like 1.x.

Try the command

javac -version

and see what you get.

You're also using a 5+ year old version of tomcat, time to upgrade.


-Steve O.





 my classpaths are /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/
 classes/com/oreilly/servlet/ and descendants
 /opt/jakarta-tomcat-3.3.1a/webapps/examples/jsp/
 /opt/jakarta-tomcat-3.3.1a/webapps/examples/servlets
 /opt/jakarta-tomcat-3.3.1a/webapps/examples/WEB-INF/classes/
 
 how do I give javac those paths?
 
 
 
 
 /opt/jakarta-tomcat-3.3.1a/lib/common/servlet.jar
 /opt/jakarta-tomcat-3.3.1a/webapps/admin/WEB-INF/scripts/watchdog-
 servlet.xml
 /opt/jakarta-tomcat-3.3.1a/webapps/admin/test/watchdog-servlet.jsp
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/Base64Decoder.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/Base64Encoder.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/CacheHttpServlet.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/CacheHttpServletResponse.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/CacheServletOutputStream.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/CookieNotFoundException.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/CookieParser.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/Daemon.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/DaemonHttpServlet.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/HttpMessage.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/HttpsMessage.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/LocaleNegotiator.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/LocaleToCharsetMap.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/MailMessage.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/MailPrintStream.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/MultipartFilter.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/MultipartRequest.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/MultipartResponse.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/MultipartWrapper.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/ParameterNotFoundException.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/ParameterParser.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/RemoteDaemonHttpServlet.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/RemoteHttpServlet.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/ServletUtils.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/UploadedFile.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/VersionDetector.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/multipart
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/multipart/BufferedServletInputStream.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/multipart/DefaultFileRenamePolicy.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/multipart/FilePart.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 servlet/multipart/FileRenamePolicy.class
 /opt/jakarta-tomcat-3.3.1a/webapps/ROOT/WEB-INF/classes/com/oreilly/
 

Re: logging with multiple web applications

2008-06-17 Thread André Warnier



Jamie wrote:

That will be Tomcat version 6.0

Caldarale, Charles R wrote:

From: Jamie [mailto:[EMAIL PROTECTED]
Subject: logging with multiple web applications

Does anyone know how to configure Tomcat such that logging writes to
separate log files for each web application?



Care to tell anyone what version of Tomcat you're using?



Now Jamie, just a word of caution : this guy Chuck sounds like he's nice 
and wants to help, but don't get your hopes up, cause the next time he 
might just tell you to go read the log4j documentation..

;-)

Ok, cheap shot.
But just to say that I'm listening too, just in case the answer would 
help me understand how it works, and reduce my daily Tomcat logs to 
monthly ones.


André


-
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: logging with multiple web applications

2008-06-17 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: logging with multiple web applications

 Now Jamie, just a word of caution : this guy Chuck sounds
 like he's nice and wants to help, but don't get your hopes
 up, cause the next time he might just tell you to go read
 the log4j documentation..

Actually, the OP appears to have done that, unlike some...

The real question is, has the OP read this:
http://tomcat.apache.org/tomcat-6.0-doc/logging.html

(My guess is that actually has been done as well.)  Note that most of the log4j 
section in the above applies to Tomcat internal logging, not individual webapp 
logging, except where noted.

 Apparently, Tomcat uses an extended the log4j package (JULI)
 to support logging across multiple web applications

No, JULI is not log4j; JULI is a more flexible replacement for the somewhat 
restrictive JDK logging mechanism.  Internally, Tomcat uses commons-logging, 
but webapps are free to use whatever they please.

 each web application has its own log4j.properties file

Look for any more global instances of log4j.properties (or log4j.xml) and get 
rid of them.

 The jar log4j-1.2.14.jar is bundled with the web application
 and is located in WEB-INF/lib

Verify that you don't have any instances of a log4j*.jar in Tomcat's lib 
directory and that you have no CLASSPATH environment variable set.

 Do I need to import catalina's version of log4j?

No, especially since Tomcat doesn't use log4j, unless you modify it to do so.

 log4j.appender.archivadebug.File=${catalina.home}/logs/debug.log

I'd suggest changing all config lines that refer to debug.log to something 
unique for each webapp.

Have you placed any jars in Tomcat's lib directory that are shared across 
webapps?  If so, and if they are doing any logging, it will use the log4j 
config of the first webapp to get there.  Better to deploy such libraries with 
each webapp rather than introduce such crosstalk.

 - Chuck


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

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



RE: logging with multiple web applications

2008-06-17 Thread Caldarale, Charles R
 From: Jamie [mailto:[EMAIL PROTECTED]
 Subject: Re: logging with multiple web applications

 Ok. I currently have the log4j-1.2.14.jar file in the WEB-INF/lib
 directory. I will remove it.

No, that's where it's supposed to be; one copy for each webapp.  I was 
referring to Tomcat's lib directory, not each webapp's.

 I do have shared JARs and class files across web apps.

That is most likely the source of your problem.

 This is a strongly desired feature as the intention is to
 minimize the memory footprint of each web app.

Unless you have many thousands of shared classes, your concern is probably 
unfounded.  By introducing such run-time dependencies, you pretty much 
guarantee that you have to take the whole server down to update a single 
webapp, and created versioning hell when you need to update a shared library 
for one particular webapp but not the others.  Memory is cheap; don't be afraid 
of configuring a larger PermGen when needed.

 Is there a way to use shared libs/classes and
 have the logging output separate?

Yes, but it's ugly: each caller of a method in a shared class must pass in a 
reference to the webapp's logger, rather than letting the shared class have its 
own.  You really don't want to do that, since it complicates and obfuscates the 
interface.  Just stop sharing your classes.

 - Chuck


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

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



Logging for Dummies in Tomcat 5.5/6.0

2008-06-17 Thread André Warnier

Hi.

Following another couple of threads which were leading to not much, and 
where it seemed evident that there was a notable difference in 
competence and understanding between the protagonists, I would like to 
start a new one, targeted at Tomcat Logging Dummies like me, but where 
Tomcat gurus are of course gratefully welcome to enlighten us.


Here are the basic premises :
Assume that one is not a Java nor Tomcat expert, just someone who has to 
install a piece of software called Tomcat, because that is what his 
users would like to have, to run nice Java applications.
Assume that one has installed Tomcat 5.5 (or 6.0) on some system just by 
using the standard software package management system for his Operating 
System, and consequently finds himself with some Tomcat installation, 
whose settings and layout have been chosen by a real guru (in both 
Tomcat and in software packaging).
Assume that the Tomcat in question works fine, but that it writes 
logfiles all over the place (or all over time), and that one would like 
to understand where these logfiles come from, and either slightly change 
which logfiles are being produced, or add a specific logfile for a 
specific application, or something simple like that.

Assume that one has read the Tomcat logging page at
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
and it's equivalent for Tomcat 5.5, and that one has even read the
commons-logging documentation at http://commons.apache.org/logging/
but that one admits that one is too dumb to really understand what is 
said there.
I believe also that it can be assumed that one does not know the 
difference between common-logging, juli, log4j or anything like it, and 
that one does not really care to know more about it than one absolutely 
needs to know in order to get a logfile.


The kind of things one would like to know are :

- where to start ?
In other words, here I have a Tomcat and it is working and it is writing 
logfiles, but I do not have a clue which kind of logging mechanism it is 
using, either directly or indirectly.  How do I find out ?


- how does it work ?
In other words : it would seem that the kind of logging adopted in 
Tomcat 5.5/6.0 is very powerful and flexible, allowing one to decide at 
the top which mechanism is being used, and then define either some 
overall generic logging settings for the whole Tomcat and valid for all 
components and applications, and/or refine this at just about each 
hierarchical level of Tomcat, Engine, Connector, Host, application and 
whatnot, at whatever level of detail one needs between CRASH and CHATTY. 
 Great.


Now, this was also pretty much what one could do in Tomcat 4, by using a 
Logger element at whichever level one deemed necessary.  And it was 
probably not perfect from a purist or developer point of view, but it 
was fairly simple to configure for the occasional Tomcat admin.
So, without going into many technical considerations about why it was 
changed, is there a simple set of analogies that one could use between 
an old and a new configuration, to achieve similar aims ?


My purpose is *not* to use the logging interface programmatically, since 
I have no access to any source code of any of the applications.  I would 
just assume they are doing the right thing so that I can re-direct their 
output to some file I choose, or to the intergalactic void if I so 
choose (like /dev/null), or just tell them to shut up via some setup 
parameter.  But, if it looks like one of them is misbehaving, I would 
like to know how to really squeeze the last logbyte out of it so that I 
can go and rub the user's nose in it, or bug the developer about fixing 
his code.


- how does one set up a really simple logging configuration, but one 
that will allow in the future some gradual tailoring and refinement 
without complete redesign ?


In other words, currently I have far too many logfiles and I don't know 
where they are coming from. I'd like to simplify initially, and then 
slowly and incrementally, as I get a better understanding of how it 
works, rebuild what I need in terms of details.
My basic purpose is to have logfiles that show me, in not too much 
detail, when Tomcat starts and stops, the important things that happen 
to it, and in case of an error, enough information to find out where it 
happened and why in general terms.


a) I have a Tomcat with one single host (localhost) and 3 applications 
: a manager, a host-manager, and a custom application called 
MyApp.  That's the way it came in the box.  Each of those at the 
moment produces a separate logfile, daily, to which one adds another set 
of daily catalina logs.

That's just a bit much.
I would like to have, for the whole of Tomcat :
- one monthly file that shows the equivalent of an Apache error log
- one monthly file that shows the equivalent of an Apache access log
and that's pretty much it.
So I need first to undo what's there, and then to put in what's needed.
How do I do that ?

Tomcat 6.0 Classloaders

2008-06-17 Thread Ole Ersoy

Hi,

I was wondering whether Tomcat 6.0 still has a classloader for classes that 
should be globally visible to all webapps only?  I read through the classloader 
documentation and it seems to be saying that $CATALINA_HOME/lib contains 
classes that are visible to both Tomcat and the webapps.

However this resource:
http://helpme.morphexchange.com/tomcat6/help/items/chapter_4_2_shared_lib

Is saying that shared/lib contains the classes visible to all webapps...

Thoughts?

Thanks,
- Ole

-
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.0 Classloaders

2008-06-17 Thread Caldarale, Charles R
 From: Ole Ersoy [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 6.0 Classloaders

 I was wondering whether Tomcat 6.0 still has a classloader
 for classes that should be globally visible to all webapps
 only?

Not by default.  However, you can edit conf/catalina.properties to create any 
classloader hierarchy you want.

 I read through the classloader documentation and it
 seems to be saying that $CATALINA_HOME/lib contains
 classes that are visible to both Tomcat and the webapps.

That is correct.

 However this resource:
 http://helpme.morphexchange.com/tomcat6/help/items/chapter_4_2_shared_lib

 Is saying that shared/lib contains the classes visible to all
 webapps...

Another example of Sturgeon's Law.

 - Chuck


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

-
To 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 Loader Documentation

2008-06-17 Thread Ole Ersoy
I think its because its just hard to explain, but maybe it could be made 
clearer.

I think *ignores* is the wrong word.

Especially if someone actually looks at catalina bat and sees this line.
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
Doesnt look like that script is ignoring CLASSPATH to me ;)


When Tomcat starts up, its internal system classes take *priority* over 
those in the normal system classloader CLASSPATH.
This is to prevent Java DLL hell, making sure that external 
applications do not see the internal tomcat engine, and making sure that 
tomcat does not use an external class (eg an xml parser), that may be 
incompatible with tomcat (Its trying to save your butt).






Ah OK - I see what you are saying.

I looked at setclasspath.sh and the first thing is does is clear the users 
CLASSPATH variable.  So seems like the Tomcat startup scripts rebuild the 
CLASSPATH variable such that only JARS that are available to it on the 
classpath.  So if I were to add more jars to the startup script, those would 
still be visible to Tomcat and all applications.


--- add your version here --- ;)

(This is what you're saying I think.  When I saw *priority* I started thinking How 
does it priorize?, and for me it's a little clearer if I understand that the 
CLASSPATH variable is rebuilt from scratch...assuming that's corrects...OK Here Goes

Take 2
When Tomcat starts up, the startup script first clears the CLASSPATH variable.  
It then adds a few libraries that Tomcat needs to boot, such as bootstrap.jar.  
These libraries contain additional class loaders that Tomcat delegates to when 
it needs it's system classes  (Libraries visible to Tomcat only and typically 
contained in CATALINA_HOME/lib).

Note that if you add additional libraries to the startup script lines that 
initialize the CLASSPATH for Tomcat, these will be visible to Tomcat and all 
running web applications as well.
/Take 2

Thoughts?

Thanks,
- Ole










-
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: Jrockit Vs Sun

2008-06-17 Thread Johnny Kewl


- Original Message - 
From: James Law [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Tuesday, June 17, 2008 12:56 PM
Subject: Jrockit Vs Sun



Ok not quite a Vs question, however I'm intrigued by BEA claim that
Jrockit is the industry leading solutions.



Does anyone have any experience in Jrockit, I know some of you will say
if its not broke etc J.



I've no issues with Sun's JVM just interested in hearing some views of
Jrockit



Thanks



James


--
It seems to be licensed, ie not free, and if you can figure out how to 
download the thing from that site, you're a better detective than I am.
It seems to be Suns JRE with tons of extra instrumentation, mission 
control.
In the news group I found ... the adoption is very low, so google is not 
going to be too rocket friendly.
There was one article refering to Tomcat... so someones trying it out with 
TC.
I imagine that from a biz point of view, the rocket is designed to launch 
you at their app server, and into premium support.
Good plan I guess, but doesnt seem like too many people riding that rocket 
;)
Intel seems to be involved somehow in the rocket as well, maybe one day it 
will be a harmonious rocket ;)

If I could have found the thing, would have given it a whiz.
Competition is good I guess... would have been interesting to see how the 
mission control related to JMX and the JConsole, perhaps the rocket 
influenced that hole idea. Article is worth a read, the terms are all good 
for foreplay ;)


---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



-
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: Jrockit Vs Sun

2008-06-17 Thread Caldarale, Charles R
 From: Johnny Kewl [mailto:[EMAIL PROTECTED]
 Subject: Re: Jrockit Vs Sun

 It seems to be Suns JRE

It's not - different code base for the JVM core.  The Java portion of the JRE 
and some of the native libraries may be the same.

When we tried it several years ago, it was slightly faster than Sun's 1.3 JVM 
(pre-HotSpot), but not stable.  I have no current experience with JRockit.

 - Chuck


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

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



Re: logging with multiple web applications

2008-06-17 Thread David Fisher

Hi Chuck,

These threads have clarified things for me as well. Thanks.


From: Jamie [mailto:[EMAIL PROTECTED]
Subject: Re: logging with multiple web applications

Ok. I currently have the log4j-1.2.14.jar file in the WEB-INF/lib
directory. I will remove it.


No, that's where it's supposed to be; one copy for each webapp.  I  
was referring to Tomcat's lib directory, not each webapp's.



I do have shared JARs and class files across web apps.


That is most likely the source of your problem.


This is a strongly desired feature as the intention is to
minimize the memory footprint of each web app.


Unless you have many thousands of shared classes, your concern is  
probably unfounded.  By introducing such run-time dependencies, you  
pretty much guarantee that you have to take the whole server down  
to update a single webapp, and created versioning hell when you  
need to update a shared library for one particular webapp but not  
the others.  Memory is cheap; don't be afraid of configuring a  
larger PermGen when needed.


Yes, this where I am. Memory is not cheap when you are running old  
hardware w/o option to replace and have your own webapps large area.  
But you are correct about tomcat's reasonable approach to the  
problem. I'll need to do containers as singletons. If a webapps is  
too PermGen intensive with 4000 clases, etc. maybe it needs its own  
isolation.



Is there a way to use shared libs/classes and
have the logging output separate?


Yes, but it's ugly: each caller of a method in a shared class must  
pass in a reference to the webapp's logger, rather than letting the  
shared class have its own.  You really don't want to do that, since  
it complicates and obfuscates the interface.  Just stop sharing  
your classes.


Once I put apache in front I can.

I'm not replying in the related classloader thread, but that is  
helpful as well in thinking about going from 5.5.25 to 6.


As always - illuminating.

Regards,
Dave



 - Chuck


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


-
To 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: Jrockit Vs Sun

2008-06-17 Thread Peter Lin
I've compared JRockit 1.4 and 1.5 in the past against SUN and it was
faster for synthetic benchmarks.

I don't work for BEA, but I do like JRockit. One thing that is
different in JRockit is it dynamically resizes the perm generation, so
in some cases it's better than SUN jvm.

peter


On Tue, Jun 17, 2008 at 1:31 PM, Johnny Kewl [EMAIL PROTECTED] wrote:

 - Original Message - From: James Law [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Tuesday, June 17, 2008 12:56 PM
 Subject: Jrockit Vs Sun


 Ok not quite a Vs question, however I'm intrigued by BEA claim that
 Jrockit is the industry leading solutions.

 Does anyone have any experience in Jrockit, I know some of you will say
 if its not broke etc J.

 I've no issues with Sun's JVM just interested in hearing some views of
 Jrockit

 Thanks

 James

 --
 It seems to be licensed, ie not free, and if you can figure out how to
 download the thing from that site, you're a better detective than I am.
 It seems to be Suns JRE with tons of extra instrumentation, mission
 control.
 In the news group I found ... the adoption is very low, so google is not
 going to be too rocket friendly.
 There was one article refering to Tomcat... so someones trying it out with
 TC.
 I imagine that from a biz point of view, the rocket is designed to launch
 you at their app server, and into premium support.
 Good plan I guess, but doesnt seem like too many people riding that rocket
 ;)
 Intel seems to be involved somehow in the rocket as well, maybe one day it
 will be a harmonious rocket ;)
 If I could have found the thing, would have given it a whiz.
 Competition is good I guess... would have been interesting to see how the
 mission control related to JMX and the JConsole, perhaps the rocket
 influenced that hole idea. Article is worth a read, the terms are all good
 for foreplay ;)

 ---
 HARBOR : http://www.kewlstuff.co.za/index.htm
 The most powerful application server on earth.
 The only real POJO Application Server.
 See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
 ---

 -
 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: Jrockit Vs Sun

2008-06-17 Thread Caldarale, Charles R
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Subject: Re: Jrockit Vs Sun

 One thing that is different in JRockit is it dynamically
 resizes the perm generation, so in some cases it's better
 than SUN jvm.

Last time I looked, JRockit didn't actually have a generational 
allocation/collection mechanism - it was all one big heap.  Has that changed?

 - Chuck


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

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



Re: Jrockit Vs Sun

2008-06-17 Thread Peter Lin
I don't know the internals. From my understanding, the generations
setting is configurable. I would suggest looking at the docs for an
authorative answer.

peter

On Tue, Jun 17, 2008 at 2:06 PM, Caldarale, Charles R
[EMAIL PROTECTED] wrote:
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Subject: Re: Jrockit Vs Sun

 One thing that is different in JRockit is it dynamically
 resizes the perm generation, so in some cases it's better
 than SUN jvm.

 Last time I looked, JRockit didn't actually have a generational 
 allocation/collection mechanism - it was all one big heap.  Has that changed?

  - Chuck


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

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



Help replacing mod_jserv with mod_jk

2008-06-17 Thread Sean Carolan
Hello Tomcat users:

I need some help replacing the functionality of mod_jserv with mod_jk.
 Here is the situation:

We have a legacy web-based java application that uses mod_jserv with
load balancing. Typically there are one or more Apache servers with
two java servers on the back-end.  We also have Apache set up to
listen on individual ports so that we can monitor each java server
separately.  Here is an example from one of the Apache config files:

VirtualHost 10.100.1.53:81

---extra config stuff here---

# App server configuration
IfModule mod_jserv.c
ApJServMount /servlets ajpv12://host.domain.com:8008/root
ApjServAction .html /servlets/gnujsp
/IfModule

What I would like to do is set up an instance of Apache on
host.domain.com itself, just for the purpose of monitoring the health
of the java process on the local box.  I want it to listen on port 81
just like the web server does.  The problem is I cannot simply use the
same mod_jserv.so module because the app server has Apache 2 installed
and the web server is still using Apache 1.3.  I have already spent
several hours trying to build a new mod_jserv.so for Apache 2.0 with
no luck.

I am told that mod_jk can be used to replace mod_jserv.  I have mod_jk
installed and the module loads fine in my Apache configuration.  Where
I'm stuck is, how do I duplicate the above configuration on the local
box using mod_jk?

Any help you can give is *most* 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]



Re: Jrockit Vs Sun

2008-06-17 Thread Juergen Weber
Why don't you try and run the DaCapo Benchmarks
(http://dacapobench.org/) with JRockit and compare it to a Sun JDK 1.6
?

On Tue, Jun 17, 2008 at 8:22 PM, Peter Lin [EMAIL PROTECTED] wrote:
 I don't know the internals. From my understanding, the generations
 setting is configurable. I would suggest looking at the docs for an
 authorative answer.

 peter

 On Tue, Jun 17, 2008 at 2:06 PM, Caldarale, Charles R
 [EMAIL PROTECTED] wrote:
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Subject: Re: Jrockit Vs Sun

 One thing that is different in JRockit is it dynamically
 resizes the perm generation, so in some cases it's better
 than SUN jvm.

 Last time I looked, JRockit didn't actually have a generational 
 allocation/collection mechanism - it was all one big heap.  Has that changed?

  - Chuck


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

 -
 To 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: Jrockit Vs Sun

2008-06-17 Thread Leon Rosenberg
Hello,

i have tested synchronized vs. atomic performance two years ago with
both jrockit and sun 1.5, both 32 bit, and
jrockit was clearly faster in synchronization and slower in atomics.
But its of cause its far outdated.

http://moskito.anotheria.net/AtomicVsSynchronized.html

regards
Leon



On Tue, Jun 17, 2008 at 8:02 PM, Peter Lin [EMAIL PROTECTED] wrote:
 I've compared JRockit 1.4 and 1.5 in the past against SUN and it was
 faster for synthetic benchmarks.

 I don't work for BEA, but I do like JRockit. One thing that is
 different in JRockit is it dynamically resizes the perm generation, so
 in some cases it's better than SUN jvm.

 peter


 On Tue, Jun 17, 2008 at 1:31 PM, Johnny Kewl [EMAIL PROTECTED] wrote:

 - Original Message - From: James Law [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Tuesday, June 17, 2008 12:56 PM
 Subject: Jrockit Vs Sun


 Ok not quite a Vs question, however I'm intrigued by BEA claim that
 Jrockit is the industry leading solutions.

 Does anyone have any experience in Jrockit, I know some of you will say
 if its not broke etc J.

 I've no issues with Sun's JVM just interested in hearing some views of
 Jrockit

 Thanks

 James

 --
 It seems to be licensed, ie not free, and if you can figure out how to
 download the thing from that site, you're a better detective than I am.
 It seems to be Suns JRE with tons of extra instrumentation, mission
 control.
 In the news group I found ... the adoption is very low, so google is not
 going to be too rocket friendly.
 There was one article refering to Tomcat... so someones trying it out with
 TC.
 I imagine that from a biz point of view, the rocket is designed to launch
 you at their app server, and into premium support.
 Good plan I guess, but doesnt seem like too many people riding that rocket
 ;)
 Intel seems to be involved somehow in the rocket as well, maybe one day it
 will be a harmonious rocket ;)
 If I could have found the thing, would have given it a whiz.
 Competition is good I guess... would have been interesting to see how the
 mission control related to JMX and the JConsole, perhaps the rocket
 influenced that hole idea. Article is worth a read, the terms are all good
 for foreplay ;)

 ---
 HARBOR : http://www.kewlstuff.co.za/index.htm
 The most powerful application server on earth.
 The only real POJO Application Server.
 See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
 ---

 -
 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: Jrockit Vs Sun

2008-06-17 Thread Tony Anecito
I talked to the lead developer for JRockit months ago
and he told me they take the code from Sun releases
and add it to all the releases. What that means is
thier 1.4.x is as fast as the 1.5.x but the difference
is functionality they do not port 1.5 functionality to
1.4.x.

This is important to me because you may be able to do
an upgrade for 1.4.x of Jrockit in production for say
BEA and get the performance of 1.5.x.

I do not believe Sun does that. Especially since I was
interested in performance inprovements of 1.6.0_02 at
the time and was wondering what release BEA was going
to put that into. Sun has a performance paper about
the improvements of 1.6.0_02 over earlier releases and
I saw that exibited on a system I engineered so I knew
it to be true and was wondering when BEA was going to
incorporate the 1.6.0_02 code from Sun.

-Tony

--- Leon Rosenberg [EMAIL PROTECTED]
wrote:

 Hello,
 
 i have tested synchronized vs. atomic performance
 two years ago with
 both jrockit and sun 1.5, both 32 bit, and
 jrockit was clearly faster in synchronization and
 slower in atomics.
 But its of cause its far outdated.
 

http://moskito.anotheria.net/AtomicVsSynchronized.html
 
 regards
 Leon
 
 
 
 On Tue, Jun 17, 2008 at 8:02 PM, Peter Lin
 [EMAIL PROTECTED] wrote:
  I've compared JRockit 1.4 and 1.5 in the past
 against SUN and it was
  faster for synthetic benchmarks.
 
  I don't work for BEA, but I do like JRockit. One
 thing that is
  different in JRockit is it dynamically resizes the
 perm generation, so
  in some cases it's better than SUN jvm.
 
  peter
 
 
  On Tue, Jun 17, 2008 at 1:31 PM, Johnny Kewl
 [EMAIL PROTECTED] wrote:
 
  - Original Message - From: James Law
 [EMAIL PROTECTED]
  To: users@tomcat.apache.org
  Sent: Tuesday, June 17, 2008 12:56 PM
  Subject: Jrockit Vs Sun
 
 
  Ok not quite a Vs question, however I'm
 intrigued by BEA claim that
  Jrockit is the industry leading solutions.
 
  Does anyone have any experience in Jrockit, I
 know some of you will say
  if its not broke etc J.
 
  I've no issues with Sun's JVM just interested in
 hearing some views of
  Jrockit
 
  Thanks
 
  James
 
  --
  It seems to be licensed, ie not free, and if you
 can figure out how to
  download the thing from that site, you're a
 better detective than I am.
  It seems to be Suns JRE with tons of extra
 instrumentation, mission
  control.
  In the news group I found ... the adoption is
 very low, so google is not
  going to be too rocket friendly.
  There was one article refering to Tomcat... so
 someones trying it out with
  TC.
  I imagine that from a biz point of view, the
 rocket is designed to launch
  you at their app server, and into premium
 support.
  Good plan I guess, but doesnt seem like too many
 people riding that rocket
  ;)
  Intel seems to be involved somehow in the rocket
 as well, maybe one day it
  will be a harmonious rocket ;)
  If I could have found the thing, would have given
 it a whiz.
  Competition is good I guess... would have been
 interesting to see how the
  mission control related to JMX and the
 JConsole, perhaps the rocket
  influenced that hole idea. Article is worth a
 read, the terms are all good
  for foreplay ;)
 
 

---
  HARBOR : http://www.kewlstuff.co.za/index.htm
  The most powerful application server on earth.
  The only real POJO Application Server.
  See it in Action :
 http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
 

---
 
 

-
  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: Installing Apache-Tomcat 6.0.16 Problem

2008-06-17 Thread Chuck Noren
Steve, with practical wisdom says,
 Why not just get the binary version of Tomcat?

I, slapping my hand to my head, says, duh, of course.

Thanks, that did the trick.
Chuck


Re: Tomcat 6.0 Classloaders

2008-06-17 Thread Ole Ersoy

I was wondering whether Tomcat 6.0 still has a classloader
for classes that should be globally visible to all webapps
only?


Not by default.  However, you can edit conf/catalina.properties to create any 
classloader hierarchy you want.


So I take it:

common.loader = Tomcat's classes/jars visible to both webapps and to itself.  
server.loader = only tomcat

shared.loader = only webapps

So if I wanted hibernate-3.0.14.jar to be visible to all webapps I could stick 
in in CATALINA_HOME/shared/lib and set shared.loader = 
${catalina.home}/shared/lib/hibernate-3.0.14.jar and now it's visible to all 
webapps, but not to Tomcat?

Thanks!
- Ole




-
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 in Tomcat 6

2008-06-17 Thread Billy Ng
9 out of 10 are the heap size problem.  Changing the -Xmsnm and -Xmxnm 
in the tomcatw.exe if you are using Windows.  On the 32-bit Windows, you can 
only allocate 1.2 GB max.  If you still have problem, check all the static 
vars to see any objects are growing forever.  If you still have problem, 
there must be some huge objects created from time to time.  You need to use 
tool like figure it out.


Billy Ng

- Original Message - 
From: Tuan Quan [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, June 16, 2008 9:11 AM
Subject: Memory usage in Tomcat 6


Hi all, how do I adjust Memory allocation Tomcat 6, running as service in 
Windows? I ran into out of memory error.
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: Tomcat 6.0 Classloaders

2008-06-17 Thread Caldarale, Charles R
 From: Ole Ersoy [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat 6.0 Classloaders

 common.loader = Tomcat's classes/jars visible to both webapps
 and to itself.
 server.loader = only tomcat
 shared.loader = only webapps

Correct.  This is how levels prior to 6.0 worked.

 So if I wanted hibernate-3.0.14.jar to be visible to all
 webapps I could stick in in CATALINA_HOME/shared/lib and set
 shared.loader =
 ${catalina.home}/shared/lib/hibernate-3.0.14.jar and now it's
 visible to all webapps, but not to Tomcat?

Also correct, but I don't know why you'd go to that trouble.  Adding 
classloaders does not improve performance, nor does preventing the Tomcat 
kernel from seeing certain jars buy you anything.

 - Chuck


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

-
To 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 in Tomcat 6

2008-06-17 Thread Caldarale, Charles R
 From: Billy Ng [mailto:[EMAIL PROTECTED]
 Subject: Re: Memory usage in Tomcat 6

 Changing the -Xmsnm and -Xmxnm in the tomcatw.exe

That's tomcat6w.exe, not tomcatw.exe.

 If you still have problem, there must be some huge
 objects created from time to time.

It can also be PermGen space (classes) that is full, rather than the normal 
heap.  Other resource exhaustion (e.g., file handles) can also cause OOMEs on 
occasion.

 You need to use tool like figure it out.

Yes, a profiler - or even JConsole - is very useful here.

 - Chuck


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

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



Re: Invalidate sessions

2008-06-17 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

J,

JLucas ZB wrote:
| i would like to invalidate the sessions.
| Is there any way to do that ?

Do you mean that you want to invalidate all sessions at once? In order
to do that, you'd have to collect sessions as they are created (using a
HttpSessionListener) and then simply loop through them invalidating
them. Remember to purge them from your list when they expire!

If you just want to invalidate a single session, then Youssef has your
answer.

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

iEYEARECAAYFAkhYLX0ACgkQ9CaO5/Lv0PAVzQCfSXX/xsbwz317pc06rvaI+wks
cXUAniypT8HyfGBhA6deIpXMuzM2HEIC
=q2bj
-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]



Re: Servlet mapping error

2008-06-17 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Amber,

Amber wrote:
| url-pattern/*.invoker/url-pattern

As pid points out, you should use *.whatever, not /*.whatever. The
servlet specification says that the pattern you used is not valid:


SRV.11.2 Specification of Mappings

In the Web application deployment descriptor, the following syntax is
used to define mappings:

• A string beginning with a ‘/’ character and ending with a ‘/*’ suffix
~  is used for path mapping.
• A string beginning with a ‘*.’ prefix is used as an extension mapping.
• A string containing only the ’/’ character indicates the default
~  servlet of the application. In this case the servlet path is the
~  request URI minus the context path and the path info is null.
• All other strings are used for exact matches only.


Thus, the only path that would match your url-pattern would actually
be the exact string /*.invoker, which I'm guessing is not what you want.

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

iEYEARECAAYFAkhYMmgACgkQ9CaO5/Lv0PD3pQCdFNmukuhfQLtnkykzVOqsTl5G
4ekAn1kujpFHkrY1kFVf7sKwF405WUW5
=5mpR
-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]



Question about mod_ssl mod_jk

2008-06-17 Thread Tan, Liao
All,
  My apache installed is has only the mod_jk.sl in the libexec/ directory.
 I want to know what I need to do in order to to configure my current http to 
https? I know this is a very general question, but to start, I guess I need to 
include the directives in httpd.conf:

1)IfDefine SSL
  LoadModule ssl_module libexec/mod_ssl.so
  /IfDefine
 
2)IfDefine SSL
  AddModule mod_ssl.c
  /IfDefine

Is this enough in order to enable the mod_ssl?

Already have all certificates configured in the paths. But still unsure on if 
simply adding those 2 directives will be enough, and will put the file 
(mod_ssl.so) there in the path, or if I have to get this file from somewhere 
(if so, how?)

Here are the environment configuration:
Web server: Apache/2.0.46 (Unix) mod_jk/1.2.4
Server: -HP-UX lath09 B.11.11 U 9000/800 690359356 unlimited-user license
Tomcat: 4.0

Ingrid Liao
Citi Markets  Banking | CMB Technology
Brazil Technology Solutions Center | Business Intelligence, Database  Support 
Services
Tel. +55-11-3741-6274
Fax. +55-11-3741-6285
Email: [EMAIL PROTECTED]



 



Re: getAttribute(null)?

2008-06-17 Thread Mark Thomas

Leon Rosenberg wrote:

may I suggest that you add the same check also to that method :

protected void removeAttributeInternal(String name, boolean notify) {


That would help wouldn't it ;).

Done. Thanks for catching that.

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]



Re: Tomcat 6.0 Classloaders

2008-06-17 Thread Ole Ersoy

So if I wanted hibernate-3.0.14.jar to be visible to all
webapps I could stick in in CATALINA_HOME/shared/lib and set
shared.loader =
${catalina.home}/shared/lib/hibernate-3.0.14.jar and now it's
visible to all webapps, but not to Tomcat?


Also correct, but I don't know why you'd go to that trouble.  Adding 
classloaders does not improve performance, nor does preventing the Tomcat 
kernel from seeing certain jars buy you anything.


I've been sitting here trying to come up with some hypothetical reasons that 
might make sense, but after writing them out, they all seem pointless, so good 
point! At least I know what's in catalina.properties now :-).

Actually one case I think is somewhat valid from an administration point of view is if you are RedBoss and you want to say to users Place all shared/provided webapp libraries in /var/lib/tomcat and have the corresponding Tomcat package pre-configured for this. 


Thanks again,
- Ole




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



Connection Pooling and Teradata

2008-06-17 Thread Katilie, John
I'm not sure if this is the right place to post this question but I've
seen through the years that there are a lot of knowledgeable people
reading and responding. 

 

1st. I'm running Tomcat 6.0.14 under Windows XP with Java 1.5.09. 

 

2nd: My problem is not getting something working its trying to
understand what is happening to see if I can get it to work faster.

 

Basically, I have a web application that communicates with Teradata
under Tomcat using a DBCP pooled connection. In my context.xml file I
have:

 

!-- Sample Database DataSource Configuration  for Teradata
--

Resource

  name=jdbc/teradata1

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

  url=jdbc:teradata://adqaxp01/LOG=DEBUG,DATABASE=Mydb

  driverClassName=com.ncr.teradata.TeraDriver

  username=

  password=

  validationQuery=Select 1

  type=javax.sql.DataSource

  maxIdle=2

  maxWait=5000

  maxActive=4

  /

 

Via JNDI we get the Resource object, get a connection, create a
statement, issue the statement, close the statement and then close the
connection. Everything works just fine. But looking at a Teradata
command log and then turning on LOG=DEBUG on the URL I see 2 things.

 

1st. Everytime we get a connection I see a Select 1 followed by a
BT/Rollback being issued and

2nd: Everytime we close the connection I see an Abort followed by
multiple ET/Commit's being issued

 

I've seen similar things with other DB's and am now wondering if I have
a problem or is this the way it is designed to work?

Using connection pooling is it normal to issue the above commands when a
connection is obtained and closed? Is there something I can do to say
don't do it? Is it an Application error, Tomcat error or JDBC driver
error?

 

Any and all feedback is appreciated.

 

Thanks, John Katilie

 

 

 



Java1.5 to 1.6

2008-06-17 Thread Kimberly Begley
Hi,
I have a web application that was working great with Tomcat 5 and Java 1.5 -
the server has recently been upgraded to Java 6 (still with tomcat 5) and
now some parts are not working and throwing null exceptions as pasted below.
I understand that the java executables should work properly but by the looks
of the error the problem might be with the servlet engines - would a
recompile of the entire app be in order? any suggestions?
Thanks
Kim

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

*exception*

org.apache.jasper.JasperException

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

*root cause*

java.lang.NullPointerException
org.apache.jsp.web.proceed_jsp._jspService(proceed_jsp.java:139)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



-- 
Kimberly Begley


Re: Java1.5 to 1.6

2008-06-17 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kimberly,

Kimberly Begley wrote:
| I understand that the java executables should work properly but by the
looks
| of the error the problem might be with the servlet engines - would a
| recompile of the entire app be in order? any suggestions?

[snip]

| java.lang.NullPointerException
|   org.apache.jsp.web.proceed_jsp._jspService(proceed_jsp.java:139)

This is an error occurring in your proceed.jsp file. You should look
at the file proceed_jsp.java in TC's work directory and see what is on
line 139 of that file -- you should be able to figure out where that
maps to in your original JSP and see what might be null.

Perhaps previous versions of TC had an object available in the
application/JNDI/session/request/page that is no longer there. More
likely is that certain configurations changed between versions and that
an object you expected to be properly loaded is not being loaded.

An inspection of your JSP and the generated java source will help a lot.

- -chris

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

iEYEARECAAYFAkhYZYsACgkQ9CaO5/Lv0PDMFACcCztcgGOtt2MzVDupDi9CAq+z
jq4AoJqVWNFga0RLArO7XM/jLUr4ja2p
=f55b
-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]



Re: Java1.5 to 1.6

2008-06-17 Thread Kimberly Begley
Great - thanks for that Chris - I found the problem and its all working now.


On Wed, Jun 18, 2008 at 11:31 AM, Christopher Schultz 
[EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Kimberly,

 Kimberly Begley wrote:
 | I understand that the java executables should work properly but by the
 looks
 | of the error the problem might be with the servlet engines - would a
 | recompile of the entire app be in order? any suggestions?

 [snip]

 | java.lang.NullPointerException
 |   org.apache.jsp.web.proceed_jsp._jspService(proceed_jsp.java:139)

 This is an error occurring in your proceed.jsp file. You should look
 at the file proceed_jsp.java in TC's work directory and see what is on
 line 139 of that file -- you should be able to figure out where that
 maps to in your original JSP and see what might be null.

 Perhaps previous versions of TC had an object available in the
 application/JNDI/session/request/page that is no longer there. More
 likely is that certain configurations changed between versions and that
 an object you expected to be properly loaded is not being loaded.

 An inspection of your JSP and the generated java source will help a lot.

 - -chris

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

 iEYEARECAAYFAkhYZYsACgkQ9CaO5/Lv0PDMFACcCztcgGOtt2MzVDupDi9CAq+z
 jq4AoJqVWNFga0RLArO7XM/jLUr4ja2p
 =f55b
 -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]




-- 
Kimberly Begley


Load Balancing Tomcat 5.5

2008-06-17 Thread Hari Krishnan N

Hi all,

I am using windows version of Tomcat5.5. When the load increases, the 
Tomcat crashes and I have to restart the server. I would like to 
implement Tomcat Load Balance with another server using Sticky Sessions.


Could somebody tell me how to configure Tomcat Server Load Balancing 
using Sticky Sessions.



Thanks and Regards,
Hari Krishnan N

--


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