RE: dynamical class loading

2005-10-12 Thread Allistair Crossley
this is a complex answer that *probably* only the Tomcat devs can answer of 
someone knowledgable about the JVM and class loaders, so don't expect too many 
users to answer. 

i believe from my limited knowledge that you cannot reload single classes in a 
tomcat web application as a whole class loader is associated with a web 
application. i believe the problem is more to do with the JVM although I 
*believe* WebLogic manages it. perhaps if a dev has time to explain they will.

Allistair.

 -Original Message-
 From: dumbQuestionsAsker _ [mailto:[EMAIL PROTECTED]
 Sent: 12 October 2005 09:11
 To: tomcat-user@jakarta.apache.org
 Subject: dynamical class loading
 
 
 can somone give me an information?
 I want to know if it is possible to past and load classes into 
 web-inf/classes path without beeing forced to reload the 
 whole webapp ?
 
 _
 10 Mo pour vos pièces jointes avec MSN Hotmail ! 
 http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: dynamical class loading

2005-10-12 Thread Allistair Crossley
 Thrust me, when dynamically classloading, half of code breaks 
  ^^
*rotfl* this has made my afternoon


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



Continuing Frustration and Misery with Deployer

2005-10-07 Thread Allistair Crossley
Hi List,
 
Honestly, I wish Tomcat web application deployment would be easier/smarter. To 
pre-empt certain list members from telling me it's my fault, I can assure you 
my WAR itself is totally 100% no doubts valid. 
 
Perhaps it is my method of deploying that is causing the issue, I don't know. I 
am attempting to use the Tomcat Client Deployer (the Ant script that comes with 
deployer).
 
I use it to compile the WAR and now want to deploy it to a waiting Tomcat. I 
ensured my Tomcat webapps folder was wiped and the conf/Catalina/localhost had 
no context configuration files.
 
My WAR contains a META-INF/context.xml for deploying the context configuration.
 
After I compile my WAR with Deployer, I call 
 
C:\apache-tomcat-5.5.12-deployerant -Dserver=intratest deploy
Buildfile: build.xml
 
deploy:
   [deploy] OK - Deployed application at context path /ROOT
 
So it's deployed OK. 
 
I wait 5 minutes and then put a request into Tomcat. 404. Why? Because it 
failed to start the context which in a nutshell is all I ever get when 
deploying from WARs.
 
My WAR has been exploded fully which is at least something.
 
The logs reveal:
 
2005-10-07 16:18:29,882 -  WARN (org.apache.catalina.startup.HostConfig:597) - 
A docBase D:\jakarta-tomcat\webapps\ROOT inside the host appBase has been 
specified, and will be ignored
2005-10-07 16:18:30,163 - ERROR (org.apache.catalina.core.StandardContext:3796) 
- Error starting static Resources
java.lang.IllegalArgumentException: Document base 
D:\jakarta-tomcat\webapps\ROOT does not exist or is not a readable directory
 at 
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
 at 
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3777)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:3948)
 at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
 at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:603)
 at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
 at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
 at org.apache.catalina.core.StandardService.start(StandardService.java:450)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
 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.catalina.startup.Bootstrap.start(Bootstrap.java:275)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2005-10-07 16:18:30,163 - ERROR (org.apache.catalina.core.StandardContext:3949) 
- Error in resourceStart()
2005-10-07 16:18:30,195 - ERROR (org.apache.catalina.core.StandardContext:4100) 
- Error getConfigured
2005-10-07 16:18:30,195 - ERROR (org.apache.catalina.core.StandardContext:4153) 
- Context [] startup failed due to previous errors
2005-10-07 16:18:30,195 -  INFO (org.apache.catalina.core.StandardContext:4250) 
- Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/] 
has not been started
 
It is not clear if this exception is thrown at the time when the WAR has not 
been exploded and of course ROOT will not exist.
 
My META-INF/context.xml has
Context docBase=/ROOT reloadable=true antiJARLocking=true 
antiResourceLocking=true swallowOutput=true

Does nobody else have issues with using the Deployer? Is it just me having all 
this bad luck? Honestly I am at my wits end with this deployment. I am fed up 
with manually having to deploy files to our Tomcat servers, exploding them 
myself and then restarting Tomcat. 

When will Deployer actually work?

Kindest, frustrated, Allistair.




FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. 

RE: Continuing Frustration and Misery with Deployer

2005-10-07 Thread Allistair Crossley
Hi,

Thanks for your thoughts. I agree, deployed OK certainly does not mean a valid 
deployment ;)

The docs say of docBase

The Document Base ... for this web application, or the pathname to the web 
application archive file (if this web application is being executed directly 
from the WAR file). You may specify an absolute pathname for this directory or 
WAR file, or a pathname that is relative to the appBase directory of the owning 
Host.

The thing is, I do not wish to execute directly from the WAR as that would be 
inefficient. I thought I could deploy a WAR, that it would explode and then 
initialise itself. It seems to me like (if it actually manages to explode in 
time which is not always the case) that initialisation of the context does not 
wait on complete extraction of the WAR.

Therefore to avoid executing from the WAR itself I use a relative path to the 
web application. Perhaps I should be specifying docBase=ROOT rather than 
/ROOT. 

Thanks again, I need all the help I can get with this deployment malarky!

Cheers, Allistair

 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Sent: 07 October 2005 17:03
 To: Tomcat Users List
 Subject: RE: Continuing Frustration and Misery with Deployer
 
 
  From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
  Subject: Continuing Frustration and Misery with Deployer
   
  deploy:
 [deploy] OK - Deployed application at context path /ROOT
  So it's deployed OK. 
 
 I suspect all that means is that it was successfully copied 
 to webapps,
 but I'm not certain.
 
  My META-INF/context.xml has
  Context docBase=/ROOT reloadable=true 
  antiJARLocking=true antiResourceLocking=true 
 swallowOutput=true
 
 The docBase attribute doesn't look right - it's specifying an absolute
 path to the directory, and I doubt that's where the war is 
 exploded to.
 Have you tried removing this?  Also, I seem to recall that if you're
 trying to deploy the default application for the host, it 
 must be named
 ROOT.war (at least on 5.5.x).
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
 PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete 
 the e-mail
 and its attachments from all computers.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: [5.5.9] Excessive jk INFO log msgs connection timeout reached

2005-10-07 Thread Allistair Crossley
Hi,

looks like jk is using commons logging, you'll have better success using a 
log4j or commons-logging properties configuration to set the threshold to 
ERROR. you may be able to do that in jk's config files too, i am sure there is 
an error level setting. check out the jk docs.

