Compiling jsp:getProperty in 5.5.17 vs. 5.5.9

2006-11-03 Thread Werno, Peter
Hello,
 
we just upgraded to NetBeans 5.5 which now comes with tomcat 5.5.17
built in. Unfortunately, we are using a couple of 
tags which were compiled in 5.5.9 as follows:
 
...handleGetProperty(_jspx_page_context.findAttribute("admin.template.fo
rm"), "templateID")));
 
and in 5.5.17 is now compiled like:
 
...handleGetProperty(_jspx_page_context.getAttribute("admin.template.for
m", PageContext.PAGE_SCOPE), "templateID")));
 
As you can see, it previously was seaching in request, session, etc.,
but now only ever looks at the "page" context. Unfortunately, the bean
is stored in the session, so I get exceptions with 5.5.17 :(
 
Is there a way to configure 5.5.17 to compile it in the "old" way?
 
Many thanks,
 
Peter Werno
 



The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express 
written permission of the sender. If you are not the intended recipient, please 
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.dresdnerkleinwort.com/disc/email/ or contact the sender. 




Suddenly server only throws ClientAbortException :-/

2006-11-03 Thread Clemens Eisserer

Hello,

One of our users is using Tomcat 4.1.29/java-1.4.2 on w2k3 server, and
he has strange problems with our webservice.
Tomcat suddenly throws at every request a ClientAbortException, like
the following:

ERROR 2006-10-30 07:21:17,736 - ClientAbortException:
java.net.SocketException: Connection reset by peer: socket write error
at 
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:404)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:353)
at 
org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:432)
at org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:419)
at 
org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.java:108)
at 
com.agosys.unicom.servlet.UnicomServlet.handleRequest(UnicomServlet.java:84)

The problem can only be resolved by restarting the service.

If this is a known problem - I don't care and advice my user to
upgrade, however its kind of hard if I am not sure (those are
production servers at a very large company).
Is this a known problem, is there something I could do to prevent
these failures or whats causing them?

Thank you in advance, lg Clemens

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



Re: FORM based authentication LOGOUT

2006-11-03 Thread John McPeek
When I call request.getUserPrincipal(); I still get the Principal back 
and I can still call request.isUserInRole( "Foo" ); and get a valid 
response for the currently logged in user.


John