Allistair.

 -Original Message-
 From: Marcus Franke [mailto:[EMAIL PROTECTED]
 Sent: 07 October 2005 17:22
 To: Tomcat Users List
 Subject: Re: [5.5.9] Excessive jk INFO log msgs connection timeout
 reached
 
 
 On Thu, Oct 06, 2005 at 06:53:36AM -0700, Rick wrote:
  Jean-Marc,
Actually, without the connectionTimeout set, jk seems 
 to hold on to its
  connections indefinitely and after a while, the apache to 
 tomcat connection
  hangs (pages quit serving).   Could you tell me which combo 
 of versions you
  use for apache, jk, and tomcat.  I'm trying to figure out 
 what is the
  correct configuration.  Or if you have a link to a guide, 
  I have yet to
  find a best practices.
  
 
 Out of curiosity I activated the connectionTimeout in my ajp 
 connector and
 my catalina.out file gets spammed with hundreds of these:
 
 07.10.2005 17:47:15 org.apache.jk.common.ChannelSocket 
 processConnection
 INFO: connection timeout reached
 07.10.2005 17:47:17 org.apache.jk.common.ChannelSocket 
 processConnection
 INFO: connection timeout reached
 07.10.2005 17:47:18 org.apache.jk.common.ChannelSocket 
 processConnection
 INFO: connection timeout reached
 07.10.2005 17:47:18 org.apache.jk.common.ChannelSocket 
 processConnection
 INFO: connection timeout reached
 07.10.2005 17:47:20 org.apache.jk.common.ChannelSocket 
 processConnection
 INFO: connection timeout reached
 
 I guess, it is because of definition of debug=9 in the same 
 Connector.
 
 What would be a reasonable debug level? Zero?
 
 
 Marcus
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Continuing Frustration and Misery with Deployer

2005-10-07 Thread Allistair Crossley
Hi,

  The thing is, I do not wish to execute directly from the WAR 
  as that would be inefficient.
 
 If you only have classes (as opposed to resource files) I 
 don't think it
 will make a difference.  If you do have other resources in there, then
 yes, expanding the war would probably be better.  However, I think
 that's controlled solely by the unpackWARs attribute of the 
 Host tag,
 and has nothing to do with docBase.

The web application is a whopping 22MB WAR consisting of resources, jsps, 
classes, you name it (although the web server is linked to the unpacked 
resources location to serve those).
 
  Therefore to avoid executing from the WAR itself I use a 
  relative path to the web application. Perhaps I should be 
  specifying docBase=ROOT rather than /ROOT. 
 
 That would probably be better; I wonder if you even need a docBase
 attribute at all?  If the war file is under webapps, it may 
 be redundant
 (and possibly a contributor to the errors in the log).  Is your app
 deployed from ROOT.war?

The docBase attribute is listed in the docs as being needed, I could try 
without it. My WAR is called ROOT.war yes.

Thanks again, I will need to try these permutations and get back to the list.

Allistair


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



[OT] RE: Flexible way of defining application variables in text format?

2005-09-27 Thread Allistair Crossley
Hi,

Just enter your variables into a text file called abc.properties with 
name/value pairs, e.g 

var1=val1
var2=val2

Although these will not automatically appear in application scope. You will 
need to write a tiny Servlet that you configure in web.xml, pass the filename 
as a servlet parameter, and set the servlet to load-on-startup=1. 

In your servlet, retrieve the filename and load the properties into a HashMap. 
Finally add it to the servlet context. Your application can now use the map 
from application scope, and better still, you can use it in JSTL syntax with 
$applicationScope.myprops['var1']

There are other ways but this is my recommended way.

Allistair.

 -Original Message-
 From: Seak, Teng-Fong [mailto:[EMAIL PROTECTED]
 Sent: 27 September 2005 09:37
 To: Tomcat Users List
 Subject: Flexible way of defining application variables in 
 text format?
 
 
 My webapp needs some application string variables for 
 configuration.  For the moment, I hard-code them as class static 
 properties and compiled.  But I'd like to know if there's any 
 method to 
 define such variables in a text file, something like the 
 global.asa in 
 ASP where we could simply write something like this withing the 
 application_onstart subroutine:
 application(myvar) = my value
 
 I like them to be withing text file because if even 
 there's a need 
 to change config, I'd like to just launch a text editor, edit it and 
 start again!  I don't want to install Eclipse or other IDE in 
 deployment 
 server just in case we need to change some parameter and have 
 to compile 
 everything.  This is very inconvenient, non professional and stupid.  
 And the client would probably not appreciate this.
 
 OK, I know I could write a wrapper function to parse that 
 text file 
 and assign the correct values, but is there a simpler way?  Is the 
 answer lying in the web.xml file?  But its syntax seems quite 
 complicated that I've no idea what to begin.
 
 TIA
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT



RE: Flexible way of defining application variables in text format?

2005-09-27 Thread Allistair Crossley
To make this easier in the presentation tier, you would probably want to make 
this method a static member of some class (if using scriplet), or a tag if 
attempting a non-scripted presentation tier (recommended). 

Allistair.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 27 September 2005 09:50
 To: tomcat-user
 Subject: Re:Flexible way of defining application variables in text
 format?
 
 
 in web.xml u can set all the constants u want as:
 
  env-entry
 env-entry-namenameVariavle/env-entry-name
 env-entry-valuevalueVariable/env-entry-value
 env-entry-typejava.lang.String or whatelse/env-entry-type
 /env-entry
 
 and use this for getting them
 public static String  getEnvVar(String name)
   throws NamingException
   {
   String var=;
   try
   {
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup( java:comp/env );
 var = (String) envCtx.lookup( name );
   }
  catch (NamingException e) {
   e.printStackTrace();
 }
 return var;
   }
 
 regards!!
 
 -- Initial Header ---
 
 From  : Seak, Teng-Fong [EMAIL PROTECTED]
 To  : Tomcat Users List tomcat-user@jakarta.apache.org
 
 Cc  : 
 Date  : Tue, 27 Sep 2005 10:36:30 +0200
 Subject : Flexible way of defining application variables in 
 text format?
 
 
 
 
 
 
 
 
  My webapp needs some application string variables for 
  configuration.  For the moment, I hard-code them as class static 
  properties and compiled.  But I'd like to know if there's 
 any method to 
  define such variables in a text file, something like the 
 global.asa in 
  ASP where we could simply write something like this withing the 
  application_onstart subroutine:
  application(myvar) = my value
  
  I like them to be withing text file because if even 
 there's a need 
  to change config, I'd like to just launch a text editor, 
 edit it and 
  start again!  I don't want to install Eclipse or other IDE 
 in deployment 
 
  server just in case we need to change some parameter and 
 have to compile 
  everything.  This is very inconvenient, non professional 
 and stupid.  
  And the client would probably not appreciate this.
  
  OK, I know I could write a wrapper function to parse 
 that text file 
  and assign the correct values, but is there a simpler way?  Is the 
  answer lying in the web.xml file?  But its syntax seems quite 
  complicated that I've no idea what to begin.
  
  TIA
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Please verify this is correct: Need multiple virtual directories for isapi_redirector

2005-09-27 Thread Allistair Crossley
Dave,

If it's working via a solution you've configured, and you are not writing a 
specification of how things will work, why do you keep asking this question?

With best intentions, Allistair.

 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 27 September 2005 15:52
 To: 'Tomcat Users List'
 Subject: RE: Please verify this is correct: Need multiple virtual
 directories for isapi_redirector
 
 
 Asking again
 
 Thanks - dave
 
 David Thielen
 303-499-2544
 www.windwardreports.com
 
 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 22, 2005 9:10 AM
 To: 'Tomcat Users List'
 Subject: Please verify this is correct: Need multiple virtual 
 directories
 for isapi_redirector
 
 Hi;
 
 I want to make sure this is correct:
 
 
 If you want to run Tomcat against multiple websites, not just 
 the default
 website, this is what I have had to do.
 
 This is on Windows 2003/IIS 6.0.
 
 I removed isapi_redirector.dll from the default web site 
 ISAPI Filters and
 put it in the parent Web Sites ISAPI Filter properties.
 
 I added a jakarta virtual directory for each website (and I 
 have a lot.).
 
 Now it appears to work.
 
 ??? - thanks - dave
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Out of Memory on Jakarta Tomcat 5.0.19, jdk1.5.0_04

2005-09-20 Thread Allistair Crossley
You'll almost likely find that the reload via Ant does not free up all 
resources and so each time you perform a reload you'll be leaking some memory 
resulting in OOME after a week. 

3 things to do;

Get a profiler to see where you may be losing memory.
Ensure no resource/references are held onto, dispose references correctly
Hard restart Tomcat when OOME occur.

Allistair.

 -Original Message-
 From: NoKideen [mailto:[EMAIL PROTECTED]
 Sent: 20 September 2005 14:55
 To: tomcat-user@jakarta.apache.org
 Subject: Out of Memory on Jakarta Tomcat 5.0.19, jdk1.5.0_04
 
 
 Hi all, I'm new in this mailling list
 
 I'm currently end up  ways to solve problem out of memory in tomcat
 
 this is
 startup script in my Linux Fedora Core 2
 
 CATALINA_OPTS= -Djava.awt.headless=true -server -Xss128k 
 -Xincgc -Xms256m 
 -Xmx256m
 
 CPU is on 1Giga Memory
 
 and the problem out of memory, can't happen in specific 
 times, can't happen in 
 specific pages (both servlet and JSP), currently happen in 
 Random time/pages, 
 usually 1 Weeks after startup.
 
 Server run 24 Hours/day for development only
 
 
 usually I use ant for reload servlet, after I change the java code
 
 #ant reload
 
 build.xml
 
 - cut -
 taskdef name=reload
 classname=org.apache.catalina.ant.ReloadTask/
 
 
 what should I do ?
 
 Thanks in Advance,
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Out of Memory on Jakarta Tomcat 5.0.19, jdk1.5.0_04

2005-09-20 Thread Allistair Crossley
A listener that calls

LogManager.shutdown();
LogFactory.releaseAll();
Introspector.flushCaches();

on contextDestroyed 

might also help if you are using certain apis like log4j, struts.

Allistair.

 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Sent: 20 September 2005 15:08
 To: Tomcat Users List
 Subject: RE: Out of Memory on Jakarta Tomcat 5.0.19, jdk1.5.0_04
 
 
  From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
  Subject: RE: Out of Memory on Jakarta Tomcat 5.0.19, jdk1.5.0_04
  
  3 things to do;
  
  Get a profiler to see where you may be losing memory.
  Ensure no resource/references are held onto, dispose 
  references correctly
  Hard restart Tomcat when OOME occur.
 
 In addition to the above, you might want to increase your -Xmx setting
 and the size of the permanent generation (-XX:PermSize=??).  
 This won't
 eliminate the need to restart Tomcat, but it may allow you more time
 between restarts.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
 PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete 
 the e-mail
 and its attachments from all computers.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Order of WebApp Loading

2005-09-16 Thread Allistair Crossley
Hi,

Create a servlet that is shared by all your web applications, perhaps use 
common/classes (or shared/classes - not sure which), and configure it to be a 
load-on-startup servlet in each web app's web.xml. your servlet can hook into 
your db startup code, or not bother if already started.

Allistair

 -Original Message-
 From: Robert Harper [mailto:[EMAIL PROTECTED]
 Sent: 15 September 2005 19:08
 To: 'Tomcat Users List'
 Subject: RE: Order of WebApp Loading
 
 
 The case is still that most servlet containers, Tomcat included, are
 multithreaded and order of processing should not be counted 
 on. One app may
 be swapped out while the other app runs. It is far better to 
 write your
 servlets so that there is no dependency on order of 
 operation, order of
 parameters, etc. Another reason not to count on this is that 
 it is not part
 of the specification and one implementation or version of a 
 container may
 choose to provide order or not and this might change. There 
 have been many
 recommendations on how to do this and I would suggest you try 
 them. Your
 apps will probably end up being more scaleable as well.
 
 Robert S. Harper
 Information Access Technology, Inc.
 
 -Original Message-
 From: Jilles van Gurp [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 15, 2005 11:52 AM
 To: Tomcat Users List
 Subject: Re: Order of WebApp Loading
 
 If you define the contexts in the server.xml, they are started in the 
 order that you define them, I think.
 
 Regards,
 
 Jilles
 
 Peter Menzel wrote:
  Hi there,
 
  I have a question concerning Tomcats webapp loading:
  What is the order in which tomcats loads its webapps ?
  I have two webapps configured by 
 /conf/Catalina/localhost/XXX.xml and 
  I need one webapp to be loaded before the other, because it 
 starts the 
  database.
  How does Tomcat choose the first, second, ...
  And what is the loading sequence, if both are deployed as a .war ?
 
  Kind regards, Peter Menzel
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Order of WebApp Loading

2005-09-16 Thread Allistair Crossley
run your dependent web app in it's own tomcat?

 -Original Message-
 From: Peter Menzel [mailto:[EMAIL PROTECTED]
 Sent: 16 September 2005 15:55
 To: Tomcat Users List
 Subject: Re: Order of WebApp Loading
 
 
 I see,
 if i can't count on the order of loading, I tried something other:
 I set crossContext=true for both webapps and while in 
 contextInitialized() of the webapp which schould run only after the 
 first webapp finished loading
 I use context.getContext(/db-app) to look if the first app 
 ist already 
 there. If not then it should wait with Thread.sleep().
 Unfortunately my Tomcat 5.5 seems to use only one thread for 
 loading all 
 web-apps, so if I let it wait the loading of all web-apps is blocked.
 
 Obviously this solution will not work reliably, because it depends on 
 the threading model the container uses to load its apps.
 Do you have any other recommendations for this issue ?
 
 Kind regards, Peter Menzel
 
 
 Robert Harper schrieb:
 
 The case is still that most servlet containers, Tomcat included, are
 multithreaded and order of processing should not be counted 
 on. One app may
 be swapped out while the other app runs. It is far better to 
 write your
 servlets so that there is no dependency on order of 
 operation, order of
 parameters, etc. Another reason not to count on this is that 
 it is not part
 of the specification and one implementation or version of a 
 container may
 choose to provide order or not and this might change. There 
 have been many
 recommendations on how to do this and I would suggest you 
 try them. Your
 apps will probably end up being more scaleable as well.
 
 Robert S. Harper
 Information Access Technology, Inc.
   
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Problem making my servlet the default servlet (instead of ROOT)

2005-09-15 Thread Allistair Crossley
Hi,

To make this URL work

http://localhost/cart.faces - error 404

You need to just define your context as path= (although I use path=/ROOT 
with no problem). 

You URI mappings for JK would need to include (if no other wildcard mapping 
exists)

/*.faces=ajp13

to ensure traffic with faces extensions reach Tomcat.

Allistair.



 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 14 September 2005 18:14
 To: 'Tomcat Users List'
 Subject: RE: Problem making my servlet the default servlet (instead of
 ROOT)
 
 
 Hi;
 
 We have some ASP stuff too so we have to have IIS.
 
 I think I'll just put my servlet in root and stop trying to 
 change what root
 is (yuck).
 
 Thanks - dave
 
 
 -Original Message-
 From: Parsons Technical Services 
 [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 13, 2005 10:45 PM
 To: Tomcat Users List
 Subject: Re: Problem making my servlet the default servlet 
 (instead of ROOT)
 
  If I do Context path=/ docBase=store., then
  http://localhost:8080/cart.faces  returns an error 404.
 
 Yep. It will. Since you are using the path attribute I assume 
 this is in the
 
 server.xml and to set it as the root you would use .
 
  If you specify a context path of an empty string (), you 
 are defining 
 the default web application for this Host, which will process 
 all requests 
 not assigned to other Contexts. 
 
 If this is not in the server.xml then remove the path 
 attribute completely. 
 Name your package ROOT.war and deploy it. (Someone correct me 
 if I am wrong 
 here.)
 
 
  I figured it should be / and not ?
 
 
 No. See above.
 
 
  If I do Context path= docBase=store., then it works. But.
 
  http://localhost:8080/store/cart.faces works
 
  http://localhost/store/cart.faces works (via IIS)
 
  http://localhost:8080/cart.faces works
 
  http://localhost/cart.faces - error 404
 
 
 
  Any idea why the error only if using the root?
 
 
 
 
 I don't use IIS but I would say it is a configuration issue in the 
 connector, as you are connecting to two different apps in the 
 first two URLs
 
 than you are in the last two. And since both :8080 URLs work 
 then Tomcat is 
 working.
 
 Out of curiosity is there any particular reason you are using 
 IIS and not 
 Tomcat alone?
 
 Doug 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Virtual Hosts

2005-09-15 Thread Allistair Crossley
Simplistically ...

Configure Host elements inside your Engine. Create a folder for each 
application within webapps. Set the Host docBase to each. 

Check out the online ref.

 -Original Message-
 From: Durfee, Bernard [mailto:[EMAIL PROTECTED]
 Sent: 15 September 2005 17:07
 To: tomcat-user@jakarta.apache.org
 Subject: Virtual Hosts
 
 
 I am having trouble configuring virtual hosts in Tomcat 5.5.9. I have
 two applications app01 and app02. I have 2 DNS entries
 app01.myserver.com and app02.myserver.com that both point to 
 the machine
 on which Tomcat is running. How do I configure Tomcat to serve from
 app01.war when app01.myserver.com is hit and app02.war when
 app02.myserver.com is hit.
 
 Thanks,
 Bernie
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Where to put context.xml?

2005-09-13 Thread Allistair Crossley
Nearly. Rename your file ROOT.xml and a path of /ROOT and you're away. The 
other alternative is create in your web application folder META-INF/context.xml

Allistair

 -Original Message-
 From: Michael Lai [mailto:[EMAIL PROTECTED]
 Sent: 13 September 2005 10:07
 To: tomcat-user@jakarta.apache.org
 Subject: Where to put context.xml?
 
 
 This is probably an obvious question to most but I am new with tomcat 
 5.5 so I am still trying to figure things out.  I want to 
 create a web 
 project with the document base in /home/tomcat/applications 
 as opposed 
 to the normal webapps folder.  This is what I have in my server.xml:
 
 Server port=8005 shutdown=SHUTDOWN
 
   GlobalNamingResources
 !-- Used by Manager webapp --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved

 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
   pathname=conf/tomcat-users.xml /
   /GlobalNamingResources
 
   Service name=Catalina
 Connector port=8081 /
 
 Engine name=Catalina defaultHost=localhost
   !-- Realm 
 className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase / --
   Host name=localhost debug=0
 Context path= docBase=/home/tomcat/applications/
  debug=0 reloadable=true /
   /Host
 /Engine

   /Service
 /Server
 
 It works when I point my browser to 
http://www.myhost.com:8081/ and it 
shows a customized welcome page from my index.jsp.  However, as I 
understand it, Context should now be in its own xml file.  I extracted 
the Context content and placed it in context.xml.  I placed 
context.xml in $CATALINA_HOME/conf/Catalina/localhost, restarted tomcat 
but now the browser shows nothing.  I also tried placing it in the conf/ 
folder but that doesn't work either.  Where does the file go?

Thanks for any help in advance.

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



FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Where to put context.xml?

2005-09-13 Thread Allistair Crossley
Hi,

The docBase is just the folder where your web applications are located. You 
need to have a folder in applications for your web application. For the empty 
path application this is /ROOT.

Thus

Context path=/ROOT docBase=/home/tomcat/applications/
 debug=0 reloadable=true 
/Context

Means a folder at

/home/tomcat/applications/ROOT/META-INF/context.xml

applications

 -Original Message-
 From: Michael Lai [mailto:[EMAIL PROTECTED]
 Sent: 13 September 2005 10:21
 To: Tomcat Users List
 Subject: Re: Where to put context.xml?
 
 
 Allistair Crossley wrote:
 
 Nearly. Rename your file ROOT.xml and a path of /ROOT and 
 you're away. The other alternative is create in your web 
 application folder META-INF/context.xml
 
 Allistair
 
 
 Thank you for your prompt replay, Allistair.  I choosed the second 
 option and created the META folder.  So I now have:
 
 /home/tomcat/applications/META-INF/context.xml
 
 And my context.xml shows:
 
 Context path= docBase=/home/tomcat/applications/
  debug=0 reloadable=true 
 /Context
 
 I restarted tomcat but with the same effect.  Is there some other 
 configuration that I have to modify to inform tomcat that I have a 
 project in this folder?
 
 Michael.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: problem with tomcat manager's deploy command

2005-09-13 Thread Allistair Crossley
Hi,

I had the same trouble with undeploy, residual JARs in WEB-INF/lib which then 
totally screwed up any chance of redeploying. So another stop Tomcat, delete 
manually, deploy.

I'd be interested to learn if there is anything that can be done too ... 

Allistair.

 -Original Message-
 From: rahul [mailto:[EMAIL PROTECTED]
 Sent: 13 September 2005 14:23
 To: Tomcat Users List
 Subject: RE: problem with tomcat manager's deploy command
 
 
 Thanks Charles,
 
 Now I am defining my application context in a separate file 
 under META-INF
 
 But still I am not been able to undeploy my application (using tomcat
 manager)
 
 Tomcat Manager's undeploy command, which I run from ant
 is not cleaning some of the jar files in my application's lib folder
 However no error shown on ant prompt.
 
 This is how I am using undeploy command in ant script
 
 target name=undeploy description=Remove application from Tomcat
   undeploy   url=${tomcat.manager.url}
   username=${tomcat.manager.username}
   password=${tomcat.manager.password}
   path=/${app.name}
   /
 /target
 
 any suggestions?
 
 
 
 
 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 12, 2005 7:50 PM
 To: Tomcat Users List
 Subject: RE: problem with tomcat manager's deploy command
 Importance: High
 
 
  From: rahul [mailto:[EMAIL PROTECTED]
  Subject: problem with tomcat manager's deploy command
 
  If I remove this context tag from server.xml then the deploy
  command works fine.
 
  But I want to keep this information in server.xml and at
  the same time use tomcat manager's deploy command from ant script
 
 You may want to rethink that one.  From the Tomcat 5.5 
 documentation for
 Context:
 
 Please note that for tomcat 5, unlike tomcat 4.x, it is NOT 
 recommended
 to place Context elements directly in the server.xml file.  Instead,
 put them in the META-INF/context.xml directory of your WAR file or the
 conf directory as described above.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
 PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete 
 the e-mail
 and its attachments from all computers.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Where to put context.xml?

2005-09-13 Thread Allistair Crossley
Hi,

Thanks. I am pretty sure that earlier 5.5 implementations needed /ROOT 
specified for the older 5.0  empty path. Looks like it's either changed back 
to 5.0's method or I read something incorrectly,

Thanks in either case,

Allistair.

 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Sent: 13 September 2005 14:25
 To: Tomcat Users List
 Subject: RE: Where to put context.xml?
 
 
  From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
  Subject: RE: Where to put context.xml?
  
  Context path=/ROOT docBase=/home/tomcat/applications/
   debug=0 reloadable=true 
  /Context
 
 To again quote from the Tomcat doc for the path attribute of the
 Context element:
 
 The value of this field must not be set except when 
 statically defining
 a Context in server.xml, as it will be infered [sic] from the 
 filenames
 used for either the .xml context file or the docBase.
 
 Also note that placing Context tags is server.xml is strongly
 discouraged.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
 PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete 
 the e-mail
 and its attachments from all computers.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Different JDBC sources?

2005-09-13 Thread Allistair Crossley
The standard way is 2 servers running their own Tomcat. Each Tomcat is then 
configured with the datasource with differing connection strings.

Allistair.

 -Original Message-
 From: Vsevolod (Simon) Ilyushchenko [mailto:[EMAIL PROTECTED]
 Sent: 13 September 2005 16:36
 To: Tomcat Users List
 Subject: Different JDBC sources?
 
 
 Hi,
 
 As a relative Tomcat newbie, I can't find anything about how 
 to use two 
 different JDBC sources with the same codebase. I'd like to have two 
 different URLs that use the same classes and JSP pages, but reference 
 two different databases (test and production). Is there a 
 standard way 
 of achieving this?
 
 Thanks,
 Simon
 -- 
 
 Simon (Vsevolod ILyushchenko)   [EMAIL PROTECTED]
   http://www.simonf.com
 
 Terrorism is a tactic and so to declare war on terrorism
 is equivalent to Roosevelt's declaring war on blitzkrieg.
 
 Zbigniew Brzezinski, U.S. national security advisor, 1977-81
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Different JDBC sources?

2005-09-13 Thread Allistair Crossley
Hi,

Yes it's called source control and build management. The same, as you call 
it, code is the managed master code (cvs/vss etc.) and when you want that 
pushed to different servers you do so with automated build scripts like Ant, or 
deployment using application server deploy tools. 

The point is that you don't modify you code in-situ within the 
staging/production Tomcat server, you do it in the local dev envionrment, and 
when ready for deploy, it gets committed, tagged and then war'd up and deployed.

Sounds like this may just be too much for your project, but it's nevertheless 
the standard way.

Allistair.

 -Original Message-
 From: Vsevolod (Simon) Ilyushchenko [mailto:[EMAIL PROTECTED]
 Sent: 13 September 2005 17:01
 To: Tomcat Users List
 Subject: Re: Different JDBC sources?
 
 
 
 
 Allistair Crossley wrote on 09/13/2005 11:49 AM:
  The standard way is 2 servers running their own Tomcat. 
 Each Tomcat is then configured with the datasource with 
 differing connection strings.
 
 Allistair,
 
 And then I would publish my code into two places? (Or alternatively I 
 can have two applications under one Tomcat, I guess.)
 
 I was hoping to somehow avoid that and reuse one set of files 
 (I do it 
 in my Perl apps by having different front controller scripts for 
 different URLs).
 
 Thanks,
 Simon
 -- 
 
 Simon (Vsevolod ILyushchenko)   [EMAIL PROTECTED]
   http://www.simonf.com
 
 Terrorism is a tactic and so to declare war on terrorism
 is equivalent to Roosevelt's declaring war on blitzkrieg.
 
 Zbigniew Brzezinski, U.S. national security advisor, 1977-81
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Asking Again: What's the best way to mix html jsp

2005-09-12 Thread Allistair Crossley
Hi,

It works just as great keeping your web application a self-contained unit, you 
can still serve HTML from IIS if you really want by setting the document root 
for the site, or using virtual folders. you'd also for absolute certainty put 
an exlusion mask in uriworkers.properties for static type file extensions.

Allistair.

 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 12 September 2005 17:03
 To: 'Tomcat Users List'
 Subject: Asking Again: What's the best way to mix html  jsp
 
 
 
 Hi;
 
 I have websites which are 95% html and 5% jsp/jsf. Any 
 suggestions on the
 best way to mix this? What I have always done to date is put 
 the jsp/jsf
 stuff under the Tomcat webapps dir and the rest under the IIS
 inetpub/wwwroot dir. It's a little disjointed during 
 development but seems
 to work great in production.
 
 ? - thanks - dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Asking again: Final questions: Default pages

2005-09-12 Thread Allistair Crossley
Hi,

Just don't bother putting the domain in the mapping from IIS to Tomcat, e.g

/*.jsp=ajp13

would capture both domain requests and forward to Tomcat.

Allistair.

 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 12 September 2005 17:03
 To: 'Tomcat Users List'
 Subject: Asking again: Final questions: Default pages
 
 
 
 Hi;
 
 I have multiple domains on my website (IIS). I would like to do the
 following.
 
 When a user goes to http://www.windward.net/cart.jsp or
 http://www.windwardreports.com/cart.jsp that it then loads 
 the jsp page in
 the root of a specific webapp of mine.
 
 In other words, all requests for a .jsp (or .faces) page is 
 mapped to the
 same servlet regardless of the domain. And that the servlet 
 name is not
 needed as part of the url.
 
 How can I do this?
 
 Thanks - dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



RE: Asking again: Final questions: Default pages

2005-09-12 Thread Allistair Crossley
Hi,

The part you are terming the servlet name is actually the web application name. 
As far as I am aware the only way to do what you need is

- Run the store web application as ROOT
- Implement a URL rewriting system

Allistair.

 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 12 September 2005 17:21
 To: 'Tomcat Users List'
 Subject: RE: Asking again: Final questions: Default pages
 
 
 Hi;
 
 What I am trying to do is beable to have a url of 
 www.windward.net/cart.jsp
 instead of www.windward.net/stroe/cart.jsp. Is there any way 
 to get the
 servlet name out of the url for the default servlet?
 
 Thanks - dave
 
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
 Sent: Monday, September 12, 2005 10:07 AM
 To: Tomcat Users List
 Subject: RE: Asking again: Final questions: Default pages
 
 Hi,
 
 Just don't bother putting the domain in the mapping from IIS 
 to Tomcat, e.g
 
 /*.jsp=ajp13
 
 would capture both domain requests and forward to Tomcat.
 
 Allistair.
 
  -Original Message-
  From: David Thielen [mailto:[EMAIL PROTECTED]
  Sent: 12 September 2005 17:03
  To: 'Tomcat Users List'
  Subject: Asking again: Final questions: Default pages
  
  
  
  Hi;
  
  I have multiple domains on my website (IIS). I would like to do the
  following.
  
  When a user goes to http://www.windward.net/cart.jsp or
  http://www.windwardreports.com/cart.jsp that it then loads 
  the jsp page in
  the root of a specific webapp of mine.
  
  In other words, all requests for a .jsp (or .faces) page is 
  mapped to the
  same servlet regardless of the domain. And that the servlet 
  name is not
  needed as part of the url.
  
  How can I do this?
  
  Thanks - dave
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
 ---
 QAS Ltd.
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474
 ---
 /FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
 Disclaimer:  The information contained within this e-mail is 
 confidential
 and may be privileged. This email is intended solely for the 
 named recipient
 only; if you are not authorised you must not disclose, copy, 
 distribute, or
 retain this message or any part of it. If you have received 
 this message in
 error please contact the sender at once so that we may take 
 the appropriate
 action and avoid troubling you further.  Any views expressed 
 in this message
 are those of the individual sender.  QAS Limited has the 
 right lawfully to
 record, monitor and inspect messages between its employees 
 and any third
 party.  Your messages shall be subject to such lawful 
 supervision as QAS
 Limited deems to be necessary in order to protect its information, its
 interests and its reputation.  
 
 Whilst all efforts are made to safeguard Inbound and Outbound 
 emails, QAS
 Limited cannot guarantee that attachments are virus free or 
 compatible with
 your systems and does not accept any liability in respect of 
 viruses or
 computer problems experienced.
 /FONT
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: Desperate: trying to get Tomcat working through IIS

2005-09-09 Thread Allistair Crossley
if your uriworkermap.properties file contains 

/servlet-examples/*=ajp13w
!/servlet-examples/*.jpeg=ajp13w

then why are you expecting 

http://localhost/jsp-examples/index.html 

to work? For that, you'd need to add

/jsp-examples/*=ajp13w

(and restart IIS)

Allistair.

 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 09 September 2005 00:50
 To: tomcat-user@jakarta.apache.org
 Subject: Desperate: trying to get Tomcat working through IIS
 
 
 Hi;
 
  
 
 I followed the instructions in
 http://jakarta.apache.org/tomcat/connectors-doc/howto/iis.html
  It references
 for configuring Tomcat with IIS 5 and 6 with a link - but 
 the link is dead
 and a search in the wiki it goes to shows nothing. I rebooted after
 installing before attempting to connect.
 
  
 
 When I go to http://localhost:8080/jsp-examples/index.html - 
 it works. When
 I go to http://localhost/jsp-examples/index.html I get an error 404.
 
  
 
 My IIS log is:
 
 #Software: Microsoft Internet Information Services 5.1
 
 #Version: 1.0
 
 #Date: 2005-09-08 23:37:35
 
 #Fields: time c-ip cs-method cs-uri-stem sc-status 
 
 23:37:35 127.0.0.1 GET /jsp-examples/index.html 404
 
  
 
 My isapi_redirect.log log file is created, but is empty.
 
  
 
 I used the isapi_redirect-1.2.14.exe setup program, then checked the
 registry settings and they all appear to be correct. I 
 followed every step
 in the howto except the ones done by the setup program.
 
  
 
 My uriworkermap.properties is:
 
 /servlet-examples/*=ajp13w
 
 !/servlet-examples/*.jpeg=ajp13w
 
  
 
 My workers.properties.minimal is:
 
 worker.list=ajp13w
 
 worker.ajp13w.type=ajp13
 
 worker.ajp13w.host=localhost
 
 worker.ajp13w.port=8009
 
  
 
 My server.xml includes (only node with ajp in it):
 
 Connector port=8009 
 
enableLookups=false redirectPort=8443 
 protocol=AJP/1.3
 /
 
  
 
  
 
 Please help - I'm desperate.
 
  
 
 Thanks - dave
 
  
 
  
 
 David Thielen
 
 303-499-2544
 
 www.windwardreports.com http://www.windwardreports.com/ 
 
  
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: where to place the /META-INF/context.xml file?

2005-09-09 Thread Allistair Crossley
Hi,

The META-INF/context.xml is one way in which a *web application context* can be 
configured, not Tomcat itself per se, although it is an instruction on behalf 
of the web application *to* Tomcat about what *it* needs Tomcat to setup for 
itself, e.g database pools, environment vars or whatever. 

Yes /MyWebApp/META-INF would be correct, as per the servlet spec for web 
application structure.

Allistair.

 -Original Message-
 From: Ben Wong [mailto:[EMAIL PROTECTED]
 Sent: 09 September 2005 05:26
 To: tomcat-user@jakarta.apache.org
 Subject: where to place the /META-INF/context.xml file?
 
 
 Hi,
  
 Apologies, but this is a newbie question. In the tomcat docs, 
 it states that
  
 A /META-INF/context.xml file can be used to define Tomcat 
 specific configuration...
  
 Could you please tell me where /META-INF/context.xml should 
 be placed relative to the web application root? In other 
 words, if I have a web application in a directory /MyWebApp, 
 should the /META-INF  be at   /MyWebApp/META-INF or should it 
 be under /WEB-INF?
  
 Thanks.
  
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Desperate: trying to get Tomcat working through IIS

2005-09-09 Thread Allistair Crossley
Hi,

Can you list the registry settings in Apache Software Foundation/Isapi 
Redirector ..

Can you check that your website has the ISAPI filter installed with a green 
arrow pointed up?

Cheers, Allistair

 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 09 September 2005 17:16
 To: 'Tomcat Users List'
 Subject: RE: Desperate: trying to get Tomcat working through IIS
 
 
 First off - THANK YOU. It's amazing how it's so often a dumb 
 little thing.
 
 Second, I'm getting a lot closer. I now get the following in 
 the IIS log:
 16:10:38 127.0.0.1 GET /servlet-examples/index.html 200
 
 The isapi_redirect.log is still empty (0 bytes).
 
 The jakarta virtual directory is set to Execute Permissions: 
 Scripts and
 Executables.
 
 Any ideas?
 
 Thanks - dave
 
 David Thielen
 303-499-2544
 www.windwardreports.com
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 09, 2005 1:57 AM
 To: Tomcat Users List
 Subject: RE: Desperate: trying to get Tomcat working through IIS
 
 if your uriworkermap.properties file contains 
 
 /servlet-examples/*=ajp13w
 !/servlet-examples/*.jpeg=ajp13w
 
 then why are you expecting 
 
 http://localhost/jsp-examples/index.html 
 
 to work? For that, you'd need to add
 
 /jsp-examples/*=ajp13w
 
 (and restart IIS)
 
 Allistair.
 
  -Original Message-
  From: David Thielen [mailto:[EMAIL PROTECTED]
  Sent: 09 September 2005 00:50
  To: tomcat-user@jakarta.apache.org
  Subject: Desperate: trying to get Tomcat working through IIS
  
  
  Hi;
  
   
  
  I followed the instructions in
  http://jakarta.apache.org/tomcat/connectors-doc/howto/iis.html
   It references
  for configuring Tomcat with IIS 5 and 6 with a link - but 
  the link is dead
  and a search in the wiki it goes to shows nothing. I rebooted after
  installing before attempting to connect.
  
   
  
  When I go to http://localhost:8080/jsp-examples/index.html - 
  it works. When
  I go to http://localhost/jsp-examples/index.html I get an error 404.
  
   
  
  My IIS log is:
  
  #Software: Microsoft Internet Information Services 5.1
  
  #Version: 1.0
  
  #Date: 2005-09-08 23:37:35
  
  #Fields: time c-ip cs-method cs-uri-stem sc-status 
  
  23:37:35 127.0.0.1 GET /jsp-examples/index.html 404
  
   
  
  My isapi_redirect.log log file is created, but is empty.
  
   
  
  I used the isapi_redirect-1.2.14.exe setup program, then checked the
  registry settings and they all appear to be correct. I 
  followed every step
  in the howto except the ones done by the setup program.
  
   
  
  My uriworkermap.properties is:
  
  /servlet-examples/*=ajp13w
  
  !/servlet-examples/*.jpeg=ajp13w
  
   
  
  My workers.properties.minimal is:
  
  worker.list=ajp13w
  
  worker.ajp13w.type=ajp13
  
  worker.ajp13w.host=localhost
  
  worker.ajp13w.port=8009
  
   
  
  My server.xml includes (only node with ajp in it):
  
  Connector port=8009 
  
 enableLookups=false redirectPort=8443 
  protocol=AJP/1.3
  /
  
   
  
   
  
  Please help - I'm desperate.
  
   
  
  Thanks - dave
  
   
  
   
  
  David Thielen
  
  303-499-2544
  
  www.windwardreports.com http://www.windwardreports.com/ 
  
   
  
  
 
 
 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
 ---
 QAS Ltd.
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474
 ---
 /FONT
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: IIS6 - ASP.Net - JK - TC5 - tomcatAuthentication=false: user auth not getting passed?

2005-09-07 Thread Allistair Crossley
Hi,

You probably need to ensure that the IIS virtual directory for the jakarta dll 
has Directory Security set to Windows Integrated?

Allistair.

 -Original Message-
 From: Tracy Spratt [mailto:[EMAIL PROTECTED]
 Sent: 07 September 2005 01:03
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: IIS6 - ASP.Net - JK - TC5 - 
 tomcatAuthentication=false: user
 auth not getting passed?
 
 
 I want to pass authorization from my dot.Net app to the Tomcat app.
 
 Unsecured, everything is working fine: IIS runs the asp.net app, which
 in turn loads the Tomcat app (a Macromedia Flex app to be specific).
 
 But the asp.net app is secured, and the JK - isapi_redirect 
 allows users
 to directly access the Tomcat app, which is not desired.
 
 To start with, I have configured basic security, protected the
 application with a security-constraint, and tested it with direct
 calls to the TC server / app, and all worked as expected.  
 
 However when I set the tomcatAuthentication=false, my 
 Tomcat app does
 not run, and judging by the RequestDumperValve output, IIS is not
 passing the user name to Tomcat, and it also reports status 403.
 
 My long term goal is to use the asp.net authentication in the Tomcat
 app, but in the short run I would just like to get anything working,
 like the Windows user for example.
 
 Any suggestions will be appreciated.  I have included a listing of the
 RequestDumperValve output below.
 
 Tracy Spratt
 
 Catalina_log:
 
  REQUEST URI
 =/flex/ltApplications/Clients/Patterson/FirePump.mxml.swf
authType=
   characterEncoding=null
   contentLength=0
 contentType=null
 contextPath=/flex
  cookie=ASP.NET_SessionId=hqoaxr45jokfpzabz4giluft
  
 cookie=Authenticate=7808CB3E915F5EBD2AC05801D91542013C4B04B393
 12E1B2335B
 32395880A6C05638E108982CA4917853D032EC9EFD47EB20A56448A23EF366
 5B48F57F49
 BD387D254B570373404A
  header=connection=Keep-Alive
  header=accept=*/*
  header=accept-encoding=gzip, deflate
  header=cookie=ASP.NET_SessionId=hqoaxr45jokfpzabz4giluft;
 Authenticate=7808CB3E915F5EBD2AC05801D91542013C4B04B39312E1B23
 35B3239588
 0A6C05638E108982CA4917853D032EC9EFD47EB20A56448A23EF3665B48F57
 F49BD387D2
 54B570373404A
  header=host=www.lariatinc.com
  header=if-modified-since=Thu, 01 Sep 2005 21:43:30 GMT
  header=user-agent=Mozilla/4.0 (compatible; MSIE 6.0;
 Windows NT 5.1; SV1; .NET CLR 1.1.4322)
  header=x-flash-version=7,0,35,29
  header=content-length=0
  locale=en_US
  method=GET
pathInfo=null
protocol=HTTP/1.1
 queryString=null
  remoteAddr=172.31.255.55
  remoteHost=172.31.255.55
  remoteUser=
  requestedSessionId=null
  scheme=http
  serverName=www.lariatinc.com
  serverPort=80
 
 servletPath=/ltApplications/Clients/Patterson/FirePump.mxml.swf
isSecure=false
  ---
  ---
authType=
   contentLength=-1
 contentType=null
 message=null
  remoteUser=
  status=403
  ===
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



Different behaviour for log4j configuration from common/classes and WEb-INF/classes

2005-09-07 Thread Allistair Crossley
Hi,
 
We've recently noticed that our log4j configuration logs are pretty empty. I 
decided I must have changed something that ruptured the configuration, so with 
a brand new installation of Tomcat 5.5.11 and a basic log4j config file (shown 
below) I set about testing what was happening.
 
Before taking you through the steps, you will see that the log4j file 
configures appenders for apache, hibernate and spring. As soon as Tomat 
initialises the web application I am testing, both hibernate and spring 
initialiizations take place.
 
Test 1
 
1. Brand new installation of 5.5.11
2. Deploy web application manually 
3. Add log4j.properties to web app's WEB-INF/classes
4. Add log4j1.2.9.jar to web app's WEB-INF/lib
5. Start Tomcat
 
I move to the Tomcat logs folder (empty) and wait. The stdout_date.log is 
created (as Tomcat is running as a Windows Service). I see a visible delay of 
10 seconds or so with the file size increasing in this log file (non-log4j) 
before the log4j configured logs appear. When Tomcat has fully started up (29s) 
I note that the log4j logs have no logging, and that the stdout log has 
collected all the web app's hibernate and spring logging.
 
Test 2
 
0. Clear logs folder
1. Delete log4j.properties from web app's WEB-INF/classes
2. Copy log4j.propeties to catalina.home/common/classes
3. Copy log4j1.2.9.jar to catalina.home/common/lib
4. Copy commons-logging.jar to catalina.home/common/lib
5. Start Tomcat
 
I move to the Tomcat logs folde (empty) and wait. This time, the log4j 
configured logs appear instantly and all at once. A delay takes place until the 
web app is initialized whereupon hibernate and spring logging starts getting 
fed into the appropriate logs as desired.
 
Conclusion
 
When the same log4j configuration is used in Tomcat's common/classes (which I 
presume is first to be loaded by the class loader) the log configuration is 
immediately available and the correct behaviour takes place by the time the web 
application's classes and libs are loaded.
 
When the same log4j configuration is used within the web application only, the 
logs are created what appears too late and all logging is dumped into the 
stdout log.
 
Is this known or understood by anyone?
 
Thanks, Allistair.
 
== log4j.properties ==
 
log4j.rootLogger=DEBUG, RootA
 
log4j.appender.RootA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RootA.File=${catalina.home}/logs/iq-Root.log
log4j.appender.RootA.layout=org.apache.log4j.PatternLayout
log4j.appender.RootA.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
log4j.appender.RootA.DatePattern=.-MM-dd
 
# Apache
 
log4j.appender.ApacheA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ApacheA.File=${catalina.home}/logs/iq-Api-Apache.log
log4j.appender.ApacheA.layout=org.apache.log4j.PatternLayout
log4j.appender.ApacheA.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
log4j.appender.ApacheA.DatePattern=.-MM-dd
 
log4j.logger.org.apache=INFO, ApacheA
log4j.additivity.org.apache=false
 
# Hibernate
 
log4j.appender.HibernateA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.HibernateA.File=${catalina.home}/logs/iq-Api-Hibernate.log
log4j.appender.HibernateA.layout=org.apache.log4j.PatternLayout
log4j.appender.HibernateA.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
log4j.appender.HibernateA.DatePattern=.-MM-dd
 
log4j.logger.org.hibernate=DEBUG, HibernateA
log4j.additivity.org.hibernate=false
 
# Spring
 
log4j.appender.SpringA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.SpringA.File=${catalina.home}/logs/iq-Api-Spring.log
log4j.appender.SpringA.layout=org.apache.log4j.PatternLayout
log4j.appender.SpringA.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
log4j.appender.SpringA.DatePattern=.-MM-dd
 
log4j.logger.org.springframework=DEBUG, SpringA
log4j.additivity.org.springframework=false
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT



Undeploy leaves residual files

2005-08-26 Thread Allistair Crossley
Hi,
 
I've noticed that undeploy of my web applications that the ROOT folder is left 
behind as follows;
 
ROOT
  WEB-INF
classes
  log4j.properties
lib
  ehcache.jar
  struts.jar
 
The web application has a ContextListener that calls LogManager shutdowns and 
Introspector.flushCaches and so fourth to attempt to release resources. Is this 
part of that kind of problem? 
 
Regards, Allistair.



FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT



RE: upgrade to 5

2005-08-26 Thread Allistair Crossley
Hi there,

Of course you can, you just need to be aware of what elements of Tomcat you 
need to configure, e.g JNDI resources and so on and then lookup the way you do 
that in Tomcat 5. It's not a *far* cry from Tomcat 3/4, you still use 
server.xml for a bunch of stuff, but it's recommended that you configure your 
Context using a separate file. It's all online, just be aware of what 
configuration you need, look at the docs, and test. Make a backup of course.

Allistair.

 -Original Message-
 From: David Ellis [mailto:[EMAIL PROTECTED]
 Sent: 26 August 2005 16:46
 To: Tomcat Users List
 Subject: upgrade to 5
 
 
 Hello,
 
 I'm extremely new to all this.  I was wondering if it is 
 possible to upgrade
 from tomcat version 3.2.3 to version 5?
 
 I've read that the upgrade from version 3 to 4 was difficult, 
 so my guess is
 that I will have to go to version 4 before I can go to 5.
 
 Thanks
 
 Dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: upgrade to 5

2005-08-26 Thread Allistair Crossley
Hey,

Yep, there's always toothache to be had with these things :) 

Cheers, Allistair.

 -Original Message-
 From: David Ellis [mailto:[EMAIL PROTECTED]
 Sent: 26 August 2005 16:55
 To: Tomcat Users List
 Subject: Re: upgrade to 5
 
 
 Thanks, that's somewhat of a relief, although I'm sure I have 
 plenty of work
 cut out for me :)
 
 Off I go
 
 - Original Message - 
 From: Allistair Crossley [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Sent: Friday, August 26, 2005 11:48 AM
 Subject: RE: upgrade to 5
 
 
  Hi there,
 
  Of course you can, you just need to be aware of what 
 elements of Tomcat
 you need to configure, e.g JNDI resources and so on and then 
 lookup the way
 you do that in Tomcat 5. It's not a *far* cry from Tomcat 
 3/4, you still use
 server.xml for a bunch of stuff, but it's recommended that 
 you configure
 your Context using a separate file. It's all online, just be 
 aware of what
 configuration you need, look at the docs, and test. Make a 
 backup of course.
 
  Allistair.
 
   -Original Message-
   From: David Ellis [mailto:[EMAIL PROTECTED]
   Sent: 26 August 2005 16:46
   To: Tomcat Users List
   Subject: upgrade to 5
  
  
   Hello,
  
   I'm extremely new to all this.  I was wondering if it is
   possible to upgrade
   from tomcat version 3.2.3 to version 5?
  
   I've read that the upgrade from version 3 to 4 was difficult,
   so my guess is
   that I will have to go to version 4 before I can go to 5.
  
   Thanks
  
   Dave
  
  
   
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  
 
 
  FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
  ---
  QAS Ltd.
  Registered in England: No 2582055
  Registered in Australia: No 082 851 474
  ---
  /FONT
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: system.property in web.xml

2005-08-25 Thread Allistair Crossley
Hi,

This is not mandated by the Servlet specification. What you *could* do is write 
a servlet that is mapped in web.xml and set init parameters for that servlet. 
Also set the load-on-startup to 1. Then in the servlet init method you can 
extract the init parametes and call System.setProperty for each.

Allistair.

 -Original Message-
 From: Davide Frigerio [mailto:[EMAIL PROTECTED]
 Sent: 25 August 2005 08:00
 To: tomcat-user@jakarta.apache.org
 Subject: system.property in web.xml
 
 
 Hi,
 I would ask to you if is possible to set a java 
 system.property for
 a web application by web.xml file application.
  
 Thanks.
 
 -- 
 
 --
 Davide Ing. Frigerio
 Wise-Lab S.r.l.
 c/o Polo Regionale di Como - Politecnico di Milano
 P.le Gerbetto, 6  -  22100 Como (Italy)
 Tel: +39 031 332 7362 - Fax: +39 031 332 7321
 Email: davide.frigerio/at/wise-lab.it
 Web: http://www.wise-lab.it - http://www.wisemodel.com
 --
 
 Leggi l'informativa in base all'art.13 del D.lgs. 30 giugno 
 2003, 196 sul trattamento
 dei dati personali da parte di Wise-Lab: 
 http://www.wise-lab.it/info_privacy.htm
 
 *
 Scarica il nuovo web browser FireFox, l'alternativa SICURA ad 
 Internet Explorer: Get Firefox! 
 http://www.spreadfirefox.com/?q=affiliatesid=28607t=1
 *
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



Client Deployer 5.5.11 NullPointerException

2005-08-25 Thread Allistair Crossley
Hi,
 
I've decided to try out the Deployer tool for the first time to see if it makes 
like a little easier for deployments to our test servers. 
 
I've used the 5.5.11 Alpha Deployer as I noted some threads indicating a 
problem with 5.5.9's version. 
 
I've come across the following when running it pretty much out of box. I setup 
a deployer.properties file. Am I missing some kind of classpath or could this 
be caused by a file in my web application?
 
Regards, Allistair.
 
compile:
 [copy] Copying 2235 files to C:\deployer-intratest\build\webapp
 [copy] Copied 521 empty directories to 2 empty directories under C:\d
r-intratest\build\webapp
  [jasper2] java.lang.NullPointerException
  [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler(
pilationContext.java:220)
  [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:913)
  [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1061)
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Met
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMetho
sorImpl.java:39)
  [jasper2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegat
hodAccessorImpl.java:25)
  [jasper2] at java.lang.reflect.Method.invoke(Method.java:585)
  [jasper2] at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.ja
)
  [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElem
va:269)
  [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364)
  [jasper2] at org.apache.tools.ant.Target.execute(Target.java:301)
  [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:32
  [jasper2] at org.apache.tools.ant.Project.executeTarget(Project.java
 
  [jasper2] at org.apache.tools.ant.Project.executeTargets(Project.jav
)
  [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:632)
  [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:183)
  [jasper2] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:
  [jasper2] at org.apache.tools.ant.launch.Launcher.main(Launcher.java
 
BUILD FAILED
C:\deployer-intratest\build.xml:45: org.apache.jasper.JasperException
 
Total time: 1 minute 33 seconds


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT



RE: Client Deployer 5.5.11 NullPointerException

2005-08-25 Thread Allistair Crossley
Hi,

No I don't think that's it, both ant and javac work on my command line. I do 
use Ant for build, I'm just trying deployer for the first time. JAVA_HOME, 
ANT_HOME are also both defined. Ant is also the latest version 1.6.5

C:\deployerjavac
Usage: javac options source files
where possible options include:
  -g Generate all debugging info
  -g:noneGenerate no debugging info
  -g:{lines,vars,source} Generate only some debugging info
  -nowarnGenerate no warnings
  -verbose   Output messages about what the compiler is doing
  -deprecation   Output source locations where deprecated APIs are u
sed
  -classpath path  Specify where to find user class files
  -cp path Specify where to find user class files
  -sourcepath path Specify where to find input source files
  -bootclasspath path  Override location of bootstrap class files
  -extdirs dirsOverride location of installed extensions
  -endorseddirs dirs   Override location of endorsed standards path
  -d directory Specify where to place generated class files
  -encoding encoding   Specify character encoding used by source files
  -source release  Provide source compatibility with specified release

  -target release  Generate class files for specific VM version
  -version   Version information
  -help  Print a synopsis of standard options
  -X Print a synopsis of nonstandard options
  -Jflag   Pass flag directly to the runtime system

-- snip --

C:\deployerant -Dserver=webtest compile
Buildfile: build.xml

clean:
   [delete] Deleting directory C:\deployer\build

compile:
 [copy] Copying 500 files to C:\deployer\build\webapp\ROOT
 [copy] Copied 165 empty directories to 1 empty directory under C:\deployer\
build\webapp\ROOT
  [jasper2] java.lang.NullPointerException
  [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler(JspCom
pilationContext.java:220)
  [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:913)
  [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1061)
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
  [jasper2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
  [jasper2] at java.lang.reflect.Method.invoke(Method.java:585)
  [jasper2] at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123
)
  [jasper2] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
  [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364)
  [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341)
  [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [jasper2] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1216)
  [jasper2] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)

  [jasper2] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:40)
  [jasper2] at org.apache.tools.ant.Project.executeTargets(Project.java:1068
)
  [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:668)
  [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:187)
  [jasper2] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
  [jasper2] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

BUILD FAILED
C:\deployer\build.xml:45: org.apache.jasper.JasperException

Total time: 7 seconds

Many thanks, Allistair.

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]
 Sent: 25 August 2005 12:40
 To: Tomcat Users List
 Subject: Re: Client Deployer 5.5.11 NullPointerException
 
 
 On 8/25/05, Allistair Crossley [EMAIL PROTECTED] wrote:
  Hi,
  
  I've decided to try out the Deployer tool for the first 
 time to see if it makes like a little easier for deployments 
 to our test servers.
  
  I've used the 5.5.11 Alpha Deployer as I noted some threads 
 indicating a problem with 5.5.9's version.
  
  I've come across the following when running it pretty much 
 out of box. I setup a deployer.properties file. Am I missing 
 some kind of classpath or could this be caused by a file in 
 my web application?
  
 
 No Java compiler available. With the deployer package, you're supposed
 to be using Ant+javac (given that Ant wants JAVA_HOME and likes a
 JDK). If not, add the JDT JAR that is in common/lib.
 
 -- 
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1

RE: Client Deployer 5.5.11 NullPointerException

2005-08-25 Thread Allistair Crossley
Hi,

I'd really love to I assure you, but I really don't 

a) have years and years of architecting Tomcat development to trace through how 
Jasper2 works and 
b) the time whilst I am sat here working for a corporation trying to get Tomcat 
working for the business

For what it's worth (which is nothing I realise) I do realise that 
jspCompiler.init(this, jsw) is throwing the exception because the jspCompiler 
returned from the compiler = (Compiler) Class.forName(className).newInstance(); 
is null due to what must be a CNFE (looks like logging is needed there). I also 
see that this was why you asked me to copy the JDT compiler jar from common/lib 
into the deployer/lib. 

However, I did just that, and this still does not solve the resolution of the 
compiler class. Can I clarify that wnated me to copy 
common/lib/jasper-compiler-jdt.jar into deployer/lib? 

Finally, is it documented anywhere that deployer won't work out of the box? If 
not, I'd be happy to make a comment on the Deployer doc page.

Regards, Allistair.

 */
public Compiler createCompiler() throws JasperException {
if (jspCompiler != null ) {
return jspCompiler;
}
jspCompiler = null;
if (options.getCompiler() == null) {
jspCompiler = 
createCompiler(org.apache.jasper.compiler.JDTCompiler);
if (jspCompiler == null) {
jspCompiler = 
createCompiler(org.apache.jasper.compiler.AntCompiler);
}
} else {
jspCompiler = 
createCompiler(org.apache.jasper.compiler.AntCompiler);
if (jspCompiler == null) {
jspCompiler = 
createCompiler(org.apache.jasper.compiler.JDTCompiler);
}
}
jspCompiler.init(this, jsw);
return jspCompiler;
}

private static Compiler createCompiler(String className) {
Compiler compiler = null; 
try {
compiler = (Compiler) Class.forName(className).newInstance();
} catch (Throwable t) {
// Log ?
// FIXME: log
}
return compiler;
}

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]
 Sent: 25 August 2005 13:05
 To: Tomcat Users List
 Subject: Re: Client Deployer 5.5.11 NullPointerException
 
 
 On 8/25/05, Allistair Crossley [EMAIL PROTECTED] wrote:
  Hi,
  
  No I don't think that's it, both ant and javac work on my 
 command line. I do use Ant for build, I'm just trying 
 deployer for the first time. JAVA_HOME, ANT_HOME are also 
 both defined. Ant is also the latest version 1.6.5
  
 
 Great. Then go look in the code and try to explain the exception by
 something other than No Java compiler available.
 
 -- 
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: jndi question

2005-08-25 Thread Allistair Crossley
Hi,

 The context.xml file is stored in META-INF during development 
 but needs 
 to be placed in Tomcat Folder/conf/Catalina/localhost/ folder for 
 deployment with the file name of the context path.

I don't think that's quite true. META-INF is a permanent valid location for 
context.xml, and does not affect deployment if /conf/Catalina/localhost/ does 
not have a file for the web application. We always keep context.xml only in 
META-INF.

However, if 2 are present this may cause issues as you say,

Allistair.

 -Original Message-
 From: Brian Cook [mailto:[EMAIL PROTECTED]
 Sent: 25 August 2005 14:39
 To: Tomcat Users List
 Subject: Re: jndi question
 
 
 Sean,
 
 One thing that stands out in your message is that the conext.xml file 
 was placed in the META-INF folder.  Is it also in Tomcat 
 Folder/conf/Catalina/localhost/ as the module name?  i.e. If the 
 context path name of your webapp is /seansApp the context.xml file 
 should appear in this folder as seansApp.xml.
 
 
 The context.xml file is stored in META-INF during development 
 but needs 
 to be placed in Tomcat Folder/conf/Catalina/localhost/ folder for 
 deployment with the file name of the context path.
 
 
 
 
 Sean Rowe wrote:
  I have tried again using the method described in the url 
 brian gave.  
  Here is the stack exception I'm receiving:
  
  *type* Exception report
  
  *message*
  
  *description* _The server encountered an internal error () that 
  prevented it from fulfilling this request._
  
  *exception*
  
  javax.servlet.ServletException: Name java:comp is not bound 
 in this Context
  
 org.apache.jasper.runtime.PageContextImpl.doHandlePageExceptio
 n(PageContextImpl.java:848) 
  
  
 org.apache.jasper.runtime.PageContextImpl.handlePageException(
 PageContextImpl.java:781) 
  
  org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:69)
  
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:322) 
  
  
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:291) 
  
  
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
  *root cause*
  
  javax.naming.NameNotFoundException: Name java:comp is not 
 bound in this 
  Context
  org.apache.naming.NamingContext.lookup(NamingContext.java:769)
  org.apache.naming.NamingContext.lookup(NamingContext.java:152)
  javax.naming.InitialContext.lookup(InitialContext.java:351)
  com.transcriptionportal.utils.DBManager.init(DBManager.java:25)
  org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:53)
  
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:322) 
  
  
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:291) 
  
  
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
  
  I have enclosed my server.xml, web.xml, context.xml (that i 
 placed in my 
  web/META-INF folder), and the class I'm using to make the 
 connection.  
  Thanks again to everyone who has helped me so far.
  
  sean
  
  Allistair Crossley wrote:
  
  Hi,
 
  He isn't using that method of configuration, that's just 1 
 option of 
  3. He is nesting his Context definition within the server.xml Host 
  element. Although this is now scorned, it's still valid. 
 The 2 other 
  methods are contextname.xml as you say, and also 
 META-INF/context.xml 
  within the webapp itself. Allistair.
 
   
 
  -Original Message-
  From: Brian Cook [mailto:[EMAIL PROTECTED]
  Sent: 23 August 2005 17:23
  To: Tomcat Users List
  Subject: Re: jndi question
 
 
 
  Ok but do you have the resource defined in context.xml?  
 If you go to 
  Tomcat Dir/conf/Cataliana/localhost/ do you see a 
 file with the 
  name of the module ending with .xml?  If so is the 
 resource defined 
  in that file?  If not you need to add it.
 
  From the description it sounds like nothing in this set 
 up has been 
  done as was show on the example page.
 
  http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources
  -howto.html
 
  If you use the code block that is shown, define that resource in 
  web.xml and context.xml it will work.  But multiple 
 postings latter 
  it still sounds like the JNDI resource is not defined in 
 context.xml 
  and the code calling the JNDI resource differs greatly from the 
  example provided.
 
 
  Sean Rowe wrote:

 
  The first post on this included the server.xml, and further 
 
  down in the   
 
  page is the relevant part of web.xml ( i just double 
 
  checked

RE: Client Deployer 5.5.11 NullPointerException

2005-08-25 Thread Allistair Crossley
Hi,

Hm :( 

Are you able to clarify what you mean by a well configured Ant which is able 
to use a Java compiler. Perhaps this is where the problem lies? 

My Ant setup is such that I have ANT_HOME and JAVA_HOME env vars set. I have 
ANT_HOME/bin and JAVA_HOME/bin on the PATH. The ant and javac commands work on 
the command line. I can run the Tomcat build script and many other build 
scripts with ant to build software (including Tomcat).

This for me looks like at least a configured Ant. Am I missing some link that 
you know of?

In terms of installing the deployer, I literally did the following:

1. Downloaded 5.5.11-alpha Deployer
2. Unzipped to c:\jakarta-tomcat-5.5.11-deployer
3. Created deployer.properties, setting the 4 or 5 properties required for the 
web application
4. Moved to c:\jakarta-tomcat-5.5.11-deployer
5. Executed ant compile
6. File copy works etc... but then I get the exception with the jasper2 task.

Then I got your suggestion

7. Copy jdt compiler jar frmo common/lib to 
c:\jakarta-tomcat-5.5.11-deployer\lib
8. Executed ant compile

Same error occurs however. I don't _think_ I have done anything funny but you 
never know ;)

Your help is appreciated, Allistair.

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]
 Sent: 25 August 2005 14:55
 To: Tomcat Users List
 Subject: Re: Client Deployer 5.5.11 NullPointerException
 
 
 On 8/25/05, Allistair Crossley [EMAIL PROTECTED] wrote:
  Hi,
  
  I'd really love to I assure you, but I really don't
  
  a) have years and years of architecting Tomcat development 
 to trace through how Jasper2 works and
  b) the time whilst I am sat here working for a corporation 
 trying to get Tomcat working for the business
  
  For what it's worth (which is nothing I realise) I do 
 realise that jspCompiler.init(this, jsw) is throwing the 
 exception because the jspCompiler returned from the compiler 
 = (Compiler) Class.forName(className).newInstance(); is null 
 due to what must be a CNFE (looks like logging is needed 
 there). I also see that this was why you asked me to copy the 
 JDT compiler jar from common/lib into the deployer/lib.
  
  However, I did just that, and this still does not solve the 
 resolution of the compiler class. Can I clarify that wnated 
 me to copy common/lib/jasper-compiler-jdt.jar into deployer/lib?
  
 
 Of course. No compiler is found, so you should add one.
 
  Finally, is it documented anywhere that deployer won't work 
 out of the box? If not, I'd be happy to make a comment on the 
 Deployer doc page.
  
 
 The deployer does work out of the box, assuming you have a well
 configured Ant which is able to use a Java compiler. So you did
 something funny :)
 
 -- 
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Client Deployer 5.5.11 NullPointerException

2005-08-25 Thread Allistair Crossley
Well that's really unexpected. The only other 2 differences are perhaps that I 
am on Windows, and that I did this with the 5.5.11-alpha download from the 
site. I can't think of anything else if you say that copying the JDT jar should 
work. It simply doesn't here and I have tested this with pure downloads with no 
interference or funny business.

I've been able to move forward with deployer by commenting out the jasper2 task 
in the build.xml file at least which is something, although I see that undeploy 
fails to remove all libs in the WEB-INF/lib which goes on to cause a redeploy 
problems, but that's anothe thread to be had ;)

It looks like I will just have to continue with commenting out jasper2 for now 
as I am simply out of ideas and I cannot reduce the problem any more, my Ant 
and Javac work well independently of deployer.

Thanks for your help, perhaps something will come to me, Allistair.

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]
 Sent: 25 August 2005 15:56
 To: Tomcat Users List
 Subject: Re: Client Deployer 5.5.11 NullPointerException
 
 
 On 8/25/05, Remy Maucherat [EMAIL PROTECTED] wrote:
  To start with something, I use a known-to-be-working Ant 
 1.6.2 release.
 
 I just installed and tested with 1.6.5, and it works too. I just added
 some debug logging too for the classloading exceptions.
 
 -- 
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Client Deployer 5.5.11 NullPointerException

2005-08-25 Thread Allistair Crossley
Thanks, that's good to know, it must be something to do with my environment. 
Are you saying then that you did not have to copy any JDT jars into your 
deployer? How have you setup Ant? In any specific manner?

Best, Allistair.

 -Original Message-
 From: Markus Schönhaber [mailto:[EMAIL PROTECTED]
 Sent: 25 August 2005 16:56
 To: Tomcat Users List
 Subject: Re: Client Deployer 5.5.11 NullPointerException
 
 
 Am Donnerstag, 25. August 2005 17:03 schrieb Allistair Crossley:
  Well that's really unexpected. The only other 2 differences 
 are perhaps
  that I am on Windows, and that I did this with the 
 5.5.11-alpha download
  from the site. I can't think of anything else if you say 
 that copying the
  JDT jar should work. It simply doesn't here and I have 
 tested this with
  pure downloads with no interference or funny business.
 
 I also tried it on Windows, also using the 5.5.11-alpha 
 deployer downloaded 
 from the jakarta site. It works OOTB.
 So, if Rémy thinks there's something funny with your setup, I 
 guess he's 
 propably right.
 
 Regards
   mks
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Client Deployer 5.5.11 NullPointerException

2005-08-25 Thread Allistair Crossley
Hi,

Thanks. Yeah something must be up I guess. Although my environment vars all 
look perfectly ok to me. Here they are echoed.

c:\echo %JAVA_HOME%
c:\Program Files\Java\jdk1.5.0_03

c:\echo %ANT_HOME%
c:\apache-ant-1.6.5

c:\echo %PATH%
c:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;c:\apache-ant-1.6.5\bin;C:\Pro
gram Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\GNU\WinCvs 1.3\CV
SNT;C:\jvmstat-3_0\jvmstat\bin;C:\PROGRA~1
\QAS\QUICKA~2;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\ba
ckburner 2\;C:\Program Files\Java\jdk1.5.0_03\bin

I need to go home now, I've not had a good day with deployer. It's 3/4 there, 
just need the last 1/4 :)

Thanks, Allistair.

 -Original Message-
 From: Markus Schönhaber [mailto:[EMAIL PROTECTED]
 Sent: 25 August 2005 17:12
 To: Tomcat Users List
 Subject: Re: Client Deployer 5.5.11 NullPointerException
 
 
 Am Donnerstag, 25. August 2005 17:57 schrieb Allistair Crossley:
  Thanks, that's good to know, it must be something to do with my
  environment. Are you saying then that you did not have to 
 copy any JDT jars
  into your deployer?
 
 No, I didn't have to copy any jars since ant uses sun's javac 
 from tools.jar 
 in JAVA_HOME by default. If it doesn't for you, then there's 
 something wrong.
 
  How have you setup Ant? In any specific manner? 
 
 I extracted the zip, set ANT_HOME accordingly and added 
 %ANT_HOME%\bin to 
 PATH.
 
 Regards
   mks
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI and Connection Pooling?

2005-08-24 Thread Allistair Crossley
Hey Ian,

Great that you got that working in the end. Did you find out what caused the 
issues? I'm not convinced you need to use the ConnectionPoolDataSource, since 
that's what DBCP is doing for you (I think - please someone correct me if I am 
wrong). You could try using javax.sql.ConnectionPoolDataSource in your res-type 
and in the JNDI configuration, but I am not sure if DBCP will allow you to do 
that. Have a go. I just use the DataSource implementation and we've had great 
success and performance with it.