From: John McPeek [mailto:[EMAIL PROTECTED] 
Subject: FORM based authentication LOGOUT


I have tried to invalidate the session and get a new one.
No Dice.
   



When you say "No Dice", what actually happens?

All the admin app for Tomcat does is the following, which seems to work:

   HttpSession session = request.getSession();
   session.invalidate();
   session = request.getSession(true);

- Chuck


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

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


 





Re: Tomcat authenticate with BASIC Auth (Pre: Active directory)

2006-11-03 Thread Johannes
With the lack of reply's I guess that Active directory connections are not used 
by anyone here.

I'm making it a bit more simple then and in step one only protect this service 
with a simple login / password protection.

Setup: One separate engine only accepting HTTPS connections that needs to be 
protected.
I have set up a ""org.apache.catalina.realm.MemoryRealm" realm with a xml file 
with one user, password and group in my server.xml section for the engine I'm 
protecting.

So far so good.
Then I got everything to work when editing /WEB-INF/web.xml and added 
the following:
  
Security check

  Protected Area
  
  /*

  
  DELETE
  GET
  POST
  PUT


  
  testgroup

  

  
BASIC
Security Check
  

That worked great, the login box appears and are not accessible without the 
correct logon.

BUT the problem is that this webapp is delivered by a 3:rd party without the 
above settings in there web.xml file.
We get regular updates and I would like to NOT be forced to remember to add the 
above section every time we get a new release of the webapp.

So how can I make this Engine/webapp in the server.xml file be protected by one 
simple login WITHOUT the need to modify the webapp itself every time we get a 
new version of the webapp?

~Johannes



-Originalmeddelande-
From: Johannes [EMAIL PROTECTED]
Date: Thu, 02 Nov 2006 12:55:13 +0100
To: users@tomcat.apache.org
Subject: Tomcat authenticate with Active directory

> I have a webapp that I want to protect the best way possible.
> Our environment has previously been Windows and still are but our new system 
> is running tomcat 5.0.
> 
> Now I would like to protect one part of our setup with login from our Windows 
> 2003 Active directory domain server when there is a lot of people that is 
> going to access this webapp. But still it need to be secure!
> Found some some information here:
> http://tomcat.apache.org/tomcat-5.0-doc/realm-howto.html
> Section JNDIRealm
> 
> But without any previous experience with LDAP connections I have no clue how 
> to get this to work.
> I'w tried searching for a good tutorial/guide how to make this happen step by 
> step but without success.
> 
> Have this been done by anyone here that could give me some help setting this 
> up. Or can direct me to a good step by step tutorial to get this up and 
> running?
> 
> ~Johannes
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



Re: Could a bad servlet initializtion stop tomcat?

2006-11-03 Thread Tim Funk
It may be better to move the "startup code" to a ServletContextListener. 
When a ServletContextLister fails on startup - then the webapp is 
unavailable.


When the webapp is unavailable - any HTTP based monitoring tool would 
pick that up (due the error page returned)


-Tim

Yaar Schnitman wrote:
Is there a way to make the failure of a single servlet's initialization 
stop the initialization of the other servlets, or even stop tomcat with 
an error?


The issue is that my system operators fail to notice initialization errors.



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



Re: Tomcat authenticate with BASIC Auth (Pre: Active directory)

2006-11-03 Thread Tim Funk
Out of the box - there is no Valve in Tomcat which requires 
authentication without first consulting web.xml.


As a simple(?) kludge - you could write your own Valve which forces 
authentication on anything executed by the Valve: - you'll need to fill 
in isAuthenticated(...)



public class ProtectMeValve extends ValveBase implements Lifecycle {

...

  public void invoke(Request request, Response response)
throws IOException, ServletException {

String authHeader = request.getHeader("Authorization");
if (authHeader!=null) {
  if (isAuthenticated(request, authHeader)) {
getNext().invoke(request, response);
  } else {
// may need setContentType(...)
response.setStatus(403);
response.getWriter().write("Go away - your not allowed!");
  }
} else {
  // may need setContentType(...)
  response.setStatus(401);
  response.addHeader("WWW-Authenticate",
 "Basic realm=\"My Webapp\"");
  response.getWriter().write("some message");
}
  }
}

I would think the preceding should work.

-Tim

Johannes wrote:

With the lack of reply's I guess that Active directory connections are not used 
by anyone here.

I'm making it a bit more simple then and in step one only protect this service 
with a simple login / password protection.

Setup: One separate engine only accepting HTTPS connections that needs to be 
protected.
I have set up a ""org.apache.catalina.realm.MemoryRealm" realm with a xml file 
with one user, password and group in my server.xml section for the engine I'm protecting.

So far so good.
Then I got everything to work when editing /WEB-INF/web.xml and added 
the following:
  
Security check

  Protected Area
  
  /*

  
  DELETE
  GET
  POST
  PUT


  
  testgroup

  

  
BASIC
Security Check
  

That worked great, the login box appears and are not accessible without the 
correct logon.

BUT the problem is that this webapp is delivered by a 3:rd party without the 
above settings in there web.xml file.
We get regular updates and I would like to NOT be forced to remember to add the 
above section every time we get a new release of the webapp.

So how can I make this Engine/webapp in the server.xml file be protected by one 
simple login WITHOUT the need to modify the webapp itself every time we get a 
new version of the webapp?

~Johannes



-Originalmeddelande-
From: Johannes [EMAIL PROTECTED]
Date: Thu, 02 Nov 2006 12:55:13 +0100
To: users@tomcat.apache.org
Subject: Tomcat authenticate with Active directory


I have a webapp that I want to protect the best way possible.
Our environment has previously been Windows and still are but our new system is 
running tomcat 5.0.

Now I would like to protect one part of our setup with login from our Windows 
2003 Active directory domain server when there is a lot of people that is going 
to access this webapp. But still it need to be secure!
Found some some information here:
http://tomcat.apache.org/tomcat-5.0-doc/realm-howto.html
Section JNDIRealm

But without any previous experience with LDAP connections I have no clue how to 
get this to work.
I'w tried searching for a good tutorial/guide how to make this happen step by 
step but without success.

Have this been done by anyone here that could give me some help setting this 
up. Or can direct me to a good step by step tutorial to get this up and running?



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



Service Options Ignored

2006-11-03 Thread Toby Saville
Hello, 
 
I'm running tomcat 5.5 on windows xp. 
 
I'm trying to configure tomcat to direct external url connections via
our proxy. When I specify the settings in the JAVA_OPTS environment
variable, and run tomcat from the command line, the connection can be
made properly. 
 
However when I use tomcat5w.exe to configure the service options on the
Java tab, and then run tomcat as a service, it doesn't use the proxy
settings I specify. my "Java Options:" entry is as follows:
 
-Dcatalina.base=C:\apache-tomcat-intranet
-Dcatalina.home=C:\apache-tomcat-intranet
-Djava.endorsed.dirs=C:\apache-tomcat-intranet\common\endorsed
-Djava.io.tmpdir=C:\apache-tomcat-intranet\temp
-Ddeployment.proxy.http.host=proxy
-Ddeployment.proxy.http.port=8080
-Ddeployment.proxy.bypass.local=true
-Ddeployment.proxy.same=true
 
Thanks for any suggestions. 
 
Cheers, Toby


 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
  
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.



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



RE: problems with unpacking ROOT.war

2006-11-03 Thread andrew . w . cooke
Hi there,

I've been having trouble persuading tomcat 5.5 to expand ROOT.war when it
is dropped into webapps, and started.  The problem seems to go away if
ROOT.war contains META-INF/context.xml - but since we deploy this war file
to different environments, shipping it with a context file isn't an option.

See the email below for instructions on how to duplicate the bug.  (btw,
this is quite an old mailtrail, and I notice there are a couple of stray
messages that should belong in this particular mail trail).

I've also experimented today with the manager app, and again , when I use
the deploy ant target, the app fails to start because it seems tomcat isn't
expanding the war file:



The manager can correctly stop and undeploy the ROOT app, but when I use
the above task, ROOT.war and ROOT.xml are dropped into the correct folders,
but the war *isn't* expanded).

ROOT.xml has the following context attributes:



and host has the usual defaults:



My question is:   has anyone else experienced similar problems with
expanding ROOT.war?My work around is to write ant targets and scripts
to manually expand the war... however I'd like to understand if this is a
bug, or just a quirk of my setup.  If it is a bug, then I'd like to submit
this to tomcat's bugzilla.

thanks

Andy



   
 [EMAIL PROTECTED] 
 mchase.com
To 
 18/10/2006 09:32  "Tomcat Users List" 
  
cc 
 Please respond to 
   "Tomcat Users   Subject 
   List"   RE: problems with unpacking 
 <[EMAIL PROTECTED] ROOT.war
 che.org>  
   
   
   
   
   




Hi Charles,

> Neither one is correct.  You must NOT use the path attribute in a
>  element unless the  is defined in server.xml.  The
> URI path to the app is determined from the name of the .xml file in the
> conf/[engine]/[host] directory.

Thanks for the feedback and the correction.  OK - I have a very simple war
file named ROOT.war - it doesn't a META-INF directory.  I have placed a
file called ROOT.xml into conf/Catalina/localhost with:

  
  
  

Server.xml has the defaults that come with tomcat 5.5.17:

  

I put ROOT.war into the webapps directory and start tomcat --> ROOT.war
isn't expanded.

Any other suggestions?  Or might this be a bug?

thanks for your help,

Andy





 "Caldarale,
 Charles R"
"Tomcat Users List"
   
 17/10/2006 14:58   cc

   Subject
 Please respond to RE: problems with unpacking
   "Tomcat Users   ROOT.war
   List"
 <[EMAIL PROTECTED]
 che.org>







> From: Michael Courcy [mailto:[EMAIL PROTECTED]
> Subject: Re: problems with unpacking ROOT.war
>
> Maybe a stupid clue but instead of
> 
> 
>
> What happen if u try
> 
> 

Neither one is correct.  You must NOT use the path attribute in a
 element unless the  is defined in server.xml.  The
URI path to the app is determined from the name of the .xml file in the
conf/[engine]/[host] directory.

 - Chuck


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

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




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




-
This transmission may contain information that is privileged,
confidential, legall

Request for WMV file to machine name doesn't work

2006-11-03 Thread Zachary Wiener
Hello.  I have Tomcat 5.0.28 installed on my Windows XP machine.  Under 
webapps I have a website installed, and under the website I have a *.wmv 
file installed.  If I access this file through Internet Explorer as 
http://:8080/mysite/test.wmv, the file does not open in 
media player, but displays as text.  I have made sure that the web.xml has 
the mime type defined.  If I access the file as 
http://localhost:8080/mysite/test.wmv, the file will be played in media 
file.  If I access the file from a different machine and access as 
http://:8080/mysite/test.wmv, the file will be played in 
media player.  My question is, if I am logged into my machine and I access 
the file using the machine name, why is it displayed as text, but 
localhost works?  Thank you.

Re: Tomcat authenticate with BASIC Auth (Pre: Active directory)

2006-11-03 Thread Pid

If you deploy the webapp inside another directory that is already
protected, you can use SingleSignOn to execute login via the parent/ROOT
web app?




Tim Funk wrote:
> Out of the box - there is no Valve in Tomcat which requires
> authentication without first consulting web.xml.
> 
> As a simple(?) kludge - you could write your own Valve which forces
> authentication on anything executed by the Valve: - you'll need to fill
> in isAuthenticated(...)
> 
> 
> public class ProtectMeValve extends ValveBase implements Lifecycle {
> 
> ...
> 
>   public void invoke(Request request, Response response)
> throws IOException, ServletException {
> 
> String authHeader = request.getHeader("Authorization");
> if (authHeader!=null) {
>   if (isAuthenticated(request, authHeader)) {
> getNext().invoke(request, response);
>   } else {
> // may need setContentType(...)
> response.setStatus(403);
> response.getWriter().write("Go away - your not allowed!");
>   }
> } else {
>   // may need setContentType(...)
>   response.setStatus(401);
>   response.addHeader("WWW-Authenticate",
>  "Basic realm=\"My Webapp\"");
>   response.getWriter().write("some message");
> }
>   }
> }
> 
> I would think the preceding should work.
> 
> -Tim
> 
> Johannes wrote:
>> With the lack of reply's I guess that Active directory connections are
>> not used by anyone here.
>>
>> I'm making it a bit more simple then and in step one only protect this
>> service with a simple login / password protection.
>>
>> Setup: One separate engine only accepting HTTPS connections that needs
>> to be protected.
>> I have set up a ""org.apache.catalina.realm.MemoryRealm" realm with a
>> xml file with one user, password and group in my server.xml section
>> for the engine I'm protecting.
>>
>> So far so good.
>> Then I got everything to work when editing /WEB-INF/web.xml
>> and added the following:
>>   
>> Security check
>> 
>>   Protected Area
>>   
>>   /*
>>
>>   
>>   DELETE
>>   GET
>>   POST
>>   PUT
>> 
>> 
>>   
>>   testgroup
>> 
>>   
>>
>>   
>> BASIC
>> Security Check
>>   
>>
>> That worked great, the login box appears and are not accessible
>> without the correct logon.
>>
>> BUT the problem is that this webapp is delivered by a 3:rd party
>> without the above settings in there web.xml file.
>> We get regular updates and I would like to NOT be forced to remember
>> to add the above section every time we get a new release of the webapp.
>>
>> So how can I make this Engine/webapp in the server.xml file be
>> protected by one simple login WITHOUT the need to modify the webapp
>> itself every time we get a new version of the webapp?
>>
>> ~Johannes
>>
>>
>>
>> -Originalmeddelande-
>> From: Johannes [EMAIL PROTECTED]
>> Date: Thu, 02 Nov 2006 12:55:13 +0100
>> To: users@tomcat.apache.org
>> Subject: Tomcat authenticate with Active directory
>>
>>> I have a webapp that I want to protect the best way possible.
>>> Our environment has previously been Windows and still are but our new
>>> system is running tomcat 5.0.
>>>
>>> Now I would like to protect one part of our setup with login from our
>>> Windows 2003 Active directory domain server when there is a lot of
>>> people that is going to access this webapp. But still it need to be
>>> secure!
>>> Found some some information here:
>>> http://tomcat.apache.org/tomcat-5.0-doc/realm-howto.html
>>> Section JNDIRealm
>>>
>>> But without any previous experience with LDAP connections I have no
>>> clue how to get this to work.
>>> I'w tried searching for a good tutorial/guide how to make this happen
>>> step by step but without success.
>>>
>>> Have this been done by anyone here that could give me some help
>>> setting this up. Or can direct me to a good step by step tutorial to
>>> get this up and running?
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


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



Re: Suddenly server only throws ClientAbortException :-/

2006-11-03 Thread Clemens Eisserer

Hi again,

Could this have something todo with missing free heap space? Some
lines later in my log-file I see a OufOfMemoryException happen,
although between there have been some sucessful requests.

lg Clemens

2006/11/3, Clemens Eisserer <[EMAIL PROTECTED]>:

Hello,

One of our users is using Tomcat 4.1.29/java-1.4.2 on w2k3 server, and
he has strange problems with our webservice.
Tomcat suddenly throws at every request a ClientAbortException, like
the following:

ERROR 2006-10-30 07:21:17,736 - ClientAbortException:
java.net.SocketException: Connection reset by peer: socket write error
at 
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:404)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:353)
at 
org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:432)
at org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:419)
at 
org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.java:108)
at 
com.agosys.unicom.servlet.UnicomServlet.handleRequest(UnicomServlet.java:84)

The problem can only be resolved by restarting the service.

If this is a known problem - I don't care and advice my user to
upgrade, however its kind of hard if I am not sure (those are
production servers at a very large company).
Is this a known problem, is there something I could do to prevent
these failures or whats causing them?

Thank you in advance, lg Clemens



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



Re: problems with unpacking ROOT.war

2006-11-03 Thread Martin Gainty
Andrew-

since the manager app is used to implement the decompression of the war I would 
set privilieged = "true"
If the decompression error only occurs using Ant deploy task I would ping ant 
users list  user@ant.apache.org

Anyone else?
M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 8:04 AM
Subject: RE: problems with unpacking ROOT.war


> Hi there,
> 
> I've been having trouble persuading tomcat 5.5 to expand ROOT.war when it
> is dropped into webapps, and started.  The problem seems to go away if
> ROOT.war contains META-INF/context.xml - but since we deploy this war file
> to different environments, shipping it with a context file isn't an option.
> 
> See the email below for instructions on how to duplicate the bug.  (btw,
> this is quite an old mailtrail, and I notice there are a couple of stray
> messages that should belong in this particular mail trail).
> 
> I've also experimented today with the manager app, and again , when I use
> the deploy ant target, the app fails to start because it seems tomcat isn't
> expanding the war file:
> 
>path="${path}" localWar="file://${build}/ROOT.war"
> config="file://${build}/ROOT.xml" />
> 
> The manager can correctly stop and undeploy the ROOT app, but when I use
> the above task, ROOT.war and ROOT.xml are dropped into the correct folders,
> but the war *isn't* expanded).
> 
> ROOT.xml has the following context attributes:
> 
>  antiJARLocking="true">
> 
> and host has the usual defaults:
> 
>  autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
> 
> My question is:   has anyone else experienced similar problems with
> expanding ROOT.war?My work around is to write ant targets and scripts
> to manually expand the war... however I'd like to understand if this is a
> bug, or just a quirk of my setup.  If it is a bug, then I'd like to submit
> this to tomcat's bugzilla.
> 
> thanks
> 
> Andy
> 
> 
> 
>   
> [EMAIL PROTECTED] 
> mchase.com
>To 
> 18/10/2006 09:32  "Tomcat Users List" 
>  
>cc 
> Please respond to 
>   "Tomcat Users   Subject 
>   List"   RE: problems with unpacking 
> <[EMAIL PROTECTED] ROOT.war
> che.org>  
>   
>   
>   
>   
>   
> 
> 
> 
> 
> Hi Charles,
> 
>> Neither one is correct.  You must NOT use the path attribute in a
>>  element unless the  is defined in server.xml.  The
>> URI path to the app is determined from the name of the .xml file in the
>> conf/[engine]/[host] directory.
> 
> Thanks for the feedback and the correction.  OK - I have a very simple war
> file named ROOT.war - it doesn't a META-INF directory.  I have placed a
> file called ROOT.xml into conf/Catalina/localhost with:
> 
>  
>  
>  
> 
> Server.xml has the defaults that come with tomcat 5.5.17:
> 
> unpackWARs="true" autoDeploy="true"
>   xmlValidation="false" xmlNamespaceAware="false">
> 
> I put ROOT.war into the webapps directory and start tomcat --> ROOT.war
> isn't expanded.
> 
> Any other suggestions?  Or might this be a bug?
> 
> thanks for your help,
> 
> Andy
> 
> 
> 
> 
> 
> "Caldarale,
> Charles R"
>  unisys.com>   "Tomcat Users List"
>   
> 17/10/2006 14:58   cc
> 
>   Subject
> Please respond to RE: problems with unpacking
>   "Tomcat Users   ROOT.war
>   List"
> <[EMAIL PROTECT

Re: How to get fields list in order

2006-11-03 Thread Christopher Schultz
David,

 Since you mentioned byte offsets, I have to ask: are you trying to
 subvert the serialization system? Or, even worse, inspect the object
 memory from with JNI?
 
>>> The latter, sort of.  I'm using a package which puts a wrapper around
>>> JNI to make it easier to create windows standard .dll's from java
>>> classes, and passing them structures from Visual Basic and other
>>> external apps.  To modify return parameters, I need the byte offsets of
>>> the various pieces of the structure, which I'm mirroring in my java
>>> classes.
>>>   
>>
>> Why not just use the built-in JNI C-to-Java capabilities? If you need to
>
> I don't know C, and don't have access to a C compiler.

Wait... I thought you said you were using JNI...?! Or, are you using
someone else's JNI package to do some dirty tricks? I thought there was
only a C binding for JNI thus far.

-chris



signature.asc
Description: OpenPGP digital signature


Re: Could a bad servlet initializtion stop tomcat?

2006-11-03 Thread Christopher Schultz
Martin,

Martin Gainty wrote:
> Yaar-
> try 
> 
> init()
> {
>  try 
> {
> //code here
> }
> catch(Exception excp)
> {
> System.exec("/PATH/TO/JAKARTA/bin/shutdown.sh");
> }
> }

OMG I'm going to vomit. At least you could have used System.exit().

Please, everyone, never do anything like this.

-chris




signature.asc
Description: OpenPGP digital signature


RE: problems with unpacking ROOT.war

2006-11-03 Thread Caldarale, Charles R
> From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> Subject: Re: problems with unpacking ROOT.war
> 
> since the manager app is used to implement the decompression 
> of the war I would set privilieged = "true"

Again, bad information from Martin.  The privileged setting allows an
app to reference container servlets and classes, not the other way
around.

Unfortunately, I have no explanation for why ROOT.war is not being
expanded in all circumstances.  Still poking around in the code.

 - Chuck


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

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



Re: FORM based authentication LOGOUT

2006-11-03 Thread Christopher Schultz
John,

> When I call request.getUserPrincipal(); I still get the Principal back
> and I can still call request.isUserInRole( "Foo" ); and get a valid
> response for the currently logged in user.

Are you checking those values during the same request in which you
killed the session? It's possible that the request needs to be recycled
(or a new session created) before getUserPrincipal and isUserInRole will
return different values. Just a thought?

-chris

> 
> John
> 
>>> From: John McPeek [mailto:[EMAIL PROTECTED] Subject: FORM based
>>> authentication LOGOUT
>>>
>>> I have tried to invalidate the session and get a new one.
>>> No Dice.
>>>   
>>
>> When you say "No Dice", what actually happens?
>>
>> All the admin app for Tomcat does is the following, which seems to work:
>>
>>HttpSession session = request.getSession();
>>session.invalidate();
>>session = request.getSession(true);
>>
>> - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail
>> and its attachments from all computers.
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>  
>>
> 
> 



signature.asc
Description: OpenPGP digital signature


Re: How to get fields list in order

2006-11-03 Thread David Kerber

Christopher Schultz wrote:

...


I don't know C, and don't have access to a C compiler.
   



Wait... I thought you said you were using JNI...?! Or, are you using
someone else's JNI package to do some dirty tricks? I thought there was
only a C binding for JNI thus far.
 

I'm using a 3rd party package which handles most of the grunt-work of 
JNI for me.  If anybody's interested, it's from www.nevaobject.com; I'm 
using their JavaDllBuilder package, but they have other ones as well.


Dave



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



RE: Suddenly server only throws ClientAbortException :-/

2006-11-03 Thread Caldarale, Charles R
> From: Clemens Eisserer [mailto:[EMAIL PROTECTED] 
> Subject: Suddenly server only throws ClientAbortException :-/
> 
> Tomcat suddenly throws at every request a ClientAbortException, like
> the following:
> 
> ERROR 2006-10-30 07:21:17,736 - ClientAbortException:
> java.net.SocketException: Connection reset by peer: socket write error
>   at 
>
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:
404)

On the face of it, it looks like the client simply closed its end of the
connection; could also be anything in between the client and server,
such as an IIS or httpd front end, a load balancer, a proxy, firewalls,
etc.  What does netstat show, from both the client and server sides?

If this is repeatable in any kind of predictable fashion, you could
monitor the network traffic with Ethereal or some other tool and see if
any TCP resets are coming across.

 - Chuck


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

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



Re: Could a bad servlet initializtion stop tomcat?

2006-11-03 Thread Edoardo Panfili

Yaar Schnitman ha scritto:
Is there a way to make the failure of a single servlet's initialization 
stop the initialization of the other servlets, or even stop tomcat with 
an error?


I can't reproduce always the error but some time ago I had a servlet 
that builds a bitmap (Mac OS X, Tomcat 5.0.x), sometimes the whole 
server crashes. I think that the error was (or is, I don't know) in the VM.


The only solution that I was able to find is to produce svg graphics 
(obviously not a solution).



Edoardo
--
[EMAIL PROTECTED]
AIM: edoardopn
Jabber: [EMAIL PROTECTED]
tel:075 9142766

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



Re: How to get fields list in order

2006-11-03 Thread Christopher Schultz
Dave,

David Kerber wrote:
> Christopher Schultz wrote:
>> Wait... I thought you said you were using JNI...?! Or, are you using
>> someone else's JNI package to do some dirty tricks? I thought there was
>> only a C binding for JNI thus far.
>
> I'm using a 3rd party package which handles most of the grunt-work of
> JNI for me.  If anybody's interested, it's from www.nevaobject.com; I'm
> using their JavaDllBuilder package, but they have other ones as well.

JavaDllBuilder looks like it should be used to call Java from another
language. Are you using this package backwards?

-chris




signature.asc
Description: OpenPGP digital signature


RE: Could a bad servlet initializtion stop tomcat?

2006-11-03 Thread Joseph Ray
Thanks for the input.  Something I forgot to mention.  My CTO built a
custom App in java.  That's why we need tomcat.  I believe he did all
his programming, and testing on a Mac.  I believe your input was more
valuable than you first realized.  

Thanks for the Help,

 

Joseph Ray

Network Administrator

Freshwater Publishing

269-704-8113


-Original Message-
From: Edoardo Panfili [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 03, 2006 9:50 AM
To: Tomcat Users List
Subject: Re: Could a bad servlet initializtion stop tomcat?

Yaar Schnitman ha scritto:
> Is there a way to make the failure of a single servlet's
initialization 
> stop the initialization of the other servlets, or even stop tomcat
with 
> an error?
> 
I can't reproduce always the error but some time ago I had a servlet 
that builds a bitmap (Mac OS X, Tomcat 5.0.x), sometimes the whole 
server crashes. I think that the error was (or is, I don't know) in the
VM.

The only solution that I was able to find is to produce svg graphics 
(obviously not a solution).


Edoardo
-- 
[EMAIL PROTECTED]
AIM: edoardopn
Jabber: [EMAIL PROTECTED]
tel:075 9142766

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


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



Can log4j logging be configured on a CATALINA_BASE basis?

2006-11-03 Thread Mike Hanafey
If multiple intances of tomcat are running from one CATALINA_HOME and
several CATALINA_BASE's it would be nice if tomcat logging (not webapp
logging) could be configured differently for the different intances by
placing the log4j.properties file somewhere under CATALINA_BASE, but
this does not appear to work, and of course putting the configuration
under CATALINE_HOME/common/classes means all instances share the same
logging configuration.

Is there some way to specify log4j logging on a CATALINA_BASE basis?

-- 
+---+
|  Mike Hanafey |
|  DuPont Crop Genetics |
|  Experimental Station E353/132|
|  --+- |
|  FedEx, UPS, etc. |  US Mail  |
|   |  ---  |
|  RT 141 & Henry Clay  |  POB 80353|
|  Wilmington, DE 19803 |  Wilmington DE 19880-0353 |
|  --+- |
|  Phone: (302)695-2614 Fax: (302)695-2728  |
|  Email: [EMAIL PROTECTED] |
+---+

This communication is for use by the intended recipient and contains
information that may be Privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender by
return e-mail and delete this e-mail from your system. Unless explicitly
and conspicuously designated as "E-Contract Intended", this e-mail does
not constitute a contract offer, a contract amendment, or an acceptance
of a contract offer. This e-mail does not constitute a consent to the
use of sender's contact information for direct marketing purposes or for
transfers of data to third parties.

Francais Deutsch Italiano  Espanol  Portugues  Japanese  Chinese  Korean

   http://www.DuPont.com/corp/email_disclaimer.html

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



Re: How to get fields list in order

2006-11-03 Thread David Kerber

Christopher Schultz wrote:


Dave,

David Kerber wrote:
 


Christopher Schultz wrote:
   


Wait... I thought you said you were using JNI...?! Or, are you using
someone else's JNI package to do some dirty tricks? I thought there was
only a C binding for JNI thus far.
 


I'm using a 3rd party package which handles most of the grunt-work of
JNI for me.  If anybody's interested, it's from www.nevaobject.com; I'm
using their JavaDllBuilder package, but they have other ones as well.
   



JavaDllBuilder looks like it should be used to call Java from another
language. Are you using this package backwards?

 

No, I'm using it to make a .dll in java that I can call from VB and 
Delphi.  The dll has to take as parameters some rather complex 
structures, modify the data in them, and return them back to the calling 
prog.  Reading and writing the data from those structures requires that 
I know the byte offsets of each piece of data inside them, but the 
Coroutine package that is part of JavaDllBuilder provides routines that 
make these retrievals one-liners once I know the offsets.  Those 
structures and their contents correspond to java classes in my dll 
source.  I read the data from the structures, load it into my classes, 
do all my processing in java with those regular classes, then write the 
data back out of the classes into the structures, and pass it back to 
the calling prog.


Dave






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



Re: Could a bad servlet initializtion stop tomcat?

2006-11-03 Thread Martin Gainty
you're definitely targetting the most resource intensive and tangential use 
case 
Although there seems to be a bit of a disconnect that where exception logic 
shuts-down the server its running on
BTW putting a system.exit(0) in your catch block will shutdown tomcat as 
well... albeit not gracefully!
If you want to look at various enterprise level development scenarios using 
design patterns such as Session-Facade or MVC feel free to ping this list

GL,
M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Joseph Ray" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 9:56 AM
Subject: RE: Could a bad servlet initializtion stop tomcat?


Thanks for the input.  Something I forgot to mention.  My CTO built a
custom App in java.  That's why we need tomcat.  I believe he did all
his programming, and testing on a Mac.  I believe your input was more
valuable than you first realized.  

Thanks for the Help,

 

Joseph Ray

Network Administrator

Freshwater Publishing

269-704-8113


-Original Message-
From: Edoardo Panfili [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 03, 2006 9:50 AM
To: Tomcat Users List
Subject: Re: Could a bad servlet initializtion stop tomcat?

Yaar Schnitman ha scritto:
> Is there a way to make the failure of a single servlet's
initialization 
> stop the initialization of the other servlets, or even stop tomcat
with 
> an error?
> 
I can't reproduce always the error but some time ago I had a servlet 
that builds a bitmap (Mac OS X, Tomcat 5.0.x), sometimes the whole 
server crashes. I think that the error was (or is, I don't know) in the
VM.

The only solution that I was able to find is to produce svg graphics 
(obviously not a solution).


Edoardo
-- 
[EMAIL PROTECTED]
AIM: edoardopn
Jabber: [EMAIL PROTECTED]
tel:075 9142766

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


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



Re: Tomcat authenticate with BASIC Auth (Pre: Active directory)

2006-11-03 Thread Johannes
That is really a REALLY good idea!
And if that works the solution is solved.

To bad that I have to go home now and I'll have to wait until Monday to try it.
But this sounds like the solution!
I'll get back with the answer on Monday.

~Johannes


-Originalmeddelande-
From: Pid [EMAIL PROTECTED]
Date: Fri, 03 Nov 2006 14:28:29 +0100
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: Tomcat authenticate with BASIC Auth (Pre: Active directory)

> 
> If you deploy the webapp inside another directory that is already
> protected, you can use SingleSignOn to execute login via the parent/ROOT
> web app?
> 
> 
> 
> 
> Tim Funk wrote:
> > Out of the box - there is no Valve in Tomcat which requires
> > authentication without first consulting web.xml.
> > 
> > As a simple(?) kludge - you could write your own Valve which forces
> > authentication on anything executed by the Valve: - you'll need to fill
> > in isAuthenticated(...)
> > 
> > 
> > public class ProtectMeValve extends ValveBase implements Lifecycle {
> > 
> > ...
> > 
> >   public void invoke(Request request, Response response)
> > throws IOException, ServletException {
> > 
> > String authHeader = request.getHeader("Authorization");
> > if (authHeader!=null) {
> >   if (isAuthenticated(request, authHeader)) {
> > getNext().invoke(request, response);
> >   } else {
> > // may need setContentType(...)
> > response.setStatus(403);
> > response.getWriter().write("Go away - your not allowed!");
> >   }
> > } else {
> >   // may need setContentType(...)
> >   response.setStatus(401);
> >   response.addHeader("WWW-Authenticate",
> >  "Basic realm=\"My Webapp\"");
> >   response.getWriter().write("some message");
> > }
> >   }
> > }
> > 
> > I would think the preceding should work.
> > 
> > -Tim
> > 
> > Johannes wrote:
> >> With the lack of reply's I guess that Active directory connections are
> >> not used by anyone here.
> >>
> >> I'm making it a bit more simple then and in step one only protect this
> >> service with a simple login / password protection.
> >>
> >> Setup: One separate engine only accepting HTTPS connections that needs
> >> to be protected.
> >> I have set up a ""org.apache.catalina.realm.MemoryRealm" realm with a
> >> xml file with one user, password and group in my server.xml section
> >> for the engine I'm protecting.
> >>
> >> So far so good.
> >> Then I got everything to work when editing /WEB-INF/web.xml
> >> and added the following:
> >>   
> >> Security check
> >> 
> >>   Protected Area
> >>   
> >>   /*
> >>
> >>   
> >>   DELETE
> >>   GET
> >>   POST
> >>   PUT
> >> 
> >> 
> >>   
> >>   testgroup
> >> 
> >>   
> >>
> >>   
> >> BASIC
> >> Security Check
> >>   
> >>
> >> That worked great, the login box appears and are not accessible
> >> without the correct logon.
> >>
> >> BUT the problem is that this webapp is delivered by a 3:rd party
> >> without the above settings in there web.xml file.
> >> We get regular updates and I would like to NOT be forced to remember
> >> to add the above section every time we get a new release of the webapp.
> >>
> >> So how can I make this Engine/webapp in the server.xml file be
> >> protected by one simple login WITHOUT the need to modify the webapp
> >> itself every time we get a new version of the webapp?
> >>
> >> ~Johannes
> >>
> >>
> >>
> >> -Originalmeddelande-
> >> From: Johannes [EMAIL PROTECTED]
> >> Date: Thu, 02 Nov 2006 12:55:13 +0100
> >> To: users@tomcat.apache.org
> >> Subject: Tomcat authenticate with Active directory
> >>
> >>> I have a webapp that I want to protect the best way possible.
> >>> Our environment has previously been Windows and still are but our new
> >>> system is running tomcat 5.0.
> >>>
> >>> Now I would like to protect one part of our setup with login from our
> >>> Windows 2003 Active directory domain server when there is a lot of
> >>> people that is going to access this webapp. But still it need to be
> >>> secure!
> >>> Found some some information here:
> >>> http://tomcat.apache.org/tomcat-5.0-doc/realm-howto.html
> >>> Section JNDIRealm
> >>>
> >>> But without any previous experience with LDAP connections I have no
> >>> clue how to get this to work.
> >>> I'w tried searching for a good tutorial/guide how to make this happen
> >>> step by step but without success.
> >>>
> >>> Have this been done by anyone here that could give me some help
> >>> setting this up. Or can direct me to a good step by step tutorial to
> >>> get this up and running?
> > 
> > 
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> 
> 

virtual host getRealPath

2006-11-03 Thread Peter Warren
 I'm trying to figure out why I get repeated directory names when calling
"application.getRealPath(request.getRequestURI())" from an index.jsp
file. Clearly there's something about virtual hosts and contexts that
I'm missing.

Using Tomcat 5.5 & 6.0 in standalone mode under Windows XP, I see the
following behavior:

A request for the url: http://www.nomad.org/gallery/

yields a real path of:

C:\Documents and Settings\Peter\My 
Documents\dev\webapps\www.nomad.org\gallery\gallery

(note the duplication of the gallery directory)

Why?

In my server.xml file I defined this virtual host:




If I don't define any contexts, the problem occurs.

The problem also occurs if I have either of the following contexts
defined for this host:

 or


If I set the gallery context to:



the duplicate folder name goes away, but my gallery web.xml does not get
read.

Thanks for any help,
Peter

 
-
Cheap Talk? Check out Yahoo! Messenger's low  PC-to-Phone call rates.

Cannot create JDBC driver of class '' for connect URL 'null'"

2006-11-03 Thread Eric Yin

Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html 
and i got this error.


i'm using fedora 5 and i download "Linux (non RPM package) downloads 
/linux (x86)" of mysql and install it accoding to the insturction. I 
created a databse P6120 and table test2 by using user 'eric' and 
passwod 'ericyin1'.


I add the following to server.xml:

   username="eric" password="ericyin1" 
driverClassName="com.mysql.jdbc.Driver"

  url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>



I add the following to web.xml:
 
 DB Connection
 jdbc/TestDB
 javax.sql.DataSource
 Container
 

I add the following to the index.jsp:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

select id, name, studentid  from test2




   name ${row.name}
   studentid ${row.studentid}


thanks,

Eric.



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



Re: How to get fields list in order

2006-11-03 Thread Christopher Schultz
Dave,

David Kerber wrote:
>> JavaDllBuilder looks like it should be used to call Java from another
>> language. Are you using this package backwards?
>
> No, I'm using it to make a .dll in java that I can call from VB and
> Delphi.

Okay, that makes way more sense.

This might be a better question on a different group. You /did/ give us
a heads-up, though ;)

> Reading and writing the data from those structures requires that
> I know the byte offsets of each piece of data inside them

Perhaps you should get someone to write simpler Java wrappers around
these things, so maybe you could deal exclusively with String data, or
maybe even with byte arrays of information that is packed in an explicit
way (for instance, Java's DataOutputStream can write binary data in
network byte order, with well-defined sizes, offsets, etc.)

> I read the data from the structures, load it into my classes,
> do all my processing in java with those regular classes, then write the
> data back out of the classes into the structures, and pass it back to
> the calling prog.

I'm sorry to say it (again), but I think you're just asking for trouble,
here. What do you have implemented in Java that's so useful and
difficult to port to Delphi or VM or (even better) C#?

-chris




signature.asc
Description: OpenPGP digital signature


Re: virtual host getRealPath

2006-11-03 Thread Christopher Schultz
Peter,

>  I'm trying to figure out why I get repeated directory names when calling
> "application.getRealPath(request.getRequestURI())" from an index.jsp
> file. Clearly there's something about virtual hosts and contexts that
> I'm missing.

I suppose you /could/ do this, but usually URIs and directory structures
usually don't map exactly to one another.

> A request for the url: http://www.nomad.org/gallery/
> C:\Documents and Settings\Peter\My 
> Documents\dev\webapps\www.nomad.org\gallery\gallery

Yeah. Since your URL contains the prefix "/gallery" already, it's being
added. When you call "getRealPath", you're getting something rooted in
"...\dev\webapps\www.nomad.org\gallery", which is the root of your
webapp. Since "/gallery" in the URI, too, you're doubling it.

You need to clip out the context path.

This ought to do it for you:

String path = request.getRequestURI();
if(path.startsWith(request.getContextPath()))
path = path.substring(request.getContextPath());
path = application.getRealPath(path);

Note that letting users' URIs drive files being loaded from the disk
might be considered a security risk. I don't know your deployment model
or anything like that; I just figured I'd mention it.

Hope that helps,
-chris



signature.asc
Description: OpenPGP digital signature


Re: How to get fields list in order

2006-11-03 Thread David Kerber

Christopher Schultz wrote:

...


I read the data from the structures, load it into my classes,
do all my processing in java with those regular classes, then write the
data back out of the classes into the structures, and pass it back to
the calling prog.
   



I'm sorry to say it (again), but I think you're just asking for trouble,
here. What do you have implemented in Java that's so useful and
difficult to port to Delphi or VM or (even better) C#?
 

What's VM?  I would really prefer to have this done in Delphi, but 
basically it has to do with where we have programmer-hours available.  
We're a very small company (15 people total).  I'm the only VB and the 
main Java programmer.  We have two guys who do Delphi and a little java, 
but they are completely socked up with other work.  We have no other 
programmers, and can't afford the cash outlay to bring in a contract 
programmer to do it in C or Delphi.  We have no C (of any flavor) 
programmers in-house.  The other reason (not the deciding one, but 
another point in its favor) to do it in java is for later portability to 
another package we're considering developing over the next year or so 
for web-based administration of one of our other apps.


Dave



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



problem all virtual host of a domain to a single context

2006-11-03 Thread mast
Hi i would like to setup a virtual host in the manner of apache  : i mean 
*.mydomain.com on this context

i have try :
*.mydomain.com
but this doesn't work, is there a way to do this on tomcat ? 



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



Re: Suddenly server only throws ClientAbortException :-/

2006-11-03 Thread Clemens Eisserer

Thanks a lot for the hint Chuck,

I think I know what happened, tomcat ran out of heap so the JVM tried
to agressivly free some space and wasted some minutes. When there was
enough free space to complete the request, the connection already had
timed out.
Its just a thought but seems quite realistic when looking at the logfiles.

I'll see wether it happens again, thanks for your help and your suggestions.

Thanks, lg Clemens

2006/11/3, Caldarale, Charles R <[EMAIL PROTECTED]>:

> From: Clemens Eisserer [mailto:[EMAIL PROTECTED]
> Subject: Suddenly server only throws ClientAbortException :-/
>
> Tomcat suddenly throws at every request a ClientAbortException, like
> the following:
>
> ERROR 2006-10-30 07:21:17,736 - ClientAbortException:
> java.net.SocketException: Connection reset by peer: socket write error
>   at
>
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:
404)

On the face of it, it looks like the client simply closed its end of the
connection; could also be anything in between the client and server,
such as an IIS or httpd front end, a load balancer, a proxy, firewalls,
etc.  What does netstat show, from both the client and server sides?

If this is repeatable in any kind of predictable fashion, you could
monitor the network traffic with Ethereal or some other tool and see if
any TCP resets are coming across.

 - Chuck


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

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




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



Re: Request for WMV file to machine name doesn't work

2006-11-03 Thread Zeina Aoun
Hi!

I am having the same problem and had posted my question earlier.

I have installed 2 media files 1 is .wmv and the other is .rmvb, both of the 
files open as text in the browser for some starnge reason.

Ppl told me to set the correct mime in web.xml, but I am just a basic user, I 
did not understand what to do.

Can u please tell me how u set the correct mimie in web.xml?

Thank u


- Original Message 
From: Zachary Wiener <[EMAIL PROTECTED]>
To: users@tomcat.apache.org
Sent: Friday, November 3, 2006 8:23:30 AM
Subject: Request for WMV file to machine name doesn't work


Hello.  I have Tomcat 5.0.28 installed on my Windows XP machine.  Under 
webapps I have a website installed, and under the website I have a *.wmv 
file installed.  If I access this file through Internet Explorer as 
http://:8080/mysite/test.wmv, the file does not open in 
media player, but displays as text.  I have made sure that the web.xml has 
the mime type defined.  If I access the file as 
http://localhost:8080/mysite/test.wmv, the file will be played in media 
file.  If I access the file from a different machine and access as 
http://:8080/mysite/test.wmv, the file will be played in 
media player.  My question is, if I am logged into my machine and I access 
the file using the machine name, why is it displayed as text, but 
localhost works?  Thank you.



RE: problem all virtual host of a domain to a single context

2006-11-03 Thread Caldarale, Charles R
> From: mast [mailto:[EMAIL PROTECTED] 
> Subject: problem all virtual host of a domain to a single context 
> 
> Hi i would like to setup a virtual host in the manner of 
> apache  : i mean *.mydomain.com on this context
> i have try :
> *.mydomain.com
> but this doesn't work, is there a way to do this on tomcat ? 

A quick search of the mail archives found this:
http://marc.theaimsgroup.com/?t=11613743464&r=1&w=2

Many other hits for the combination of "host" and "wildcard".

 - Chuck


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

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



Re: haaving trouble html in tomcat 5.5.20

2006-11-03 Thread Edoardo Panfili

Edoardo Panfili ha scritto:

Zeina Aoun ha scritto:
I am having trouble with html in tomcat. I am using the Apache Tomcat 
5.5.20 Server
 
The problem is hard to describe. I am trying to enable some video clip 
files to be downloaded by users, but unfortunatley instead of 
downloading it opens up the garbage text on the webpage, just like if 
u try to open a media file in notepad or wordpad. It does not allow to 
download the media files.
 
But when I try running the html page outside tomcat or in another 
server, it opens up perfectly.


It seems that tomcat doesn't set up the proper mime type of your media 
files, the error is not in the html page.


I think that you can take a look at $TOMCAT/conf/web.xml and set up the 
proper mime type, in my web.xml there is no mapping for rmvb or wmv.


loocking in mime.types of my linux machine:
for wmv the mime type is video/x-ms-wmv



Is not difficult, try: find web.xml in the tomcat installation directory 
(I am using OS X, what OS are you using?).


add the follow lines after the other mime-mapping


wmv
video/x-ms-wmv


rmvb
application/vnd.rn-realmedia-vbr


I hope that this is the right mapping, the first comes from my 
linux-box, the second from internet search.



Edoardo




 
 
I am using .rmvb and .wmv format clips.
 
 
I am using this type of basic coding.
 

"http://www.w3.org/TR/xhtml1/DTD/xhtml1 - transitional.dtd">
http://www.w3.org/1999/xhtml";>



 download video

  
   Clip1 
   
 Clip2 
< div>

 
 
Thank u









--
[EMAIL PROTECTED]
AIM: edoardopn
Jabber: [EMAIL PROTECTED]
tel:075 9142766

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



Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Igor Borovkov
Hello!

I have a standalone java program permanently running on a server. I need to
communicate with that java program from servlets.

Could you suggest me a simplest solution how to do that. I think I should use
RMI. But there is one requirement – apache tomcat should be embedded to that
program. Will this requirement bring difficulties or not?

Thanks in advance.



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



Re: problem all virtual host of a domain to a single context

2006-11-03 Thread mast
i see i have read all subjets thanks, so tomcat still doesn't support it i 
guess, too bad it would be very useful
- Original Message - 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 7:58 PM
Subject: RE: problem all virtual host of a domain to a single context



From: mast [mailto:[EMAIL PROTECTED]
Subject: problem all virtual host of a domain to a single context

Hi i would like to setup a virtual host in the manner of
apache  : i mean *.mydomain.com on this context
i have try :
*.mydomain.com
but this doesn't work, is there a way to do this on tomcat ?


A quick search of the mail archives found this:
http://marc.theaimsgroup.com/?t=11613743464&r=1&w=2

Many other hits for the combination of "host" and "wildcard".

- Chuck


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

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



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



RE: Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Robert Harper
I don't know of anything that requires you to embed Tomcat in your app. They
should be able to communicate just find as separate entities. You could also
maybe wrapper some OS specific IPC with JNI. We use RMI both internal to a
machine and externally to other machines just fine and you don't have to
have anything embedded. Your servlet can communicate to another
process/machine with no change in code except logic of where to connect.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Igor Borovkov [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 03, 2006 12:20 PM
To: users@tomcat.apache.org
Subject: Communication with a standalone java program from servlets
(embedded tomcat). RMI?

Hello!

I have a standalone java program permanently running on a server. I need to
communicate with that java program from servlets.

Could you suggest me a simplest solution how to do that. I think I should
use
RMI. But there is one requirement - apache tomcat should be embedded to that
program. Will this requirement bring difficulties or not?

Thanks in advance.



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





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



Error Messages?

2006-11-03 Thread Kevin Mullin

I am using Tomcat, and just starting
the server, I see these messages that look like error messages:

SEVERE: Servlet /ibi_html threw load()
exception  
java.lang.NullPointerException  
                 

and

SEVERE: StandardWrapper.Throwable 
java.lang.NullPointerException  
 

log4j:ERROR setFile(null,true) call
failed.                  
                 
java.io.FileNotFoundException: /appls/WebFocusClient/ibi/WebFOCUS71/logs/wfibihtml.log
(EDC5129I No such file or directory

and

SEVERE: StandardWrapper.Throwable
java.lang.NullPointerException  


and

log4j:ERROR setFile(null,true) call
failed.                  
           
java.io.FileNotFoundException: /appls/WebFocusClient/ibi/WebFOCUS71/logs/wfibihtml.log
(EDC5129I No such file or directory.)  

(which sure looks like the previous
one)

and

SEVERE: Servlet /approot threw load()
exception
java.lang.NullPointerException  
              

and

SEVERE: StandardWrapper.Throwable 
java.lang.NullPointerException  
 

and

log4j:ERROR setFile(null,true) call
failed.                  
          
java.io.FileNotFoundException: /appls/WebFocusClient/ibi/WebFOCUS71/logs/wfapproot.log
(EDC5129I No such file or directory.)

I say that these LOOK like errors, but
the server does come up and nothing seems amiss.  Are these errors
that need to be looked at?  The problems with 'No Such file or directory'
are easy, and I can track those down, but the others?






Kevin Mullin
Sr. Analyst
IBM Corporation
(206) 345-7068
[EMAIL PROTECTED]



Re: Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Martin Gainty
Igor-

when you say 'tomcat' should be embedded ..does this imply that  of these 
tomcat constructs should be embedded?
Servlet?
Manager?
MBean?
Internals?

Yes RMI uses RPC under the covers while providing complete and seamless 
(Complex) Object transmissions as well as fully supporting multi-threaded 
objects for your  web application. In other words you're on 
the right track..for more details  take a look at 
http://java.sun.com/javase/technologies/core/basic/rmi/whitepaper/index.jsp

Martin --
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Igor Borovkov" <[EMAIL PROTECTED]>
To: 
Sent: Friday, November 03, 2006 2:20 PM
Subject: Communication with a standalone java program from servlets (embedded 
tomcat). RMI?


Hello!

I have a standalone java program permanently running on a server. I need to
communicate with that java program from servlets.

Could you suggest me a simplest solution how to do that. I think I should use
RMI. But there is one requirement – apache tomcat should be embedded to that
program. Will this requirement bring difficulties or not?

Thanks in advance.



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



Re: How to get fields list in order

2006-11-03 Thread Christopher Schultz
David,

>> I'm sorry to say it (again), but I think you're just asking for
>> trouble, here. What do you have implemented in Java that's so
>> useful and difficult to port to Delphi or VM or (even better) C#?
> 
> What's VM?

Whoops. That should have been "VB".

> I would really prefer to have this done in Delphi, but basically it
> has to do with where we have programmer-hours available.

I complete understand.

> The other reason (not the deciding one, but another point in its
> favor) to do it in java is for later portability to another package
> we're considering developing over the next year or so for web-based
> administration of one of our other apps.

That's an interesting strategy... do new development in Java and write
wrappers for existing software to use the new libraries. In this case, I
think you are playing with fire.

It turns out that C wrappers for Java libraries aren't that hard to
write. IF you don't know much about C, though, I wouldn't recommend it.

The bottom line to your question is that byte offsets are difficult if
not impossible to predict, and you are better off using getDeclaredField
and getField().getValue() calls. Better yet, write your own, simpler
Java wrapper and then ddl-ize /that/. You could even write a short Java
program to read your classes using reflection and write-out simpler
forms of data, like all Strings or well-ordered, binary data.

Good luck,
-chris



signature.asc
Description: OpenPGP digital signature


RE: Error Messages?

2006-11-03 Thread Caldarale, Charles R
> From: Kevin Mullin [mailto:[EMAIL PROTECTED] 
> Subject: Error Messages?
> 
> I say that these LOOK like errors, but the server does come 
> up and nothing seems amiss.

They are errors.  At least one of your webapps is not running properly.
Individual webapp failures do not normally affect the container, unless
the webapp starts consuming resources excessively.

> Are these errors that need to be looked at?

Certainly, if you want your apps to run properly.

 - Chuck


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

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



Trouble changing Tomcat webapps directory

2006-11-03 Thread D. Alvarado

I just installed Tomcat 5.5 on Fedora Core 5 Linux.  Everything works
fine if I make absolutely no changes to anything, including server.xml
with this host element ...

 

However, I want to change the default webapps directory.  I notice when
I change to any other directory (the one below exists and has 775
permissions)

 

I get this error by doing "wget" ...

[EMAIL PROTECTED] bin]# wget http://localhost:8080/
--08:29:46--  http://localhost:8080/
  => `index.html'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 400 No Host matches server name
localhost
08:29:46 ERROR 400: No Host matches server name localhost.

Any ideas where I might start troubleshooting the problem?

Thanks, - Dave

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



Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Igor Borovkov

> I don't know of anything that requires you to embed Tomcat in your app. They
> should be able to communicate just find as separate entities. You could also

Thanks for your reply.

We thought about embedding tomcat (to startup it from the java program) to
simplify whole application and improve its portability, cause it is more
convient for us and our system to have all logic both of the java program and
the servlets in one place.
But perhaps it is not really good idea.




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



Re: haaving trouble html in tomcat 5.5.20

2006-11-03 Thread Zeina Aoun
ONce again thank u for ur response and help. I appreciate it! 


- Original Message 
From: Edoardo Panfili <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Friday, November 3, 2006 2:09:55 PM
Subject: Re: haaving trouble html in tomcat 5.5.20


Edoardo Panfili ha scritto:
> Zeina Aoun ha scritto:
>> I am having trouble with html in tomcat. I am using the Apache Tomcat 
>> 5.5.20 Server
>>  
>> The problem is hard to describe. I am trying to enable some video clip 
>> files to be downloaded by users, but unfortunatley instead of 
>> downloading it opens up the garbage text on the webpage, just like if 
>> u try to open a media file in notepad or wordpad. It does not allow to 
>> download the media files.
>>  
>> But when I try running the html page outside tomcat or in another 
>> server, it opens up perfectly.
> 
> It seems that tomcat doesn't set up the proper mime type of your media 
> files, the error is not in the html page.
> 
> I think that you can take a look at $TOMCAT/conf/web.xml and set up the 
> proper mime type, in my web.xml there is no mapping for rmvb or wmv.
> 
> loocking in mime.types of my linux machine:
> for wmv the mime type is video/x-ms-wmv
> 

Is not difficult, try: find web.xml in the tomcat installation directory 
(I am using OS X, what OS are you using?).

add the follow lines after the other mime-mapping

 
 wmv
 video/x-ms-wmv
 
 
 rmvb
 application/vnd.rn-realmedia-vbr
 

I hope that this is the right mapping, the first comes from my 
linux-box, the second from internet search.


Edoardo

> 
> 
>>  
>>  
>> I am using .rmvb and .wmv format clips.
>>  
>>  
>> I am using this type of basic coding.
>>  
>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1 - transitional.dtd">
>> http://www.w3.org/1999/xhtml";;>
>>
>> 
>> 
>>  download video
>> 
>>   
>>Clip1 
>>
>>  Clip2 
>> < div>
>> 
>>  
>>  
>> Thank u
>>
>>
> 
> 


-- 
[EMAIL PROTECTED]
AIM: edoardopn
Jabber: [EMAIL PROTECTED]
tel:075 9142766

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



Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Igor Borovkov
> Igor-

> when you say 'tomcat' should be embedded ..does this imply that  of
> these tomcat constructs should be embedded?
> Servlet?
> Manager?
> MBean?
> Internals?


Sorry. I am not perfectly familiar with embedding tomcat server at present time
I just ment starting tomcat server from the java program and to stop it with 
closing
that standalone java program.
Perhaps bad idea.  But may be it is good to have all application logic in one 
place cause
we wouldn't need tomcat server for other purposes rather than for serving 
servlets that control
the external java program.


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



RE: Trouble changing Tomcat webapps directory

2006-11-03 Thread Caldarale, Charles R
> From: D. Alvarado [mailto:[EMAIL PROTECTED] 
> Subject: Trouble changing Tomcat webapps directory
> 
> 08:29:46 ERROR 400: No Host matches server name localhost.

This would indicate a mismatch between the defaultHost attribute in your
 and the name attribute on your .  I wonder if you have
some XML errors in your modified server.xml that prevent its being
parsed properly.

 - Chuck


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

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



RE: Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Robert Harper
The big thing is scalability. If you leave them separate, you can put Tomcat
in one system and have your app running in another. This will help with
loading if either process ends up using a lot of CPU. Using RMI you can make
it loosely coupled where only the interface is known. As long as the
interface is not changed, you don't have to worry about changes in one
affecting the other.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: Igor Borovkov [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 03, 2006 1:08 PM
To: Robert Harper
Cc: 'Tomcat Users List'
Subject: Re[2]: Communication with a standalone java program from servlets
(embedded tomcat). RMI?


> I don't know of anything that requires you to embed Tomcat in your app.
They
> should be able to communicate just find as separate entities. You could
also

Thanks for your reply.

We thought about embedding tomcat (to startup it from the java program) to
simplify whole application and improve its portability, cause it is more
convient for us and our system to have all logic both of the java program
and
the servlets in one place.
But perhaps it is not really good idea.




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





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



Thread pool per webapp?

2006-11-03 Thread Huy Vo \(hvo\)
Hi,
 
I am wondering whether Tomcat supports thread pool configuration for
each webapp.  My understanding is that all webapps share the pool
configured for the connector.
 
Let's say I have webapps A and B, and A is more critical webapp.  Let's
say my connector's pool size is 100, and there are 100 concurrent
requests destined for A and B each (so total 200 requests here).  I
would like to allocate 70 threads to process A's requests, and only 30
for B's.
 
Is this something that Tomcat supports?  If not, what would be a good
alternative strategy for it?  I am thinking of using a RequestProcessor
to reject requests depending on its destination but that is not very
elegant as requests are rejected instead of being queued.
 
Thanks in advance.
 
Regards.
 
===
Huy T. Vo
Voice: 408-853-0535
Fax:408-853-4021
 


RE: Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Caldarale, Charles R
> From: Igor Borovkov [mailto:[EMAIL PROTECTED] 
> Subject: Re[2]: Communication with a standalone java program 
> from servlets (embedded tomcat). RMI?
> 
> Sorry. I am not perfectly familiar with embedding tomcat 
> server at present time

You have it right; Martin's question doesn't make any sense.  The
embedded version of Tomcat is a separate download, and you have to
establish the server part of its configuration programattically at run
time.

> But may be it is good to have all application logic
> in one place cause we wouldn't need tomcat server
> for other purposes rather than for serving servlets
> that control the external java program.

This is exactly why the embedded version exists.  Look at the doc for:
org.apache.catalina.startup.Embedded
at:
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/index.html

 - Chuck


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

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



Re: Error Messages?

2006-11-03 Thread Martin Gainty
Kevin-

every Servlet has  an init(ServletCinfig) method
where you want to make sure you initialise all of the servlet variables 
Also perform quick sanity checks by initialising as well as printing the 
variable to make sure it is NOT null
and avoid NullPointerExceptions on load
e.g.
YourServlet extends javax.servlet.http.HttpServlet
{
string foo=null;
init(javax.servlet.ServletConfig config)
{
foo="foo";
out.println("foo variable = "+foo);
}

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
  - Original Message - 
  From: Kevin Mullin 
  To: users@tomcat.apache.org 
  Sent: Friday, November 03, 2006 2:39 PM
  Subject: Error Messages?



  I am using Tomcat, and just starting the server, I see these messages that 
look like error messages: 

  SEVERE: Servlet /ibi_html threw load() exception   
  java.lang.NullPointerException 

  and 

  SEVERE: StandardWrapper.Throwable 
  java.lang.NullPointerException 

  log4j:ERROR setFile(null,true) call failed.   
  
  java.io.FileNotFoundException: 
/appls/WebFocusClient/ibi/WebFOCUS71/logs/wfibihtml.log (EDC5129I No such file 
or directory 

  and 

  SEVERE: StandardWrapper.Throwable 
  java.lang.NullPointerException   

  and 

  log4j:ERROR setFile(null,true) call failed.   
  java.io.FileNotFoundException: 
/appls/WebFocusClient/ibi/WebFOCUS71/logs/wfibihtml.log (EDC5129I No such file 
or directory.)   

  (which sure looks like the previous one) 

  and 

  SEVERE: Servlet /approot threw load() exception 
  java.lang.NullPointerException 

  and 

  SEVERE: StandardWrapper.Throwable 
  java.lang.NullPointerException 

  and 

  log4j:ERROR setFile(null,true) call failed. 
  java.io.FileNotFoundException: 
/appls/WebFocusClient/ibi/WebFOCUS71/logs/wfapproot.log (EDC5129I No such file 
or directory.) 

  I say that these LOOK like errors, but the server does come up and nothing 
seems amiss.  Are these errors that need to be looked at?  The problems with 
'No Such file or directory' are easy, and I can track those down, but the 
others?



Kevin Mullin
Sr. Analyst
IBM Corporation
(206) 345-7068
[EMAIL PROTECTED]   



Re: Trouble changing Tomcat webapps directory

2006-11-03 Thread D. Alvarado

Would a parse error be indicated on startup?  Anyway, I attached my
server.xml file, but here are the relevant lines

   
   

 
 

Do these seem in order?

Thanks, - Dave


On 11/3/06, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:

> From: D. Alvarado [mailto:[EMAIL PROTECTED]
> Subject: Trouble changing Tomcat webapps directory
>
> 08:29:46 ERROR 400: No Host matches server name localhost.

This would indicate a mismatch between the defaultHost attribute in your
 and the name attribute on your .  I wonder if you have
some XML errors in your modified server.xml that prevent its being
parsed properly.

 - Chuck


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

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











  
  
  
  
  

  
  







  

  

  
  






	
	













 
 



  
  

  

  
  

  
  

  

  

  

  

  
  

 















  


  


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

Re: Thread pool per webapp?

2006-11-03 Thread Martin Gainty
Huy

This RequestProcessor enqueues requests and services on as needed basisyou 
can easily substitute jdbc connections for corba connections
http://www.koders.com/java/fid327B70539EF40AE0E75381B058FB06D9B1BFFE61.aspx

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Huy Vo (hvo)" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 3:27 PM
Subject: Thread pool per webapp?


Hi,
 
I am wondering whether Tomcat supports thread pool configuration for
each webapp.  My understanding is that all webapps share the pool
configured for the connector.
 
Let's say I have webapps A and B, and A is more critical webapp.  Let's
say my connector's pool size is 100, and there are 100 concurrent
requests destined for A and B each (so total 200 requests here).  I
would like to allocate 70 threads to process A's requests, and only 30
for B's.
 
Is this something that Tomcat supports?  If not, what would be a good
alternative strategy for it?  I am thinking of using a RequestProcessor
to reject requests depending on its destination but that is not very
elegant as requests are rejected instead of being queued.
 
Thanks in advance.
 
Regards.
 
===
Huy T. Vo
Voice: 408-853-0535
Fax:408-853-4021
 


Re: Thread pool per webapp?

2006-11-03 Thread Christopher Schultz
Huy,

> Let's say I have webapps A and B, and A is more critical webapp.  Let's
> say my connector's pool size is 100, and there are 100 concurrent
> requests destined for A and B each (so total 200 requests here).  I
> would like to allocate 70 threads to process A's requests, and only 30
> for B's.

You could do this by fronting Tomcat with a web server like Apache httpd
or a proxy server, and just use two different connectors. I think this
would be a more elegant solution than trying to hack-together a
short-circuiting, load-balancing RequestProcessor (probably a Filter
would be better, but not by much).

-chris



signature.asc
Description: OpenPGP digital signature


Re: Cannot create JDBC driver of class '' for connect URL 'null'"

2006-11-03 Thread Eric Yin

Quoting Eric Yin <[EMAIL PROTECTED]>:


Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html 
and i got this error.


i'm using fedora 5 and i download "Linux (non RPM package) downloads 
/linux (x86)" of mysql and install it accoding to the insturction. I 
created a databse P6120 and table test2 by using user 'eric' and 
passwod 'ericyin1'.


I add the following to server.xml:

   username="eric" password="ericyin1" 
driverClassName="com.mysql.jdbc.Driver"

  url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>



I add the following to web.xml:
 
 DB Connection
 jdbc/TestDB
 javax.sql.DataSource
 Container
 

I add the following to the index.jsp:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

select id, name, studentid  from test2




   name ${row.name}
   studentid ${row.studentid}


thanks,

Eric.



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






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



obtain X-Forwarded-for: client-IP-address in access logs

2006-11-03 Thread Maurice Yarrow

Hello Tomcat community

I have tomcat (5.0.28) running behind pound (2.1.3) 
reverse-proxy-load-balancer.


This is a very effective setup, as I have pound also fronting apache and 
mongrel-rails

clusters.

Question:
Pound adds the following to its request to backend servers:
X-Forwarded-for: client-IP-address

I would like to be able to obtain this client-IP address in the tomcat 
access logs.
I tried all available formats (%a,  %A,  %b,  %B,  etc.,etc.) for the 
logger pattern,

but of course, none produced the client IP address placed in the request by
Pound. 

I could, of course, grep through the Pound log output which, by default, 
winds

up on /var/log/messages, but would rather just be able to see this in the
tomcat access log.

How could I, say, derive my own logger class and capture this header 
info that

pound places in the request to backend server ??

Is there a simpler way ?   Am I unaware of a direct way to do this ?

Maurice Yarrow


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



Re: Thread pool per webapp?

2006-11-03 Thread Christopher Schultz
Tomcat List,

Does anyone else suspect that Martin is actually an expert system
designed to read and respond to mailing list posts, but is totally
failing the Turing test?

-chris

Martin Gainty wrote:
> Huy
> 
> This RequestProcessor enqueues requests and services on as needed 
> basisyou can easily substitute jdbc connections for corba connections
> http://www.koders.com/java/fid327B70539EF40AE0E75381B058FB06D9B1BFFE61.aspx
> 
> M-
> This e-mail communication and any attachments may contain confidential and 
> privileged information for the use of the 
> designated recipients named above. If you are not the intended recipient, you 
> are hereby notified that you have received
> this communication in error and that any review, disclosure, dissemination, 
> distribution or copying of it or its 
> contents
> - Original Message - 
> From: "Huy Vo (hvo)" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" 
> Sent: Friday, November 03, 2006 3:27 PM
> Subject: Thread pool per webapp?
> 
> 
> Hi,
>  
> I am wondering whether Tomcat supports thread pool configuration for
> each webapp.  My understanding is that all webapps share the pool
> configured for the connector.
>  
> Let's say I have webapps A and B, and A is more critical webapp.  Let's
> say my connector's pool size is 100, and there are 100 concurrent
> requests destined for A and B each (so total 200 requests here).  I
> would like to allocate 70 threads to process A's requests, and only 30
> for B's.
>  
> Is this something that Tomcat supports?  If not, what would be a good
> alternative strategy for it?  I am thinking of using a RequestProcessor
> to reject requests depending on its destination but that is not very
> elegant as requests are rejected instead of being queued.
>  
> Thanks in advance.
>  
> Regards.
>  
> ===
> Huy T. Vo
> Voice: 408-853-0535
> Fax:408-853-4021
>  



signature.asc
Description: OpenPGP digital signature


Re: Cannot create JDBC driver of class '' for connect URL 'null'"

2006-11-03 Thread Martin Gainty
eric-
the name of your DB in the URL appears incorrect
instead of 
url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"

use 
url="jdbc:mysql://localhost:3306/P6120?autoReconnect=true"

anyone else?
M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Eric Yin" <[EMAIL PROTECTED]>
To: 
Sent: Friday, November 03, 2006 4:12 PM
Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'"


> Quoting Eric Yin <[EMAIL PROTECTED]>:
> 
>> Hi,
>>
>> I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
>> i'm doing the same thing as 
>> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html 
>> and i got this error.
>>
>> i'm using fedora 5 and i download "Linux (non RPM package) downloads 
>> /linux (x86)" of mysql and install it accoding to the insturction. I 
>> created a databse P6120 and table test2 by using user 'eric' and 
>> passwod 'ericyin1'.
>>
>> I add the following to server.xml:
>> >debug="5" reloadable="true" crossContext="true">
>>  >   maxActive="100" maxIdle="30" maxWait="1"
>>   username="eric" password="ericyin1" 
>> driverClassName="com.mysql.jdbc.Driver"
>>   url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>
>>
>> 
>>
>> I add the following to web.xml:
>>  
>>  DB Connection
>>  jdbc/TestDB
>>  javax.sql.DataSource
>>  Container
>>  
>>
>> I add the following to the index.jsp:
>> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
>> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
>> 
>> select id, name, studentid  from test2
>> 
>>
>>
>> 
>>name ${row.name}
>>studentid ${row.studentid}
>> 
>>
>> thanks,
>>
>> Eric.
>>
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Re: Cannot create JDBC driver of class '' for connect URL 'null'"

2006-11-03 Thread Christopher Schultz
Eric,

Eric Yin wrote:
> Hi,
> 
> I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
> i'm doing the same thing as
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> and i got this error.

Where did you put mysql-connector-*.jar? I suspect that you have it in
your webapp's lib directory, but you need to have it in Tomcat's
server-wise common/lib directory.

Another note:

> url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>

Since you are using a DataSource which defaults to the Jakarta Commons
DBCP pool, you should remove the "autoReconnect=true" from your URL;
re-connection is handled by the DPCP library, so you /should be/ able to
safely remove this parameter. This feature is documented to be
undesirable as seen here:

http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html

For the lazy: (emphasis added by me)

"Should the driver try to re-establish stale and/or dead connections? If
enabled the driver will throw an exception for a queries issued on a
stale or dead connection, which belong to the current transaction, but
will attempt reconnect before the next query issued on the connection in
a new transaction. *The use of this feature is not recommended, because
it has side effects related to session state and data consistency when
applications don'thandle SQLExceptions properly, and is only designed to
be used when you are unable to configure your application to handle
SQLExceptions resulting from dead andstale connections properly*.
Alternatively, investigate setting the MySQL server variable
"wait_timeout"to some high value rather than the default of 8 hours."

-chris



signature.asc
Description: OpenPGP digital signature


Re: obtain X-Forwarded-for: client-IP-address in access logs

2006-11-03 Thread Maurice Yarrow

Hello, again, Tomcat community:

I found the answer to my own question below:
Use:

pattern="%{X-Forwarded-for}i %l %u %t %r %s %b"

in the access log valve config.

Only thing: I would like to surround the %r with "%r", as
is done in the "common" setup.
What byzantine combination of  single quote, double quote,
backslashes is required for this to be acceptable to the
serverl.xml XML readin ?  (I tried a whole bunch of different
combinations but all error'ed out on startup.)

Maurice




Maurice Yarrow wrote:


Hello Tomcat community

I have tomcat (5.0.28) running behind pound (2.1.3) 
reverse-proxy-load-balancer.


This is a very effective setup, as I have pound also fronting apache 
and mongrel-rails

clusters.

Question:
Pound adds the following to its request to backend servers:
X-Forwarded-for: client-IP-address

I would like to be able to obtain this client-IP address in the tomcat 
access logs.
I tried all available formats (%a,  %A,  %b,  %B,  etc.,etc.) for the 
logger pattern,
but of course, none produced the client IP address placed in the 
request by

Pound.
I could, of course, grep through the Pound log output which, by 
default, winds

up on /var/log/messages, but would rather just be able to see this in the
tomcat access log.

How could I, say, derive my own logger class and capture this header 
info that

pound places in the request to backend server ??

Is there a simpler way ?   Am I unaware of a direct way to do this ?

Maurice Yarrow


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





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



RE: How to get fields list in order

2006-11-03 Thread Nelson, Tracy
| From: Christopher Schultz [mailto:[EMAIL PROTECTED]
| Sent: Friday, 03 November, 2006 13:41
| 
| The bottom line to your question is that byte offsets are difficult if
| not impossible to predict, and you are better off using
getDeclaredField
| and getField().getValue() calls. Better yet, write your own, simpler
| Java wrapper and then ddl-ize /that/. You could even write a short
Java
| program to read your classes using reflection and write-out simpler
| forms of data, like all Strings or well-ordered, binary data.

I'd even go so far as to recommend XML.  Nice representation-neutral
format, and there should be plenty of support (in VB for sure, not sure
how well supported Delphi still is), and JAXB makes marshalling and
unmarshalling pretty painless.

The information contained in this message is confidential
proprietary property of FACTS/Nelnet Business Solutions. Any reproduction,
forwarding, or copying without the express
permission of FACTS/Nelnet Business Solutions is strictly prohibited. If you 
have
received this communication in error, please notify us
immediately by replying to this e-mail.


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



Re: obtain X-Forwarded-for: client-IP-address in access logs

2006-11-03 Thread Martin Gainty
you can acquire the local IP (%A) and remote IP (%a) if you implement 
AccessLogValve
http://tomcat.apache.org/tomcat-5.0-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Maurice Yarrow" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 4:23 PM
Subject: obtain X-Forwarded-for: client-IP-address in access logs


> Hello Tomcat community
> 
> I have tomcat (5.0.28) running behind pound (2.1.3) 
> reverse-proxy-load-balancer.
> 
> This is a very effective setup, as I have pound also fronting apache and 
> mongrel-rails
> clusters.
> 
> Question:
> Pound adds the following to its request to backend servers:
> X-Forwarded-for: client-IP-address
> 
> I would like to be able to obtain this client-IP address in the tomcat 
> access logs.
> I tried all available formats (%a,  %A,  %b,  %B,  etc.,etc.) for the 
> logger pattern,
> but of course, none produced the client IP address placed in the request by
> Pound. 
> 
> I could, of course, grep through the Pound log output which, by default, 
> winds
> up on /var/log/messages, but would rather just be able to see this in the
> tomcat access log.
> 
> How could I, say, derive my own logger class and capture this header 
> info that
> pound places in the request to backend server ??
> 
> Is there a simpler way ?   Am I unaware of a direct way to do this ?
> 
> Maurice Yarrow
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Re: Cannot create JDBC driver of class '' for connect URL 'null'"

2006-11-03 Thread David Smith

I'll go further and say mysql discourages the use of autoReconnect.  See:

http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html

the section titled "High Availability and Clustering. "

--David

Christopher Schultz wrote:

Eric,

Eric Yin wrote:
  

Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
and i got this error.



Where did you put mysql-connector-*.jar? I suspect that you have it in
your webapp's lib directory, but you need to have it in Tomcat's
server-wise common/lib directory.

Another note:

  

url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>



Since you are using a DataSource which defaults to the Jakarta Commons
DBCP pool, you should remove the "autoReconnect=true" from your URL;
re-connection is handled by the DPCP library, so you /should be/ able to
safely remove this parameter. This feature is documented to be
undesirable as seen here:

http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html

For the lazy: (emphasis added by me)

"Should the driver try to re-establish stale and/or dead connections? If
enabled the driver will throw an exception for a queries issued on a
stale or dead connection, which belong to the current transaction, but
will attempt reconnect before the next query issued on the connection in
a new transaction. *The use of this feature is not recommended, because
it has side effects related to session state and data consistency when
applications don'thandle SQLExceptions properly, and is only designed to
be used when you are unable to configure your application to handle
SQLExceptions resulting from dead andstale connections properly*.
Alternatively, investigate setting the MySQL server variable
"wait_timeout"to some high value rather than the default of 8 hours."

-chris

  



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



Re: obtain X-Forwarded-for: client-IP-address in access logs

2006-11-03 Thread Rainer Jung
... for the quotes simply use the predefined xml entity:

   "

Maurice Yarrow schrieb:
> Hello, again, Tomcat community:
> 
> I found the answer to my own question below:
> Use:
> 
> pattern="%{X-Forwarded-for}i %l %u %t %r %s %b"
> 
> in the access log valve config.
> 
> Only thing: I would like to surround the %r with "%r", as
> is done in the "common" setup.
> What byzantine combination of  single quote, double quote,
> backslashes is required for this to be acceptable to the
> serverl.xml XML readin ?  (I tried a whole bunch of different
> combinations but all error'ed out on startup.)
> 
> Maurice
> 
> 
> 
> 
> Maurice Yarrow wrote:
> 
>> Hello Tomcat community
>>
>> I have tomcat (5.0.28) running behind pound (2.1.3)
>> reverse-proxy-load-balancer.
>>
>> This is a very effective setup, as I have pound also fronting apache
>> and mongrel-rails
>> clusters.
>>
>> Question:
>> Pound adds the following to its request to backend servers:
>> X-Forwarded-for: client-IP-address
>>
>> I would like to be able to obtain this client-IP address in the tomcat
>> access logs.
>> I tried all available formats (%a,  %A,  %b,  %B,  etc.,etc.) for the
>> logger pattern,
>> but of course, none produced the client IP address placed in the
>> request by
>> Pound.
>> I could, of course, grep through the Pound log output which, by
>> default, winds
>> up on /var/log/messages, but would rather just be able to see this in the
>> tomcat access log.
>>
>> How could I, say, derive my own logger class and capture this header
>> info that
>> pound places in the request to backend server ??
>>
>> Is there a simpler way ?   Am I unaware of a direct way to do this ?
>>
>> Maurice Yarrow
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Thread pool per webapp?

2006-11-03 Thread David Smith

Lol!  I was starting to get the same impression. :-)

--David

Christopher Schultz wrote:

Tomcat List,

Does anyone else suspect that Martin is actually an expert system
designed to read and respond to mailing list posts, but is totally
failing the Turing test?

-chris

Martin Gainty wrote:
  

Huy

This RequestProcessor enqueues requests and services on as needed basisyou 
can easily substitute jdbc connections for corba connections
http://www.koders.com/java/fid327B70539EF40AE0E75381B058FB06D9B1BFFE61.aspx

M-
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
- Original Message - 
From: "Huy Vo (hvo)" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 3:27 PM
Subject: Thread pool per webapp?


Hi,
 
I am wondering whether Tomcat supports thread pool configuration for

each webapp.  My understanding is that all webapps share the pool
configured for the connector.
 
Let's say I have webapps A and B, and A is more critical webapp.  Let's

say my connector's pool size is 100, and there are 100 concurrent
requests destined for A and B each (so total 200 requests here).  I
would like to allocate 70 threads to process A's requests, and only 30
for B's.
 
Is this something that Tomcat supports?  If not, what would be a good

alternative strategy for it?  I am thinking of using a RequestProcessor
to reject requests depending on its destination but that is not very
elegant as requests are rejected instead of being queued.
 
Thanks in advance.
 
Regards.
 
===

Huy T. Vo
Voice: 408-853-0535
Fax:408-853-4021
 



  



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



RE: Thread pool per webapp?

2006-11-03 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
> Subject: Re: Thread pool per webapp?
> 
> Does anyone else suspect that Martin is actually an expert system
> designed to read and respond to mailing list posts, but is totally
> failing the Turing test?

Wow.  That would explain a lot.  I might take issue with the term
"expert" in this case, though...

What was Eliza's last name?  Could Martin be a relative?

 - Chuck


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

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



catalina.sh "==" artifact

2006-11-03 Thread Mark Petrovic

I don't think this is a serious issue, if an issue at all.  But I point it
out just in case.

There's a "==" in the catalina.sh script, in this case in Tomcat 5.5.17.

E.g.

 -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \

where I believe one would normally expect to find a single "=".

--
Mark


Re: obtain X-Forwarded-for: client-IP-address in access logs

2006-11-03 Thread Maurice Yarrow

Rainer (and also, Martin)

Thanks, gentlemen.

Maurice


Rainer Jung wrote:


... for the quotes simply use the predefined xml entity:

  "

Maurice Yarrow schrieb:
 


Hello, again, Tomcat community:

I found the answer to my own question below:
Use:

   pattern="%{X-Forwarded-for}i %l %u %t %r %s %b"

in the access log valve config.

Only thing: I would like to surround the %r with "%r", as
is done in the "common" setup.
What byzantine combination of  single quote, double quote,
backslashes is required for this to be acceptable to the
serverl.xml XML readin ?  (I tried a whole bunch of different
combinations but all error'ed out on startup.)

Maurice




Maurice Yarrow wrote:

   


Hello Tomcat community

I have tomcat (5.0.28) running behind pound (2.1.3)
reverse-proxy-load-balancer.

This is a very effective setup, as I have pound also fronting apache
and mongrel-rails
clusters.

Question:
Pound adds the following to its request to backend servers:
   X-Forwarded-for: client-IP-address

I would like to be able to obtain this client-IP address in the tomcat
access logs.
I tried all available formats (%a,  %A,  %b,  %B,  etc.,etc.) for the
logger pattern,
but of course, none produced the client IP address placed in the
request by
Pound.
I could, of course, grep through the Pound log output which, by
default, winds
up on /var/log/messages, but would rather just be able to see this in the
tomcat access log.

How could I, say, derive my own logger class and capture this header
info that
pound places in the request to backend server ??

Is there a simpler way ?   Am I unaware of a direct way to do this ?

Maurice Yarrow


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

 



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



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

 





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



Re: Thread pool per webapp?

2006-11-03 Thread Hassan Schroeder

On 11/3/06, Christopher Schultz <[EMAIL PROTECTED]> wrote:


Does anyone else suspect that Martin is actually an expert system
designed to read and respond to mailing list posts, but is totally
failing the Turing test?


Yeah, I've been thinking exactly that for a while now. :-)

--
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Thread pool per webapp?

2006-11-03 Thread Martin Gainty
Boys-

Why do you not post your answers?
Do you have a solution or your solution is to whine like 10 year olds?
Stay on point and provide an answer

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "David Smith" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 5:21 PM
Subject: Re: Thread pool per webapp?


> Lol!  I was starting to get the same impression. :-)
> 
> --David
> 
> Christopher Schultz wrote:
>> Tomcat List,
>>
>> Does anyone else suspect that Martin is actually an expert system
>> designed to read and respond to mailing list posts, but is totally
>> failing the Turing test?
>>
>> -chris
>>
>> Martin Gainty wrote:
>>   
>>> Huy
>>>
>>> This RequestProcessor enqueues requests and services on as needed 
>>> basisyou can easily substitute jdbc connections for corba connections
>>> http://www.koders.com/java/fid327B70539EF40AE0E75381B058FB06D9B1BFFE61.aspx
>>>
>>> M-
>>> This e-mail communication and any attachments may contain confidential and 
>>> privileged information for the use of the 
>>> designated recipients named above. If you are not the intended recipient, 
>>> you are hereby notified that you have received
>>> this communication in error and that any review, disclosure, dissemination, 
>>> distribution or copying of it or its 
>>> contents
>>> - Original Message - 
>>> From: "Huy Vo (hvo)" <[EMAIL PROTECTED]>
>>> To: "Tomcat Users List" 
>>> Sent: Friday, November 03, 2006 3:27 PM
>>> Subject: Thread pool per webapp?
>>>
>>>
>>> Hi,
>>>  
>>> I am wondering whether Tomcat supports thread pool configuration for
>>> each webapp.  My understanding is that all webapps share the pool
>>> configured for the connector.
>>>  
>>> Let's say I have webapps A and B, and A is more critical webapp.  Let's
>>> say my connector's pool size is 100, and there are 100 concurrent
>>> requests destined for A and B each (so total 200 requests here).  I
>>> would like to allocate 70 threads to process A's requests, and only 30
>>> for B's.
>>>  
>>> Is this something that Tomcat supports?  If not, what would be a good
>>> alternative strategy for it?  I am thinking of using a RequestProcessor
>>> to reject requests depending on its destination but that is not very
>>> elegant as requests are rejected instead of being queued.
>>>  
>>> Thanks in advance.
>>>  
>>> Regards.
>>>  
>>> ===
>>> Huy T. Vo
>>> Voice: 408-853-0535
>>> Fax:408-853-4021
>>>  
>>> 
>>
>>   
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Re: Thread pool per webapp?

2006-11-03 Thread Christopher Schultz
Chuck,

Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
>> Subject: Re: Thread pool per webapp?
> 
> What was Eliza's last name?  Could Martin be a relative?

I'd love to say otherwise, but Wikipedia says "Doolittle". Still apt?
Perhaps.

-chris



signature.asc
Description: OpenPGP digital signature


RE: Thread pool per webapp?

2006-11-03 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
> Subject: Re: Thread pool per webapp?
> 
> > What was Eliza's last name?  Could Martin be a relative?
> 
> I'd love to say otherwise, but Wikipedia says "Doolittle". Still apt?
> Perhaps.

Not sure - I understand Cockney (used to live near London), but I sure
don't understand Martin.

 - Chuck


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

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



Re: Thread pool per webapp?

2006-11-03 Thread Martin Gainty
I have received another blank email from Chris-

Am i the only person that doesnt see your response???

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Christopher Schultz" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 6:22 PM
Subject: Re: Thread pool per webapp?



RE: Thread pool per webapp?

2006-11-03 Thread Caldarale, Charles R
> From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> Subject: Re: Thread pool per webapp?
> 
> I have received another blank email from Chris-
> 
> Am i the only person that doesnt see your response???

Apparently.  Works fine for me, and all of Chris' messages do show up in
the archive.  Something is broken on your end.

 - Chuck


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

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



Re: Tomcat authenticate with BASIC Auth (Pre: Active directory)

2006-11-03 Thread Mark Thomas
Johannes wrote:
> That is really a REALLY good idea!
> And if that works the solution is solved.

Afraid not. It is a bad idea and won't work.

Mark


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



Re: Thread pool per webapp?

2006-11-03 Thread Christopher Schultz
Martin,

> I have received another blank email from Chris-
> 
> Am i the only person that doesnt see your response???

Yes. Hahahahaha.

Ditch your mail client and get something that understands plaintext
attachments.

-chris




signature.asc
Description: OpenPGP digital signature


Re: Thread pool per webapp?

2006-11-03 Thread Martin Gainty
In that case we are 2 people separated by a common language

Not to steal thunder from this puerile diatribe thread but anyone care for a 
Programming duel?

M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 6:40 PM
Subject: RE: Thread pool per webapp?


> From: Christopher Schultz [mailto:[EMAIL PROTECTED]
et] 
> Subject: Re: Thread pool per webapp?
> 
> > What was Eliza's last name?  Could Martin be a relative?
> 
> I'd love to say otherwise, but Wikipedia says "Doolittle". Still apt?
> Perhaps.

Not sure - I understand Cockney (used to live near London), but I sure
don't understand Martin.

 - Chuck


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

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



Re: catalina.sh "==" artifact

2006-11-03 Thread Mark Thomas
Mark Petrovic wrote:
> I don't think this is a serious issue, if an issue at all.  But I point it
> out just in case.
> 
> There's a "==" in the catalina.sh script, in this case in Tomcat 5.5.17.
> 
> E.g.
> 
>  -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
> 
> where I believe one would normally expect to find a single "=".

Nope. Read the JDK docs to find out why the double == is correct.

Mark

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



Using Tomcat admin console to configure my WEB app

2006-11-03 Thread ying lcs

Hi,

Can you please tell me what do I need to do in my web app so that I
can use Tomcat admin console to configure my WEB app?

Thank you.

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



Re: catalina.sh "==" artifact

2006-11-03 Thread Mark Petrovic

Aha.  Thank you.

On 11/3/06, Mark Thomas <[EMAIL PROTECTED]> wrote:


Mark Petrovic wrote:
> I don't think this is a serious issue, if an issue at all.  But I point
it
> out just in case.
>
> There's a "==" in the catalina.sh script, in this case in Tomcat 5.5.17.
>
> E.g.
>
>  -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
>
> where I believe one would normally expect to find a single "=".

Nope. Read the JDK docs to find out why the double == is correct.

Mark

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





--
Mark


Re: Thread pool per webapp?

2006-11-03 Thread David Smith
Well I was actually holding off because the internal threading of tomcat 
isn't my area.  But if you insist, I have never seen any configuration 
parameters that effectively partition threads between webapps.


--David

Martin Gainty wrote:

Boys-

Why do you not post your answers?
Do you have a solution or your solution is to whine like 10 year olds?
Stay on point and provide an answer

M-
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
- Original Message - 
From: "David Smith" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 5:21 PM
Subject: Re: Thread pool per webapp?


  

Lol!  I was starting to get the same impression. :-)

--David

Christopher Schultz wrote:


Tomcat List,

Does anyone else suspect that Martin is actually an expert system
designed to read and respond to mailing list posts, but is totally
failing the Turing test?

-chris

Martin Gainty wrote:
  
  

Huy

This RequestProcessor enqueues requests and services on as needed basisyou 
can easily substitute jdbc connections for corba connections
http://www.koders.com/java/fid327B70539EF40AE0E75381B058FB06D9B1BFFE61.aspx

M-
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
- Original Message - 
From: "Huy Vo (hvo)" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Friday, November 03, 2006 3:27 PM
Subject: Thread pool per webapp?


Hi,
 
I am wondering whether Tomcat supports thread pool configuration for

each webapp.  My understanding is that all webapps share the pool
configured for the connector.
 
Let's say I have webapps A and B, and A is more critical webapp.  Let's

say my connector's pool size is 100, and there are 100 concurrent
requests destined for A and B each (so total 200 requests here).  I
would like to allocate 70 threads to process A's requests, and only 30
for B's.
 
Is this something that Tomcat supports?  If not, what would be a good

alternative strategy for it?  I am thinking of using a RequestProcessor
to reject requests depending on its destination but that is not very
elegant as requests are rejected instead of being queued.
 
Thanks in advance.
 
Regards.
 
===

Huy T. Vo
Voice: 408-853-0535
Fax:408-853-4021
 


  
  

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



>



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



Locale difference with Console and Windows Service

2006-11-03 Thread maxt

I am using Windows XP, Tomcat 5.5.17, JRE 1.5.0_08. I am in Australia. To
test localization, my Windows Region is set to English, US. 

When using the Console, tomcat5.exe, my localization files work correctly,
returning the Locale, en_US. 

When using Windows Services, the Locale returned is en.AU with the same code
and Region still set to English, US. 

In the Services I am using a Classpath command: C:\Program
Files\BMJ\Tomcat\bin\bootstrap.jar and Java Options: 
-Dcatalina.base=C:\Program Files\BMJ\Tomcat 
-Dcatalina.home=C:\Program Files\BMJ\Tomcat 

Any help explaining how to get the default Locale using Services would be
appreciated. I do not want to set the Locale, but to get and apply my users
default Locale using Services. 

The same problem applies to the use of the Robot class used for sending
keystrokes. OK with Console, no response or error with Services. 

Max

-- 
View this message in context: 
http://www.nabble.com/Locale-difference-with-Console-and-Windows-Service-tf2572041.html#a7170215
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Session Invalidation Not working

2006-11-03 Thread me_zeta

Hi,

   From my jsp page i call session.invalidate(). After doing this if i check
the tomcat active session through the tomcat manager i find that the number
of active session has not reduced. it is same as the before calling of
session.invalidate(). Why is this happening? Am i doing the correct thing
for invalidating the session

zeta
-- 
View this message in context: 
http://www.nabble.com/Session-Invalidation-Not-working-tf2572617.html#a7171732
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Session Invalidation Not working

2006-11-03 Thread Caldarale, Charles R
> From: me_zeta [mailto:[EMAIL PROTECTED] 
> Subject: Session Invalidation Not working
> 
> From my jsp page i call session.invalidate(). After
> doing this if i check the tomcat active session
> through the tomcat manager i find that the number
> of active session has not reduced.

You may be getting a new session created while the servlet/JSP is
running.  Use the Complete Server Status page (/manager/status/all), and
check the number of expired sessions, as well as the active count.  If
expired has gone up, your code worked.

 - Chuck


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

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