Cheers, Allistair.

 -Original Message-
 From: Wylie, Ian [mailto:[EMAIL PROTECTED]
 Sent: 24 August 2005 12:33
 To: Tomcat Users List
 Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server
 using JNDI and Connection Pooling?
 
 
 Hi Allistair,
 
 I just got the basic JNDI datasource working for MS SQL 
 Server with Tomcat
 5.5.
 
 I tried using the ConnectionPoolDataSource instead of the standard
 DataSource but I cannot get this working.
 
 Not sure whether I need to replace the
 res-typejavax.sql.DataSource/res-type with something else 
 in the web.xml
 file.
 
 I changed the driverclass name from the standard datasource class of
 com.microsoft.jdbc.sqlserver.SQLServerDriver - used with 
 standard datasource
 to the com.microsoft.jdbcx.sqlserver.SQLServerDataSource 
 class used by MS
 connection pooling in the 
 TOMCAT_HOME/conf/Catalina/localhost/webappname.xml
 file.  Also added the factory for PooledConnections -
 factory=com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFact
 ory to the
 TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. 
 
 Any ideas to get the MS Connection Pooling working, or is 
 there no need in
 Tomcat 5.5  -   In aother words does Tomcat 5.5 automatically 
 used Cnnection
 Pooling with a datasource??
 
 Many thanks for your help with this.
 
 Best Regards,
 
 Ian
 
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 16:05
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server
 usin g JNDI?
 
 
 Hi Wade,
 
 Can you perhaps resend the configuration files
 
 server.xml
 web.xml
 yourapp.xml
 listing of files in common/lib
 listing of files in yourapp/WEB-INF/lib
 
 Again?
 
 Cheers, Allistair.
 
  -Original Message-
  From: Wade Chandler [mailto:[EMAIL PROTECTED]
  Sent: 22 August 2005 17:58
  To: Tomcat Users List
  Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS 
 SQL Server
  usin g JNDI?
  
  
  --- Wylie, Ian [EMAIL PROTECTED] wrote:
  
   Allistair,
   
   My apologies for taking much longer than usual to
   get back to you but I had
   to finish some Java code that allowed us to upgrade
   our portal to PlumTree
   version 5.
   
   To clarify and answer your points below.
   
   1)  I have opted not to have a context.xml file in
   the META-INF directory
   but I am using the 
   TOMCAT_HOME/conf/Catalina/localhost/webappname.xml
   file
   instead.
   
   2)  I  have ensured that the 3 MS JAR files for the
   JDBC connection exist
   only in TOMCAT_HOME/common/lib and not in my webapp
   lib.
   
   3)  I have changed the java code to use a simple
   'DataSource' instead of a
   'ConnectionPoolDataSource' connection.  See Java
   code snippet below :-
   
   Unfortunately I still get the error below :-
   
   ERROR - NamingException - Config error with JNDI
   and
   datasource.javax.naming.NamingException: Cannot
   create resource instance
   ERROR com.webconnex.cognos.PORT.OMTLreport  : Cannot
   create resource
   instance
   
   I have attached my web.xml and
   TOMCAT_HOME/conf/Catalina/localhost/webappname.xml
   files for your perusal.
   
   
   I am of yet no further forward in solving my
   problem.
   
   Any further insight would be appreciated, as Tomcat
   5 allows me to do quite
   a few things better, not least of which is
   debugging!!
   
   
   Java Code snippet :-
   
  
  =
   
   logger.debug(Before
   InitialContext.) ;
   InitialContext ctx = new
   InitialContext();
   if (ctx == null) { 
   log(ERROR initialising
   InitialContext.) ;  
   logger.error(ERROR initialising
   InitialContext.) ;
   }
   log(Before Context.) ;
   ds = (DataSource)
   ctx.lookup(java:comp/env/jdbc/UKportalPool);
   
   log(Before initialising
   DataSource.) ;
   
   if(ds != null) {
   con = ds.getConnection();
   if (con != null) {
 
 if ((pType != null) 
   (!pType.equals()))
   {
 userDetails = new
   pfUsersBean(pType,
   posName, typeCD, firstLineProduct

RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI and Connection Pooling?

2005-08-24 Thread Allistair Crossley
Hi again,

By the way, you really ought to consider *not* using the MS drivers. jTDS at 
jtds.sourceforge.net is more performant.

Cheers, Allistair

 -Original Message-
 From: Wylie, Ian [mailto:[EMAIL PROTECTED]
 Sent: 24 August 2005 12:33
 To: Tomcat Users List
 Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server
 using JNDI and Connection Pooling?
 
 
 Hi Allistair,
 
 I just got the basic JNDI datasource working for MS SQL 
 Server with Tomcat
 5.5.
 
 I tried using the ConnectionPoolDataSource instead of the standard
 DataSource but I cannot get this working.
 
 Not sure whether I need to replace the
 res-typejavax.sql.DataSource/res-type with something else 
 in the web.xml
 file.
 
 I changed the driverclass name from the standard datasource class of
 com.microsoft.jdbc.sqlserver.SQLServerDriver - used with 
 standard datasource
 to the com.microsoft.jdbcx.sqlserver.SQLServerDataSource 
 class used by MS
 connection pooling in the 
 TOMCAT_HOME/conf/Catalina/localhost/webappname.xml
 file.  Also added the factory for PooledConnections -
 factory=com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFact
 ory to the
 TOMCAT_HOME/conf/Catalina/localhost/webappname.xml file. 
 
 Any ideas to get the MS Connection Pooling working, or is 
 there no need in
 Tomcat 5.5  -   In aother words does Tomcat 5.5 automatically 
 used Cnnection
 Pooling with a datasource??
 
 Many thanks for your help with this.
 
 Best Regards,
 
 Ian
 
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 16:05
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server
 usin g JNDI?
 
 
 Hi Wade,
 
 Can you perhaps resend the configuration files
 
 server.xml
 web.xml
 yourapp.xml
 listing of files in common/lib
 listing of files in yourapp/WEB-INF/lib
 
 Again?
 
 Cheers, Allistair.
 
  -Original Message-
  From: Wade Chandler [mailto:[EMAIL PROTECTED]
  Sent: 22 August 2005 17:58
  To: Tomcat Users List
  Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS 
 SQL Server
  usin g JNDI?
  
  
  --- Wylie, Ian [EMAIL PROTECTED] wrote:
  
   Allistair,
   
   My apologies for taking much longer than usual to
   get back to you but I had
   to finish some Java code that allowed us to upgrade
   our portal to PlumTree
   version 5.
   
   To clarify and answer your points below.
   
   1)  I have opted not to have a context.xml file in
   the META-INF directory
   but I am using the 
   TOMCAT_HOME/conf/Catalina/localhost/webappname.xml
   file
   instead.
   
   2)  I  have ensured that the 3 MS JAR files for the
   JDBC connection exist
   only in TOMCAT_HOME/common/lib and not in my webapp
   lib.
   
   3)  I have changed the java code to use a simple
   'DataSource' instead of a
   'ConnectionPoolDataSource' connection.  See Java
   code snippet below :-
   
   Unfortunately I still get the error below :-
   
   ERROR - NamingException - Config error with JNDI
   and
   datasource.javax.naming.NamingException: Cannot
   create resource instance
   ERROR com.webconnex.cognos.PORT.OMTLreport  : Cannot
   create resource
   instance
   
   I have attached my web.xml and
   TOMCAT_HOME/conf/Catalina/localhost/webappname.xml
   files for your perusal.
   
   
   I am of yet no further forward in solving my
   problem.
   
   Any further insight would be appreciated, as Tomcat
   5 allows me to do quite
   a few things better, not least of which is
   debugging!!
   
   
   Java Code snippet :-
   
  
  =
   
   logger.debug(Before
   InitialContext.) ;
   InitialContext ctx = new
   InitialContext();
   if (ctx == null) { 
   log(ERROR initialising
   InitialContext.) ;  
   logger.error(ERROR initialising
   InitialContext.) ;
   }
   log(Before Context.) ;
   ds = (DataSource)
   ctx.lookup(java:comp/env/jdbc/UKportalPool);
   
   log(Before initialising
   DataSource.) ;
   
   if(ds != null) {
   con = ds.getConnection();
   if (con != null) {
 
 if ((pType != null) 
   (!pType.equals()))
   {
 userDetails = new
   pfUsersBean(pType,
   posName, typeCD, firstLineProduct);
 userSessionDetails = new
   pfUserSessionBean();
 userDetails.getPrefix(con,
   userDetails);  // See if User is in database
 
   //userDetails.getPrefix(pCon,
   userDetails);  // See if User is in database
 

   ptpResponse.setSettingValue(SettingType.Portlet,
   SalesCubePrefix

RE: Tomcat 5.5.9 missing jars ?

2005-08-24 Thread Allistair Crossley
I don't think that's shipped with Tomcat 5.5.9. What is the error you are 
getting? Are you running your own web applications yet or just testing the 
default ROOT webapp?

Allistair.

 -Original Message-
 From: Srinath Narasimhan [mailto:[EMAIL PROTECTED]
 Sent: 24 August 2005 14:29
 To: tomcat-user@jakarta.apache.org
 Subject: Tomcat 5.5.9 missing jars ?
 
 
 Hi 
 I downloaded Tomcat 5.5.9 (zip file as well as exe) and it seems to be
 missing the naming-common.jar.
 The documentation says that the file exists. I have tried 
 searching the
 mailing list, but could not find anything specific.
 Any information/pointers will be very helpful.
 
 Thanks
 Srinath.
 
 
 ---
 
 DISCLAIMER: This email and any attachments are confidential and may be
 legally privileged.  It is intended solely for the named 
 addressee.  Access
 to this message by anyone else is unauthorized.  If you are 
 not the intended
 recipient, any disclosure, copying, or distribution of the 
 message, or any
 action or omission taken by you in reliance on it, is 
 prohibited and may be
 unlawful.  If you have received this email in error please contact the
 sender or NuView Systems, Inc. at 978-988-7884. Thank you.
 
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Tomcat 5.5.9 missing jars ?

2005-08-24 Thread Allistair Crossley
Hi,

It looks like you are another developer who thinks the transition from 5.0.x to 
5.5.x is just copying your webapp across. Unfortunalte you'll need to configure 
JNDI datasources in a different way in 5.5.x. Check out the manual pages to see 
how.

Allistair.

 -Original Message-
 From: Srinath Narasimhan [mailto:[EMAIL PROTECTED]
 Sent: 24 August 2005 14:37
 To: Tomcat Users List
 Subject: RE: Tomcat 5.5.9 missing jars ?
 
 
 Thanks Allistair for the information,
 I am running my own web application and it is already working 
 in 5.0.28
 When I try to run it under 5.5.9, the JNDI errors pop up.
 Unable to create resource instance or something like that.
 I see the naming-common.jar and naming-java.jar are missing 
 under common/lib
 folder.
 Now if these jars are not shipped with Tomcat, how does the 
 default java
 namespace in the JNDI work ?
 
 Srinath.
 
 
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 24, 2005 9:29 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 5.5.9 missing jars ?
 
 I don't think that's shipped with Tomcat 5.5.9. What is the 
 error you are
 getting? Are you running your own web applications yet or 
 just testing the
 default ROOT webapp?
 
 Allistair.
 
  -Original Message-
  From: Srinath Narasimhan [mailto:[EMAIL PROTECTED]
  Sent: 24 August 2005 14:29
  To: tomcat-user@jakarta.apache.org
  Subject: Tomcat 5.5.9 missing jars ?
  
  
  Hi 
  I downloaded Tomcat 5.5.9 (zip file as well as exe) and it 
 seems to be
  missing the naming-common.jar.
  The documentation says that the file exists. I have tried 
  searching the
  mailing list, but could not find anything specific.
  Any information/pointers will be very helpful.
  
  Thanks
  Srinath.
  
  
  ---
  
  DISCLAIMER: This email and any attachments are confidential 
 and may be
  legally privileged.  It is intended solely for the named 
  addressee.  Access
  to this message by anyone else is unauthorized.  If you are 
  not the intended
  recipient, any disclosure, copying, or distribution of the 
  message, or any
  action or omission taken by you in reliance on it, is 
  prohibited and may be
  unlawful.  If you have received this email in error please 
 contact the
  sender or NuView Systems, Inc. at 978-988-7884. Thank you.
  
  
  
 
 
 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
 ---
 QAS Ltd.
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474
 ---
 /FONT
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 ---
 
 DISCLAIMER: This email and any attachments are confidential and may be
 legally privileged.  It is intended solely for the named 
 addressee.  Access
 to this message by anyone else is unauthorized.  If you are 
 not the intended
 recipient, any disclosure, copying, or distribution of the 
 message, or any
 action or omission taken by you in reliance on it, is 
 prohibited and may be
 unlawful.  If you have received this email in error please contact the
 sender or NuView Systems, Inc. at 978-988-7884. Thank you.
 
 
 

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



RE: how to update tomcat?

2005-08-24 Thread Allistair Crossley
Hi,

Not sure if there's a migration guide, but roughly

1. Download Tomcat 5.0.x or 5.5.x
2. Read the configuration guide for those parts you've configured in 4.1 to see 
how to do it in 5.0.x/5.5.x
3. Move your webapp WAR to the new webapps, make configuration changes
4. Test.

Your webapp *should* run alright itself, but it's normally the Tomcat 
configuration parts that stop smooth migration, so ensure you understand how 
you're configured in 4.1, e.g datasource, realms, hosts etc.. and make sure you 
do it the correct way in 5.0/5.5

Allistair.

 -Original Message-
 From: subi [mailto:[EMAIL PROTECTED]
 Sent: 24 August 2005 14:40
 To: tomcat-user@jakarta.apache.org
 Subject: how to update tomcat?
 
 
 I am using Tomcat 4.1. How can i update to 5.x?
 
 -- 
 ilu,
 subi
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Deploying war in another directory

2005-08-24 Thread Allistair Crossley
you can change the appBase attribute per Host but I am not aware of whether you 
can mix based on webapp name.

Allistair.

 -Original Message-
 From: XYZ [mailto:[EMAIL PROTECTED]
 Sent: 24 August 2005 15:51
 To: tomcat-user@jakarta.apache.org
 Subject: Deploying war in another directory
 
 
 Hello.
 I would like to know how it is possible to have catalina 
 deploy a war  
 outside of $CATALINA_HOME/webapps.  What I'd like to do is have  
 catalina find the war in another path, $APPS.  How can I do this?
 
 Thanks.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: newbie with a short question

2005-08-24 Thread Allistair Crossley
Hi,

I did this the other day with a bat file.

First I cause an open/save prompt with 

response.addHeader(Content-Disposition, attachment; filename=somebat.bat);

Then I use the response.getOutputStream() and stream the bat file down it. This 
requires of course that you get an inputstream to your bat file first. Copy it 
into your webapp somewhere and use the servlet context 
getRealPath(/bat/mybat.bat) and then i/o API to read it into an input stream 
before sending outbound again. 

I found that setting content type of application/msdos-x-batch failed, as did 
others, just send it without a content type as a open/save.

You'd do this in a servlet.

Allistair

 -Original Message-
 From: nick sturm [mailto:[EMAIL PROTECTED]
 Sent: 24 August 2005 17:21
 To: Tomcat Users List
 Subject: newbie with a short question
 
 
 I am new to any web server, but hopefully this question is 
 easilly answered:
 
 If I wanted to make a link to execute a .bat file locally on the
 server when a link is pressed, how would I do so?
 
 I am making a pan/tiltable webcam and hope to use the siple 
 controls shown here:
 http://www.geocities.com/zoomkat/byte.htm
 
 my major confusion stems from there not being a cgi directory.  (upon
 first inspection)
 
 Sorry for my ignorance,
 -n
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server usin g JNDI?

2005-08-23 Thread Allistair Crossley
());
  }
  catch(IOException IOe) {
   logger.error(ERROR - IOException
  occurred: +IOe) ;
   logger.error(IOe.getMessage()) ;
   }
  catch(Exception e) {
  log(ERROR - Exception occurred:
  +e) ;
  logger.error(ERROR - Exception
  occurred: +e) ;
  logger.error(e.getMessage()) ;  
   
  }
  ==
  
  -Original Message-
  From: Allistair Crossley
  [mailto:[EMAIL PROTECTED]
  Sent: 11 August 2005 12:10
  To: Tomcat Users List
  Subject: RE: Has anyone used Tomcat 5.5.9 connecting
  to MS SQL Server
  using JNDI?
  
  
  Hi,
  
  A) First, can you clarify which method you have
  opted for now of;
  
  1.
  
  TOMCAT_HOME/webapps/webappname/META-INF/context.xml
  
  or
  
  2.
  
  TOMCAT_HOME/conf/Catalina/localhost/webappname.xml
  
  B) Ensure your database JAR(s) are in
  TOMCAT_HOME/common/lib (not in your
  webapp lib).
  
  C) Try something simpler ...
  
  DataSource dataSource = null;
  try {
Context ctx = new InitialContext();
dataSource = (DataSource)
  ctx.lookup(java:comp/env/jdbc/UKportalPool);
  } catch (NamingException nE) {
log.error(nE.getMessage());
  } catch (NullPointerException npE) {
log.error(npE.getMessage());
  }
  
  Allistair.
  
   -Original Message-
   From: Wylie, Ian [mailto:[EMAIL PROTECTED]
   Sent: 11 August 2005 12:02
   To: Tomcat Users List
   Subject: RE: Has anyone used Tomcat 5.5.9
  connecting to MS SQL Server
   using JNDI?
   
   
   Alistair,
   
   Well I have learned something that I was doing
  wrong, but 
   after removing the
   webappname.xml I get the same error.
   
   Any more ideas?
   
   Thanks,
   
   Ian
   
   -Original Message-
   From: Allistair Crossley
  [mailto:[EMAIL PROTECTED]
   Sent: 11 August 2005 11:53
   To: Tomcat Users List
   Subject: RE: Has anyone used Tomcat 5.5.9
  connecting to MS SQL Server
   using JNDI?
   
   
   Hi,
   
   You can only configure a web application in 1
  place. You 
   can't use *both*
   context.xml AND a webappname.xml. I think the
   TOMCAT_HOME\conf\Catalina\localhost method is
  tried first, 
   and because this
   does not have any of your datasources in it you
  get your 
   problems. Decide on
   either
  TOMCAT_HOME\conf\Catalina\localhost\webappname.xml
  or
   META-INF/context.xml and see if you get any
  further first.
   
   Cheers, Allistair
   
-Original Message-
From: Wylie, Ian [mailto:[EMAIL PROTECTED]
Sent: 11 August 2005 11:47
To: Tomcat Users List
Subject: RE: Has anyone used Tomcat 5.5.9
  connecting to MS 
   SQL Server
using JNDI?


Alistair,

For configuration purposes I attach the
  Context.xml, web.xml and
mininPCO-practise.xml - which is the web
  application file 
which resides in
TOMCAT_HOME\conf\Catalina\localhost directory.


The error message is basically Cannot create
  resource 
instance.  (Full
Error message attached below.)


The Java code above works in 4.1.31, so I am not
  really 
worried about this,
unless Tomcat 5.5.9 works differently.



Here is the code snippet from the java class
  PortletHelper 
that is being
executed which produces the error at the end of
  this email.

Well I think that is all that anyone needs to
  check out my app.

If anyone can offer some good advice on this, it
  would be 
much appreciated.

Best Regards,

Ian


   
 
 ==
=
JAVA CODE SNIPPET START

logger.debug(Before
  InitialContext.) ;
InitialContext ctx = new
  InitialContext();
if (ctx == null) { 
log(ERROR initialising
  InitialContext.) ;  
logger.error(ERROR
  initialising 
InitialContext.) ;
}
log(Before Context.) ;
Context envCtx = (Context) 
ctx.lookup(java:comp/env);

if (envCtx != null) {
log(Before initialising
  DataSource.) ;
ConnectionPoolDataSource ds
  = 
 
   
 
 (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool);

if(ds != null) {

pCon =
  ds.getPooledConnection(); 

JAVA CODE SNIPPET END
   
 
 


   
 
 ==

ERROR MESSAGE START

10-Aug-2005 15:26:56
  org.apache.catalina.core.ApplicationContext log
INFO: OMTLreport: Before Context.
10-Aug-2005 15:26:56

RE: logging tomcat 5.5

2005-08-23 Thread Allistair Crossley
actually you don't *have* to use log4j, since 5.5.8/9 tomcat has shipped with a 
customised jdk logging configuration (juli) that sets up a localhost log for 
you out of the box

 -Original Message-
 From: Alain Gaeremynck [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 16:09
 To: Tomcat Users List
 Subject: logging tomcat 5.5
 
 
 I read the doc and found out that in tomcat 5.5 we are suppose to use 
 log 4 j to handle getServletContext.log.  However i rather 
 liked the old 
 ways  Is it stil supported? 
 
 if i put this in my context
 
 Logger className=org.apache.catalina.logger.FileLogger
   prefix=servlet. suffix=.log timestamp=true /
 
 will it still work?
 
 -- 
 Alain Gaeremynck
 CTO Le Groupe Interstructure
 (514) 374-1110
 (514) 825-7810 cell
 weblog: http://www.sanssucre.ca
 (En informatique, comme en musique, n'importe quoi sauf du commercial)
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: jndi question

2005-08-23 Thread Allistair Crossley
Hi,

The documentation says;

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource ds = (DataSource)
  envCtx.lookup(jdbc/EmployeeDB);

However, we use;

try {
  Context ctx = new InitialContext();
  dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/yourdb);
} catch (NamingException nE) {
  // log somewhere
} catch (NullPointerException npE) {
  // log somewhere
}

Does that work for you? Allistair

 -Original Message-
 From: Sean Rowe [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 16:29
 To: Tomcat Users List
 Subject: Re: jndi question
 
 
 Brian, thank you for replying.  I was afraid my topic was 
 dead.  If you 
 could look at my first post, I listed all the files that you have 
 suggested I take a look at.  I have done everything you have 
 suggested, 
 but am still getting errors.  The error I am getting now is
 
 javax.naming.NameNotFoundException: Name java:comp is not 
 bound in this 
 Context
 
 I can't find anything on the net or in any books I've looked at that 
 explains this.  As far as I can tell, java:comp should just 
 be there.  
 Any ideas?  Thanks again.
 
 Sean
 
 Brian Cook wrote:
 
 
  Yes you can use JNDI with out using JSTL.  But the only way to 
  configure it is to define the JNDI resources in the web.xml and 
  context.xml files.Technically you should be able to use the 
  globally defined JNDI resources in server.xml, and I have seen 
  configuration set ups doing it when googling.  But could never get 
  them to work.
 
  This highlights another area of seemingly unneeded complication in 
  Java/Unix development.  Using JNDI for data sources which 
 was supposed 
  to help you save time requires that you redundantly define the JNDI 
  resource in at lest 2 if not 3 places.
 
  The admin tool which was also supposed to help save time 
 defines the 
  JNDI resources in server.xml which does not really seem to 
 be all that 
  helpful.  I am sure there is likely a reason for this but I am 
  ignorant of it.  The admin tool is also supposed to let you define 
  JNDI resources  per context but it errors out when ever I 
 have tried it.
 
  My experience with the Tomcat Admin and Manager tools is 
 that they are 
  worthless.  Of the few steps they try to help with more 
 often that not 
  they just return errors when you need to use it.  I removed 
 them both 
  and have gone back to doing set ups manually and there has not been 
  much of a time difference doing it this way.
 
  Any way for JNDI to work you will have to add the 
 definition for it in 
  both web.xml and context.xml in the Tomcat 
  Folder/conf/Catalina/localhost/ folder.  This seems counter 
  productive since it makes your app less portable having the 
 data base 
  configuration details inside the context and by extent the WAR file 
  but it is what you have to do to get it to work right now.
 
  I feel your pain I know it is frustrating spending hours debugging 
  just the DB connection but todate that is the reality of 
 Java web app 
  development.  It is why I fear we will all be .Net 
 developers some day.
 
 
  Example :
  
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources
 -howto.html
 
  CODE
 
  Context initCtx = new InitialContext();
  Context envCtx = (Context) initCtx.lookup(java:comp/env);
  DataSource ds = (DataSource)
envCtx.lookup(jdbc/EmployeeDB);
 
  Connection conn = ds.getConnection();
  ... use this connection to access the database ...
  conn.close();
 
  /CODE
 
 
 
 
 
  WEB.XML
 
  resource-ref
description
  Resource reference to a factory for java.sql.Connection
  instances that may be used for talking to a particular
  database that is configured in the server.xml file.
/description
res-ref-name
  jdbc/EmployeeDB
/res-ref-name
res-type
  javax.sql.DataSource
/res-type
res-auth
  Container
/res-auth
  /resource-ref
 
  /WEB.XML
 
 
 
 
  CONTEXT FILE
 
  Context
 
Resource name=jdbc/EmployeeDB
  auth=Container
  type=javax.sql.DataSource
  username=dbusername
  password=dbpassword
  driverClassName=org.hsql.jdbcDriver
  url=jdbc:HypersonicSQL:database
  maxActive=8
  maxIdle=4/
 
  /Context
 
  /CONTEXT FILE
 
 
 
 
 
 
  Sean Rowe wrote:
 
  Dirk, I'm sorry I didn't see the difference on the page 
 you sent me 
  to.  However, if there is a way I can do this without 
 having to use 
  jstl, I would really like to know.  I was hoping to put 
 the code in a 
  class somewhere that my servlets could use.
 
  thanks,
  sean
 
  Dirk Weigenand wrote:
 
  Sean,
 
   
 
  --- Ursprüngliche Nachricht ---
  Von: Sean Rowe [EMAIL PROTECTED]
  An: Tomcat Users List tomcat-user@jakarta.apache.org
  Betreff: Re: jndi question
  Datum: Mon, 22 Aug 2005 09:24:10 -0500
 
  Thanks for responding Dirk.  I've practically memorized the 
  documentation on the link you 

RE: jndi question

2005-08-23 Thread Allistair Crossley
If you could please send

1. server.xml
2. web.xml
3. context.xml or yourwebapp.xml
4. list of files in common/lib
5. list of files in yourwebapp/WEB-INF/lib

I'd be happy to see if I can spot anything.

 -Original Message-
 From: Sean Rowe [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 16:41
 To: Tomcat Users List
 Subject: Re: jndi question
 
 
 no, that didn't help.  thanks though.
 
 could this maybe be a class problem?  am i using the wrong 
 jar files?  i 
 can list the files i'm using if anyone thinks it might be the problem
 
 Allistair Crossley wrote:
 
 Hi,
 
 The documentation says;
 
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource)
   envCtx.lookup(jdbc/EmployeeDB);
 
 However, we use;
 
 try {
   Context ctx = new InitialContext();
   dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/yourdb);
 } catch (NamingException nE) {
   // log somewhere
 } catch (NullPointerException npE) {
   // log somewhere
 }
 
 Does that work for you? Allistair
 
   
 
 -Original Message-
 From: Sean Rowe [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 16:29
 To: Tomcat Users List
 Subject: Re: jndi question
 
 
 Brian, thank you for replying.  I was afraid my topic was 
 dead.  If you 
 could look at my first post, I listed all the files that you have 
 suggested I take a look at.  I have done everything you have 
 suggested, 
 but am still getting errors.  The error I am getting now is
 
 javax.naming.NameNotFoundException: Name java:comp is not 
 bound in this 
 Context
 
 I can't find anything on the net or in any books I've 
 looked at that 
 explains this.  As far as I can tell, java:comp should just 
 be there.  
 Any ideas?  Thanks again.
 
 Sean
 
 Brian Cook wrote:
 
 
 
 Yes you can use JNDI with out using JSTL.  But the only way to 
 configure it is to define the JNDI resources in the web.xml and 
 context.xml files.Technically you should be able to use the 
 globally defined JNDI resources in server.xml, and I have seen 
 configuration set ups doing it when googling.  But could never get 
 them to work.
 
 This highlights another area of seemingly unneeded complication in 
 Java/Unix development.  Using JNDI for data sources which 
   
 
 was supposed 
 
 
 to help you save time requires that you redundantly define 
 the JNDI 
 resource in at lest 2 if not 3 places.
 
 The admin tool which was also supposed to help save time 
   
 
 defines the 
 
 
 JNDI resources in server.xml which does not really seem to 
   
 
 be all that 
 
 
 helpful.  I am sure there is likely a reason for this but I am 
 ignorant of it.  The admin tool is also supposed to let you define 
 JNDI resources  per context but it errors out when ever I 
   
 
 have tried it.
 
 
 My experience with the Tomcat Admin and Manager tools is 
   
 
 that they are 
 
 
 worthless.  Of the few steps they try to help with more 
   
 
 often that not 
 
 
 they just return errors when you need to use it.  I removed 
   
 
 them both 
 
 
 and have gone back to doing set ups manually and there has 
 not been 
 much of a time difference doing it this way.
 
 Any way for JNDI to work you will have to add the 
   
 
 definition for it in 
 
 
 both web.xml and context.xml in the Tomcat 
 Folder/conf/Catalina/localhost/ folder.  This seems counter 
 productive since it makes your app less portable having the 
   
 
 data base 
 
 
 configuration details inside the context and by extent the 
 WAR file 
 but it is what you have to do to get it to work right now.
 
 I feel your pain I know it is frustrating spending hours debugging 
 just the DB connection but todate that is the reality of 
   
 
 Java web app 
 
 
 development.  It is why I fear we will all be .Net 
   
 
 developers some day.
 
 
 Example :
 
   
 
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources
 -howto.html
 
 
 CODE
 
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource)
   envCtx.lookup(jdbc/EmployeeDB);
 
 Connection conn = ds.getConnection();
 ... use this connection to access the database ...
 conn.close();
 
 /CODE
 
 
 
 
 
 WEB.XML
 
 resource-ref
   description
 Resource reference to a factory for java.sql.Connection
 instances that may be used for talking to a particular
 database that is configured in the server.xml file.
   /description
   res-ref-name
 jdbc/EmployeeDB
   /res-ref-name
   res-type
 javax.sql.DataSource
   /res-type
   res-auth
 Container
   /res-auth
 /resource-ref
 
 /WEB.XML
 
 
 
 
 CONTEXT FILE
 
 Context
 
   Resource name=jdbc/EmployeeDB
 auth=Container
 type=javax.sql.DataSource
 username=dbusername
 password=dbpassword
 driverClassName=org.hsql.jdbcDriver

RE: jndi question

2005-08-23 Thread Allistair Crossley
Hi Sean,

It looks from a quick glance that your JNDI configuration is done globally, 
rather than in the Context configuration, and you do not link to it using a 
ResourceLink.

Try adding 

ResourceLink name=myLinkToAppJndi
  global=jdbc/appname
  type=javax.sql.DataSource /

Into the Context block, and remove the Resource block you have in there. The 
other thing to try would be to move the JNDI datasource Resource configuration 
block into the Context block.

See how you get on, Allistair.

 -Original Message-
 From: Sean Rowe [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 16:45
 To: Tomcat Users List
 Subject: Re: jndi question
 
 
 thank you, i will
 
 Allistair Crossley wrote:
 
 If you could please send
 
 1. server.xml
 2. web.xml
 3. context.xml or yourwebapp.xml
 4. list of files in common/lib
 5. list of files in yourwebapp/WEB-INF/lib
 
 I'd be happy to see if I can spot anything.
 
   
 
 -Original Message-
 From: Sean Rowe [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 16:41
 To: Tomcat Users List
 Subject: Re: jndi question
 
 
 no, that didn't help.  thanks though.
 
 could this maybe be a class problem?  am i using the wrong 
 jar files?  i 
 can list the files i'm using if anyone thinks it might be 
 the problem
 
 Allistair Crossley wrote:
 
 
 
 Hi,
 
 The documentation says;
 
 Context initCtx = new InitialContext();
 Context envCtx = (Context) initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource)
  envCtx.lookup(jdbc/EmployeeDB);
 
 However, we use;
 
 try {
  Context ctx = new InitialContext();
  dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/yourdb);
 } catch (NamingException nE) {
  // log somewhere
 } catch (NullPointerException npE) {
  // log somewhere
 }
 
 Does that work for you? Allistair
 
  
 
   
 
 -Original Message-
 From: Sean Rowe [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 16:29
 To: Tomcat Users List
 Subject: Re: jndi question
 
 
 Brian, thank you for replying.  I was afraid my topic was 
 dead.  If you 
 could look at my first post, I listed all the files that you have 
 suggested I take a look at.  I have done everything you have 
 suggested, 
 but am still getting errors.  The error I am getting now is
 
 javax.naming.NameNotFoundException: Name java:comp is not 
 bound in this 
 Context
 
 I can't find anything on the net or in any books I've 
 
 
 looked at that 
 
 
 explains this.  As far as I can tell, java:comp should just 
 be there.  
 Any ideas?  Thanks again.
 
 Sean
 
 Brian Cook wrote:
 

 
 
 
 Yes you can use JNDI with out using JSTL.  But the only way to 
 configure it is to define the JNDI resources in the web.xml and 
 context.xml files.Technically you should be able to use the 
 globally defined JNDI resources in server.xml, and I have seen 
 configuration set ups doing it when googling.  But could 
 never get 
 them to work.
 
 This highlights another area of seemingly unneeded 
 complication in 
 Java/Unix development.  Using JNDI for data sources which 
  
 
   
 
 was supposed 

 
 
 
 to help you save time requires that you redundantly define 
   
 
 the JNDI 
 
 
 resource in at lest 2 if not 3 places.
 
 The admin tool which was also supposed to help save time 
  
 
   
 
 defines the 

 
 
 
 JNDI resources in server.xml which does not really seem to 
  
 
   
 
 be all that 

 
 
 
 helpful.  I am sure there is likely a reason for this but I am 
 ignorant of it.  The admin tool is also supposed to let 
 you define 
 JNDI resources  per context but it errors out when ever I 
  
 
   
 
 have tried it.

 
 
 
 My experience with the Tomcat Admin and Manager tools is 
  
 
   
 
 that they are 

 
 
 
 worthless.  Of the few steps they try to help with more 
  
 
   
 
 often that not 

 
 
 
 they just return errors when you need to use it.  I removed 
  
 
   
 
 them both 

 
 
 
 and have gone back to doing set ups manually and there has 
   
 
 not been 
 
 
 much of a time difference doing it this way.
 
 Any way for JNDI to work you will have to add the 
  
 
   
 
 definition for it in 

 
 
 
 both web.xml and context.xml in the Tomcat 
 Folder/conf/Catalina/localhost/ folder.  This seems counter 
 productive since it makes your app less portable having the 
  
 
   
 
 data base 

 
 
 
 configuration details inside the context and by extent the 
   
 
 WAR file 
 
 
 but it is what you have to do to get it to work right now.
 
 I feel your pain I know it is frustrating spending hours 
 debugging 
 just the DB connection but todate that is the reality of 
  
 
   
 
 Java web app 

 
 
 
 development.  It is why I fear we will all be .Net 
  
 
   
 
 developers

RE: jndi question

2005-08-23 Thread Allistair Crossley
Hi,

He isn't using that method of configuration, that's just 1 option of 3. He is 
nesting his Context definition within the server.xml Host element. Although 
this is now scorned, it's still valid. The 2 other methods are contextname.xml 
as you say, and also META-INF/context.xml within the webapp itself. 
Allistair.

 -Original Message-
 From: Brian Cook [mailto:[EMAIL PROTECTED]
 Sent: 23 August 2005 17:23
 To: Tomcat Users List
 Subject: Re: jndi question
 
 
 
 Ok but do you have the resource defined in context.xml?  If you go to 
 Tomcat Dir/conf/Cataliana/localhost/ do you see a file 
 with the name 
 of the module ending with .xml?  If so is the resource 
 defined in that 
 file?  If not you need to add it.
 
  From the description it sounds like nothing in this set up has been 
 done as was show on the example page.
 
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources
 -howto.html
 
 If you use the code block that is shown, define that resource 
 in web.xml 
 and context.xml it will work.  But multiple postings latter it still 
 sounds like the JNDI resource is not defined in context.xml 
 and the code 
 calling the JNDI resource differs greatly from the example provided.
 
 
 Sean Rowe wrote:
  The first post on this included the server.xml, and further 
 down in the 
  page is the relevant part of web.xml ( i just double 
 checked that ).  as 
  for context.xml, i have listed it in my webapp.xml file, as well as 
  server.xml as all other examples have suggested.  i then 
 tried it in the 
  admin module, where it then put it in server.xml for me.  
 i'm willing to 
  try anything at this point, though, if you have any suggestions.
  
  as for my post not being jndi specific, i applogize if 
 that's the case.  
  i'm not really familiar with jndibut when I did a search for 
  'connection pooling', jndi seemed to be what everyone 
 suggested i use.  
  what i want to do, if it's not clear, is to create a 
 connection pool to 
  my MySql database.
  thanks,
  sean
  
  Brian Cook wrote:
  
 
  Actually the files I listed are NOT in the first post.  It 
 shows the 
  server.xml and the code calling it but does not show web.xml or 
  context.xml.
 
  The error you are getting just means that that the JNDI 
 resource being 
  called in the code is not defined in both web.xml and context.xml.
 
  In looking at the code snip it in the first post I am not 
 following 
  what you are trying to do.  The post is for a JNDI 
 question but in the 
  code it looks like you are calling the DB URL directly.  The whole 
  point of JDNI being to get specific URL, and configuration info 
  outside of the code base.  I am not following what it is you are 
  trying to do here.
 
 
 
  Sean Rowe wrote:
 
  Brian, thank you for replying.  I was afraid my topic was 
 dead.  If 
  you could look at my first post, I listed all the files 
 that you have 
  suggested I take a look at.  I have done everything you have 
  suggested, but am still getting errors.  The error I am 
 getting now is
 
  javax.naming.NameNotFoundException: Name java:comp is not 
 bound in 
  this Context
 
  I can't find anything on the net or in any books I've 
 looked at that 
  explains this.  As far as I can tell, java:comp should just be 
  there.  Any ideas?  Thanks again.
 
  Sean
 
  Brian Cook wrote:
 
 
  Yes you can use JNDI with out using JSTL.  But the only way to 
  configure it is to define the JNDI resources in the web.xml and 
  context.xml files.Technically you should be able to use the 
  globally defined JNDI resources in server.xml, and I have seen 
  configuration set ups doing it when googling.  But could 
 never get 
  them to work.
 
  This highlights another area of seemingly unneeded 
 complication in 
  Java/Unix development.  Using JNDI for data sources which was 
  supposed to help you save time requires that you 
 redundantly define 
  the JNDI resource in at lest 2 if not 3 places.
 
  The admin tool which was also supposed to help save time 
 defines the 
  JNDI resources in server.xml which does not really seem 
 to be all 
  that helpful.  I am sure there is likely a reason for 
 this but I am 
  ignorant of it.  The admin tool is also supposed to let 
 you define 
  JNDI resources  per context but it errors out when ever 
 I have tried 
  it.
 
  My experience with the Tomcat Admin and Manager tools is 
 that they 
  are worthless.  Of the few steps they try to help with 
 more often 
  that not they just return errors when you need to use 
 it.  I removed 
  them both and have gone back to doing set ups manually 
 and there has 
  not been much of a time difference doing it this way.
 
  Any way for JNDI to work you will have to add the 
 definition for it 
  in both web.xml and context.xml in the Tomcat 
  Folder/conf/Catalina/localhost/ folder.  This seems counter 
  productive since it makes your app less portable having the data 
  base configuration details inside the context 

RE: Java 1.4.2_08 and up breaks Jstl

2005-08-22 Thread Allistair Crossley
Ensure that your class members all have getters, since 
person.language.localeName will call

person.getLanguage().getLocaleName()

Allistair.

 -Original Message-
 From: Martyn Hiemstra [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2005 09:55
 To: Tomcat Users List
 Subject: Re: Java 1.4.2_08 and up breaks Jstl
 
 
 Hi All
 
 First of all my jsp file looks like this
 
 Contents Jsp File:
 %@ page language=java %
 %@ page contentType=text/html; charset=UTF-8 %
 %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt %
 %@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
 
 c:out value=${person.language.localeName} /
 
 The error occures on the line with the person.language.localeName. 
 Person is a object in the session. The code prints the locale 
 name the 
 person has chosen.
 
 System
 Debian Sarge
 
 Tomcat:
 Tomcat 5.0.27 (I have also tried 5.0.28)
 
 Java
 I have Java j2sdk 1.4.2_05 installed under /opt/j2sdk1.4.2_05. I have 
 created a sym link from /opt/java to /opt/j2sdk1.4.2_05.
 I have JAVA_HOME point to /opt/java.
 
 
 This runs perfectly. I then install j2sdk 1.4.2_08 under /opt 
 and then 
 have /opt/java point to /opt/j2sdk1.4.2_08.
 
 I stop tomcat. Wait and check to see that no occurance is 
 running in the 
 memory anymore. I then start up tomcat. When calling the same 
 jsp file 
 that worked with the previous version of Java I get this error in the 
 catalina.out:
 2005-08-11 11:37:06 StandardWrapperValve[jsp]: Servlet.service() for 
 servlet jsp threw exception
 javax.servlet.jsp.JspException: An error occurred while evaluating 
 custom action attribute value with value 
 ${person.language.localeName}: Unable to find a value for 
 language 
 in object of class com.jatse.api.User using operator . (null)
 at 
 org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu
 ator.java:146)
 at 
 org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu
 ator.java:166)
 at 
 org.apache.taglibs.standard.lang.support.ExpressionEvaluatorMa
 nager.evaluate(ExpressionEvaluatorManager.java:112)
 at 
 org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag.evaluateEx
 pressions(SetLocaleTag.java:141)
 at 
 org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag.doStartTag
 (SetLocaleTag.java:101)
 at 
 org.apache.jsp.index_jsp._jspx_meth_fmt_setLocale_0(index_jsp.
 java:146)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:100)
 at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:324)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:292)
 at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(ApplicationFilterChain.java:237)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterChain.java:157)
 at 
 com.jatse.website.filters.PersonFilter.doFilter(PersonFilter.java:42)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(ApplicationFilterChain.java:186)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterChain.java:157)
 at 
 com.jatse.website.filters.SetCharacterEncodingFilter.doFilter(
SetCharacterEncodingFilter.java:128)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(ApplicationFilterChain.java:186)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterChain.java:157)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
 rapperValve.java:214)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(Stand
 ardValveContext.java:104)
 at 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:520)
 at 
 org.apache.catalina.core.StandardContextValve.invokeInternal(S
 tandardContextValve.java:198)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardC
 ontextValve.java:152)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(Stand
 ardValveContext.java:104)
 at 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:520)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHost
 Valve.java:137)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(Stand
 ardValveContext.java:104)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
 Valve.java:117)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(Stand
 ardValveContext.java:102)
 at 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:520)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
 gineValve.java:109)
 at 
 

Deploying ROOT.war indicates missing application web.xml

2005-08-22 Thread Allistair Crossley
Hi Everyone,
 
Just been deploying ROOT.war into webapps and it's failing to explode. The logs 
indicate;
 
INFO: Deploying web application archive ROOT.war
22-Aug-2005 09:46:44 org.apache.catalina.startup.ContextConfig 
applicationWebConfig
INFO: Missing application web.xml, using defaults only
  ^^^
 
Yet, if I rename ROOT.war to ROOT.zip and open it in WinZip, the web.xml has 
been correctly packed by the Ant WAR task. Indeed if I unzip the WAR into 
webapps manually, the web application works fine and is packaged correctly.
 
I use an Ant WAR task
 
war 
destFile=${dist.dir}/${app.name}.war 
webxml=${webroot.dir}/WEB-INF/web.xml
duplicate=preserve
  
  classes dir=${classes.dir} /
  lib dir=${webroot.dir}/WEB-INF/lib /
  webinf dir=${webroot.dir}/WEB-INF /
  metainf dir=${webroot.dir}/META-INF /
  
  fileset dir=${webroot.dir}
include name=includes/** /
include name=resources/** /
include name=views/** /
  /fileset

/war
 
Any ideas why Tomcat is exhibiting this behaviour?
 
Cheers, Allistair.
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT



RE: Java 1.4.2_08 and up breaks Jstl

2005-08-22 Thread Allistair Crossley
If you do have com.jatse.api.User.getLanguage() then the problem is that 
language is null. Test with

c:if test=${empty person.language}
  language is null
/c:if

Allistair.

 -Original Message-
 From: Allistair Crossley 
 Sent: 22 August 2005 10:19
 To: Tomcat Users List
 Subject: RE: Java 1.4.2_08 and up breaks Jstl
 
 
 Ensure that your class members all have getters, since 
 person.language.localeName will call
 
 person.getLanguage().getLocaleName()
 
 Allistair.
 
  -Original Message-
  From: Martyn Hiemstra [mailto:[EMAIL PROTECTED]
  Sent: 22 August 2005 09:55
  To: Tomcat Users List
  Subject: Re: Java 1.4.2_08 and up breaks Jstl
  
  
  Hi All
  
  First of all my jsp file looks like this
  
  Contents Jsp File:
  %@ page language=java %
  %@ page contentType=text/html; charset=UTF-8 %
  %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt %
  %@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
  
  c:out value=${person.language.localeName} /
  
  The error occures on the line with the person.language.localeName. 
  Person is a object in the session. The code prints the locale 
  name the 
  person has chosen.
  
  System
  Debian Sarge
  
  Tomcat:
  Tomcat 5.0.27 (I have also tried 5.0.28)
  
  Java
  I have Java j2sdk 1.4.2_05 installed under 
 /opt/j2sdk1.4.2_05. I have 
  created a sym link from /opt/java to /opt/j2sdk1.4.2_05.
  I have JAVA_HOME point to /opt/java.
  
  
  This runs perfectly. I then install j2sdk 1.4.2_08 under /opt 
  and then 
  have /opt/java point to /opt/j2sdk1.4.2_08.
  
  I stop tomcat. Wait and check to see that no occurance is 
  running in the 
  memory anymore. I then start up tomcat. When calling the same 
  jsp file 
  that worked with the previous version of Java I get this 
 error in the 
  catalina.out:
  2005-08-11 11:37:06 StandardWrapperValve[jsp]: 
 Servlet.service() for 
  servlet jsp threw exception
  javax.servlet.jsp.JspException: An error occurred while evaluating 
  custom action attribute value with value 
  ${person.language.localeName}: Unable to find a value for 
  language 
  in object of class com.jatse.api.User using operator . (null)
  at 
  org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu
  ator.java:146)
  at 
  org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu
  ator.java:166)
  at 
  org.apache.taglibs.standard.lang.support.ExpressionEvaluatorMa
  nager.evaluate(ExpressionEvaluatorManager.java:112)
  at 
  org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag.evaluateEx
  pressions(SetLocaleTag.java:141)
  at 
  org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag.doStartTag
  (SetLocaleTag.java:101)
  at 
  org.apache.jsp.index_jsp._jspx_meth_fmt_setLocale_0(index_jsp.
  java:146)
  at org.apache.jsp.index_jsp._jspService(index_jsp.java:100)
  at 
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at 
  org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
  Wrapper.java:324)
  at 
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
  .java:292)
  at 
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at 
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
  er(ApplicationFilterChain.java:237)
  at 
  org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
  cationFilterChain.java:157)
  at 
  
 com.jatse.website.filters.PersonFilter.doFilter(PersonFilter.java:42)
  at 
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
  er(ApplicationFilterChain.java:186)
  at 
  org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
  cationFilterChain.java:157)
  at 
  com.jatse.website.filters.SetCharacterEncodingFilter.doFilter(
 SetCharacterEncodingFilter.java:128)
  at 
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
  er(ApplicationFilterChain.java:186)
  at 
  org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
  cationFilterChain.java:157)
  at 
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
  rapperValve.java:214)
  at 
  org.apache.catalina.core.StandardValveContext.invokeNext(Stand
  ardValveContext.java:104)
  at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
  ine.java:520)
  at 
  org.apache.catalina.core.StandardContextValve.invokeInternal(S
  tandardContextValve.java:198)
  at 
  org.apache.catalina.core.StandardContextValve.invoke(StandardC
  ontextValve.java:152)
  at 
  org.apache.catalina.core.StandardValveContext.invokeNext(Stand
  ardValveContext.java:104)
  at 
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
  ine.java:520)
  at 
  org.apache.catalina.core.StandardHostValve.invoke(StandardHost
  Valve.java:137

RE: Deploying ROOT.war indicates missing application web.xml

2005-08-22 Thread Allistair Crossley
Hi,

Just to reconfirm, and also to take into account what you did in your test

0. Check server.xml for unpackWARs=true autoDeploy=true
1. I use Ant's war task to correctly war the web application package.
2. I clear Tomcat's webapps folder and restart for good measure.
3. I copy the war into webapps
4. Tomcat reports

INFO: Deploying web application archive ROOT.war
22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig 
applicationWebConfig
INFO: Missing application web.xml, using defaults only 
StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

5. I rename ROOT.war to ROOT.zip and open in WinZip to check file structure, in 
particular web.xml and to ensure that ROOT is not part of packaged paths.
6. I unzip ROOT.zip to webapps\ROOT
7. I make a request to the web application which succeeds including filters 
defined in the web.xml
8. Stop Tomcat
9. With WinZip, rezip the tested working ROOT folder contents
10. Delete webapps\ROOT
11. Rename ROOT.zip to ROOT.war
12. Cut ROOT.war onto Desktop.
13. Start Tomcat
14. Cut ROOT.war into webapps
15. Get same error.

INFO: Deploying web application archive ROOT.war
22-Aug-2005 11:14:02 org.apache.catalina.startup.ContextConfig 
applicationWebConfig
INFO: Missing application web.xml, using defaults only 
StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

Could the fact that my ROOT.war is 18MB have anything to do with Tomcat's 
ability to examine for the web.xml??? (wild guess)

Thanks, Allistair.

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2005 10:56
 To: Tomcat Users List
 Subject: Re: Deploying ROOT.war indicates missing application web.xml
 
 
 On 8/22/05, Allistair Crossley [EMAIL PROTECTED] wrote:
  Hi Everyone,
  
  Just been deploying ROOT.war into webapps and it's failing 
 to explode. The logs indicate;
  
  INFO: Deploying web application archive ROOT.war
  22-Aug-2005 09:46:44 
 org.apache.catalina.startup.ContextConfig applicationWebConfig
  INFO: Missing application web.xml, using defaults only
^^^
  
  Yet, if I rename ROOT.war to ROOT.zip and open it in 
 WinZip, the web.xml has been correctly packed by the Ant WAR 
 task. Indeed if I unzip the WAR into webapps manually, the 
 web application works fine and is packaged correctly.
  
  I use an Ant WAR task
  
  war
  destFile=${dist.dir}/${app.name}.war
  webxml=${webroot.dir}/WEB-INF/web.xml
  duplicate=preserve
  
classes dir=${classes.dir} /
lib dir=${webroot.dir}/WEB-INF/lib /
webinf dir=${webroot.dir}/WEB-INF /
metainf dir=${webroot.dir}/META-INF /
  
fileset dir=${webroot.dir}
  include name=includes/** /
  include name=resources/** /
  include name=views/** /
/fileset
  
  /war
  
  Any ideas why Tomcat is exhibiting this behaviour?
 
 I just tried it by zipping and removing the ROOT folder, replacing it
 with ROOT.war. It gets expanded and deployed correctly.
 
 -- 
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Deploying ROOT.war indicates missing application web.xml

2005-08-22 Thread Allistair Crossley
Hi,

Yes, the default ROOT.war does appear to work in the way I have been trying to 
deploy my own ROOT.war, you're right there.

Nevertheless I will hold that there are a lot of potential differences between 
the empty default ROOT and an 18MB struts/spring/hibernate etc... real-world 
web application so I am not convinced just yet that it's my web application 
packaging (especially with the valid tests I have shown by manual unpack).

I will see if I can pursue the reason and come back to you.

Kindest regards, Allistair.

PS: thanks for the usual insult, i'd expect no less.

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2005 11:32
 To: Tomcat Users List
 Subject: Re: Deploying ROOT.war indicates missing application web.xml
 
 
 On 8/22/05, Allistair Crossley [EMAIL PROTECTED] wrote:
  Hi,
  
  Just to reconfirm, and also to take into account what you 
 did in your test
  
  0. Check server.xml for unpackWARs=true autoDeploy=true
  1. I use Ant's war task to correctly war the web 
 application package.
 
 I used 7zip.
 
  2. I clear Tomcat's webapps folder and restart for good measure.
 
 I only deleted the ROOT folder.
 
  3. I copy the war into webapps
  4. Tomcat reports
  
  INFO: Deploying web application archive ROOT.war
  22-Aug-2005 11:14:02 
 org.apache.catalina.startup.ContextConfig applicationWebConfig
  INFO: Missing application web.xml, using defaults only 
 StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
  
  5. I rename ROOT.war to ROOT.zip and open in WinZip to 
 check file structure, in particular web.xml and to ensure 
 that ROOT is not part of packaged paths.
  6. I unzip ROOT.zip to webapps\ROOT
  7. I make a request to the web application which succeeds 
 including filters defined in the web.xml
  8. Stop Tomcat
  9. With WinZip, rezip the tested working ROOT folder contents
  10. Delete webapps\ROOT
  11. Rename ROOT.zip to ROOT.war
  12. Cut ROOT.war onto Desktop.
  13. Start Tomcat
  14. Cut ROOT.war into webapps
  15. Get same error.
  
  INFO: Deploying web application archive ROOT.war
  22-Aug-2005 11:14:02 
 org.apache.catalina.startup.ContextConfig applicationWebConfig
  INFO: Missing application web.xml, using defaults only 
 StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
  
  Could the fact that my ROOT.war is 18MB have anything to do 
 with Tomcat's ability to examine for the web.xml??? (wild guess)
 
 I know you like funny theories, but how about trying with the default
 ROOT webapp then ?
 
 -- 
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Deploying ROOT.war indicates missing application web.xml

2005-08-22 Thread Allistair Crossley
Hi,

OK, I've found the issue :( The Ant war task appears to have packed all files 
that were in the root of WEB-INF within a packed path of as web-inf (i.e 
lowercase) although not the classes which are packed within an uppercase 
WEB-INF.

Looks like the funny theory is funny afterall.

Cheers, Allistair.

 -Original Message-
 From: Allistair Crossley 
 Sent: 22 August 2005 11:48
 To: Tomcat Users List
 Subject: RE: Deploying ROOT.war indicates missing application web.xml
 
 
 Hi,
 
 Yes, the default ROOT.war does appear to work in the way I 
 have been trying to deploy my own ROOT.war, you're right there.
 
 Nevertheless I will hold that there are a lot of potential 
 differences between the empty default ROOT and an 18MB 
 struts/spring/hibernate etc... real-world web application so 
 I am not convinced just yet that it's my web application 
 packaging (especially with the valid tests I have shown by 
 manual unpack).
 
 I will see if I can pursue the reason and come back to you.
 
 Kindest regards, Allistair.
 
 PS: thanks for the usual insult, i'd expect no less.
 
  -Original Message-
  From: Remy Maucherat [mailto:[EMAIL PROTECTED]
  Sent: 22 August 2005 11:32
  To: Tomcat Users List
  Subject: Re: Deploying ROOT.war indicates missing 
 application web.xml
  
  
  On 8/22/05, Allistair Crossley [EMAIL PROTECTED] wrote:
   Hi,
   
   Just to reconfirm, and also to take into account what you 
  did in your test
   
   0. Check server.xml for unpackWARs=true autoDeploy=true
   1. I use Ant's war task to correctly war the web 
  application package.
  
  I used 7zip.
  
   2. I clear Tomcat's webapps folder and restart for good measure.
  
  I only deleted the ROOT folder.
  
   3. I copy the war into webapps
   4. Tomcat reports
   
   INFO: Deploying web application archive ROOT.war
   22-Aug-2005 11:14:02 
  org.apache.catalina.startup.ContextConfig applicationWebConfig
   INFO: Missing application web.xml, using defaults only 
  StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
   
   5. I rename ROOT.war to ROOT.zip and open in WinZip to 
  check file structure, in particular web.xml and to ensure 
  that ROOT is not part of packaged paths.
   6. I unzip ROOT.zip to webapps\ROOT
   7. I make a request to the web application which succeeds 
  including filters defined in the web.xml
   8. Stop Tomcat
   9. With WinZip, rezip the tested working ROOT folder contents
   10. Delete webapps\ROOT
   11. Rename ROOT.zip to ROOT.war
   12. Cut ROOT.war onto Desktop.
   13. Start Tomcat
   14. Cut ROOT.war into webapps
   15. Get same error.
   
   INFO: Deploying web application archive ROOT.war
   22-Aug-2005 11:14:02 
  org.apache.catalina.startup.ContextConfig applicationWebConfig
   INFO: Missing application web.xml, using defaults only 
  StandardEngine[Catalina].StandardHost[localhost].StandardContext[]
   
   Could the fact that my ROOT.war is 18MB have anything to do 
  with Tomcat's ability to examine for the web.xml??? (wild guess)
  
  I know you like funny theories, but how about trying with 
 the default
  ROOT webapp then ?
  
  -- 
  x
  Rémy Maucherat
  Developer  Consultant
  JBoss Group (Europe) SàRL
  x
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
 ---
 QAS Ltd.
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474
 ---
 /FONT
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: Deploying ROOT.war indicates missing application web.xml

2005-08-22 Thread Allistair Crossley
Hi,

Nope, but that looks helpful,

Many thanks, Allistair.

 -Original Message-
 From: Longson, Robert [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2005 12:11
 To: Tomcat Users List
 Subject: RE: Deploying ROOT.war indicates missing application web.xml
 
 
 Haveyou seen this article?
 
 http://ant.apache.org/faq.html#winzip-lies
 
 Best regards
 
 Robert
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2005 11:59
 To: Tomcat Users List
 Subject: RE: Deploying ROOT.war indicates missing application web.xml
 
 
 Hi,
 
 OK, I've found the issue :( The Ant war task appears to have 
 packed all files that were in the root of WEB-INF within a 
 packed path of as web-inf (i.e lowercase) although not the 
 classes which are packed within an uppercase WEB-INF.
 
 Looks like the funny theory is funny afterall.
 
 Cheers, Allistair.
 
  -Original Message-
  From: Allistair Crossley 
  Sent: 22 August 2005 11:48
  To: Tomcat Users List
  Subject: RE: Deploying ROOT.war indicates missing 
 application web.xml
  
  
  Hi,
  
  Yes, the default ROOT.war does appear to work in the way I 
  have been trying to deploy my own ROOT.war, you're right there.
  
  Nevertheless I will hold that there are a lot of potential 
  differences between the empty default ROOT and an 18MB 
  struts/spring/hibernate etc... real-world web application so 
  I am not convinced just yet that it's my web application 
  packaging (especially with the valid tests I have shown by 
  manual unpack).
  
  I will see if I can pursue the reason and come back to you.
  
  Kindest regards, Allistair.
  
  PS: thanks for the usual insult, i'd expect no less.
  
   -Original Message-
   From: Remy Maucherat [mailto:[EMAIL PROTECTED]
   Sent: 22 August 2005 11:32
   To: Tomcat Users List
   Subject: Re: Deploying ROOT.war indicates missing 
  application web.xml
   
   
   On 8/22/05, Allistair Crossley [EMAIL PROTECTED] wrote:
Hi,

Just to reconfirm, and also to take into account what you 
   did in your test

0. Check server.xml for unpackWARs=true autoDeploy=true
1. I use Ant's war task to correctly war the web 
   application package.
   
   I used 7zip.
   
2. I clear Tomcat's webapps folder and restart for good measure.
   
   I only deleted the ROOT folder.
   
3. I copy the war into webapps
4. Tomcat reports

INFO: Deploying web application archive ROOT.war
22-Aug-2005 11:14:02 
   org.apache.catalina.startup.ContextConfig applicationWebConfig
INFO: Missing application web.xml, using defaults only 
   StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

5. I rename ROOT.war to ROOT.zip and open in WinZip to 
   check file structure, in particular web.xml and to ensure 
   that ROOT is not part of packaged paths.
6. I unzip ROOT.zip to webapps\ROOT
7. I make a request to the web application which succeeds 
   including filters defined in the web.xml
8. Stop Tomcat
9. With WinZip, rezip the tested working ROOT folder contents
10. Delete webapps\ROOT
11. Rename ROOT.zip to ROOT.war
12. Cut ROOT.war onto Desktop.
13. Start Tomcat
14. Cut ROOT.war into webapps
15. Get same error.

INFO: Deploying web application archive ROOT.war
22-Aug-2005 11:14:02 
   org.apache.catalina.startup.ContextConfig applicationWebConfig
INFO: Missing application web.xml, using defaults only 
   StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

Could the fact that my ROOT.war is 18MB have anything to do 
   with Tomcat's ability to examine for the web.xml??? (wild guess)
   
   I know you like funny theories, but how about trying with 
  the default
   ROOT webapp then ?
   
   -- 
   x
   Rémy Maucherat
   Developer  Consultant
   JBoss Group (Europe) SàRL
   x
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
   
  
  
  FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
  ---
  QAS Ltd.
  Registered in England: No 2582055
  Registered in Australia: No 082 851 474
  ---
  /FONT
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] 
   
 
  
 The information contained in this message is intended only 
 for the recipient, and may be a confidential attorney-client 
 communication or may otherwise be privileged and confidential

RE: tomcat 5.5.9 not recompiling JSPs

2005-08-22 Thread Allistair Crossley
compiled pages are just classes, and so long as they are mapped correctly in 
the web.xml you'll be ok.

 -Original Message-
 From: Paul Singleton [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2005 15:13
 To: Tomcat Users List
 Cc: [EMAIL PROTECTED]
 Subject: Re: tomcat 5.5.9 not recompiling JSPs
 
 
 Mark Hagger wrote:
  ...
  Although to be honest I suspect that the best solution for 
 production
  boxes is to pre-compile all jsps into the war file anyway.
 
 Is this possible?  Don't different containers store the
 compiled pages in different places, with different names?
 
 Paul Singleton
 
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.338 / Virus Database: 267.10.13/78 - Release 
 Date: 19/Aug/2005
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Log4j writing to the same log file for different webapps

2005-08-18 Thread Allistair Crossley
shouldn't that be

log4j.logger.voteLogger=DEBUG, vote

?? else where will it get voteLogger from?

 -Original Message-
 From: Derek Merren [mailto:[EMAIL PROTECTED]
 Sent: 18 August 2005 15:42
 To: tomcat-user@jakarta.apache.org
 Subject: Log4j writing to the same log file for different webapps
 
 
 Hi,
 
 I have a problem with Log4j. I have several webapps running on Tomcat.
 They all use Log4j. The problem is that they all log to the same file.
 The file they log to depends on which app is used first. It seems to
 be picking up the settings from the log4j.properties file of the app
 that is run first and using those settings for all the other apps.
 
 I have the Log4j.properties file for each application in the location
 --  tomcat/webapps/aplication1/WEB-INF/classes/
 
 Here is an example of one of the log4j.properties files --
 
 log4j.rootCategory=DEBUG, vote
 log4j.appender.vote=org.apache.log4j.ConsoleAppender
 log4j.appender.vote.layout=org.apache.log4j.PatternLayout
 log4j.appender.vote.layout.ConversionPattern=%d{dd MMM 
 HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n
 log4j.appender.vote=org.apache.log4j.RollingFileAppender
 log4j.appender.vote.File=/opt/tomcat/logs/vote.log
 log4j.appender.vote.MaxFileSize=100KB
 log4j.appender.vote.MaxBackupIndex=10
 
 
 An example of the code in the app is --
 
 //Create logger
   protected static Logger logger = Logger.getLogger(voteLogger);
 
   /**
* Constructor for the DataAccessObject 
*/
   public DataAccessObject() throws SQLException, NamingException {
   logger.info(DataAccessObject() start 
 constructor method);
   initialise();   
   }
 
 Any help would be very much appreciated.
 
 Best Regards,
   Derek
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Advice for Hosting Many Individual Webapps?

2005-08-18 Thread Allistair Crossley
we used to just schedule updates and let all our staff know there would be a 
small amount of downtime (for our intranet) but you can't do this on external 
production servers, so you need to go with either load balancing/clustering 
that allows you to close a node down *while also* letting sessions complete 
(e.g BigIP I think may do this). we have a semi-solution using mod_jk's load 
balancing/sticky sessions. Although closing a node does not wait until sessions 
are complete, mod_jk still detects the failed node and passes over to the next 
node gracefully. it's a 1/2 way house to a full solution that you can implement 
right away. for graceful close down (i.e sessions completing) you need 
something like BigIP or a commercial application server like BEA which does 
this for you. I really wish support for hot deployment got sorted out in 
Tomcat/J2EE servers in general. Although I am a J2EE die-hard I used C# .NET 
recently for a project and it beats the hell out of J2EE deployment, if we're 
not careful this will be a big win for .NET.

 -Original Message-
 From: Brian Cook [mailto:[EMAIL PROTECTED]
 Sent: 18 August 2005 15:55
 To: Tomcat Users List
 Subject: Re: Advice for Hosting Many Individual Webapps?
 
 
 
 I think I missed something here.  Are you not still bouncing Tomcat 
 here?  If so isnt the service still going down?  What is the 
 benifit of 
 changign the ports around?  I have a feeling I missed 
 something in the 
 expliation.
 
 
 George Sexton wrote:
  The technique I use is this:
  
  Run the HTTP connector on port 8080.
  
  Forward port 80 to port 8080.
  
  To re-start the system:
  
  edit the server.xml and run the HTTP connector on port 7080
  Change the shutdown port to 8006
  
  Start tomcat, and wait till it comes up.
  
  Re-run the firewall script to forward port 80 to port 7080.
  
  Stop the instance running on port 7080.
  
  The downside is that any active sessions get bounced and 
 have to re-login.
  
  George Sexton
  MH Software, Inc.
  http://www.mhsoftware.com/
  Voice: 303 438 9585

  
  
 -Original Message-
 From: Seth Ladd [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 16, 2005 3:12 PM
 To: Tomcat Users List
 Subject: Advice for Hosting Many Individual Webapps?
 
 Hello,
 
 We are finding outselves hosting more and more individual 
 webapps, all 
 running on Tomcat 5.5.9 w/ JDK 1.5.  Each of these webapps is 
 developed 
 and deployed on a separate schedule, and the number and 
 frequency of app 
 deployments is increasing.
 
 The frequency is so much that the uptime of all of our 
 applications is 
 affected as we continually take down Tomcat servers in 
 production to 
 deploy a new application (or new version of the application). 
  Because 
 hot deploy does not work (the old favorite OOM error w/ too many 
 redeploys), we bounce the Tomcat server for every redeploy.
 
 To avoid taking down all of our applications when we need to 
 redeploy a 
 single app, we've begun to deploy each application to their 
 own Tomcat 
 instance.  All of these instances are fronted by a single 
 Apache server 
 handling vhosts, logging, etc.
 
 We're just curious how common this setup really is.  We know 
 we are in 
 an uncommon position, with so many webapps (approaching 20, 
 and growing 
 very fast).  We don't want to put all our eggs in one basket, so to 
 speak, so we've begun to split out individual tomcat instances.
 
 Anyone else have to handle numerous webapps, with frequent 
 deploys, and 
 have to keep uptime for all apps as high as possible?  We 
 hesitate to 
 put all webapps in one tomcat, because to deploy one app 
 means we have 
 to take down all of our apps.  This is becoming unacceptable. 
  (not to 
 mention that a memory leak in one app will bring down all the apps 
 living in that tomcat instance)
 
 Any tips or tricks would be really appreciated.  Or pointers 
 to previous 
 material (I've found some, but nothing that jumped out at me).
 
 Thanks very much in advance,
 Seth
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -- 
 Brian Cook
 Digital Services Analyst
 Print Time Inc.
 [EMAIL PROTECTED]
 913.345.8900
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



load balancing 2 tomcats on 1 machine question

2005-08-18 Thread Allistair Crossley
Hi,
 
I thought I had this sussed but it seems I haven't :( 2 tomcats, 1 machine, JK 
to balance with stick sessions. The following configuration works in that JK 
routes requests to both the tomcats and so on. 
 
The issue is that if I look in the access logs for each tomcat I can see that 1 
session gets spread across both tomcats rather than staying on one. 
 
This question is ever so slightly related to a post earlier today by a poster 
who was seeing JK actually stay with the same tomcat, but still create a new 
session. My issue is that the requests do not stay with the same tomcat.
 
Is anyone able to suggest why this is?
 
Regards, Allistair.
 
workers.tomcat_home=d:\jakarta-tomcat
workers.java_home=c:\Program Files\Java\jdk1.5.0
ps=\
 
worker.list=loadbalancer
 
worker.tomcat1.port=8009
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=1
worker.tomcat1.cachesize=1
 
worker.tomcat2.port=8109
worker.tomcat2.host=localhost
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor=1
worker.tomcat2.cachesize=1
 
worker.loadbalancer.type=lb
worker.loadbalancer.sticky_session=true
worker.loadbalancer.method=R
worker.loadbalancer.balanced_workers=tomcat1,tomcat2
 
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT



RE: load balancing 2 tomcats on 1 machine question

2005-08-18 Thread Allistair Crossley
Hi Mladen,

Damn, no, I didn't :) Thanks very much indeed, seems to have done the trick :)

Cheers, Allistair.

 -Original Message-
 From: Mladen Turk [mailto:[EMAIL PROTECTED]
 Sent: 18 August 2005 17:17
 To: Tomcat Users List
 Subject: Re: load balancing 2 tomcats on 1 machine question
 
 
 Allistair Crossley wrote:
  Hi,
   
  I thought I had this sussed but it seems I haven't :( 2 
 tomcats, 1 machine, JK to balance with stick sessions. The 
 following configuration works in that JK routes requests to 
 both the tomcats and so on. 
 
 
 Did you set the jvmRoute=tomcat1 inside server.xml Engine tag
 for the first and jvmRoute=tomcat2 for the second instance.
 
 
   
  workers.tomcat_home=d:\jakarta-tomcat
  workers.java_home=c:\Program Files\Java\jdk1.5.0
  ps=\
 
 
 You don't need that
 
 
   
  worker.inprocess.type=jni
  
 worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps
 )tomcat.jar
  worker.inprocess.cmd_line=start
  
 worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$
 (ps)classic$(ps)jvm.dll
  
 worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)in
 process.stdout
  
 worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)in
 process.stderr
 
 
 You don't need that too.
 
 
 Regards,
 Mladen.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: tomcat connect to IIs - Upload problem

2005-08-15 Thread Allistair Crossley
Hi,
 
What is the error that you receive when uploading  50kb? I know there was 
previously a bug with earlier versions of the now unsupported JK2 connector. If 
that's what you are using then you should upgrade to the latest JK 1.2.x 
connector.
 
Allistair.

-Original Message- 
From: Paulo Neves [mailto:[EMAIL PROTECTED] 
Sent: Mon 15/08/2005 18:30 
To: tomcat-user@jakarta.apache.org 
Cc: 
Subject: tomcat connect to IIs - Upload problem



Hi all,


 I have tomcat connected to IIs and working fine.

 But I can't upload files  50Kb, anyone knows what I need to change
to permit upload files  50Kb ??

 If I upload directly with tomcat works fine.


Regards,
Paulo


--
--
Paulo Jorge Zagalo das Neves
Linux User # 61096
--

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





FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT

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

RE: Tomcat 5.5 upgrade + logging problems

2005-08-12 Thread Allistair Crossley
Really, this has been discussed to death on this mailing list. The 5.5 logging 
page for a start gives you instructions for setting logging up. Also, I have a 
blog at www.adcworks.com/blog that touches on 5.5 configuration and logging.

Allistair.

 -Original Message-
 From: Robert Abbate [mailto:[EMAIL PROTECTED]
 Sent: 11 August 2005 15:43
 To: tomcat-user@jakarta.apache.org
 Subject: Tomcat 5.5 upgrade + logging problems
 
 
 Hi. I have searched through archives and online for such 
 solutions for the
 depreciated Logger element. We have a virtual host setup 
 and requires
 separate logs for each host. We have followed the 
 instructions such as this:
 
 jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html
 
 we've put log4j.properties file in each host's 
 WEB-INF/classes folder, and
 log4j1.2.8.jar into WEB-INF/lib in each host
 
 still, nothing seems to work. there must be something we are missing.
 
 
 CONFIGURATION:
 
 CATALINA_HOME=/var/tomcat5
 TOMCAT_USER=apache
 JAVA_HOME=/usr/java
 CATALINA_OPTS=-Xmx1228M -Djava.awt.headless=true
  java= 1.5.0_03
 
 server.xml
 CUT
 Host name=domain.com unpackWARs=true autoDeploy=true
 appBase=/home/rondelli/html
   Realm className=org.apache.catalina.realm.MemoryRealm
 pathname=/var/tomcat5/conf/tomcat-users/rondelli-t
 omcat-users.xml/
   Context path= docBase=/home/rondelli/html debug=0/
 Aliaswww.domain.com/Alias
 Context path=/tomcatmanager 
 docBase=/var/tomcat5/server/webapps/manager
 debug=0 privileged=true/
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=domain.com_log. suffix=.txt directo
 ry=/home/rondelli timestamp=true/
 /Host
 
 Host name=domain2.com unpackWARs=true autoDeploy=true
 appBase=/home/revisionten/html
   Realm className=org.apache.catalina.realm.MemoryRealm
 pathname=/var/tomcat5/conf/tomcat-users/revisionte
 n-tomcat-users.xml/
   Context path= docBase=/home/revisionten/html debug=0/
 Aliaswww.domain2.com/Alias
 Context path=/tomcatmanager 
 docBase=/var/tomcat5/server/webapps/manager
 debug=0 privileged=true/
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=domain2.com_log. suffix=.txt dire
 ctory=/home/revisionten timestamp=true/
 /Host
 CUT.
 
 
 /usr/java/bin/java 
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLo
 gManager -Xmx1228M -Djava.awt.headless=true 
 -Djava.endorsed.dirs=/var/tomcat
 5/common/endorsed -classpath
 :/var/tomcat5/bin/bootstrap.jar:/var/tomcat5/bin/commons-loggi
 ng-api.jar:/us
 r/java/jre/lib/mysql-connector-java-3.0.15-ga-bin.jar:/var/tom
 cat5/common/li
 b/log4j-1.2.8.jar -Dcatalina.base=/var/tomcat5 
 -Dcatalina.home=/var/tomcat5 
 -Djava.io.tmpdir=/var/tomcat5/temp 
 org.apache.catalina.startup.Bootstrap
 start
 
 Does anyone have a setup like this and can offer any clues? 
 If you need any
 further config details, please ask. I hope I gave all necessary.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Out of memory

2005-08-12 Thread Allistair Crossley
Hi,

You can modify the memory settings for the windows service also in the 
service.bat file itself. I've been known to uninstall the service, modify the 
bat file and then service install again. I don't like using the binary version 
so that should work for you.

Secondly, OOMEs should be addressed by profiling (discussed lots on this list) 
not by throwing more memory at Tomcat (unless of course you have a valid need 
for all that RAM).

Allistair

 -Original Message-
 From: Yun Yang [mailto:[EMAIL PROTECTED]
 Sent: 11 August 2005 19:31
 To: Tomcat Users List
 Subject: Out of memory 
 
 
 
 Hello,
 
 I am using Tomcat5.0.28. When I try to run my web application, I got
 this message:
 
 exception
  
 javax.servlet.ServletException: Servlet execution threw an exception
 
 root cause
 
 java.lang.OutOfMemoryError
 
  
 How can I solve this problem? I tried to uninstall tomcat5 as service
 using service.bat remove and tried to reinstall it as service in
 Windows XP. How can I add option like -xmx512M into service.bat? Or
 How can I increase the heap size?
 
 I added this statement into Catalina.bat set JAVA_OPTS=-Xmx512m. It
 works. But When I run tomcat5.0 as server it still does not work.
 
  
 
 Thanks,
 
  
 
 Yun Yang
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Out of memory

2005-08-12 Thread Allistair Crossley
Oh yes :) 

 -Original Message-
 From: Wolfgang Hackl [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 09:24
 To: Tomcat Users List
 Subject: RE: Out of memory
 
 
 
  You can modify the memory settings for the windows service 
 also in the
  service.bat file itself. I've been known to uninstall the 
 service, modify 
  the bat file and then service install again. 
 
 Forget about a reinstall. Use regedit and go to 
 
 HKEY_LOCAL_MACHINE\SOFTWARE\Apache software Foundation\Procrun
 2.0\yourTomcatServiceName\Parameters\Java 
 
 and edit the JvmMx and JvmMs settings as your deployment requires.
 
 Kind regards
 Wolfgang
 
 -- 
 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
 +++ GMX - die erste Adresse für Mail, Message, More +++
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Tomcat W3C Access Log

2005-08-12 Thread Allistair Crossley
Hi,

Just use the Access Log Value with the pattern you need. You can see the 
built-in patterns or define your own one.

Check out the docs

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/valve.html

Cheers, Allistair.

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Björn Andersen
 Sent: 12 August 2005 11:24
 To: tomcat-user@jakarta.apache.org
 Subject: Tomcat W3C Access Log
 
 
 Hi,
 
 We are hosting webapplications on IIS with an Tomcat-Backend 
 connected via 
 JK2.
 We analyze the IIS-Logs to supply Webstats. Now, the 
 ISAPI-calls to the JK2 
 can not be analyzed.
 We see that Tomcat has a Logger-Valve for a W3C format access log.
 How can we configrue our Tomcatfarm to produce W3C-conform 
 per-application 
 accesslogs?
 Preferably in server.xml, so we don't have to change the apps.
 If you gotta build it manually in the applcations, how is that done?
 
 thanks fou your help.
 
 Bjoern 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Tomcat 5.5 upgrade + logging problems

2005-08-12 Thread Allistair Crossley
Hi Robert,

The fact is that followed precisely the instructions do work. I *almost* 
guarantee this because I walked through it just last week with a guy on a 
vanilla Tomcat 5.5.9 install and I deal with Tomcat and logging daily.

The question is, what kind of logging do you want, because there are 2 types. 
The old FileLogger was internal logging mixed with webapp logging. Tomcat 5.5 
aims to decouple itself from a custom logging implementation and uses the 
Commons Logging wrapper to allow developers to customise their logging output 
in a more flexible and powerful way. 

Therefore the developers did not do a *bad thing* as you describe, you are 
simply peeved off that you don't understand the change. That's natural, noone 
likes change, but change is inevitable if we are to do things better. Granted 
that FileLogger was probably easier, but it was not as powerful or flexible. 
And perhaps the logging page is not the most straightforward but it does work 
when followed.

So now, if you want Tomcat core classes logging, i.e internal Tomcat logging, 
then you need to have a log4j.properties file inside tomcat/common/classes and 
*both* the log4j jar *and* commons logging jar in tomcat/common/lib. This 
information in my view is not all that useful unless you're trying to get to 
the nitty gritty of what's happening. More than likely you are more interested 
in per-webapp logging.

If you want logging for a web application in particular, then you need a 
log4j.properties in the webapp's classes folder and log4j jar only in the lib.

History on this list shows us that logging configuration issues like these are 
almost always caused by something the user has misunderstood or done in their 
customisation or web application. 

As for the multiple virtual hosts with webapps;

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost][/yourwebappname]=DEBUG,
 R

You'll recognise localhost is a servername, so perhaps you could try using your 
virtual host name and let us know if that works.

Cheers, Allistair.

 -Original Message-
 From: Robert Abbate [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 01:37
 To: Allistair Crossley
 Subject: RE: Tomcat 5.5 upgrade + logging problems
 
 
 I appreciate your response, but I can assure you there are 
 many out there
 which are not able to get this going EVEN after following the scant
 instructions. I had consulted at least 5 other webhosting 
 companies that I
 am in contact with all having the same issue. There is 
 something wrong and
 not much help so far. Tomcat developers did a bad thing by 
 removing support
 for Logger element. They didn't have to do that since it worked fine.
 
 Also, I see your site doesn't address a virtual /multiple host setup; I have
 not seen any help anywhere on this setup as we are requesting.
 
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 12, 2005 3:07 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 5.5 upgrade + logging problems
 
 
 Really, this has been discussed to death on this mailing list. The 5.5
 logging page for a start gives you instructions for setting 
 logging up.
 Also, I have a blog at www.adcworks.com/blog that touches on 5.5
 configuration and logging.
 
 Allistair.
 
  -Original Message-
  From: Robert Abbate [mailto:[EMAIL PROTECTED]
  Sent: 11 August 2005 15:43
  To: tomcat-user@jakarta.apache.org
  Subject: Tomcat 5.5 upgrade + logging problems
 
 
  Hi. I have searched through archives and online for such
  solutions for the
  depreciated Logger element. We have a virtual host setup
  and requires
  separate logs for each host. We have followed the
  instructions such as this:
 
  jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html
 
  we've put log4j.properties file in each host's
  WEB-INF/classes folder, and
  log4j1.2.8.jar into WEB-INF/lib in each host
 
  still, nothing seems to work. there must be something we 
 are missing.
 
 
  CONFIGURATION:
 
  CATALINA_HOME=/var/tomcat5
  TOMCAT_USER=apache
  JAVA_HOME=/usr/java
  CATALINA_OPTS=-Xmx1228M -Djava.awt.headless=true
   java= 1.5.0_03
 
  server.xml
  CUT
  Host name=domain.com unpackWARs=true autoDeploy=true
  appBase=/home/rondelli/html
Realm className=org.apache.catalina.realm.MemoryRealm
  pathname=/var/tomcat5/conf/tomcat-users/rondelli-t
  omcat-users.xml/
Context path= docBase=/home/rondelli/html debug=0/
  Aliaswww.domain.com/Alias
  Context path=/tomcatmanager
  docBase=/var/tomcat5/server/webapps/manager
  debug=0 privileged=true/
   Logger className=org.apache.catalina.logger.FileLogger
  prefix=domain.com_log. suffix=.txt directo
  ry=/home/rondelli timestamp=true/
  /Host
 
  Host name=domain2.com unpackWARs=true autoDeploy=true
  appBase=/home/revisionten/html
Realm className=org.apache.catalina.realm.MemoryRealm
  pathname=/var/tomcat5/conf/tomcat-users/revisionte
  n-tomcat-users.xml/
Context path= docBase=/home

RE: Tomcat 5.5 upgrade + logging problems

2005-08-12 Thread Allistair Crossley
===
Tomcat 5.5.10 Virtual Host example setup with log4j logging per host
===

I hope this can be of some use to those who are confused about how to add 
logging to Virtual Hosts in Tomcat 5.5 Series since the disappearance of 
FileLogger.

You will need to be able to configure DNS resolution for this example.

In this example I setup 2 Virtual Hosts each with their own web applications. 
Each
host gets its own log.

I cause an exception in one of the Virtual Hosts to show that its logging is 
directed
into its log.

Virtual Host DNS Entries


Create 2 DNS entries to the Tomcat target machine

tomcata.qas.com
tomcatb.qas.com

Tomcat 5.5.10
-

Download and unzip somewhere.

Virtual Host Web Applications
-

Create directories for the vhost webapps

catalina_home/webapps-a
catalina_home/webapps-b

Copy ROOT and jsp-examples directories from catalina_home/webapps into both 
webapps-a and webapps-b

Setup the exception test


Enter webapps-b/jsp-examples
Create file test.jsp and add into it

% throw new Exception(); %

log4j.properties


Create file log4j.properties in catalina_home/common/classes and copy the 
following into it;

# Root
log4j.rootCategory=error, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=c:/jakarta-tomcat-5.5.10/logs/tomcat-root.log
log4j.appender.R.MaxFileSize=1500KB
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n

# VH A
log4j.appender.A=org.apache.log4j.RollingFileAppender
log4j.appender.A.File=c:/jakarta-tomcat-5.5.10/logs/tomcat-a.log
log4j.appender.A.MaxFileSize=1500KB
log4j.appender.A.MaxBackupIndex=1
log4j.appender.A.layout=org.apache.log4j.PatternLayout
log4j.appender.A.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n

# VH B
log4j.appender.B=org.apache.log4j.RollingFileAppender
log4j.appender.B.File=c:/jakarta-tomcat-5.5.10/logs/tomcat-b.log
log4j.appender.B.MaxFileSize=1500KB
log4j.appender.B.MaxBackupIndex=1
log4j.appender.B.layout=org.apache.log4j.PatternLayout
log4j.appender.B.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG,
 R
log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=false

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[tomcata.qas.com]=DEBUG,
 A
log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[tomcata.qas.com]=false

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[tomcatb.qas.com]=DEBUG,
 B
log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[tomcatb.qas.com]=false

server.xml
--

After the localhost Host element, add the Virtual Hosts (here I also add per 
Host access logs)

Host name=tomcata.qas.com appBase=webapps-a
  Valve 
className=org.apache.catalina.valves.FastCommonAccessLogValve
directory=logs  
prefix=a_access_log. 
suffix=.txt
pattern=common 
resolveHosts=false/ 
/Host

Host name=tomcatb.qas.com appBase=webapps-b
  Valve 
className=org.apache.catalina.valves.FastCommonAccessLogValve
directory=logs  
prefix=b_access_log. 
suffix=.txt
pattern=common 
resolveHosts=false/ 
/Host  

logging jars


Download and copy log4j1.2.9.jar into catalina_home/common/lib
Download and copy commons-logging.jar into catalina_home/common/lib

Finish and Test
---

That's it. Start Tomcat and go into the logs directory. You should see all the 
new logs created with some default startup information. 

Now browse to 

http://tomcata.qas.com:8080/ (you should get the ROOT tomcat welcome page)
http://tomcatb.qas.com:8080/test.jsp (you should get an exception, check the 
tomcat-b.log

Summary
---

Note that this is virtual host logging, it is not webapp logging. For webapp 
logging you need to configure log4j within the web application itself which is 
another example.

-- end --

 -Original Message-
 From: Allistair Crossley 
 Sent: 12 August 2005 13:57
 To: tomcat-user@jakarta.apache.org
 Cc: Robert Abbate
 Subject: RE: Tomcat 5.5 upgrade + logging problems
 
 
 Hi Robert,
 
 The fact is that followed precisely the instructions do work. 
 I *almost* guarantee this because I walked through it just 
 last week with a guy on a vanilla Tomcat 5.5.9 install and I 
 deal with Tomcat and logging daily.
 
 The question is, what kind of logging do you want, because 
 there are 2 types. The old FileLogger was internal logging 
 mixed with webapp logging. Tomcat 5.5 aims to decouple itself 
 from a custom logging implementation and uses the Commons 
 Logging wrapper to allow developers

RE: Out of memory

2005-08-12 Thread Allistair Crossley
You can also get OOME in development by causing restarts by copying class files 
or web.xml files into a running web application with reloadable=true and 
depending on how good you are at cleaning out your appliacation this leaks 
until such a point you get the OOME usually with PermGen error.

 -Original Message-
 From: Brian Cook [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 15:48
 To: Tomcat Users List
 Subject: Re: Out of memory
 
 
 
 You would probably be better served looking at what you can change in 
 the app so it does not require so much RAM.  It has been my 
 experience 
 that when I get an out of memory error it is because I was 
 forgetting to 
 close an object, or calling too many large objects globally, 
 or reading 
 in too much data into a result set.
 
 Of all my web apps only one requires the heap size to be 
 raised to the 
 512MB limit.  It loads multiple 1MB - 10MB overlays them on 
 one another 
 and then dynamically overlays a lot of font specific 
 anti-aliasing text.
 
 Unless the application is doing similarly demanding you would 
 probably 
 be better severed by debugging the app to see what is using 
 so much RAM.
 
 If you are making a development error like say forgetting to close an 
 object something everyone on the list has done it is always better to 
 learn of errors as early as possible so you do not carry it over to 
 other apps.
 
 A lesson I have learned the hard way.
 
 
 Allistair Crossley wrote:
  Oh yes :) 
  
  
 -Original Message-
 From: Wolfgang Hackl [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 09:24
 To: Tomcat Users List
 Subject: RE: Out of memory
 
 
 
 
 You can modify the memory settings for the windows service 
 
 also in the
 
 service.bat file itself. I've been known to uninstall the 
 
 service, modify 
 
 the bat file and then service install again. 
 
 Forget about a reinstall. Use regedit and go to 
 
 HKEY_LOCAL_MACHINE\SOFTWARE\Apache software Foundation\Procrun
 2.0\yourTomcatServiceName\Parameters\Java 
 
 and edit the JvmMx and JvmMs settings as your deployment requires.
 
 Kind regards
 Wolfgang
 
 -- 
 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
 +++ GMX - die erste Adresse für Mail, Message, More +++
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  
  
  
  FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
  ---
  QAS Ltd.
  Registered in England: No 2582055
  Registered in Australia: No 082 851 474
  ---
  /FONT
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -- 
 Brian Cook
 Digital Services Analyst
 Print Time Inc.
 [EMAIL PROTECTED]
 913.345.8900
 
 

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



RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Allistair Crossley
Can you post the JSP directives, and the scriplet that calls log4j? Also, you 
have been given a line number 39 .. can you work out which line this is in the 
work directory.

Allistair.

 -Original Message-
 From: Gary Zhu [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:17
 To: Tomcat Users List
 Subject: Cannot compile jsp pages with log4j statements -- 
 Tomcat 5.5.9
 
 
 Hi all, 
  
 I am having difficulties to figure out the solution for this 
 issue. Jsp
 pages with log4j logging statements that worked perfect on 
 Tomcat 4.1.30
 could not compile on Tomcat 5.5.9. I commented out the log4j 
 statements
 for these problematic pages, then, tomcat 5.5.9 could compile them.
  
 Except commenting out all the log4j statements for the jsp pages in
 order to run on Tomcat 5.5.9, does anyone have any other solutions?
  
 Below is the JasperException message when attempting to compile JSP
 pages with log4j statements:
  
  
 org.apache.jasper.JasperException: Unable to compile class for JSP
 
 An error occurred at line: 39 in the jsp file:
 /sysco/agent_report_all_in.jsp
 Generated servlet error:
 agent_report_all_in_jsp cannot be resolved or is not a type
 
 
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa
ultErrorHa
 ndler.java:84)
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
patcher.ja
 va:328)
 org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil
er.java:39
 7)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
 org.apache.jasper.JspCompilationContext.compile(JspCompilation
Context.ja
 va:556)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
Wrapper.ja
 va:293)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
.java:291)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 Thanks
  
 Gary
 
  
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: WEB-INF/lib/myjar.jar doesn't contain file xyz...

2005-08-12 Thread Allistair Crossley
Can you post the full exception stack?

 -Original Message-
 From: t.n.a. [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:19
 To: tomcat-user@jakarta.apache.org
 Subject: WEB-INF/lib/myjar.jar doesn't contain file xyz...
 
 
 Tomcat (5.5) seems reluctant to load a .jar file from the WEB-INF/lib
 directory.
 Specifically, it seems to load tapestly.jar (as the error is displayed
 in a tapestry exception page), but it doesn't seem to want anything to
 do with cayenne.jar.
 The reported error is that a file in cayenne.jar is missing, which is
 plain wrong: when you unzip the .jar, it's there.
 Also, I've got another application that also uses cayenne.jar - on the
 same tomcat server - and it just works.
 
 Am I missing something here?
 
 Tia,
 Tomislav
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Problems with context

2005-08-12 Thread Allistair Crossley
And what is the error you are getting? 404? 500? Exception? What?

Allistair.

 -Original Message-
 From: Fermin Jimenez Najar [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 08:54
 To: Tomcat Users List
 Subject: Problems with context
 
 
 Hi. I just has beginning to use the Tomcat, for programming in JSP.
 I have the 5.0 version.
 
 I make a web app that uses, in some jsp's files, the command
 response.sendRedirect.
 
 When i execute the pages locally in my computer, works fine, 
 but, i if try
 to
 test the pages from another computer, i get an error.
 
 This is the way i was executed the sendRedirect for test in 
 another machine,
 and always get an error:
 response.sendRedirect(http://localhost:8080/activation/obliga
 torios.jsp)
 response.sendRedirect(http://192.168.1.137:8080/activation/ob
 ligatorios.jsp
 )
 response.sendRedirect(http://mycomputer:8080/activation/oblig
 atorios.jsp)
 response.sendRedirect(/obligatorios.jsp)
 response.sendRedirect(activation/obligatorios.jsp)
 
 
 I think that could be some context problems because, for make 
 the webapp
 structure, i
 copied one example webapp that comes with the tomcat, then i 
 deleted and
 renamed
 those files and directories that i dont use (off course, the 
 web-inf still
 exist)
 
 What can i do ? Is there is some file where i must configure 
 the context of
 the webapp ?
 
 Thanks !!
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Allistair Crossley
I think Jon maybe onto something ... to use agent_report_all_in_jsp.class your 
JSP would need to be called

agent_report_all_in.jsp

Is that the case?

Allistair/

 -Original Message-
 From: Jon Wingfield [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:44
 To: Tomcat Users List
 Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat
 5.5.9
 
 
 It doesn't like the agent_report_all_in_jsp classname.
 I'm guessing that's supposed to be the name of the servlet class 
 generated from the jsp. Are you sure it's correct? If it is 
 then you may 
 have to use a String argument instead of a class when calling 
 the Logger 
 factory method.
 
 Gary Zhu wrote:
  Thanks Allistair.
  
  Below is the snippet of the code, I indicated line 39 as well.
  
   %@ page import=javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, 
java.io.File,
java.io.FileOutputStream,  
java.io.IOException,
java.io.BufferedReader,
java.io.FileInputStream,
java.util.StringTokenizer,
java.util.ArrayList,
java.io.InputStreamReader,
java.io.InputStream,
java.io.OutputStream,
com.timeicr.sysco.web.bean.AgentBean,
com.timeicr.util.web.session.*,
org.apache.log4j.* %  
  
  %
response.setHeader(Cache-Control,no-cache); //HTTP 1.1
response.setHeader(Pragma,no-cache); //HTTP 1.0
response.setDateHeader(Expires, 0); //prevents caching 
 at the proxy
  server
  %

  (Line 39)%!
static private org.apache.log4j.Logger logger =
  org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class);
  %
  
  Gary
  
   
  
  -Original Message-
  From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
  Sent: August 12, 2005 11:20 AM
  To: Tomcat Users List
  Subject: RE: Cannot compile jsp pages with log4j statements 
 -- Tomcat
  5.5.9
  
  Can you post the JSP directives, and the scriplet that calls log4j?
  Also, you have been given a line number 39 .. can you work out which
  line this is in the work directory.
  
  Allistair.
  
  
 -Original Message-
 From: Gary Zhu [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:17
 To: Tomcat Users List
 Subject: Cannot compile jsp pages with log4j statements -- Tomcat 
 5.5.9
 
 
 Hi all,
  
 I am having difficulties to figure out the solution for this issue. 
 Jsp pages with log4j logging statements that worked perfect 
 on Tomcat 
 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j 
 statements for these problematic pages, then, tomcat 5.5.9 could 
 compile them.
  
 Except commenting out all the log4j statements for the jsp pages in 
 order to run on Tomcat 5.5.9, does anyone have any other solutions?
  
 Below is the JasperException message when attempting to compile JSP 
 pages with log4j statements:
  
  
 org.apache.jasper.JasperException: Unable to compile class for JSP
 
 An error occurred at line: 39 in the jsp file:
 /sysco/agent_report_all_in.jsp
 Generated servlet error:
 agent_report_all_in_jsp cannot be resolved or is not a type
 
 
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa
  
  ultErrorHa
  
 ndler.java:84)
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
  
  patcher.ja
  
 va:328)
 org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil
  
  er.java:39
  
 7)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
 org.apache.jasper.JspCompilationContext.compile(JspCompilation
  
  Context.ja
  
 va:556)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
  
  Wrapper.ja
  
 va:293)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
  
  .java:291)
  
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 Thanks
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Virtual Host Config Question

2005-08-12 Thread Allistair Crossley
Hi,

Not sure about this one. How are you routing requests to Tomcat? Are you using 
the JK connector with a mapping of /*.do? Do you allow image to be handled by 
Apache/IIS or is Tomcat doing it? 
You may need to ensure your static resource uris like images reference the 
context name, e.g src=/unique/images/pic.gif

Allistair.

 -Original Message-
 From: Scott Purcell [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 15:43
 To: tomcat-user@jakarta.apache.org
 Subject: Virtual Host Config Question
 
 
 Hello,
 
 I have configured two Hosts in my server.xml for two different sites.
 
 The one I am having issues with is as follows:
  Host name=www.theuniquepear.com appBase=webapps/unique/
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 Context path= docBase=. /
 
 It actuall works well, but I am running struts application 
 and with struts it includes the context which is unique.
 
 So behind the scenes, (in the URL) I am getting something like this:
 
 http://www.theuniquepear.com/welcome.do
 which is really doing this
 http://www.theuniquepear.com/unique/welcome.do
 
 And things of course are getting screwed up. 
 
 Is there a way to get around that. I took off the /unique 
 under appBase but then it showed the default Tomcat page.
 
 Anyone been here before?
 
 Thanks
 Scott
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Allistair Crossley
Hi,

It doesn't really matter if you did the app or not, it's irrelevant to this 
conversation and you asked a question.

Anyway, yes an awful lot has changed between 4.1 and 5.5 including the Jasper 
compiler, see the change logs.

However, I have tested your declaration on 5.5.9 and do not get this error 
therefore I think we can rule out the Jasper compiler.

%!
  static private org.apache.log4j.Logger logger = 
org.apache.log4j.Logger.getLogger(_5_jsp.class);
%

Have you definately cross-checked the class filename in the 
tomcat_home/work/Catalina/localhost/_/org/apache/jsp location?

Allistair.

 -Original Message-
 From: Gary Zhu [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 17:08
 To: Tomcat Users List
 Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat
 5.5.9
 
 
 First of all, I am not the one who did this app.
 
 Second, it is the case that the JSP file is called
 agent_report_all_in.jsp. 
 
 The question is: Why it runs perfect on Tomcat 4.1.30, and has issues
 with Tomcat 5.5.9? The JasperCompiler on Tomcat5.5.9 has 
 introduced some
 bugs that JasperCompiler on Tomcat 4.1.30 does not have?
 
 Thanks.
 
 Gary 
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
 Sent: August 12, 2005 11:46 AM
 To: Tomcat Users List
 Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat
 5.5.9
 
 I think Jon maybe onto something ... to use
 agent_report_all_in_jsp.class your JSP would need to be called
 
 agent_report_all_in.jsp
 
 Is that the case?
 
 Allistair/
 
  -Original Message-
  From: Jon Wingfield [mailto:[EMAIL PROTECTED]
  Sent: 12 August 2005 16:44
  To: Tomcat Users List
  Subject: Re: Cannot compile jsp pages with log4j statements 
 -- Tomcat
  5.5.9
  
  
  It doesn't like the agent_report_all_in_jsp classname.
  I'm guessing that's supposed to be the name of the servlet class 
  generated from the jsp. Are you sure it's correct? If it is 
 then you 
  may have to use a String argument instead of a class when 
 calling the 
  Logger factory method.
  
  Gary Zhu wrote:
   Thanks Allistair.
   
   Below is the snippet of the code, I indicated line 39 as well.
   
%@ page import=javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse, 
 java.io.File,
 java.io.FileOutputStream,  
 java.io.IOException,
 java.io.BufferedReader,
 java.io.FileInputStream,
 java.util.StringTokenizer,
 java.util.ArrayList,
 java.io.InputStreamReader,
 java.io.InputStream,
 java.io.OutputStream,
 com.timeicr.sysco.web.bean.AgentBean,
 com.timeicr.util.web.session.*,
 org.apache.log4j.* %  
   
   %
 response.setHeader(Cache-Control,no-cache); //HTTP 1.1
 response.setHeader(Pragma,no-cache); //HTTP 1.0
 response.setDateHeader(Expires, 0); //prevents caching
  at the proxy
   server
   %
 
   (Line 39)%!
 static private org.apache.log4j.Logger logger = 
   org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class);
   %
   
   Gary
   

   
   -Original Message-
   From: Allistair Crossley [mailto:[EMAIL PROTECTED]
   Sent: August 12, 2005 11:20 AM
   To: Tomcat Users List
   Subject: RE: Cannot compile jsp pages with log4j statements
  -- Tomcat
   5.5.9
   
   Can you post the JSP directives, and the scriplet that 
 calls log4j?
   Also, you have been given a line number 39 .. can you 
 work out which
 
   line this is in the work directory.
   
   Allistair.
   
   
  -Original Message-
  From: Gary Zhu [mailto:[EMAIL PROTECTED]
  Sent: 12 August 2005 16:17
  To: Tomcat Users List
  Subject: Cannot compile jsp pages with log4j statements -- Tomcat
  5.5.9
  
  
  Hi all,
   
  I am having difficulties to figure out the solution for 
 this issue. 
  Jsp pages with log4j logging statements that worked perfect
  on Tomcat
  4.1.30 could not compile on Tomcat 5.5.9. I commented out 
 the log4j 
  statements for these problematic pages, then, tomcat 5.5.9 could 
  compile them.
   
  Except commenting out all the log4j statements for the 
 jsp pages in 
  order to run on Tomcat 5.5.9, does anyone have any other 
 solutions?
   
  Below is the JasperException message when attempting to 
 compile JSP 
  pages with log4j statements:
   
   
  org.apache.jasper.JasperException: Unable to compile class for JSP
  
  An error occurred at line: 39 in the jsp file:
  /sysco/agent_report_all_in.jsp
  Generated servlet error:
  agent_report_all_in_jsp cannot be resolved or is not a type
  
  
  org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa
   
   ultErrorHa
   
  ndler.java:84)
  org.apache.jasper.compiler.ErrorDispatcher.javacError

RE: Listening on multiple ips

2005-08-12 Thread Allistair Crossley
In the time it took you to write this email you could have tested this!! ;o) 
Looks reasonable so long as you want to connect direct to Tomcat on port 80 for 
each IP ... try it out and get back to us.

Allistair.

 -Original Message-
 From: David Erickson [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 17:20
 To: tomcat-user@jakarta.apache.org
 Subject: Listening on multiple ips
 
 
 Hi I was just wondering what the best way to setup tomcat to listen to
 multiple ip addresses is?  I have a box with 1 nic that has 3 
 ip addresses,
 the first address port 80 is in use by apache so I want it to 
 listen on the
 2nd and 3rd address.  I also need to have different webapps 
 be loaded for
 each of the addresses it is listening on.  From looking at 
 the conf file I
 was wondering if I can just create two connectors for each ip 
 address ie:
 
 Connector address=X.X.X.61 port=80
maxThreads=150 minSpareThreads=25 
 maxSpareThreads=75
enableLookups=false redirectPort=443 
 acceptCount=100
debug=0 connectionTimeout=2 
disableUploadTimeout=true /
 
 Connector address=X.X.X.62 port=80
maxThreads=150 minSpareThreads=25 
 maxSpareThreads=75
enableLookups=false redirectPort=443 
 acceptCount=100
debug=0 connectionTimeout=2 
disableUploadTimeout=true /
 
 And then in the engine create two Host elements:
 
   Host name=X.X.X.61 debug=0 appBase=webapps-61
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 
   Host name=X.X.X.62 debug=0 appBase=webapps-62
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 
 
 Would this work?
 
 Thanks,
 David
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?

2005-08-11 Thread Allistair Crossley
Hi,

Can you please send more information, such as error messages, stdout logging 
and the configuration for your pool.

Cheers, Allistair.

 -Original Message-
 From: Wylie, Ian [mailto:[EMAIL PROTECTED]
 Sent: 11 August 2005 10:28
 To: Tomcat Users List
 Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server
 using JNDI?
 
 
 David,
 
 Thanks for the link.   I have followed the instructions but 
 unfortunately
 get similar errors to what I had previously I am afraid.
 
 In a situation like this I am sure I could get the company to 
 pay for some
 support for this type of problem, but I am unsure who would 
 be best to help
 with this.
 
 Without further help, I will have to sideline the upgrade to 
 5.5, until
 there is more info out there for the connecting using JNDI 
 with a MS SQL
 Server example.  
 
 In my opinion the people who develop Tomcat should provide an 
 example of
 JNDI for ALL major databases.  This is one of the things that 
 makes the
 Tomcat offering lacking somewhat in maturity.  It seems to me it is
 relatively easy to get the basic JSP / Servlet stuff up and 
 running in no
 time, but it has always been a hassle to get JNDI to work in 
 Tomcat.  The
 Tomcat folks provide MySQL and an Oracle example but they 
 need to provide
 examples for MS SQL Server, DB2 and Sybase.
 
 Thanks for your help though - as it may have worked...  :-)
 
 Best Regards,
 
 Ian
 
 Ian Wylie
 Business Intelligence Architect
 Business Information  Technology (BIT)
 Pfizer Global Pharmaceuticals (PGP)
 
 
 -Original Message-
 From: David Thielen [mailto:[EMAIL PROTECTED]
 Sent: 10 August 2005 14:56
 To: Tomcat Users List
 Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server
 using JNDI?
 
 
 http://thielen.typepad.com/programming/2005/07/hibernate_on_to.html
 
 
 David Thielen
 303-499-2544
 www.windwardreports.com
 
 
 -Original Message-
 From: Wylie, Ian [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 10, 2005 4:37 AM
 To: tomcat-user@jakarta.apache.org
 Subject: Has anyone used Tomcat 5.5.9 connecting to MS SQL 
 Server using
 JNDI?
 
 Hi All,
  
 I have just installed Tomcat 5.5.9 on our Dev Server.  I 
 managed with a bit
 of work and a few searches on the web to get Tomcat 4.1.x 
 working with MS
 SQL Server using JNDI and database pooled connections to 
 work.  This has
 been working well for some time now.  However, there is quite a few
 advantages for upgrading the current system to Tomcat 5.5, 
 not least of
 which, is improvements to the list and functionality of tools 
 that aid with
 Java debugging!
  
 I cannot get Tomcat 5.5.9 working with JNDI and MS SQL Server 
 at the moment.
  
 I have already read all the various official docs on JNDI how-to and
 searched the web but even after all that and changing various 
 things that
 others have recommended, I cannot get the JNDI to work.
  
 Has anyone out there successfully using JNDI with Tomcat and 
 MS SQL Server?
  
 If so please can you put another professional out of there misery!
  
 Many thanks,
 
 Best Regards,
 
   _  
 
  http://www.pfizer.co.uk/Ian Wylie - [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
   Business Intelligence Architect
   Business Information  Technology (BIT)
   Pfizer Global Pharmaceuticals (PGP)
   Direct: +44 (0)1737 330422
   Address: Pfizer Ltd, Walton Oaks (IPC 2G), Dorking Road, 
 Tadworth, Surrey,
 KT20 7NS.
 
 LEGAL NOTICE 
 Unless expressly stated otherwise, this message is 
 confidential and may be
 privileged. It is intended for the addressee(s) only. Access 
 to this e-mail
 by anyone else is unauthorised. If you are not an addressee, 
 any disclosure
 or copying of the contents of this e-mail or any action taken 
 (or not taken)
 in reliance on it is unauthorised and may be unlawful. If you 
 are not an
 addressee, please inform the sender immediately. 
 
 Pfizer Limited is registered in England under No. 526209 with 
 its registered
 office at Ramsgate Road, Sandwich, Kent CT13 9NJ
 
   _  
 
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?

2005-08-11 Thread Allistair Crossley
-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED]
 Sent: 11 August 2005 10:38
 To: Tomcat Users List
 Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server
 using JNDI?
 
 
 Hi,
 
 Can you please send more information, such as error messages, 
 stdout logging
 and the configuration for your pool.
 
 Cheers, Allistair.
 
  -Original Message-
  From: Wylie, Ian [mailto:[EMAIL PROTECTED]
  Sent: 11 August 2005 10:28
  To: Tomcat Users List
  Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS 
 SQL Server
  using JNDI?
  
  
  David,
  
  Thanks for the link.   I have followed the instructions but 
  unfortunately
  get similar errors to what I had previously I am afraid.
  
  In a situation like this I am sure I could get the company to 
  pay for some
  support for this type of problem, but I am unsure who would 
  be best to help
  with this.
  
  Without further help, I will have to sideline the upgrade to 
  5.5, until
  there is more info out there for the connecting using JNDI 
  with a MS SQL
  Server example.  
  
  In my opinion the people who develop Tomcat should provide an 
  example of
  JNDI for ALL major databases.  This is one of the things that 
  makes the
  Tomcat offering lacking somewhat in maturity.  It seems to me it is
  relatively easy to get the basic JSP / Servlet stuff up and 
  running in no
  time, but it has always been a hassle to get JNDI to work in 
  Tomcat.  The
  Tomcat folks provide MySQL and an Oracle example but they 
  need to provide
  examples for MS SQL Server, DB2 and Sybase.
  
  Thanks for your help though - as it may have worked...  :-)
  
  Best Regards,
  
  Ian
  
  Ian Wylie
  Business Intelligence Architect
  Business Information  Technology (BIT)
  Pfizer Global Pharmaceuticals (PGP)
  
  
  -Original Message-
  From: David Thielen [mailto:[EMAIL PROTECTED]
  Sent: 10 August 2005 14:56
  To: Tomcat Users List
  Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS 
 SQL Server
  using JNDI?
  
  
  http://thielen.typepad.com/programming/2005/07/hibernate_on_to.html
  
  
  David Thielen
  303-499-2544
  www.windwardreports.com
  
  
  -Original Message-
  From: Wylie, Ian [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, August 10, 2005 4:37 AM
  To: tomcat-user@jakarta.apache.org
  Subject: Has anyone used Tomcat 5.5.9 connecting to MS SQL 
  Server using
  JNDI?
  
  Hi All,
   
  I have just installed Tomcat 5.5.9 on our Dev Server.  I 
  managed with a bit
  of work and a few searches on the web to get Tomcat 4.1.x 
  working with MS
  SQL Server using JNDI and database pooled connections to 
  work.  This has
  been working well for some time now.  However, there is quite a few
  advantages for upgrading the current system to Tomcat 5.5, 
  not least of
  which, is improvements to the list and functionality of tools 
  that aid with
  Java debugging!
   
  I cannot get Tomcat 5.5.9 working with JNDI and MS SQL Server 
  at the moment.
   
  I have already read all the various official docs on JNDI how-to and
  searched the web but even after all that and changing various 
  things that
  others have recommended, I cannot get the JNDI to work.
   
  Has anyone out there successfully using JNDI with Tomcat and 
  MS SQL Server?
   
  If so please can you put another professional out of there misery!
   
  Many thanks,
  
  Best Regards,
  
_  
  
   http://www.pfizer.co.uk/Ian Wylie - [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] 
Business Intelligence Architect
Business Information  Technology (BIT)
Pfizer Global Pharmaceuticals (PGP)
Direct: +44 (0)1737 330422
Address: Pfizer Ltd, Walton Oaks (IPC 2G), Dorking Road, 
  Tadworth, Surrey,
  KT20 7NS.
  
  LEGAL NOTICE 
  Unless expressly stated otherwise, this message is 
  confidential and may be
  privileged. It is intended for the addressee(s) only. Access 
  to this e-mail
  by anyone else is unauthorised. If you are not an addressee, 
  any disclosure
  or copying of the contents of this e-mail or any action taken 
  (or not taken)
  in reliance on it is unauthorised and may be unlawful. If you 
  are not an
  addressee, please inform the sender immediately. 
  
  Pfizer Limited is registered in England under No. 526209 with 
  its registered
  office at Ramsgate Road, Sandwich, Kent CT13 9NJ
  
_  
  
   
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
 ---
 QAS Ltd.
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474

RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server using JNDI?

2005-08-11 Thread Allistair Crossley
Hi,

A) First, can you clarify which method you have opted for now of;

1.

TOMCAT_HOME/webapps/webappname/META-INF/context.xml

or

2.

TOMCAT_HOME/conf/Catalina/localhost/webappname.xml

B) Ensure your database JAR(s) are in TOMCAT_HOME/common/lib (not in your 
webapp lib).

C) Try something simpler ...

DataSource dataSource = null;
try {
  Context ctx = new InitialContext();
  dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/UKportalPool);
} catch (NamingException nE) {
  log.error(nE.getMessage());
} catch (NullPointerException npE) {
  log.error(npE.getMessage());
}

Allistair.

 -Original Message-
 From: Wylie, Ian [mailto:[EMAIL PROTECTED]
 Sent: 11 August 2005 12:02
 To: Tomcat Users List
 Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server
 using JNDI?
 
 
 Alistair,
 
 Well I have learned something that I was doing wrong, but 
 after removing the
 webappname.xml I get the same error.
 
 Any more ideas?
 
 Thanks,
 
 Ian
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED]
 Sent: 11 August 2005 11:53
 To: Tomcat Users List
 Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS SQL Server
 using JNDI?
 
 
 Hi,
 
 You can only configure a web application in 1 place. You 
 can't use *both*
 context.xml AND a webappname.xml. I think the
 TOMCAT_HOME\conf\Catalina\localhost method is tried first, 
 and because this
 does not have any of your datasources in it you get your 
 problems. Decide on
 either TOMCAT_HOME\conf\Catalina\localhost\webappname.xml or
 META-INF/context.xml and see if you get any further first.
 
 Cheers, Allistair
 
  -Original Message-
  From: Wylie, Ian [mailto:[EMAIL PROTECTED]
  Sent: 11 August 2005 11:47
  To: Tomcat Users List
  Subject: RE: Has anyone used Tomcat 5.5.9 connecting to MS 
 SQL Server
  using JNDI?
  
  
  Alistair,
  
  For configuration purposes I attach the Context.xml, web.xml and
  mininPCO-practise.xml - which is the web application file 
  which resides in
  TOMCAT_HOME\conf\Catalina\localhost directory.
  
  
  The error message is basically Cannot create resource 
  instance.  (Full
  Error message attached below.)
  
  
  The Java code above works in 4.1.31, so I am not really 
  worried about this,
  unless Tomcat 5.5.9 works differently.
  
  
  
  Here is the code snippet from the java class PortletHelper 
  that is being
  executed which produces the error at the end of this email.
  
  Well I think that is all that anyone needs to check out my app.
  
  If anyone can offer some good advice on this, it would be 
  much appreciated.
  
  Best Regards,
  
  Ian
  
  
  ==
  =
  JAVA CODE SNIPPET START
  
  logger.debug(Before InitialContext.) ;
  InitialContext ctx = new InitialContext();
  if (ctx == null) { 
  log(ERROR initialising InitialContext.) ;  
  logger.error(ERROR initialising 
  InitialContext.) ;
  }
  log(Before Context.) ;
  Context envCtx = (Context) 
  ctx.lookup(java:comp/env);
  
  if (envCtx != null) {
  log(Before initialising DataSource.) ;
  ConnectionPoolDataSource ds = 
   
  (ConnectionPoolDataSource)envCtx.lookup(jdbc/UKportalPool);
  
  if(ds != null) {
  
  pCon = ds.getPooledConnection(); 
  
  JAVA CODE SNIPPET END
  
  
  
  ==
  
  ERROR MESSAGE START
  
  10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log
  INFO: OMTLreport: Before Context.
  10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log
  INFO: OMTLreport: Before initialising DataSource.
  10-Aug-2005 15:26:56 org.apache.catalina.core.ApplicationContext log
  INFO: OMTLreport: ERROR - NamingException - Config error 
 with JNDI and
  datasource.javax.naming.NamingException: Cannot create 
  resource instance
  10-Aug-2005 15:26:56 
  org.apache.catalina.core.StandardWrapperValve invoke
  SEVERE: Servlet.service() for servlet OMTLreport threw exception
  java.lang.NullPointerException
  at
  
 com.webconnex.portal.PortletHelper.initPortlet(PortletHelper.java:230)
  at
  com.webconnex.cognos.PORT.OMTLreport.processRequest(OMTLreport
  .java:243)
  at 
  com.webconnex.portal.PortletHelper.doGet(PortletHelper.java:321)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
  er(Application
  FilterChain.java:252)
  at
  org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
  cationFilterCh
  ain.java:173

RE: Easy EL question

2005-08-08 Thread Allistair Crossley
you use .key or .value, e.g

item.value['key']
item.key

Allistair

 -Original Message-
 From: Guillaume Lederrey [mailto:[EMAIL PROTECTED]
 Sent: 08 August 2005 10:34
 To: Tomcat Users List
 Subject: Easy EL question
 
 
   Hello !
 
   I'm still having problem with all the different syntax used in
 JSP... so excuse my question if it sound really stupid !
 
   I'm having to iterate on the values of a Map. So I'd like
 something like that :
 
 c:catch
   c:set var=items value=${itemsMap.values}/
 /c:catch
 
 c:forEach items=${items} var=item
   [do something]
 /c:forEach
 
   Of course, it doesnt work because there is no getter in a Map to
 get the values ...  There is probably a very easy and standard way to
 do exactly that ... could you help me on that one ?
 
   Thanks
 
 
  Guillaume
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Easy EL question

2005-08-08 Thread Allistair Crossley
Hi,

With what you supplied, the answer was the best you could have expected. The 
deletedDma item per loop iteration is of type MapEntry. This has getKey and 
getValue, hence why you can call deletedDma.key and deletedDma.value. 

In html your link would be

a 
href=/DMAAssistant/ChooseDeletedDMAToCancelRemove?id=${deletedDma.value.id}Remove/a

I am not sure if you can pass this into the html:link tag.

Try ...

// you don't need this block by the way
c:catch
  c:set var=deletedDmas 
value=${dmaAssistantSession.deletedDmasSimple}/
/c:catch


ul id=overviewDeletedDmas
  c:forEach items=${dmaAssistantSession.deletedDmasSimple} var=deletedDma

li
  html:link 
action=/DMAAssistant/ChooseDeletedDMAToCancelRemove
 paramId=id paramName=deletedDma.value paramProperty=id
 bean:message name=deletedDma.value property=label /
  /html:link
/li
  /c:forEach
/ul

 -Original Message-
 From: Guillaume Lederrey [mailto:[EMAIL PROTECTED]
 Sent: 08 August 2005 12:10
 To: Tomcat Users List
 Subject: Re: Easy EL question
 
 
   Thanks for your answer !  But I'm afraid I dont really understand
 how to use it ...  Do you mean I should iterate on the keys of my Map
 ? But then the question is of course How do I iterate on the keys ?.
 
   Maybe I should be more precise in my example, so here is my actual
 code (which doesnt work).
 
 dmaAssistantSession.deletedDmasSimple is a Map of beans (id, label).
 The key to the Map is the id of the bean itself (but I dont use the
 key here).
 
 c:catch
   c:set var=deletedDmas 
 value=${dmaAssistantSession.deletedDmasSimple}/
 /c:catch
 
ul id=overviewDeletedDmas
   c:forEach items=${deletedDmas} var=deletedDma
 li
   html:link 
 action=/DMAAssistant/ChooseDeletedDMAToCancelRemove
 paramId=id paramName=deletedDma paramProperty=id
 bean:message name=deletedDma property=label/
   /html:link
 /li
   /c:forEach
 /ul
 
   Thanks a lot for the answer, but I would be even more thankfull if a
 bit more explanation goes with it ...
 
 On 8/8/05, Allistair Crossley [EMAIL PROTECTED] wrote:
  you use .key or .value, e.g
  
  item.value['key']
  item.key
  
  Allistair
  
   -Original Message-
   From: Guillaume Lederrey [mailto:[EMAIL PROTECTED]
   Sent: 08 August 2005 10:34
   To: Tomcat Users List
   Subject: Easy EL question
  
  
 Hello !
  
 I'm still having problem with all the different syntax used in
   JSP... so excuse my question if it sound really stupid !
  
 I'm having to iterate on the values of a Map. So I'd like
   something like that :
  
   c:catch
 c:set var=items value=${itemsMap.values}/
   /c:catch
  
   c:forEach items=${items} var=item
 [do something]
   /c:forEach
  
 Of course, it doesnt work because there is no getter 
 in a Map to
   get the values ...  There is probably a very easy and 
 standard way to
   do exactly that ... could you help me on that one ?
  
 Thanks
  
  
Guillaume
  
   
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
  
  
  
  FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
  ---
  QAS Ltd.
  Registered in England: No 2582055
  Registered in Australia: No 082 851 474
  ---
  /FONT
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Blog: JK1.2 load balancing as solution to 100% uptime

2005-08-04 Thread Allistair Crossley
Hi Chaps,
 
If anyone is interested, I blogged last night on my experience setting up 2 
tomcats on 1 server and then load balancing them with JK 1.2, and tested that 
bringing 1 down, and then back up did not lose any requests. 
 
This for my web application is an ideal way to avoid downtime during class 
patching or full builds, although for those needing session replication, the 
blog does not cover that.
 
Take it or leave it :), I've also added this to the Tomcat links wiki.
 
Allistair


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT



RE: Blog: JK1.2 load balancing as solution to 100% uptime

2005-08-04 Thread Allistair Crossley
Oops! :)

http://www.adcworks.com/blog/index.php/archives/2005/08/03/load-balancing-with-tomcat-55-and-jk-12/

Cheers, Allistair.

 -Original Message-
 From: Mladen Turk [mailto:[EMAIL PROTECTED]
 Sent: 04 August 2005 12:42
 To: Tomcat Users List
 Subject: Re: Blog: JK1.2 load balancing as solution to 100% uptime
 
 
 Allistair Crossley wrote:
  Hi Chaps,
   
  If anyone is interested, I blogged last night on my 
 experience setting up ...
   
 
 It would be great if you provide a link to your blog :)
 
 Regards,
 Mladen.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Upgrading from 5.0.28 to 5.5.9?

2005-08-03 Thread Allistair Crossley
Yes, some of which are pointed out in my blog at www.adcworks.com/blog

 -Original Message-
 From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
 Sent: 02 August 2005 22:44
 To: Tomcat Users List
 Subject: Upgrading from 5.0.28 to 5.5.9?
 
 
 Anything one should be aware of when moving from 5.0.28 to 5.5.9?
 Also, any reasons not to make the move?
 
 
 Regards,
 
 BTJ
 
 -- 
 --
 -
 Bjørn T Johansen
 
 [EMAIL PROTECTED]
 --
 -
 Someone wrote:
 I understand that if you play a Windows CD backwards you 
 hear strange Satanic messages
 To which someone replied:
 It's even worse than that; play it forwards and it installs Windows
 --
 -
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: How to set auto-commit to false on a Tomcat Connection-Pool?

2005-08-02 Thread Allistair Crossley
I found this on the web for Struts using 
org.apache.commons.dbcp.BasicDataSource which I believe Tomcat also uses. 
Therefore perhaps you can try defaultAutoCommit instead.

data-source key=homeDS type=org.apache.commons.dbcp.BasicDataSource
set-property property=driverClassName 
value=oracle.jdbc.driver.OracleDriver /
set-property property=url value=jdbc:oracle:thin:@localhost:1521:DBLOCAL /
set-property property=username value=user /
set-property property=password value=pwd /
set-property property=maxActive value=10 /
set-property property=maxWait value=5000 /
set-property property=defaultAutoCommit value=false /
set-property property=defaultReadOnly value=false /
set-property property=validationQuery value=SELECT SYSDATE FROM DUAL /
/data-source 

Allistair

 -Original Message-
 From: starki78 [mailto:[EMAIL PROTECTED]
 Sent: 02 August 2005 09:38
 To: tomcat-user
 Subject: How to set auto-commit to false on a Tomcat Connection-Pool?
 
 
 Hi, my example works but I cannot set the 
 autocommit paramter, but this is quite important to me.
 Can someone give me advice?
 
 Thanks Starki
 
 
 
  ResourceParams name=jdbc/test
   parameter
 namevalidationQuery/name
 valueselect * from dual/value
   /parameter
   parameter
 namemaxWait/name
 value5000/value
   /parameter
   parameter
 namemaxActive/name
 value4/value
   /parameter
   parameter
 namepassword/name
 valuextest/value
 
   /parameter
   parameter
 nameurl/name
 
 valuejdbc:oracle:thin:@xinfosap.w1:1521:orcl;autocommit=fals
 e/value
   /parameter
   parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
 nameauto-commit/name
 valuefalse/value
   /parameter
   parameter
 nameautoCommit/name
 valuefalse/value
   /parameter
   parameter
 nameautocommit/name
 valuefalse/value
   /parameter
   parameter
 namemaxIdle/name
 
 value2/value
   /parameter
   parameter
 nameusername/name
 valuextest/value
   /parameter
 
 /ResourceParams
 
 
 
 
 
 6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero!
 Scaricalo su INTERNET GRATIS 6X http://www.libero.it
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: tomcat 5.5, jdk1.5 on user mode debian stable hangs after a few days

2005-08-02 Thread Allistair Crossley
Hi,

Hanging, memory up 50%, sounds very much like an OutOfMemoryException to me. I 
know from experience that Tomcat can hang with no memory and not log to stdout 
either (although most of the time it does). 

Have you profiled your application under a load test?

Cheers, Allistair.

 -Original Message-
 From: MDK [mailto:[EMAIL PROTECTED]
 Sent: 02 August 2005 10:23
 To: tomcat-user@jakarta.apache.org
 Subject: tomcat 5.5, jdk1.5 on user mode debian stable hangs 
 after a few
 days
 
 
 Hello,
 
 I've searched far and wide for a definitive answer to this 
 problem, but 
 have found nothing that relates to my situation.
 
 I did find a few similar issues, but
 
 1. I have no System.exit in my code
 2. I am not using the root context
 
 and still after a few days tomcat stops responding.
 
 The problem also doesnt go away after i stop and re-start tomcat.
 
 And occasionally it wont stop with ./bin/shutdown.sh
 
 so i have to kill -9 the first process to stop it.
 
 when it is running, the CPU usage runs at over 90% and the 
 memory usage 
 goes up to 50% or so.
 
 It doesnt even respond when i telnet to localhost 8080.
 
 does anyone know a viable fix for this problem ?
 
 thanks,
 
 martin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: tomcat 5.5, jdk1.5 on user mode debian stable hangs after a few days

2005-08-02 Thread Allistair Crossley
Hi,

You can get JProbe freeware for profiling and use JMeter to issue load to your 
web application.

Does the same phenoneneneneom occur with a vanilla Tomcat 5.5 install with 
included webapps like jsp-examples. First figure out if it is your webapp 
that's causing it.

Allistair.

 -Original Message-
 From: MDK [mailto:[EMAIL PROTECTED]
 Sent: 02 August 2005 12:29
 To: Tomcat Users List
 Subject: Re: tomcat 5.5, jdk1.5 on user mode debian stable 
 hangs after a
 few days
 
 
 no, the odd thing is, it wasnt even being used (and its a very simple 
 application, of course, thats a relative term)
 
 i installed the app, tested it once and logged out.
 
 I came back to it a few days later and the whole thing is hanging.
 
 If you can recommed any tools i can use to detect what is 
 happening that 
 would be much appreciated
 
 the app itself uses spring, openamf (an open source flash remoting 
 connector) with some jdbc (mysql)
 
 so i guess that any one of these (and my code) could be the culprit.
 
 I'll look into each of these individually and see if they could be 
 causing the problem.
 
 thanks.
 
 martin
 
 
 Allistair Crossley wrote:
  Hi,
  
  Hanging, memory up 50%, sounds very much like an 
 OutOfMemoryException to me. I know from experience that 
 Tomcat can hang with no memory and not log to stdout either 
 (although most of the time it does). 
  
  Have you profiled your application under a load test?
  
  Cheers, Allistair.
  
  
 -Original Message-
 From: MDK [mailto:[EMAIL PROTECTED]
 Sent: 02 August 2005 10:23
 To: tomcat-user@jakarta.apache.org
 Subject: tomcat 5.5, jdk1.5 on user mode debian stable hangs 
 after a few
 days
 
 
 Hello,
 
 I've searched far and wide for a definitive answer to this 
 problem, but 
 have found nothing that relates to my situation.
 
 I did find a few similar issues, but
 
 1. I have no System.exit in my code
 2. I am not using the root context
 
 and still after a few days tomcat stops responding.
 
 The problem also doesnt go away after i stop and re-start tomcat.
 
 And occasionally it wont stop with ./bin/shutdown.sh
 
 so i have to kill -9 the first process to stop it.
 
 when it is running, the CPU usage runs at over 90% and the 
 memory usage 
 goes up to 50% or so.
 
 It doesnt even respond when i telnet to localhost 8080.
 
 does anyone know a viable fix for this problem ?
 
 thanks,
 
 martin
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  
  
  
  FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
  ---
  QAS Ltd.
  Registered in England: No 2582055
  Registered in Australia: No 082 851 474
  ---
  /FONT
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: Logging With Tomcat 5.5

2005-08-02 Thread Allistair Crossley
Don't confuse not understanding with not sufficient. The instructions do 
lead to a correct configuration. However, here it is more explicitly.

Allistair.

Per-webapp logging
==

1. Add log4j's jar to both your webapp's WEB-INF/lib folders
2. Add log4j.properties to both your webapp's WEB-INF/classes folders. 
*Minimally*, add

log4j.rootCategory=debug, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=c:/jakarta-tomcat/logs/webapp-name.log
log4j.appender.R.MaxFileSize=1500KB
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n

to those log4j.properties files changing the File path appropriately.

Ideally you will pick up the log4j manual and create appenders that map to 
packages.

Tomcat logging with log4j
=

I've found the best way is

1. Add log4j jar to common/lib, add commons-logging.jar to common/lib
2. Add log4j.properties to common/classes with content

log4j.rootCategory=error, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=c:/jakarta-tomcat/logs/tomcat.log
log4j.appender.R.MaxFileSize=1500KB
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n

log4j.logger.org.apache.commons.modeler=INFO, R
log4j.logger.org.apache.tomcat.util.digester=ERROR, R
log4j.logger.org.apache.catalina.loader=INFO, R
log4j.logger.org.apache.catalina.session=INFO, R
log4j.logger.org.apache.catalina=DEBUG, R
log4j.logger.org.apache.commons.digester=INFO, R
log4j.logger.org.apache.commons.beanutils=INFO, R
log4j.logger.org.apache.jasper=INFO, R
log4j.additivity.org.apache.catalina=false

Tomcat logging per-webapp
=

Add to your webapp's log4j.properties files

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost][/webappname]=DEBUG,
 R 

 -Original Message-
 From: Scott Purcell [mailto:[EMAIL PROTECTED]
 Sent: 02 August 2005 14:22
 To: tomcat-user@jakarta.apache.org
 Subject: Logging With Tomcat 5.5
 
 
 Hello,
 
 I am sure this topic has been beaten to death, but I am 
 having trouble understanding how the Log4J works, and how I 
 can configure it on my localbox.
 
 First off, I am running Tomcat 5.5 and I have created two 
 webapp contexts. One is a dev site, and the other is a 
 production site. I am using struts (I don't think it matters).
 
 I would to be able to have two sets of rolling logs. One for 
 dev, and the other for production. I am trying to decipher 
 the readme at 
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html;
  but I am not truly sure if this is for all webapps, or what 
 this is implying.
 
 I would like to get all Tomcat messages (errors, etc) and my 
 actual logging all in either one or two files per webapp.
 
 
 Can someone please assist me in this? The readme just doesn't 
 cut it, or I am interpreting it wrongly. Or maybe there is an 
 example setup somewhere.
 
 Any info would be appreciated.
 Sincerely
 Scott
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Logging With Tomcat 5.5

2005-08-02 Thread Allistair Crossley
Hi,

You don't change Catalina (for most purposes). Just change end part /webappname 
to your web application name, and yes, add it into the web application's log4j. 
E.g if your webapp was called banana

You would add (in addition to the root logger etc..) into 
webapps/banana/WEB-INF/classes/log4j.properties

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost][/banana]=DEBUG,
 R

Allistair.

 -Original Message-
 From: Scott Purcell [mailto:[EMAIL PROTECTED]
 Sent: 02 August 2005 14:49
 To: Tomcat Users List
 Subject: RE: Logging With Tomcat 5.5
 
 
 Allistair,
 
 That last instruction
 log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina
 ].[localhost][/webappname]=DEBUG, R 
 
 What do I change the [Catalina] value to?
 and that does go into the log4j.properties file under the webapp?
 
 Thanks,
 Scott
 
 
 
 
 
 
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 02, 2005 8:31 AM
 To: Tomcat Users List
 Subject: RE: Logging With Tomcat 5.5
 
 
 Don't confuse not understanding with not sufficient. The 
 instructions do lead to a correct configuration. However, 
 here it is more explicitly.
 
 Allistair.
 
 Per-webapp logging
 ==
 
 1. Add log4j's jar to both your webapp's WEB-INF/lib folders
 2. Add log4j.properties to both your webapp's WEB-INF/classes 
 folders. *Minimally*, add
 
 log4j.rootCategory=debug, R
 log4j.appender.R=org.apache.log4j.RollingFileAppender
 log4j.appender.R.File=c:/jakarta-tomcat/logs/webapp-name.log
 log4j.appender.R.MaxFileSize=1500KB
 log4j.appender.R.MaxBackupIndex=1
 log4j.appender.R.layout=org.apache.log4j.PatternLayout
 log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
 
 to those log4j.properties files changing the File path appropriately.
 
 Ideally you will pick up the log4j manual and create 
 appenders that map to packages.
 
 Tomcat logging with log4j
 =
 
 I've found the best way is
 
 1. Add log4j jar to common/lib, add commons-logging.jar to common/lib
 2. Add log4j.properties to common/classes with content
 
 log4j.rootCategory=error, R
 log4j.appender.R=org.apache.log4j.RollingFileAppender
 log4j.appender.R.File=c:/jakarta-tomcat/logs/tomcat.log
 log4j.appender.R.MaxFileSize=1500KB
 log4j.appender.R.MaxBackupIndex=1
 log4j.appender.R.layout=org.apache.log4j.PatternLayout
 log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
 
 log4j.logger.org.apache.commons.modeler=INFO, R
 log4j.logger.org.apache.tomcat.util.digester=ERROR, R
 log4j.logger.org.apache.catalina.loader=INFO, R
 log4j.logger.org.apache.catalina.session=INFO, R
 log4j.logger.org.apache.catalina=DEBUG, R
 log4j.logger.org.apache.commons.digester=INFO, R
 log4j.logger.org.apache.commons.beanutils=INFO, R
 log4j.logger.org.apache.jasper=INFO, R
 log4j.additivity.org.apache.catalina=false
 
 Tomcat logging per-webapp
 =
 
 Add to your webapp's log4j.properties files
 
 log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina]
 .[localhost][/webappname]=DEBUG, R 
 
  -Original Message-
  From: Scott Purcell [mailto:[EMAIL PROTECTED]
  Sent: 02 August 2005 14:22
  To: tomcat-user@jakarta.apache.org
  Subject: Logging With Tomcat 5.5
  
  
  Hello,
  
  I am sure this topic has been beaten to death, but I am 
  having trouble understanding how the Log4J works, and how I 
  can configure it on my localbox.
  
  First off, I am running Tomcat 5.5 and I have created two 
  webapp contexts. One is a dev site, and the other is a 
  production site. I am using struts (I don't think it matters).
  
  I would to be able to have two sets of rolling logs. One for 
  dev, and the other for production. I am trying to decipher 
  the readme at 
  http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html;
   but I am not truly sure if this is for all webapps, or what 
  this is implying.
  
  I would like to get all Tomcat messages (errors, etc) and my 
  actual logging all in either one or two files per webapp.
  
  
  Can someone please assist me in this? The readme just doesn't 
  cut it, or I am interpreting it wrongly. Or maybe there is an 
  example setup somewhere.
  
  Any info would be appreciated.
  Sincerely
  Scott
  
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
 ---
 QAS Ltd.
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474
 ---
 /FONT
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe

RE: Cannot create JDBC driver of class - help!!

2005-08-01 Thread Allistair Crossley
Is Context not supposed to be within a Host element? You also have a lowercase 
c in context rather than Context. You also will want jdbc/ before the name 
for the datasource. 

In fact, I think you need to read the manual (I am assuming Tomcat 5.0, 
otherwise look at your version).

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

Allistair.

 -Original Message-
 From: Anish Tom Ashley [mailto:[EMAIL PROTECTED]
 Sent: 01 August 2005 16:30
 To: tomcat-user@jakarta.apache.org
 Subject: Cannot create JDBC driver of class - help!!
 Importance: High
 
 
 Hi,
   I'm trying to create a struts based application which tries to
 access MySQL dB using mysql-connector-java-3.1.10 connector.
   I'm having problem with my getConnection() code. The 
 following error
 is occurring.
 
 org.apache.commons.dbcp.SQLNestedException: 
 Cannot create JDBC
 driver of class ' ' for connect URL 'null'
 at
 org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic
 DataSource.jav
 a:780)
 at
 org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat
 aSource.java:5
 40)
 at
 com.tavant.app1_2.dao.MySQLLoader.executeQuery(MySQLLoader.java:29)
 at
 com.tavant.app1_2.action.HomePageAction.execute(HomePageAction
 .java:28)
 at
 org.apache.struts.action.RequestProcessor.processActionPerform
 (RequestProces
 sor.java:419)
 at
 org.apache.struts.action.RequestProcessor.process(RequestProce
 ssor.java:224)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.j
 ava:1194)
 at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
   ..etcetc
   
 
   I've pasted the server.xml, web.xml and my java program only
 including relevant parts.
 
    server.xml
 
 ?xml version='1.0' encoding='utf-8'?
 Server
   context path=/teststruts docBase=teststruts.war debug=1
 reloadable=true 
 Resource name=mydatasource type=javax.sql.DataSource/
 ResourceParams name=mydatasource
   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 namemaxWait/name
 value5000/value
   /parameter
   parameter
 namemaxActive/name
 value4/value
   /parameter
   parameter
 namepassword/name
 valuef_695248/value
   /parameter
   parameter
 nameurl/name
 valuejdbc:mysql://localhost:3306/tavant/value
   /parameter
   parameter
 namedriverClassName/name
 valuecom.mysql.jdbc.Driver/value
   /parameter
   parameter
 namemaxIdle/name
 value2/value
   /parameter
   parameter
 nameusername/name
 valueroot/value
   /parameter
 /ResourceParams
   /context  
 /Server
   
 --
 --
 -
    web.xml
 
 ?xml version=1.0 encoding=ISO-8859-1?
 
 !DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;
 web-app 
  resource-ref
description
 Resource reference to a factory for java.sql.Connection
 instances that may be used for talking to a particular
 database that is configured in the server.xml file.
/description
res-ref-namemydatasource/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref
 /web-app
   
 --
 --
 -
 
 
    MySQLLoader.java
 
 package com.tavant.app1_2.dao;
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.sql.Statement;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.sql.DataSource;
 
 public class MySQLLoader {
   public void executeQuery() {
   try { 
   InitialContext ctx = new InitialContext();
   Context ctx2 = (Context)ctx.lookup(java:comp/env);
 
   DataSource ds = 
 (DataSource)ctx2.lookup(mydatasource);
   Connection conn = ds.getConnection();
   Statement stmt = conn.createStatement();
 stmt.executeUpdate(Insert into customer
 values('001','Anish','001'));
 

RE: tomcat 5.5.9, JSP, EL evaluation

2005-07-26 Thread Allistair Crossley
Hi,

1. Check your JSP imports the c tag library
2. Check your web.xml schema is for J2EE 2.4

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

3. You don't need to use c:out for this kind of thing. Just

${users}

in the page works. Many people don't seem to realise this.

Allistair.

 -Original Message-
 From: Walther Hautermann [mailto:[EMAIL PROTECTED]
 Sent: 26 July 2005 09:37
 To: tomcat-user@jakarta.apache.org
 Subject: tomcat 5.5.9, JSP, EL evaluation
 
 
 Hi,
 
  
 
 My jsp page contains a c:out value=${users}/. The result is
 ${users}. I had a look in the generated .java and it seems 
 the ${users}
 is not evaluated : _jspx_th_c_out_0.setValue(new String(${users}));
 
  
 
 Is there something to configure with tomcat 5.5.9 to enable the
 evaluation of the EL ?
 
  
 
 Thanks for your help.
 
 Walther
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: tomcat 5.5.9, JSP, EL evaluation

2005-07-26 Thread Allistair Crossley
Hi,

You don't need to import the tag libraries for EL etc.. only in your pages. 
However, the new schema will cause problems for your web.xml in other ways. 
Here is a valid web.xml

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

context-param
param-namecontextConfigLocation/param-name
param-value/WEB-INF/applicationContext.xml/param-value
/context-param

listener
listener-class
org.springframework.web.context.ContextLoaderListener
/listener-class
/listener

listener
listener-class
com.opensymphony.oscache.web.CacheContextListener
/listener-class
/listener 

listener
listener-class

com.qas.newmedia.internet.core.framework.listener.ContextListener
/listener-class
/listener

filter
filter-nameUrlRewriteFilter/filter-name

filter-classorg.tuckey.web.filters.urlrewrite.UrlRewriteFilter/filter-class
init-param
param-namelogLevel/param-name
param-valueERROR/param-value
/init-param
/filter

filter-mapping
filter-nameUrlRewriteFilter/filter-name
url-pattern/*/url-pattern
/filter-mapping

servlet
servlet-namespringFrontController/servlet-name

servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class
load-on-startup1/load-on-startup
/servlet

servlet-mapping
servlet-namespringFrontController/servlet-name
url-pattern*.do/url-pattern
/servlet-mapping

session-config
session-timeout10/session-timeout
/session-config

mime-mapping
extensionpdf/extension
mime-typeapplication/pdf/mime-type
/mime-mapping

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

!-- 
error-page
error-code404/error-code
location/views/errors/404.html/location
/error-page   
--

error-page

exception-typecom.qas.newmedia.internet.core.page.exception.PageException/exception-type
location/jsp/errors/pageNotFound.html/location
/error-page   

jsp-config

taglib
taglib-uriqas/taglib-uri
taglib-location/WEB-INF/tld/qas.tld/taglib-location
/taglib

taglib
taglib-urioscache/taglib-uri
taglib-location/WEB-INF/tld/oscache.tld/taglib-location
/taglib

taglib
taglib-urispring/taglib-uri
taglib-location/WEB-INF/tld/spring.tld/taglib-location
/taglib


jsp-property-group
display-nameQAS.com/display-name
url-pattern*.jsp/url-pattern
el-ignoredfalse/el-ignored
scripting-invalidfalse/scripting-invalid
is-xmlfalse/is-xml
/jsp-property-group
/jsp-config   

/web-app


 -Original Message-
 From: Walther Hautermann [mailto:[EMAIL PROTECTED]
 Sent: 26 July 2005 10:00
 To: Tomcat Users List
 Subject: RE: tomcat 5.5.9, JSP, EL evaluation
 
 
 Hi Allistair,
 
 Now the definition of the taglibs in the web.xml seems to be wrong.
 Could you provide me an example?
 
 
 Thx
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
 Sent: mardi 26 juillet 2005 10:43
 To: Tomcat Users List
 Subject: RE: tomcat 5.5.9, JSP, EL evaluation
 
 Hi,
 
 1. Check your JSP imports the c tag library
 2. Check your web.xml schema is for J2EE 2.4
 
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; version=2.4
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 
 3. You don't need to use c:out for this kind of thing. Just
 
 ${users}
 
 in the page works. Many people don't seem to realise this.
 
 Allistair.
 
  -Original Message-
  From: Walther Hautermann [mailto:[EMAIL PROTECTED]
  Sent: 26 July 2005 09:37
  To: tomcat-user@jakarta.apache.org
  Subject: tomcat 5.5.9, JSP, EL evaluation
  
  
  Hi,
  
   
  
  My jsp page

Requests that are not handled by ROOT

2005-07-26 Thread Allistair Crossley
Hi,
 
Mind's gone a little blank, should know this but our webapp has a setup such 
that a filter maps /* requests and handles them.
 
However, Tomcat is preventing requests that do not match /abc with a 404 I 
think because it thinks abc is another web application if it has /abc/def
 
E.g
 
/index.do HTTP/1.1 200 -
/utilities/index.do HTTP/1.1 404 -
 
My question is how do I get all requests (i.e both those above) to get handled 
by the ROOT web application?
 
Cheers, Allistair


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT



RE: Requests that are not handled by ROOT

2005-07-26 Thread Allistair Crossley
According to the spec /* is everything in the web application. Well, I did try 
* but that killed all my requests with 404 errors.

Any further suggestions? 

Thx.

 -Original Message-
 From: Raghupathy,Gurumoorthy
 [mailto:[EMAIL PROTECTED]
 Sent: 26 July 2005 11:38
 To: 'Tomcat Users List'
 Subject: RE: Requests that are not handled by ROOT
 
 
 Try filter map with * instead of /* 
 
 Regards
 Guru 
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
 Sent: 26 July 2005 11:36
 To: tomcat-user@jakarta.apache.org
 Subject: Requests that are not handled by ROOT
 
 
 Hi,
  
 Mind's gone a little blank, should know this but our webapp 
 has a setup such
 that a filter maps /* requests and handles them.
  
 However, Tomcat is preventing requests that do not match /abc 
 with a 404 I
 think because it thinks abc is another web application if it 
 has /abc/def
  
 E.g
  
 /index.do HTTP/1.1 200 -
 /utilities/index.do HTTP/1.1 404 -
  
 My question is how do I get all requests (i.e both those above) to get
 handled by the ROOT web application?
  
 Cheers, Allistair
 
 
 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
 ---
 QAS Ltd.
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474
 ---
 /FONT
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: Requests that are not handled by ROOT

2005-07-26 Thread Allistair Crossley
My bad. It is actually coming into the web application afterall with /*.

Cheers!

 -Original Message-
 From: Allistair Crossley 
 Sent: 26 July 2005 11:46
 To: Tomcat Users List
 Subject: RE: Requests that are not handled by ROOT
 
 
 According to the spec /* is everything in the web 
 application. Well, I did try * but that killed all my 
 requests with 404 errors.
 
 Any further suggestions? 
 
 Thx.
 
  -Original Message-
  From: Raghupathy,Gurumoorthy
  [mailto:[EMAIL PROTECTED]
  Sent: 26 July 2005 11:38
  To: 'Tomcat Users List'
  Subject: RE: Requests that are not handled by ROOT
  
  
  Try filter map with * instead of /* 
  
  Regards
  Guru 
  
  -Original Message-
  From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
  Sent: 26 July 2005 11:36
  To: tomcat-user@jakarta.apache.org
  Subject: Requests that are not handled by ROOT
  
  
  Hi,
   
  Mind's gone a little blank, should know this but our webapp 
  has a setup such
  that a filter maps /* requests and handles them.
   
  However, Tomcat is preventing requests that do not match /abc 
  with a 404 I
  think because it thinks abc is another web application if it 
  has /abc/def
   
  E.g
   
  /index.do HTTP/1.1 200 -
  /utilities/index.do HTTP/1.1 404 -
   
  My question is how do I get all requests (i.e both those 
 above) to get
  handled by the ROOT web application?
   
  Cheers, Allistair
  
  
  FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
  ---
  QAS Ltd.
  Registered in England: No 2582055
  Registered in Australia: No 082 851 474
  ---
  /FONT
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



  1   2   3   4   5   6   7   >