AW: Using appelts with different clients

2005-06-08 Thread Heiner . Amthauer
Well, I discovered the following facts:

- I've created a jsp-page with the following line:
  jsp:plugin type=applet code=applet.MyApplet codebase=. width=100
height=100/

- I've deployed all files to BEA weblogic. The page loades fine on IE and
firefox.
- I've deployed all files to tomcat. The page loads on IE, however, it
doesn't on firefox. 

Therefore, I assume that this is either a bug, or tomcat just doesn't
support different clients.

Heiner

-Ursprüngliche Nachricht-
Von: Mark Thomas [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 7. Juni 2005 20:38
An: Tomcat Users List
Betreff: Re: Using appelts with different clients


[EMAIL PROTECTED] wrote:
 Other
 servers create the corret page by using the jsp:pluggin tag. Tomcat
doesn't.

In what way does Tomcat not support this? As far as I am aware it does 
in both 4.1.x and 5.5.x

Mark

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

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



RE: Using appelts with different clients

2005-06-08 Thread Caldarale, Charles R
 From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
 Subject: AW: Using appelts with different clients
 
 - I've deployed all files to BEA weblogic. The page loades 
 fine on IE and firefox.
 - I've deployed all files to tomcat. The page loads on IE, however, it
 doesn't on firefox. 
 
 Therefore, I assume that this is either a bug, or tomcat just doesn't
 support different clients.

There must be an echo in here.  Here's a portion of an e-mail from less
than 24 hours ago about the IE vs. the specs problems.  The last
referenced link is most illuminating.

 -Original Message-
 From: Joe Plautz [mailto:[EMAIL PROTECTED] 
 Sent: 2005 June 06, Monday 09:57
 To: Tomcat Users List
 Subject: Re: IE-Page not found problem
 
 Here's a link to a html validator, http://validator.w3.org/
 
 Here's a link that explains a lot of the known issues,
 http://www.howtocreate.co.uk/wrongWithIE/

 - Chuck


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

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



Re: AW: Using appelts with different clients

2005-06-08 Thread Jost Richstein

Tomcat 5.5.9 generates the following code snippet, requesting version 1.2.2
of the plugin:

OBJECT classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
   width=100 height=100
   
codebase=http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0;
 PARAM name=java_code value=applet.MyApplet
 PARAM name=java_codebase value=.
 PARAM name=type value=application/x-java-applet;

Firefox requires version 1.3.0_01 or better 
(http://www.mozilla.org/support/firefox/faq#q2.2).
Maybe it's that version mismatch that leads to your problem?

And: could be a firefox issue as well.

[EMAIL PROTECTED] wrote:

Well, I discovered the following facts:

- I've created a jsp-page with the following line:
  jsp:plugin type=applet code=applet.MyApplet codebase=. width=100
height=100/

- I've deployed all files to BEA weblogic. The page loades fine on IE and
firefox.
- I've deployed all files to tomcat. The page loads on IE, however, it
doesn't on firefox. 


Therefore, I assume that this is either a bug, or tomcat just doesn't
support different clients.

Heiner

-Ursprüngliche Nachricht-
Von: Mark Thomas [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 7. Juni 2005 20:38

An: Tomcat Users List
Betreff: Re: Using appelts with different clients


[EMAIL PROTECTED] wrote:


Other
servers create the corret page by using the jsp:pluggin tag. Tomcat


doesn't.

In what way does Tomcat not support this? As far as I am aware it does 
in both 4.1.x and 5.5.x


Mark

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

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








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



AW: AW: Using appelts with different clients

2005-06-08 Thread Heiner . Amthauer
u r right, of course. It's just that weblogic generates the page OK for both
clients.

This is the code generated for firefox:

EMBED type=application/x-java-applet code=applet.MyApplet codebase=.
align=top archive=applet.jar height=100 name=MyApplet
width=100/EMBED

This works perfectly well. I've JRE1.4.1_03 installed.


-Ursprüngliche Nachricht-
Von: Jost Richstein [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 8. Juni 2005 09:49
An: Tomcat Users List
Betreff: Re: AW: Using appelts with different clients


Tomcat 5.5.9 generates the following code snippet, requesting version 1.2.2
of the plugin:

OBJECT classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
width=100 height=100
 
codebase=http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#V
ersion=1,2,2,0
  PARAM name=java_code value=applet.MyApplet
  PARAM name=java_codebase value=.
  PARAM name=type value=application/x-java-applet;

Firefox requires version 1.3.0_01 or better
(http://www.mozilla.org/support/firefox/faq#q2.2).
Maybe it's that version mismatch that leads to your problem?

And: could be a firefox issue as well.

[EMAIL PROTECTED] wrote:
 Well, I discovered the following facts:
 
 - I've created a jsp-page with the following line:
   jsp:plugin type=applet code=applet.MyApplet codebase=.
width=100
 height=100/
 
 - I've deployed all files to BEA weblogic. The page loades fine on IE and
 firefox.
 - I've deployed all files to tomcat. The page loads on IE, however, it
 doesn't on firefox. 
 
 Therefore, I assume that this is either a bug, or tomcat just doesn't
 support different clients.
 
 Heiner
 
 -Ursprüngliche Nachricht-
 Von: Mark Thomas [mailto:[EMAIL PROTECTED] 
 Gesendet: Dienstag, 7. Juni 2005 20:38
 An: Tomcat Users List
 Betreff: Re: Using appelts with different clients
 
 
 [EMAIL PROTECTED] wrote:
 
Other
servers create the corret page by using the jsp:pluggin tag. Tomcat
 
 doesn't.
 
 In what way does Tomcat not support this? As far as I am aware it does 
 in both 4.1.x and 5.5.x
 
 Mark
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 



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

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



Tomcat CGI and HTTP status codes

2005-06-08 Thread Chris Picton
Hi all

I am trying to get squivi2 running under tomcat cgi, but I am having a
problem with redirects.

Code I am testing generates a redirect as follows:
-
my $tempout =  $q-header(
   -nph=1,
   -status=302 Moved Temporarily,
   -location=$dest,
);
open F, /tmp/f; print F $tempout; close F;
print $tempout;
exit 0;
-

I am printing the output to /tmp/f to check what is being sent to the
browser.  The contents of that file look like:
--
HTTP/1.0 302 Moved Temporarily
Server: TOMCAT
Status: 302 Moved Temporarily
Date: Wed, 08 Jun 2005 09:31:34 GMT
Location: http://127.0.0.1:8080/cgi-bin/squivi.cgi/seqf_11/proto_prep
Content-Type: text/html; charset=ISO-8859-1
--

Here is where the problem comes in.  When I try to access the cgi, It
doesn;t redirect, but downloads the file.  It seems that tomcat is
changing the 302 status to a 200 somewhere.

When I telnet to the tomcat port and GET the cgi, this is what I see:
-
GET /cgi-bin/squivi.cgi/seqf_11 HTTP/1.0
Host: 127.0.0.1

HTTP/1.1 200 OK
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 02:00:00 SAST
Server: TOMCAT
Status: 302 Moved Temporarily
Date: Wed, 08 Jun 2005 09:40:24 GMT
Content-Length: 0
Server: Apache-Coyote/1.1
Connection: close
---


Note that the Location header has been removed, and the status has been
changed to 200. 

Am I missing a trick here?  What is going on?

Chris


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



Jserv to Tomcat migration

2005-06-08 Thread gaurav

Hi List,
   We thinking migrating some legacy code from Jserv 1.1.2  to 
tomcat 5.

We some running a legacy application that runs entirely on servlet

I am looking around some practical insightful  tips/ guidance on this 
matter ...it there is any Jserv to Tomcat migration guide book or any 
other documentation  which I can refer to or if any one ever   faced 
some problems then pl share with me :-)


Regards,
GP

**
/pl ignore anything below this ;-)/






DISCLAIMER:
This e-mail contains confidential and/or privileged information. If you are not 
the intended recipient (or have received this e-mail in error) please notify 
the sender immediately and destroy this e-mail. Any unauthorized copying, 
disclosure, use or distribution of the material in this e-mail is strictly 
forbidden.

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



percent in URL makes tomcat chocke

2005-06-08 Thread Holger Klawitter
Hi there,

I would like to use my tomcat standalone (don't want to maintain more than
one server :-) also as a server for debian packages. However as tomcat
interprets percent characters in file names, apt-get is not capable to
retrieve the deb files from the tomcat server.

Example URL:
  http://oberon/apt/./g++_4%3a3.3.5-3_i386.deb
Tomcat replies with 404, whereas
  http://oberon/apt/./g++_4%253a3.3.5-3_i386.deb
would work (but apt-get does not ask that way)

Is there a way to tweak tomcat into not interpreting percent signs?

-- 
With Kind Regards / Mit freundlichem Gruß
  Holger Klawitter (listen at klawitter dot de)


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



Re: percent in URL makes tomcat chocke

2005-06-08 Thread Omar Adobati
maybe u can try to replace the % symbol with the ASCII value, that is
#37; found at http://www.lookuptables.com/

regards
  Omar

On 6/8/05, Holger Klawitter [EMAIL PROTECTED] wrote:
 Hi there,
 
 I would like to use my tomcat standalone (don't want to maintain more than
 one server :-) also as a server for debian packages. However as tomcat
 interprets percent characters in file names, apt-get is not capable to
 retrieve the deb files from the tomcat server.
 
 Example URL:
  http://oberon/apt/./g++_4%3a3.3.5-3_i386.deb
 Tomcat replies with 404, whereas
  http://oberon/apt/./g++_4%253a3.3.5-3_i386.deb
 would work (but apt-get does not ask that way)
 
 Is there a way to tweak tomcat into not interpreting percent signs?
 
 --
 With Kind Regards / Mit freundlichem Gruß
  Holger Klawitter (listen at klawitter dot de)
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Why I got multiple/many instance of tomcat + jvm right after I've started tomcat? ( on Red Hat Linux E 3 )

2005-06-08 Thread Anto Paul
On 6/7/05, Mohd. Jeffry [EMAIL PROTECTED] wrote:
 Dear All,
 
 I got 6 servers running rhel3 and tomcat 4.1.27. One of this servers
 its tomcat is giving so many instance of tomcat and jvm but not for
 other server. They are running with the same configuration as far as
 tomcat and jvm is concern. Any thing else did I miss?


I am not sure whether it is because of the NPTL threading
implementation in newer kernels.

-- 
rgds
Anto Paul

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



Re: Jserv to Tomcat migration

2005-06-08 Thread QM
On Wed, Jun 08, 2005 at 04:18:30PM +0530, gaurav wrote:
:We thinking migrating some legacy code from Jserv 1.1.2  to
: tomcat 5.
: I am looking around some practical insightful  tips/ guidance on this
: matter ...it there is any Jserv to Tomcat migration guide book or any
: other documentation  which I can refer to or if any one ever   faced
: some problems then pl share with me :-)

The process is the same for migrating between any two servlet
containers:
1/ make note of any vendor-specific hooks you use in your current app.
Don't expect them to be in the other container.  Rewrite your app to
work without them.

2/ Review the servlet spec that fits the destination container (v2.4 for
Tomcat 5).  If it's not the same servlet spec version as your current
container, make note of any deprecations (such as SingleThreadModel) or
other changes.  Code your app to work per the spec.

3/ Note how the new container provides services (such as database
pooling).


That's about it. =)

All jokes aside, the point of the spec is that 100% spec-compliant apps
should be able to migrate between spec-compliant containers without much
hassle.  If you've stuck to the spec this whole time, your migration
shouldn't be a problem.

-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

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



Embedded Tomcat SSL

2005-06-08 Thread Diarmuid McDonald
Hi,

Can anyone help me with regard to running Embedded Tomcat 5.5.9 with SSL. I 
found a mail archive before that has the same problem, however there is no 
resolution.

http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg153661.html

I have included my code and errors that I am receiving. Any help would be 
greatly appreciated

Here is the code I am Using

import java.io.File;
..
..
import org.apache.tomcat.util.IntrospectionUtils;

public class TestEmbededTomcat {


public static void main( String args[] )
{

Embedded embedded = new Embedded();

// set default logger and realm
org.apache.log4j.BasicConfigurator.configure();

MemoryRealm memRealm = new MemoryRealm();
embedded.setRealm(memRealm);

//Create an Engine
Engine baseEngine = embedded.createEngine();

baseEngine.setName(TestEngine);
baseEngine.setDefaultHost(vsjHost);

//Create Host
Host baseHost =  embedded.createHost( vsjHost, 
e:/ent/sip2.0/rte/jakarta-tomcat-5.5.9-embed/webapps );

baseEngine.addChild( baseHost );

//Create default context
Context rootContext = embedded.createContext(,ROOT);

baseHost.addChild( rootContext );

// Create context for web app for axis
Context axisContext = embedded.createContext(/axis, axis);
axisContext.setPrivileged( true );
baseHost.addChild( axisContext );

embedded.addEngine( baseEngine );

  //Create a ssh Connector 
  Connector sshConnector = embedded.createConnector( (java.net.InetAddress) 
null,
   9012, 
   true);

IntrospectionUtils.setProperty(sshConnector, sslProtocol, TLS);
IntrospectionUtils.setProperty(sshConnector, keypass, changeit);
IntrospectionUtils.setProperty(sshConnector, keystore, C:/Documents 
and Settings/mcdonald/.keystore);
IntrospectionUtils.setProperty(sshConnector, clientAuth, false);

embedded.addConnector( sshConnector );
sshConnector.setProtocol( TLS );

//start operation
embedded.start();
}
}


Here is the error message I get :-

12:16:41:375: 
[org.apache.tomcat.util.net.PoolTcpEndpoint][http-9012-Processor3] DEBUG - 
Handshake
ailed
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:119)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:520)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.j
va:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:536)
287423 [http-9012-Processor3] DEBUG org.apache.tomcat.util.net.PoolTcpEndpoint  
- Handshake failed
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:119)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:520)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.j
va:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:536)


Here is the message I get from Firefox :-

Could not establish an encrypted connection, because the certificate presented 
by localhost is invalid or corrupted. Error Code : -8182


This e-mail and any files transmitted with it are confidential and may be 
privileged and are intended solely for the individual named/ for the use of the 
individual or entity to whom they are addressed.If you are not the intended 
addressee, you should not disseminate, distribute or copy this e-mail.Please 
notify the sender 

Re: percent in URL makes tomcat chocke

2005-06-08 Thread Holger Klawitter
Omar Adobati wrote:

 maybe u can try to replace the % symbol with the ASCII value, that is
 #37; found at http://www.lookuptables.com/

It's not about that *I* can't load that file.
*apt-get* needs to be able to do it.

I already tried to use urlrewrite, but the filter are already too late down
the filter chain, the %3a in ...g++_4%3a3.3... is already translated.
Furthermore the + signs are being translated into spaces by the rewrite
engine.

With Kind Regards / Mit freundlichem Gruß
  Holger Klawitter (listen at klawitter dot de)


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



Re: Why I got multiple/many instance of tomcat + jvm right after I've started tomcat? ( on Red Hat Linux E 3 )

2005-06-08 Thread Mohd. Jeffry
All servers are using the same kernel :-
[EMAIL PROTECTED] admin]$ uname -a
Linux iedb1 2.4.21-9.0.1.ELsmp #1 SMP Mon Feb 9 22:26:51 EST 2004 i686
i686 i386 GNU/Linux

On 6/8/05, Anto Paul [EMAIL PROTECTED] wrote:
 On 6/7/05, Mohd. Jeffry [EMAIL PROTECTED] wrote:
  Dear All,
 
  I got 6 servers running rhel3 and tomcat 4.1.27. One of this servers
  its tomcat is giving so many instance of tomcat and jvm but not for
  other server. They are running with the same configuration as far as
  tomcat and jvm is concern. Any thing else did I miss?
 
 
 I am not sure whether it is because of the NPTL threading
 implementation in newer kernels.
 
 --
 rgds
 Anto Paul


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



RE: Servlet Concurrency Issues

2005-06-08 Thread Michael Pasko
Thanks Chuck, that was exactly the problem.  I was under the very poor
assumption that a new thread and newly instantiated servlet object was
created every time a request was made, instead of all threads working on
only one instance of an object.  To mimic the desired behavior I've fixed
the problem by adding this (implements SingleThreadModel)...

public class ServletName implements SingleThreadModel

Now it would seem that if several 100 people were to access a servlet that
every time the following code was hit by a new thread:

PrintWriter out = response.getWriter();

It would direct all output (using out.println()) from all threads to the
most recent person to access the servlet.  

Follow up question:  With this in mind, what is the most common method of
writing thread safe code?  

Thank you very much for your help.

-Mike

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 07, 2005 1:15 PM
To: Tomcat Users List
Subject: RE: Servlet Concurrency Issues

 From: Michael Pasko [mailto:[EMAIL PROTECTED] 
 Subject: Servlet Concurrency Issues
 
 I started allowing other users on it, I stumbled on some problems.
 Basically what happens, when user A submits the form, and then 2 
 seconds later user B submits the same form.  User A stops getting 
 results, and User B receives the output for his request as well as
 the end of User A's request.

Probably not a configuration problem but rather implementation errors in
your servlet or some related object (such as the DB connection).
There's normally only one copy of the servlet object, and it will be
used concurrently by multiple threads.  Make sure you're not storing
request-specific information in there.

 - Chuck


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

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

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



RE: Servlet Concurrency Issues

2005-06-08 Thread Raghupathy,Gurumoorthy
For thread safe programs
1. Declare all your variables within your method.
2. Do not declare static ( class level ) variables.
3. Pass Parameters from one method to another rather than accessing
global variables.

Regards
Guru

-Original Message-
From: Michael Pasko [mailto:[EMAIL PROTECTED] 
Sent: 08 June 2005 13:33
To: 'Tomcat Users List'
Subject: RE: Servlet Concurrency Issues


Thanks Chuck, that was exactly the problem.  I was under the very poor
assumption that a new thread and newly instantiated servlet object was
created every time a request was made, instead of all threads working on
only one instance of an object.  To mimic the desired behavior I've fixed
the problem by adding this (implements SingleThreadModel)...

public class ServletName implements SingleThreadModel

Now it would seem that if several 100 people were to access a servlet that
every time the following code was hit by a new thread:

PrintWriter out = response.getWriter();

It would direct all output (using out.println()) from all threads to the
most recent person to access the servlet.  

Follow up question:  With this in mind, what is the most common method of
writing thread safe code?  

Thank you very much for your help.

-Mike

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 07, 2005 1:15 PM
To: Tomcat Users List
Subject: RE: Servlet Concurrency Issues

 From: Michael Pasko [mailto:[EMAIL PROTECTED] 
 Subject: Servlet Concurrency Issues
 
 I started allowing other users on it, I stumbled on some problems.
 Basically what happens, when user A submits the form, and then 2 
 seconds later user B submits the same form.  User A stops getting 
 results, and User B receives the output for his request as well as
 the end of User A's request.

Probably not a configuration problem but rather implementation errors in
your servlet or some related object (such as the DB connection).
There's normally only one copy of the servlet object, and it will be
used concurrently by multiple threads.  Make sure you're not storing
request-specific information in there.

 - Chuck


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

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

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

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



adding new virtual hosts without restart?

2005-06-08 Thread Thomas Corte

Hello,

I understand that it is possible to (re-)deploy new contexts/web 
applications in Tomcat 5.5.9 without a complete server restart.


I wonder whether the same might be possible for new virtual hosts, i.e. 
adding new virtual hosts/IP addresses to a running Tomcat server.
From the documentation, I get the impression that this is *not* 
possible, which means that I'd have to stop and start tomcat to do this.


Is there a way to do it without restart?

--
[EMAIL PROTECTED]

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



RE: Module jk2 and jk Connectormodules

2005-06-08 Thread luc_boudreau

Hi,

Jk suse 9.1 binary?
Yes, you need a binary module suitable for your OS. Or, you still can try tom 
compile it for your system, but it's not recommended since it's too long for 
not so many more advantages.


 Same: /, \ for suse?
Of course, you have adapt the paths to match your OS logical structure. On 
*nix, use /, and on window$, use \.


 After the loaded modules?
Well, just insert your directives right before section three. (Therefore after 
section 2...)


 In the httpd.conf, too?
Yes, we're still in the httpd.conf file.


Hope it helps ! And thanks for the link !!


Luc Boudreau
Université du Québec
Canada







-Message d'origine-
De : Andreas Bauer [mailto:[EMAIL PROTECTED] 
Envoyé : 7 juin 2005 09:49
À : 'Tomcat Users List'
Objet : Re: Module jk2 and jk Connectormodules

Hello!

Btw, here is another link:
http://www.dynamicobjects.com/d2r/archives/002574.html
After doing this script, jk2 works for me in win xp, but not in Suse 9.2.
I hope, it helps you anyway and you can use it somehow.
I have still questions.


LoadModule jk_module modules/mod_jk.so

Jk suse 9.1 binary?



   Then, protect your WEB-INF directories :
   Directory c:/Tomcat5/webapps/exampleApp/WEB-INF
Options -Indexes FollowSymLinks
Deny from all
   /Directory

Same: /, \ for suse?



Then, between section 2 and 3 of httpd.conf, add the jk configuration :


After the loaded modules? 



Create an alias :
Alias /exampleApp c:/Tomcat5/webapps/exampleApp
Define which files are to be served by Tomcat :
JkMount / exampleApp/*.jsp tomcat5
JkMount / exampleApp/*.do tomcat5

In the httpd.conf, too?

Best regards and many thanks
Andreas


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


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



Re: adding new virtual hosts without restart?

2005-06-08 Thread delbd
If you add virtual hosts using the tomcat admin interface and hit the commit 
button on top after all changes, you do not have to issue a bin/shutdown.sh 
and a bin/startup.sh.
However, the catalina engine is restarted and so are all webapps in it. 


Le Mercredi 8 Juin 2005 14:39, Thomas Corte a écrit :
 Hello,

 I understand that it is possible to (re-)deploy new contexts/web
 applications in Tomcat 5.5.9 without a complete server restart.

 I wonder whether the same might be possible for new virtual hosts, i.e.
 adding new virtual hosts/IP addresses to a running Tomcat server.
  From the documentation, I get the impression that this is *not*
 possible, which means that I'd have to stop and start tomcat to do this.

 Is there a way to do it without restart?

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Is there life after /sbin/halt -p?

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



RE: Servlet Concurrency Issues

2005-06-08 Thread Peter Crowther
 From: Michael Pasko [mailto:[EMAIL PROTECTED] 
 To mimic the desired behavior I've fixed
 the problem by adding this (implements SingleThreadModel)...
 
 public class ServletName implements SingleThreadModel

Note that SingleThreadModel isn't supported in more recent versions of
Tomcat.  This may or may not worry you depending on whether you want to
move to a more recent version :-).

 Now it would seem that if several 100 people were to access a 
 servlet that
 every time the following code was hit by a new thread:
 
 PrintWriter out = response.getWriter();
 
 It would direct all output (using out.println()) from all 
 threads to the most recent person to access the servlet.  

The servlet spec mandates that each concurrent request (which is
processed on its own thread) has distinct request and response objects
passed in, so response.getWriter() will get the writer for the current
thread's response object - which is guaranteed not to be the same as
that for any other request that's being processed at the same time.

Reading between the lines, by the way, this means that the container
may, if it wishes, recycle objects (and indeed threads) between
requests.  I know Tomcat 5.0 does this.

 Follow up question:  With this in mind, what is the most 
 common method of writing thread safe code?  

As Guru said, plus a couple of process-related points:

- Go through the spec for third-party code that you're using (libraries,
servlet containers and the like).  Check what guarantees they make about
thread-safety, and check what guarantees they make about object
uniqueness.  If you don't know what the rest of the system provides, you
can be in for some surprises.

- Test!  Jmeter (or some similar multi-threaded load testing tool) is
your friend.  As Knuth remarked, Beware of the above code; I have only
proved it correct, not tried it.  Writing solid thread-safe code takes
more thinking, and hence more time, than writing single-threaded code;
and the likelihood of defects goes up as you now have to think about
interactions between threads which may occur at arbitrary times.  In a
recent project, we bought an 8 CPU box with the slowest processors we
could find, simply so that we could load it up with requests fairly
trivially and so that it could sit and chug away at our test suite
looking for threading issues.  We found several...

- Peter

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



Re: Servlet Concurrency Issues

2005-06-08 Thread Remy Maucherat
On 6/8/05, Peter Crowther [EMAIL PROTECTED] wrote:
 Note that SingleThreadModel isn't supported in more recent versions of
 Tomcat.  This may or may not worry you depending on whether you want to
 move to a more recent version :-).

I've posted already about that: if you don't know about something,
please don't make guesses with the tone of someone who knows his
stuff, since you'll just end up confusing people.

Your statement is completely wrong, STM is fully supported in Tomcat
5.5, with instance pooling for good performance. It's usually much
faster than having lots of sync in your servlet, that is. I actually
like the feature, personally. The only reason it got removed is
because it gave users the impression that no additional syncing was
ever needed (which is not the case, as session modification may still
be unsafe).

-- 
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



RE: Tomcat, SSL, IE, and .pdf downloads

2005-06-08 Thread Panichi, Mary-Beth
I think that I'll be leaving the moral decisions to my network admins.
They can decide what they feel is the right answer with regard to
network security.  But it's good to know that there is a way to fix the
problem.

Thanks again to everyone for all the input!
-Mary Beth

-Original Message-
From: Mark Leone [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 07, 2005 9:24 PM
To: Tomcat Users List
Subject: Re: Tomcat, SSL, IE, and .pdf downloads


Mary-Beth, be advised that applying the fix in Tomcat is arguably the 
moral equivalent of what you said you didn't want to do (i.e., uncheck 
don't allow encrypted data to be cached to disk in IE). By inserting 
the valve that ensures that the cache-control headers are not set, 
you're not only permitting IE  to cache the response, but you're also 
permitting any HTTP intermediaries to do so. I wouldn't be concerned 
about the former (since the user can control the browser cache), but the

latter can be an issue if you have HTTP intermediaries in the path and 
you don't want any copies of the response hanging around.

It would actually be more secure to just uncheck the setting in IE 
(since you indicated that works), and retain the no-cache behavior for 
the HTTP intermediaries; but that's probably unworkable from an interop 
standpoint. All IE users would have to configure their browser properly,

or they will be told that your site is unavailable.

The unfortunate reality is that because one particular user agent (IE) 
is applying more restrictive caching behavior than is warranted by the 
spec, the server has to relax the caching behavior where it really needs

to be restricted in many cases, if IE compatibility with default 
settings is to be maintained. There's an important lesson here, but I 
don't think the party that needs to learn it is listening.

-Mark

Mark Thomas wrote:

 This seems to be a popular subject today. Try looking at 
 http://marc.theaimsgroup.com/?l=tomcat-userm=111811136603781w=2

 Mark

 Panichi, Mary-Beth wrote:

 Greetings ~

 We're having issues downloading .pdf files in SSL.  I've been all
over
 the web trying to find solutions.  The issue appears to be
interaction
 between Tomcat and InternetExplorer.  IE appears to be corrupting the
 pdf files.  There's an IE patch out there, but we've patched past
that.
 The fix that they list, to uncheck the don't allow encrypted data to
be
 cached to disk,  works, but it's a setting that for security reasons
we
 don't want to leave unchecked.

 I've tried all manner of setting headers for cache-control, etc..
We're
 dynamically generating the .pdf files, and streaming them to the jsp
 page.   I've tried also saving the pdf's physically to the server and
 then getting them, but that didn't work either.

 Has anyone run into this issue?  Does anyone have a solution?  I've
seen
 lots of suggestions out there, but nothing that actually works.

 Thanks!

 Mary Beth Panichi


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





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



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



RE: Servlet Concurrency Issues

2005-06-08 Thread Peter Crowther
 From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
 Your statement is completely wrong, STM is fully supported in Tomcat
 5.5, with instance pooling for good performance.

Sorry, Remy - I should have checked rather than relying on memory.

- Peter

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



Re: Servlet Concurrency Issues

2005-06-08 Thread Remy Maucherat
On 6/8/05, Peter Crowther [EMAIL PROTECTED] wrote:
  From: Remy Maucherat [mailto:[EMAIL PROTECTED]
  Your statement is completely wrong, STM is fully supported in Tomcat
  5.5, with instance pooling for good performance.
 
 Sorry, Remy - I should have checked rather than relying on memory.

No problem. STM is deprecated in the specification, but support is
mandatory (of course, if the container doesn't do pooling, performance
will be really bad). I hope it doesn't get removed, since it is
sometimes useful (maybe it could be reinstated with a different name).

-- 
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



Re: Servlet Concurrency Issues

2005-06-08 Thread Dakota Jack
Your best bet for understanding multithreading issues is to get a good
understanding of the JVM.

On 6/8/05, Michael Pasko [EMAIL PROTECTED] wrote:
 Thanks Chuck, that was exactly the problem.  I was under the very poor
 assumption that a new thread and newly instantiated servlet object was
 created every time a request was made, instead of all threads working on
 only one instance of an object.  To mimic the desired behavior I've fixed
 the problem by adding this (implements SingleThreadModel)...
 
 public class ServletName implements SingleThreadModel
 
 Now it would seem that if several 100 people were to access a servlet that
 every time the following code was hit by a new thread:
 
 PrintWriter out = response.getWriter();
 
 It would direct all output (using out.println()) from all threads to the
 most recent person to access the servlet.
 
 Follow up question:  With this in mind, what is the most common method of
 writing thread safe code?
 
 Thank you very much for your help.
 
 -Mike
 
 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 07, 2005 1:15 PM
 To: Tomcat Users List
 Subject: RE: Servlet Concurrency Issues
 
  From: Michael Pasko [mailto:[EMAIL PROTECTED]
  Subject: Servlet Concurrency Issues
 
  I started allowing other users on it, I stumbled on some problems.
  Basically what happens, when user A submits the form, and then 2
  seconds later user B submits the same form.  User A stops getting
  results, and User B receives the output for his request as well as
  the end of User A's request.
 
 Probably not a configuration problem but rather implementation errors in
 your servlet or some related object (such as the DB connection).
 There's normally only one copy of the servlet object, and it will be
 used concurrently by multiple threads.  Make sure you're not storing
 request-specific information in there.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
You can lead a horse to water but you cannot make it float on its back.
~Dakota Jack~

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



Re: Servlet Concurrency Issues

2005-06-08 Thread Anto Paul
On 6/8/05, Dakota Jack [EMAIL PROTECTED] wrote:
 Your best bet for understanding multithreading issues is to get a good
 understanding of the JVM.
 

Can you recommend one ?


-- 
rgds
Anto Paul

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



default IP address connector binding?

2005-06-08 Thread Paul Singleton

My Linux server's eth0 supports ten IP addresses.

What happens (in 5.5.9) if my HTTP Connector doesn't
specify an

  address = 216.119.217.240

attribute?  Does it use the first one?  all of them?

(it's working but I need to know exactly what it's doing)

Paul Singleton


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.5 - Release Date: 7/Jun/2005


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



Re: default IP address connector binding?

2005-06-08 Thread Tim Funk

All of them

-Tim

Paul Singleton wrote:


My Linux server's eth0 supports ten IP addresses.

What happens (in 5.5.9) if my HTTP Connector doesn't
specify an

  address = 216.119.217.240

attribute?  Does it use the first one?  all of them?

(it's working but I need to know exactly what it's doing)

Paul Singleton




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



Re: default IP address connector binding?

2005-06-08 Thread Markus Schönhaber
Am Mittwoch, 8. Juni 2005 16:04 schrieb Paul Singleton:
 My Linux server's eth0 supports ten IP addresses.

 What happens (in 5.5.9) if my HTTP Connector doesn't
 specify an

address = 216.119.217.240

 attribute?  Does it use the first one?  all of them?

 (it's working but I need to know exactly what it's doing)

If you don't specify an address, tomcat will bind to 0.0.0.0 (resp. to ::0 on 
IPv6) which effectively means it binds to all available addresses.

Regards
mks

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



Re: percent in URL makes tomcat chocke

2005-06-08 Thread Tim Diggins

I think tomcat is behaving correctly...

You may have missed out an important fact about URLs... check out
http://www.w3.org/Addressing/rfc1630.txt
Universal Resource Identifiers in WWW


   THE PERCENT SIGN

  The percent sign (%, ASCII 25 hex) is used as the escape
  character in the encoding scheme and is never allowed for anything
  else.


URL-escaping is different from html/sgml-escaping  (e.g. #37; )

give that %3a is an escape for :, then if something is asking for
  http://oberon/apt/./g++_4%3a3.3.5-3_i386.deb

then (I think) they are really asking for
  http://oberon/apt/./g++_4:3.3.5-3_i386.deb

so maybe you could handle a that in your tomcat webapp?


hope this indicates some directions to try...

Tim



Holger Klawitter wrote:

Omar Adobati wrote:



maybe u can try to replace the % symbol with the ASCII value, that is
#37; found at http://www.lookuptables.com/



It's not about that *I* can't load that file.
*apt-get* needs to be able to do it.

I already tried to use urlrewrite, but the filter are already too late down
the filter chain, the %3a in ...g++_4%3a3.3... is already translated.
Furthermore the + signs are being translated into spaces by the rewrite
engine.

With Kind Regards / Mit freundlichem Gruß
  Holger Klawitter (listen at klawitter dot de)


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






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



Re: Servlet Concurrency Issues

2005-06-08 Thread Woodchuck
hihi all,

does Tomcat 5.5.x handle this instance pooling transparently for
objects implementing STM?

do i need to configure Tomcat to turn on this feature?

tia,
woodchuck



--- Remy Maucherat [EMAIL PROTECTED] wrote:

 Your statement is completely wrong, STM is fully supported in Tomcat
 5.5, with instance pooling for good performance. It's usually much
 faster than having lots of sync in your servlet, that is. I actually
 like the feature, personally. The only reason it got removed is
 because it gave users the impression that no additional syncing was
 ever needed (which is not the case, as session modification may still
 be unsafe).




__ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html

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



tomcat causes servlet malfunction???

2005-06-08 Thread Michael Echavez
Hi Everyone!
There is a servlet i found from a book that utilizes the parameters from 
servlets but whenever i run it the browser doesnt seem to open the class 
properly and instead it only downloads the .class file. I think the problem 
here has something to do with the new Tomcat version. Can someone try 
deploying the application so that I'll be able to find out whether what the 
problem really is. Below are the codes i used:

the code below is for Form.html where i have to enter the information that 
will be passed onto the servlet:
HTML
HEAD
TITLE
Parameter Servlet Form
/TITLE
/HEAD
BODY

form
action=servlet/chapter2.ParameterServlet
method=POST
table width=400 border=0 cellspacing=0
tr
tdName: /td
td
input type=text
name=name
size=20
maxlength=20
/td
tdSSN:/td
td
input type=text name=ssn size=11 maxlength=11
/td
/tr
tr
tdAge:/td
td
input type=text name=age size=3 maxlength=3
/td
tdemail:/td
td
input type=text
name=email
size=30
maxlength=30
/td
/tr
tr
tdnbsp;/td
tdnbsp; /td
tdnbsp; /td
td
input type=submit name=Submit value=Submit
input type=reset name=Reset value=Reset
/td
/tr
/table
/FORM

/BODY
/HTML

and here is the code for ParamterServlet.java:
package chapter2;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class ParameterServlet extends HttpServlet {

public void init(ServletConfig config) throws ServletException {
// Always pas the ServletConfig object to the super class
super.init(config);
}

// Process the HTTP Get request
public void doGet (HttpServletRequest request, HttpServletResponse response) 
throws ServletException, IOException {
doPost(request, response);
}

// Process the HTTP Post request
public void doPost (HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {
response.setContentType(html/text);
PrintWriter out = response.getWriter();

out.println(html);
out.println(head);
out.println(titleParameter Servlet/title);
out.println(/head);
out.println(body);

// Get an enumeration of the parameter names
Enumeration parameters = request.getParameterNames();

String param = null;

// Iterate over the parameter names,
// getting the parameters values
while(parameters.hasMoreElements()) {
param = (String)parameters.nextElement();
out.println(param +  :  + request.getParameter(param) + BR);
}

out.println(/body/html);
out.close();
}
}

Thank you and Good day!
Regards,
michael


Re: tomcat causes servlet malfunction???

2005-06-08 Thread Jason Bainbridge
On 6/8/05, Michael Echavez [EMAIL PROTECTED] wrote:
 Hi Everyone!
 There is a servlet i found from a book that utilizes the parameters from
 servlets but whenever i run it the browser doesnt seem to open the class
 properly and instead it only downloads the .class file. I think the problem
 here has something to do with the new Tomcat version. Can someone try
 deploying the application so that I'll be able to find out whether what the
 problem really is. Below are the codes i used:

That is using the ancient /servlet directory default servlet thingy,
the class you have needs to be packaged and then placed in
%TOMCAT_HOME%/webapps/yourwebapp/WEB-INF/classes for it to work
properly.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



Re: Set Connector to secure but DON'T use TLS/keystore/etc.?

2005-06-08 Thread John G. Norman
My suggested solution (2) below works ok as a temporary stopgap. So,
if you ever find yourself in this scenario -- Tomcat behind a hardware
ssl accelerator but you need to redirect for confidential matrials), a
stopgap solution is the code below.

My question is still open as to whether or not a Connector can be set
to be secure but without its wanting to do TLS, etc. I wonder if
there is a way through this problem with proxy settings. Also, in the
solution below, I think there are some issues with cached resources.
Anyhoo . . .

Scenario:

1. You have Tomcat behind a hardware SSL accelerator, which handles
TLS for you. And you want that performance boost.

2. You need to mark certain resources CONFIDENTIAL in your web.xml
with transport-guaranteeCONFIDENTIAL/transport-guarantee

3. However, CONFIDENTIAL means that when you get traffic to your
Tomcat on the non-secured Connector, there is a redirect to, say, 443
(i.e., back to the SSL accelerator).

4. When the SSL accelerator then sends the traffic to your Tomcat's
8443, there's a double-bind:

a. If you set the 8443 Connector to secure=true then Tomcat wants to
handle the SSL. But this is bad because it was already handled by the
hardware accelerator.
b. But if you set the 8443 Connect to secure=false then Tomcat wants
to send the redirect (again). Infinite loop.

Stopgap solution:

1. Remove the user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee from your
web.xml

2. Change your 8443 Connector to secure=false

3. Handle the redirect yourself with a filter such as this one (this
is just the dofilter method):

(Note that the filter will have to look at the incoming paths, and
reproduce whatever your settings were in that required the
CONFIDENTIAL guarantee.)

(Also note that this is obviously a hack, with some hardcoding of a
port, assumption that the other port is regular http, etc., etc.)

  public void doFilter(ServletRequest request, ServletResponse response,
  FilterChain chain) throws IOException, ServletException {

// If incoming is not on the port that is for secure traffic, redirect
if (request.getLocalPort() != 8443) {
  
  HttpServletRequest req = (HttpServletRequest) request;
  HttpServletResponse res = (HttpServletResponse) response;

  String url = NetUtils.getReconstructedURL(req);

  // Change the scheme
  String redirect = https + url.substring(4);
  res.setStatus(HttpServletResponse.SC_FOUND);
  res.setHeader(Location, redirect);
  if (logger.isLoggable(Level.INFO)) {
logger.info(Redirecting:  + url +  to  + redirect);
  }
  return;
} else {
  chain.doFilter(request, response);
}
  }

John

On 6/7/05, John G. Norman [EMAIL PROTECTED] wrote:
 For Tomcat 5.0.28:
 
 I have an SSL accelerator in front of a set of hardware load-balanced Tomcats.
 
 SSL is handled by the accelerator.
 
 HTTP requests come in on port 80 and are redirected via the load
 balancer (it's actually an Inkra) to a Tomcat HTTP Connector listening
 on port 8080.
 
 I would like to mark some resources in the app with the security
 constraint CONFIDENTIAL and have the request redirected to port 443.
 
 So . . . A redirected request would now come in on 443, where the SSL
 accelerator handles TLS. Then the request goes into the LB, and goes
 to a Tomcat Connector on port 8443.
 
 Therefore, in server.xml, I would like to set the secure attribute for
 the Connector on port 8443 to true so that the request is no longer
 redirected.
 
 But if I set the secure attribute to true, it seems that I must
 specify a keystore, and handle SSL on Tomcat. (If you set secure to
 true but w/o a keystore, you get exceptions and the Connector
 doesn't start.)
 
 If I set the secure attribute to false, then the redirect happens
 again (effectively an infinite loop).
 
 So . . . any suggestions?
 
 My ideas are:
 
 (0) See if the load balancer can do the redirect. I.e., have certain
 traffic (not all, I'm afraid) return a 304 and redirect to the 443
 port? There *are* certain paths (for example, for privacy policy XML
 files) that must not use https/443. Then the Tomcat's 8443 could be
 insecure. This is a bad solution because now the authority for the
 redirect isn't in the app; harder to change.
 
 (1) Stop using the hardware acceleration, and put the SSL cert on each
 of the Tomcats. This is probably big drag for performance reasons.
 
 (2) Write a custom J2EE filter to do the 304/redirect.
 
 (3) Any more flexibility on this in Tomcat 5.5?
 
 John


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



Re: Embedded Tomcat SSL

2005-06-08 Thread Mark
I do not think that you need an SSL connector.  I have an embedded
tomcat working using mutual authenticated SSL and the connector is not
SSL enabled.

On 6/8/05, Diarmuid McDonald [EMAIL PROTECTED] wrote:
 Hi,
 
 Can anyone help me with regard to running Embedded Tomcat 5.5.9 with SSL. I 
 found a mail archive before that has the same problem, however there is no 
 resolution.
 
 http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg153661.html
 
 I have included my code and errors that I am receiving. Any help would be 
 greatly appreciated
 
 Here is the code I am Using
 
 import java.io.File;
 ..
 ..
 import org.apache.tomcat.util.IntrospectionUtils;
 
 public class TestEmbededTomcat {
 
 
 public static void main( String args[] )
 {
 
 Embedded embedded = new Embedded();
 
 // set default logger and realm
 org.apache.log4j.BasicConfigurator.configure();
 
 MemoryRealm memRealm = new MemoryRealm();
 embedded.setRealm(memRealm);
 
 //Create an Engine
 Engine baseEngine = embedded.createEngine();
 
 baseEngine.setName(TestEngine);
 baseEngine.setDefaultHost(vsjHost);
 
 //Create Host
 Host baseHost =  embedded.createHost( vsjHost, 
 e:/ent/sip2.0/rte/jakarta-tomcat-5.5.9-embed/webapps );
 
 baseEngine.addChild( baseHost );
 
 //Create default context
 Context rootContext = embedded.createContext(,ROOT);
 
 baseHost.addChild( rootContext );
 
 // Create context for web app for axis
 Context axisContext = embedded.createContext(/axis, axis);
 axisContext.setPrivileged( true );
 baseHost.addChild( axisContext );
 
 embedded.addEngine( baseEngine );
 
   //Create a ssh Connector
   Connector sshConnector = embedded.createConnector( 
 (java.net.InetAddress) null,
9012,
true);
 
 IntrospectionUtils.setProperty(sshConnector, sslProtocol, TLS);
 IntrospectionUtils.setProperty(sshConnector, keypass, changeit);
 IntrospectionUtils.setProperty(sshConnector, keystore, 
 C:/Documents and Settings/mcdonald/.keystore);
 IntrospectionUtils.setProperty(sshConnector, clientAuth, false);
 
 embedded.addConnector( sshConnector );
 sshConnector.setProtocol( TLS );
 
 //start operation
 embedded.start();
 }
 }
 
 
 Here is the error message I get :-
 
 12:16:41:375: 
 [org.apache.tomcat.util.net.PoolTcpEndpoint][http-9012-Processor3] DEBUG - 
 Handshake
 ailed
 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
 at 
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
 at 
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:119)
 at 
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:520)
 at 
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.j
 va:80)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:536)
 287423 [http-9012-Processor3] DEBUG 
 org.apache.tomcat.util.net.PoolTcpEndpoint  - Handshake failed
 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
 at 
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
 at 
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:119)
 at 
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:520)
 at 
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.j
 va:80)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:536)
 
 
 Here is the message I get from Firefox :-
 
 Could not establish an encrypted connection, because the certificate 
 presented by localhost is invalid or corrupted. Error Code : -8182
 
 
 This e-mail and any files transmitted with it are confidential and may be 
 privileged and are intended 

Re: Embedded Tomcat SSL

2005-06-08 Thread Atul
Hi Mark,
 On a similar note, would you be able to point me on how to get CRL
validator invoked by tomcat 5.x for ssl/mutual.

thnks


On 6/8/05, Mark [EMAIL PROTECTED] wrote:
 I do not think that you need an SSL connector.  I have an embedded
 tomcat working using mutual authenticated SSL and the connector is not
 SSL enabled.
 
 On 6/8/05, Diarmuid McDonald [EMAIL PROTECTED] wrote:
  Hi,
 
  Can anyone help me with regard to running Embedded Tomcat 5.5.9 with SSL. I 
  found a mail archive before that has the same problem, however there is no 
  resolution.
 
  http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg153661.html
 
  I have included my code and errors that I am receiving. Any help would be 
  greatly appreciated
 
  Here is the code I am Using
 
  import java.io.File;
  ..
  ..
  import org.apache.tomcat.util.IntrospectionUtils;
 
  public class TestEmbededTomcat {
 
 
  public static void main( String args[] )
  {
 
  Embedded embedded = new Embedded();
 
  // set default logger and realm
  org.apache.log4j.BasicConfigurator.configure();
 
  MemoryRealm memRealm = new MemoryRealm();
  embedded.setRealm(memRealm);
 
  //Create an Engine
  Engine baseEngine = embedded.createEngine();
 
  baseEngine.setName(TestEngine);
  baseEngine.setDefaultHost(vsjHost);
 
  //Create Host
  Host baseHost =  embedded.createHost( vsjHost, 
  e:/ent/sip2.0/rte/jakarta-tomcat-5.5.9-embed/webapps );
 
  baseEngine.addChild( baseHost );
 
  //Create default context
  Context rootContext = embedded.createContext(,ROOT);
 
  baseHost.addChild( rootContext );
 
  // Create context for web app for axis
  Context axisContext = embedded.createContext(/axis, axis);
  axisContext.setPrivileged( true );
  baseHost.addChild( axisContext );
 
  embedded.addEngine( baseEngine );
 
//Create a ssh Connector
Connector sshConnector = embedded.createConnector( 
  (java.net.InetAddress) null,
 9012,
 true);
 
  IntrospectionUtils.setProperty(sshConnector, sslProtocol, TLS);
  IntrospectionUtils.setProperty(sshConnector, keypass, changeit);
  IntrospectionUtils.setProperty(sshConnector, keystore, 
  C:/Documents and Settings/mcdonald/.keystore);
  IntrospectionUtils.setProperty(sshConnector, clientAuth, false);
 
  embedded.addConnector( sshConnector );
  sshConnector.setProtocol( TLS );
 
  //start operation
  embedded.start();
  }
  }
 
 
  Here is the error message I get :-
 
  12:16:41:375: 
  [org.apache.tomcat.util.net.PoolTcpEndpoint][http-9012-Processor3] DEBUG - 
  Handshake
  ailed
  javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
  at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
  at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
  at 
  com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
  at 
  org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:119)
  at 
  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:520)
  at 
  org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.j
  va:80)
  at 
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  at java.lang.Thread.run(Thread.java:536)
  287423 [http-9012-Processor3] DEBUG 
  org.apache.tomcat.util.net.PoolTcpEndpoint  - Handshake failed
  javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
  at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
  at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
  at 
  com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
  at 
  org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:119)
  at 
  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:520)
  at 
  org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.j
  va:80)
  at 
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  at java.lang.Thread.run(Thread.java:536)
 
 
  Here is the 

RE: Embedded Tomcat SSL

2005-06-08 Thread Diarmuid McDonald
Hi Mark,

Im not sure I understand what you mean by mutual authenticated SSL. I set to 
not be SSL enabled and it made no difference when tring to connect to 
https://localhost:9012/axis/ . i.e.

Connector sshConnector = embedded.createConnector( (java.net.InetAddress)   
 null,
 9012,
   false);

Could you elaborate as to how you got SSL working, or do you have sample code I 
could use


-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]
Sent: 08 June 2005 16:12
To: Tomcat Users List
Subject: Re: Embedded Tomcat  SSL


I do not think that you need an SSL connector.  I have an embedded
tomcat working using mutual authenticated SSL and the connector is not
SSL enabled.

On 6/8/05, Diarmuid McDonald [EMAIL PROTECTED] wrote:
 Hi,
 
 Can anyone help me with regard to running Embedded Tomcat 5.5.9 with SSL. I 
 found a mail archive before that has the same problem, however there is no 
 resolution.
 
 http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg153661.html
 
 I have included my code and errors that I am receiving. Any help would be 
 greatly appreciated
 
 Here is the code I am Using
 
 import java.io.File;
 ..
 ..
 import org.apache.tomcat.util.IntrospectionUtils;
 
 public class TestEmbededTomcat {
 
 
 public static void main( String args[] )
 {
 
 Embedded embedded = new Embedded();
 
 // set default logger and realm
 org.apache.log4j.BasicConfigurator.configure();
 
 MemoryRealm memRealm = new MemoryRealm();
 embedded.setRealm(memRealm);
 
 //Create an Engine
 Engine baseEngine = embedded.createEngine();
 
 baseEngine.setName(TestEngine);
 baseEngine.setDefaultHost(vsjHost);
 
 //Create Host
 Host baseHost =  embedded.createHost( vsjHost, 
 e:/ent/sip2.0/rte/jakarta-tomcat-5.5.9-embed/webapps );
 
 baseEngine.addChild( baseHost );
 
 //Create default context
 Context rootContext = embedded.createContext(,ROOT);
 
 baseHost.addChild( rootContext );
 
 // Create context for web app for axis
 Context axisContext = embedded.createContext(/axis, axis);
 axisContext.setPrivileged( true );
 baseHost.addChild( axisContext );
 
 embedded.addEngine( baseEngine );
 
   //Create a ssh Connector
   Connector sshConnector = embedded.createConnector( 
 (java.net.InetAddress) null,
9012,
true);
 
 IntrospectionUtils.setProperty(sshConnector, sslProtocol, TLS);
 IntrospectionUtils.setProperty(sshConnector, keypass, changeit);
 IntrospectionUtils.setProperty(sshConnector, keystore, 
 C:/Documents and Settings/mcdonald/.keystore);
 IntrospectionUtils.setProperty(sshConnector, clientAuth, false);
 
 embedded.addConnector( sshConnector );
 sshConnector.setProtocol( TLS );
 
 //start operation
 embedded.start();
 }
 }
 
 
 Here is the error message I get :-
 
 12:16:41:375: 
 [org.apache.tomcat.util.net.PoolTcpEndpoint][http-9012-Processor3] DEBUG - 
 Handshake
 ailed
 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
 at 
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
 at 
 org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:119)
 at 
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:520)
 at 
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.j
 va:80)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:536)
 287423 [http-9012-Processor3] DEBUG 
 org.apache.tomcat.util.net.PoolTcpEndpoint  - Handshake failed
 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
 at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
 at 
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
 at 
 

tomcat windows / mysql linux

2005-06-08 Thread daniel steel
hi all,
  i have an interesting problem. our app server(tomcat
5.5) on windows 2003 communicates with mySQl database
on linux box.

our client application is very slow each time we log
in. when we moved the database to windows box, the
application is super fast.

does anybody have thoughts on this?

thank you
secc



__ 
Discover Yahoo! 
Have fun online with music videos, cool games, IM and more. Check it out! 
http://discover.yahoo.com/online.html

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



Re: tomcat causes servlet malfunction???

2005-06-08 Thread Ben Souther
Where is the servlet's class file?


On Wed, 2005-06-08 at 11:35, Michael Echavez wrote:
  i didnt use the invoker here. ive explicitly mapped my servlet with
 that url. below is a part of my web.xml
 
 servlet
   servlet-nameParameterServlet/servlet-name
   description
  This servlet retrieves the parameters sent to it and returns
  the parameters and their values back to the client.
   /description
   servlet-classchapter2.ParameterServlet/servlet-class
   !-- Load this servlet at server startup time --
   load-on-startup5/load-on-startup
 /servlet
 
 servlet-mapping
   servlet-nameParameterServlet/servlet-name
   url-pattern/servlet/chapter2.ParameterServlet/url-pattern
 /servlet-mapping
 
 I actually thought that there was some kind of an agreement to use
 /servlet for servlet urls. Thank you for the links. I actually
 learned a lot from them.
 
 Yes, the browser does download the file. it says that it has found a
 PARAMETERSERVLET file since the url is
 ...\servlet\chapter2.ParameterServlet
 It actually thinks that ParameterServlet is an extension. I'm really
 lost now cause i have a couple of other servlets that is in the same
 directory and they work properly. this is the only one that doesnt.
 
 On 6/8/05, Ben Souther [EMAIL PROTECTED] wrote:
 If the browser can see the .class file and download it, then
 it's not in
 the right place.
 
 Also: action=servlet/chapter2.ParameterServlet
 The servlet/ section in the URL is an outdated way of
 invoking a 
 servlet.  It uses the deprecated (and disabled in current
 versions of
 Tocmat) Invoker servlet.
 
 You will need to map your servlets in web.xml or disable the
 invoker in
 order to run them.
 
 On the InvokerServlet: 
 http://jakarta.apache.org/tomcat/faq/misc.html#evil
 http://faq.javaranch.com/view?InvokerServlet
 
 
 On Wed, 2005-06-08 at 11:10, Michael Echavez wrote:
  Hi Ben,
  It is so nice of you to respond so quickly.
  Actually, I've already deployed a few simple servlets
 already and I am
  sure that the .class file for the servlet is in the right
 directory. I 
  was just wasnt sure why tomcat couldnt load the class file
 correctly.
  Also, I already read the tomcat documentation you pointed me
 to before
  i posted my question.
  I really appreciate the link with the example applications.
 I think it 
  will help me a lot with practicing on servlets, jsps and
 beans. Again,
  Thank you so much!
  Regards,
  Michael
 
  On 6/8/05, Ben Souther [EMAIL PROTECTED] wrote:
  Michael,
 
  Have a look at the documentation for classloading in
 TC to
  find out
  where your class files need to go.
 
 
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
 
  You'll also need to map your servlet in your web.xml
 file.
 
 
  I have some example applications that are packaged
 as war 
  files that you
  can use as a reference if you like:
  http://simple.souther.us.
 
  -Ben
 
 
 
  On Wed, 2005-06-08 at 10:58, Michael Echavez wrote:
   Hi Everyone!
   There is a servlet i found from a book that
 utilizes the
  parameters from
   servlets but whenever i run it the browser doesnt
 seem to 
  open the class
   properly and instead it only downloads the .class
 file. I
  think the problem
   here has something to do with the new Tomcat
 version. Can 
  someone try
   deploying the application so that I'll be able to
 find out
  whether what the
   problem really is. Below are the codes i used:
   
   the code below is for Form.html where i have to
 enter the
  information that
   will be passed onto the servlet:
   HTML
   HEAD 
   TITLE
   Parameter Servlet Form
   /TITLE
   /HEAD
   BODY
  
   form 
   action=servlet/chapter2.ParameterServlet
   method=POST
   table width=400 border=0 cellspacing=0
   tr 
   tdName: /td
   td

Question on Configuring Virtual Hosts on different ports

2005-06-08 Thread Colby . Meyer
We are attempting to configure tomcat with virtual hosts so that different 
ports represent different regions

For example 
port 80 may represent a QA region
port 90 may represent a dev region

We are using apache as the front end for Tomcat

in httpd.conf we have the following defined :

# Definition for DEVA
VirtualHost *:90
ServerAdmin [EMAIL PROTECTED]
   ServerName deva 
JkMount /* ajp13
ErrorLog /opt/bluepage/deva/logs/error_log
CustomLog /opt/bluepage/deva/logs/access_log common
/VirtualHost

this should forward all requests to the Tomcat connector and hence to 
Tomcat

in server.xml we have the following defined :

Host name=deva appBase=webapps unpackWARs=true autoDeploy=true
Logger className=org.apache.catalina.logger.FileLogger
   directory=logs 
   prefix=deva_log. suffix=.txt
   timestamp=true/
 
Context path= 
 docBase=/opt/tomcat/webapps/dva/BluePage.war
 crossContext=false
 debug=1 
 reloadable=false
 trusted=false 
/Context 
Context path=/BluePage 
 docBase=/opt/tomcat/webapps/dva/BluePage.war
crossContext=false
 debug=1 
 reloadable=false
 trusted=false 
/Context 
!-- ** the deva application context ** --
 /Host

and in /etc/hosts we have 

127.0.0.1   localhost qaa qab qac deva devb devc 
192.168.85.6qaa qab qac deva devb devc
 
When we start tomcat and hit the URL : http://192.168.85.6:90/index.html 
we see some of the static html content that is defined in the root of 
the WAR file
However when trying to access any of the servlets in the WAR , for example

http://192.168.85.6:90/BluePage/Redirector?foo=usabar=caENTER.x=15ENTER.y=18

 The following logs in the Apache access_log for this host 

 - [08/Jun/2005:12:21:59 -0400] GET 
/BluePage/Redirector?foo=usabar=caENTER.x=15ENTER.y=18 HTTP/1.1 302 0

nothing logs in the associated tomcat log and the servlet doesn't appear 
to be getting called.

The WAR was built on the same machine as the Tomcat Server so we are using 
the same java version and the structure of the WAR was initially built on 
Websphere, so I feel that
the structure in terms of WEB-INF/classes and such is valid.

We have exhaustively experimented with permutations of server settings, 
read everything on Virtual Host configuration and the proper course of 
action escapes us.
I am thinking that this may be an issue with the application code itself, 
but I am not sure where to start looking.

Does anyone have any thoughts or pointers they may be willing to share ?

Thanks

Colby C. Meyer


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



Re: AW: AW: Using appelts with different clients

2005-06-08 Thread Mark Thomas
The JSP spec specifies a default JRE version of 1.2. What happens in 
FireFox if you specify jreversion=1.3 ?


Mark

[EMAIL PROTECTED] wrote:

u r right, of course. It's just that weblogic generates the page OK for both
clients.

This is the code generated for firefox:

EMBED type=application/x-java-applet code=applet.MyApplet codebase=.
align=top archive=applet.jar height=100 name=MyApplet
width=100/EMBED

This works perfectly well. I've JRE1.4.1_03 installed.


-Ursprüngliche Nachricht-
Von: Jost Richstein [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 8. Juni 2005 09:49

An: Tomcat Users List
Betreff: Re: AW: Using appelts with different clients


Tomcat 5.5.9 generates the following code snippet, requesting version 1.2.2
of the plugin:

OBJECT classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
width=100 height=100
 
codebase=http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#V

ersion=1,2,2,0
  PARAM name=java_code value=applet.MyApplet
  PARAM name=java_codebase value=.
  PARAM name=type value=application/x-java-applet;

Firefox requires version 1.3.0_01 or better
(http://www.mozilla.org/support/firefox/faq#q2.2).
Maybe it's that version mismatch that leads to your problem?

And: could be a firefox issue as well.

[EMAIL PROTECTED] wrote:


Well, I discovered the following facts:

- I've created a jsp-page with the following line:
 jsp:plugin type=applet code=applet.MyApplet codebase=.


width=100


height=100/

- I've deployed all files to BEA weblogic. The page loades fine on IE and
firefox.
- I've deployed all files to tomcat. The page loads on IE, however, it
doesn't on firefox. 


Therefore, I assume that this is either a bug, or tomcat just doesn't
support different clients.

Heiner

-Ursprüngliche Nachricht-
Von: Mark Thomas [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 7. Juni 2005 20:38

An: Tomcat Users List
Betreff: Re: Using appelts with different clients


[EMAIL PROTECTED] wrote:



Other
servers create the corret page by using the jsp:pluggin tag. Tomcat


doesn't.

In what way does Tomcat not support this? As far as I am aware it does 
in both 4.1.x and 5.5.x


Mark

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

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









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

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






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



Re: Tomcat CGI and HTTP status codes

2005-06-08 Thread Mark Thomas

Chris,

Sorry, but this isn't supported. See 
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?rev=1.31view=markup 
and search for NPH for more info.


Patches are always welcome ;)

Mark

Chris Picton wrote:

Hi all

I am trying to get squivi2 running under tomcat cgi, but I am having a
problem with redirects.

Code I am testing generates a redirect as follows:
-
my $tempout =  $q-header(
   -nph=1,
   -status=302 Moved Temporarily,
   -location=$dest,
);
open F, /tmp/f; print F $tempout; close F;
print $tempout;
exit 0;
-

I am printing the output to /tmp/f to check what is being sent to the
browser.  The contents of that file look like:
--
HTTP/1.0 302 Moved Temporarily
Server: TOMCAT
Status: 302 Moved Temporarily
Date: Wed, 08 Jun 2005 09:31:34 GMT
Location: http://127.0.0.1:8080/cgi-bin/squivi.cgi/seqf_11/proto_prep
Content-Type: text/html; charset=ISO-8859-1
--

Here is where the problem comes in.  When I try to access the cgi, It
doesn;t redirect, but downloads the file.  It seems that tomcat is
changing the 302 status to a 200 somewhere.

When I telnet to the tomcat port and GET the cgi, this is what I see:
-
GET /cgi-bin/squivi.cgi/seqf_11 HTTP/1.0
Host: 127.0.0.1

HTTP/1.1 200 OK
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 02:00:00 SAST
Server: TOMCAT
Status: 302 Moved Temporarily
Date: Wed, 08 Jun 2005 09:40:24 GMT
Content-Length: 0
Server: Apache-Coyote/1.1
Connection: close
---


Note that the Location header has been removed, and the status has been
changed to 200. 


Am I missing a trick here?  What is going on?

Chris


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






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



RE: tomcat windows / mysql linux

2005-06-08 Thread Robert Harper
What is the speed of your network? Local access will almost always be faster
than a call across the network. Even if you specify your ODBC to use a
network address, the OS's are smart enough to not send local access through
the network card. There could also be issues with the network physical
setup. If you have daisy chained hubs instead of smart switches this could
further degrade the performance due to the number of hops you request might
take. You could expect a few second delay for network layer depending on the
speed and topography of the network. This is one of the reason good network
engineers get paid so well.

Robert S. Harper
Information Access Technology, Inc.

-Original Message-
From: daniel steel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 08, 2005 10:36 AM
To: tomcat-user@jakarta.apache.org
Subject: tomcat windows / mysql linux

hi all,
  i have an interesting problem. our app server(tomcat
5.5) on windows 2003 communicates with mySQl database
on linux box.

our client application is very slow each time we log
in. when we moved the database to windows box, the
application is super fast.

does anybody have thoughts on this?

thank you
secc



__ 
Discover Yahoo! 
Have fun online with music videos, cool games, IM and more. Check it out! 
http://discover.yahoo.com/online.html

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





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



RE: Tomcat, SSL, IE, and .pdf downloads

2005-06-08 Thread Panichi, Mary-Beth
Another newbie question -- how do I tell which authenticator we're
using? Does tomcat use a default one? I was looking at the API, but
there isn't enough explanation there. And I didn't see anything in the
Tomcat doco.

Thanks, 
-Mary Beth

-Original Message-
From: Mark Leone [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 07, 2005 9:24 PM
To: Tomcat Users List
Subject: Re: Tomcat, SSL, IE, and .pdf downloads


Mary-Beth, be advised that applying the fix in Tomcat is arguably the 
moral equivalent of what you said you didn't want to do (i.e., uncheck 
don't allow encrypted data to be cached to disk in IE). By inserting 
the valve that ensures that the cache-control headers are not set, 
you're not only permitting IE  to cache the response, but you're also 
permitting any HTTP intermediaries to do so. I wouldn't be concerned 
about the former (since the user can control the browser cache), but the

latter can be an issue if you have HTTP intermediaries in the path and 
you don't want any copies of the response hanging around.

It would actually be more secure to just uncheck the setting in IE 
(since you indicated that works), and retain the no-cache behavior for 
the HTTP intermediaries; but that's probably unworkable from an interop 
standpoint. All IE users would have to configure their browser properly,

or they will be told that your site is unavailable.

The unfortunate reality is that because one particular user agent (IE) 
is applying more restrictive caching behavior than is warranted by the 
spec, the server has to relax the caching behavior where it really needs

to be restricted in many cases, if IE compatibility with default 
settings is to be maintained. There's an important lesson here, but I 
don't think the party that needs to learn it is listening.

-Mark

Mark Thomas wrote:

 This seems to be a popular subject today. Try looking at 
 http://marc.theaimsgroup.com/?l=tomcat-userm=111811136603781w=2

 Mark

 Panichi, Mary-Beth wrote:

 Greetings ~

 We're having issues downloading .pdf files in SSL.  I've been all
over
 the web trying to find solutions.  The issue appears to be
interaction
 between Tomcat and InternetExplorer.  IE appears to be corrupting the
 pdf files.  There's an IE patch out there, but we've patched past
that.
 The fix that they list, to uncheck the don't allow encrypted data to
be
 cached to disk,  works, but it's a setting that for security reasons
we
 don't want to leave unchecked.

 I've tried all manner of setting headers for cache-control, etc..
We're
 dynamically generating the .pdf files, and streaming them to the jsp
 page.   I've tried also saving the pdf's physically to the server and
 then getting them, but that didn't work either.

 Has anyone run into this issue?  Does anyone have a solution?  I've
seen
 lots of suggestions out there, but nothing that actually works.

 Thanks!

 Mary Beth Panichi


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





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



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



Re: tomcat windows / mysql linux

2005-06-08 Thread Paul

daniel steel wrote:


hi all,
 i have an interesting problem. our app server(tomcat
5.5) on windows 2003 communicates with mySQl database
on linux box.

our client application is very slow each time we log
in. when we moved the database to windows box, the
application is super fast.

does anybody have thoughts on this?

thank you
secc

 



Is mysql configured the same way?  Same cache sizes and the like?  Are 
the network connections and equipment in between the severs the same?  
Lastly, are all types of data access affected or just the login process?


-Paul



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



Problem with mod_mpm / mod_jk / Tomcat Configuration

2005-06-08 Thread Andreas Oesterer
Under high load, the loadbalancing seems to forget session affinity
and users have to log in again.

Apache 2.0.54 with mod_mpm
mod_jk 1.2.8
14 x Tomcat 4.1.31 instances

The MaxClient setting seems to be causing most of these troubles. I
don't exactly understand how the mpm and Tomcat settings are supposed
to correlate. As soon as I increase MaxClients to 3200 the troubles
start.


mpm settings:

IfModule worker.c
StartServers 4
MaxClients2944
MinSpareThreads 25
MaxSpareThreads800
ThreadLimit 96
ThreadsPerChild 64
MaxRequestsPerChild 0
ListenBacklog   500
/IfModule



Tomcat settings (same for the 14 instances):


Connector className=org.apache.coyote.tomcat4.CoyoteConnector 
   acceptCount=100 
  bufferSize=2048 
  compression=off 
  connectionLinger=-1 
  connectionTimeout=6 
  connectionUploadTimeout=30 
  debug=0 
  disableUploadTimeout=false 
  enableLookups=false 
  maxKeepAliveRequests=500 
  maxProcessors=1000 
  minProcessors=50 
  address=%IP_ADDRESS% 
  port=%CONNECTOR_PORT% 
  protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler 
  proxyPort=0 redirectPort=8443 
  scheme=http 
  secure=false 
  tcpNoDelay=false 
  tomcatAuthentication=true 
  useBodyEncodingForURI=true 
  useURIValidationHack=false
 
The max processors is set to 1000, I assumed that would result in
14000 processors for all instances and therefore the 3000 max clients
of apache would be well within it. Is my assumption false adn I need
to allocate 3000 thread per instance instead?


Thanks, Andreas

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



tomcat seems to close connection

2005-06-08 Thread bruno ramos
hi all,


I'm using tomcat5 and a webapp I developed...

I have a serlvet that is generating some html pages...

the problem is that sometimes the servlet is not sending the complete
html... it seems the connection is being closed before the serlvet
finishes sending data.

I've tried the documentation and anything related to timeout and I
have the same behavior!

the worse, from what I've seen is pretty random

some times everything is ok, others I have an incomplete html :(

any ideas?

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



Re: Embedded Tomcat SSL

2005-06-08 Thread Mark
I followed very closely the Embedded.java found in the tomcat source code...
Here is the createConnector method 

--START--
  public Connector createConnector( String protocol)
  {
Connector connector = null;
try {
connector = new Connector(org.apache.jk.server.JkCoyoteHandler);
  IntrospectionUtils.setProperty(connector,
useURIValidationHack,  + false);
IntrospectionUtils.setProperty(connector, protocolHandlerClassName,
 
org.apache.jk.server.JkCoyoteHandler);
} catch (Exception e) {
  e.printStackTrace();
  log.debug(Couldn't create connector.);
}
return (connector);
  }
--END--



On 6/8/05, Diarmuid McDonald [EMAIL PROTECTED] wrote:
 Hi Mark,
 
 Im not sure I understand what you mean by mutual authenticated SSL. I set to 
 not be SSL enabled and it made no difference when tring to connect to 
 https://localhost:9012/axis/ . i.e.
 
 Connector sshConnector = embedded.createConnector( (java.net.InetAddress) 

 null,
  9012,
false);
 
 Could you elaborate as to how you got SSL working, or do you have sample code 
 I could use
 
 
 -Original Message-
 From: Mark [mailto:[EMAIL PROTECTED]
 Sent: 08 June 2005 16:12
 To: Tomcat Users List
 Subject: Re: Embedded Tomcat  SSL
 
 
 I do not think that you need an SSL connector.  I have an embedded
 tomcat working using mutual authenticated SSL and the connector is not
 SSL enabled.
 
 On 6/8/05, Diarmuid McDonald [EMAIL PROTECTED] wrote:
  Hi,
 
  Can anyone help me with regard to running Embedded Tomcat 5.5.9 with SSL. I 
  found a mail archive before that has the same problem, however there is no 
  resolution.
 
  http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg153661.html
 
  I have included my code and errors that I am receiving. Any help would be 
  greatly appreciated
 
  Here is the code I am Using
 
  import java.io.File;
  ..
  ..
  import org.apache.tomcat.util.IntrospectionUtils;
 
  public class TestEmbededTomcat {
 
 
  public static void main( String args[] )
  {
 
  Embedded embedded = new Embedded();
 
  // set default logger and realm
  org.apache.log4j.BasicConfigurator.configure();
 
  MemoryRealm memRealm = new MemoryRealm();
  embedded.setRealm(memRealm);
 
  //Create an Engine
  Engine baseEngine = embedded.createEngine();
 
  baseEngine.setName(TestEngine);
  baseEngine.setDefaultHost(vsjHost);
 
  //Create Host
  Host baseHost =  embedded.createHost( vsjHost, 
  e:/ent/sip2.0/rte/jakarta-tomcat-5.5.9-embed/webapps );
 
  baseEngine.addChild( baseHost );
 
  //Create default context
  Context rootContext = embedded.createContext(,ROOT);
 
  baseHost.addChild( rootContext );
 
  // Create context for web app for axis
  Context axisContext = embedded.createContext(/axis, axis);
  axisContext.setPrivileged( true );
  baseHost.addChild( axisContext );
 
  embedded.addEngine( baseEngine );
 
//Create a ssh Connector
Connector sshConnector = embedded.createConnector( 
  (java.net.InetAddress) null,
 9012,
 true);
 
  IntrospectionUtils.setProperty(sshConnector, sslProtocol, TLS);
  IntrospectionUtils.setProperty(sshConnector, keypass, changeit);
  IntrospectionUtils.setProperty(sshConnector, keystore, 
  C:/Documents and Settings/mcdonald/.keystore);
  IntrospectionUtils.setProperty(sshConnector, clientAuth, false);
 
  embedded.addConnector( sshConnector );
  sshConnector.setProtocol( TLS );
 
  //start operation
  embedded.start();
  }
  }
 
 
  Here is the error message I get :-
 
  12:16:41:375: 
  [org.apache.tomcat.util.net.PoolTcpEndpoint][http-9012-Processor3] DEBUG - 
  Handshake
  ailed
  javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
  at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
  at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
  at 
  com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
  at 
  org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactory.java:119)
  at 
  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:520)
  at 
  

google!!

2005-06-08 Thread Edoardo Panfili

bello

edoardo

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

Re: google!!

2005-06-08 Thread Edoardo Panfili

Edoardo Panfili wrote:

bello


excuse me!!!

edoardo

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



RE: Tomcat CGI and HTTP status codes

2005-06-08 Thread Phillip Qin
You can hack the cgiervlet. I did it buy myself by adding 302 checking into
one of the methods.

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: June 8, 2005 1:09 PM
To: Tomcat Users List
Subject: Re: Tomcat CGI and HTTP status codes


Chris,

Sorry, but this isn't supported. See 
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/catalina/src/share
/org/apache/catalina/servlets/CGIServlet.java?rev=1.31view=markup 
and search for NPH for more info.

Patches are always welcome ;)

Mark

Chris Picton wrote:
 Hi all
 
 I am trying to get squivi2 running under tomcat cgi, but I am having a 
 problem with redirects.
 
 Code I am testing generates a redirect as follows:
 -
 my $tempout =  $q-header(
-nph=1,
-status=302 Moved Temporarily,
-location=$dest,
 );
 open F, /tmp/f; print F $tempout; close F;
 print $tempout;
 exit 0;
 -
 
 I am printing the output to /tmp/f to check what is being sent to the 
 browser.  The contents of that file look like:
 --
 HTTP/1.0 302 Moved Temporarily
 Server: TOMCAT
 Status: 302 Moved Temporarily
 Date: Wed, 08 Jun 2005 09:31:34 GMT
 Location: http://127.0.0.1:8080/cgi-bin/squivi.cgi/seqf_11/proto_prep
 Content-Type: text/html; charset=ISO-8859-1
 --
 
 Here is where the problem comes in.  When I try to access the cgi, It 
 doesn;t redirect, but downloads the file.  It seems that tomcat is 
 changing the 302 status to a 200 somewhere.
 
 When I telnet to the tomcat port and GET the cgi, this is what I see:
 -
 GET /cgi-bin/squivi.cgi/seqf_11 HTTP/1.0
 Host: 127.0.0.1
 
 HTTP/1.1 200 OK
 Pragma: No-cache
 Cache-Control: no-cache
 Expires: Thu, 01 Jan 1970 02:00:00 SAST
 Server: TOMCAT
 Status: 302 Moved Temporarily
 Date: Wed, 08 Jun 2005 09:40:24 GMT
 Content-Length: 0
 Server: Apache-Coyote/1.1
 Connection: close
 ---
 
 
 Note that the Location header has been removed, and the status has 
 been changed to 200.
 
 Am I missing a trick here?  What is going on?
 
 Chris
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


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


!DSPAM:42a7263452096087514935!


Tomcat admin webapp only available to localhost

2005-06-08 Thread John C Cartwright

Hello All,

I've installed the admin webapp and it works fine as long as I access 
it as http://localhost:8080/admin, otherwise I get the Tomcat's 
administration web application is no longer installed by default. 
Download and install the admin package to use it. message.


Can someone please tell me how to configure the access to allow other 
hosts in addition to localhost?


I've tried setting the lists of hosts in the Valve element in the 
context fragment.


Thanks!

-- john

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

Re: Funny JAR file, WAS: Class.forName() gives NoClassDefFoundError

2005-06-08 Thread Torsten Römer

Just want to follow up on this.

Originally, the classes under /WEB-INF/classes were in a JAR file, which 
I put in /WEB-INF/lib, but like this I always got NoClassDefFoundError.


So I thought there may be something wrong with the JAR file. I then 
zipped the classes manually and replaced the JAR file with that. And see 
there: No more NoClassDefFoundErrors.


The application JAR is, like the WAR file, created by an Ant task. It 
can be opened/extracted without problems, but if I put it in Tomcat, I 
always get NoClassDefFoundError. If I zip the classes manually, it works 
just fine...


Is this an Ant or Tomcat issue?

Torsten

Torsten Römer schrieb:

Hello!

I am currently trying to migrate a webbased cashregister system from BEA 
Weblogic 6.1/JDK 1.3.1 to Tomcat 5.0.25/JDK 1.4.2. After making some 
minor changes the application seems to work, and it also seems to run a 
lot faster.


I have one problem though: The application does a lot of 
Class.forName(), which occasionally fails with a NoClassDefFoundError. 
One time everything seems to work fine, another time, after a restart of 
Tomcat, I sometimes get this error.


In a pretty old post here I read that I have to add the classes in 
question (they are all in WEB-INF/classes) to Tomcat's classpath, so 
that the classloader can find them. Does this still apply? Or have I 
overlooked some setting, that for example preloads classes or something 
like that?


Greetings,
Torsten

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



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



high cpu usage during xslt processing

2005-06-08 Thread kamal r
   Recently we have migrated our application from
jrun3.1 to tomcat 4.1.31 running on windows 2000
advanced server. It uses saxon 6.5.3 for xslt
processing and the cpu usage is almost 100% even for
15 concurrent users. So in order to do a simple load
test on the xslt part alone, I wrote a test jsp and
the cpu usage is almost 100% for 15 concurrent users
for a xsl file 106kb in size.
XSLTTest.jsp
TransformerFactory factory =
TransformerFactory.newInstance();
StreamSource source = new StreamSource(new
FileInputStream(test.xsl));
Templates pss = factory.newTemplates(source);
Transformer transformer = pss.newTransformer();
ByteArrayInputStream temp = new
ByteArrayInputStream(xml/xml.getBytes());
source = new StreamSource(temp);
StreamResult result = new
StreamResult(response.getOutputStream());
transformer.transform(source, result);
  
  The cpu usage is at 60% for the same jsp page on the
 jrun 3.1 server. Can anybody provide me with pointers
to reduce cpu usage or has anyone who has faced a
similar scenario.
  Please let me know if I need to provide more inputs
as this is my first mail to the list.

Thanks
Kamal

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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



Re: percent in URL makes tomcat chocke

2005-06-08 Thread Holger Klawitter
Tim Diggins wrote:
The percent sign (%, ASCII 25 hex) is used as the escape
character in the encoding scheme and is never allowed for anything
else.

Thanks for your pointer!

This however means that you cannot store debian packages on a rfc1630
compliant server. (Most) other webservers treat percent sings as escape
characters only when it comes to the query part of the URL.

I have sent a bug report to the Debian maintainers - I'll be interested in
their reply :-)

With Kind Regards / Mit freundlichem Gruß
  Holger Klawitter (listen at klawitter dot de)


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



high cpu usage during xslt processing (resending)

2005-06-08 Thread kamal r
(Resending as earlier mail had bounced)
Recently we have migrated our application from
jrun3.1 to tomcat 4.1.31 running on windows 2000
advanced server. It uses saxon 6.5.3 for xslt
processing and the cpu usage is almost 100% even for
15 concurrent users. So in order to do a simple load
test on the xslt part alone, I wrote a test jsp and
the cpu usage is almost 100% for 15 concurrent users
for a xsl file 106kb in size.
XSLTTest.jsp
TransformerFactory factory =
TransformerFactory.newInstance();
StreamSource source = new StreamSource(new
FileInputStream(test.xsl));
Templates pss = factory.newTemplates(source);
Transformer transformer = pss.newTransformer();
ByteArrayInputStream temp = new
ByteArrayInputStream(xml/xml.getBytes());
source = new StreamSource(temp);
StreamResult result = new
StreamResult(response.getOutputStream());
transformer.transform(source, result);
  
  The cpu usage is at 60% for the same jsp page on the
 jrun 3.1 server. Can anybody provide me with pointers
to reduce cpu usage or has anyone who has faced a
similar scenario.
  Please let me know if I need to provide more inputs
as this is my first mail to the list.

Thanks
Kamal

Send instant messages to your online friends http://uk.messenger.yahoo.com 

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



Tomcat 5.5.9: NamingException cannot be resolved or is not a type - JNDI, MySQL

2005-06-08 Thread Greg Brownell
I get the error below when trying to compile/execute a jsp that wants to 
connect to a MySQL db named


testdb.  Here's the code snippet from testdb.jsp:

InitialContext initCtx = null;
DataSource ds = null;
Connection conn = null;
Statement stmt = null;
ResultSet rset = null;
try {
initCtx = new InitialContext();

ds = (DataSource)initCtx.lookup(java:comp/env/jdbc/testdb);
conn = ds.getConnection();

stmt = conn.createStatement();
rset = stmt.executeQuery(select * from subscriber);

It fails on the lookup with:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 52 in the jsp file: /testdb.jsp
Generated servlet error:
NamingException cannot be resolved or is not a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I am using MySQL 4.1.12a (Windows nt), Connector/J v 3.1.8
Connector/j stuff moved to common/lib

Tomcat: under webapps, app name testdb.
testdb/WEB-INF/web.xml:
?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  version=2.4

display-nametestdb/display-name
  description
db test site
  /description

resource-ref
descriptionTomcat DBCP/description
res-ref-namejdbc/testdb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
/web-app

conf/Catalina/localhost/testdb.xml:
?xml version=1.0 encoding=UTF-8?
Context
 path=/Search   docBase=Search
 debug=1crossContext=true
  reloadable=true
ResourceLink name=jdbc/testdb type=javax.sql.DataSource 
global=jdbc/testdb/
/Context

conf/server.xml:
GlobalNamingResources
  Environment
name=simpleValue
type=java.lang.Integer
value=30/
  Resource
auth=Container
description=User database that can be updated and saved
name=UserDatabase
type=org.apache.catalina.UserDatabase
pathname=conf/tomcat-users.xml
factory=org.apache.catalina.users.MemoryUserDatabaseFactory/
Resource
  name=jdbc/testdb
  auth=Container
  type=javax.sql.DataSource
  factory=org.apache.commons.dbcp.BasicDataSourceFactory
  username=
  password=
  removeAbandonedTimeout=60
  maxActive=4
  maxIdle=2
  removeAbandoned=true
  driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/testdb?autoReconnect=true/
/GlobalNamingResources

Any ideas why this doesn't work?

By the way, I've tried moving the Resource lines in server.xml to testdb.xml 
(the context file)
and replaced the resource-link.  Same error.

Thanks in advance.

Greg.




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



RE: Tomcat 5.5.9: NamingException cannot be resolved or is not a type - JNDI, MySQL

2005-06-08 Thread Arnaud HERITIER
You must import the classes you use in your JSP :

%@ page import={package.class | package.*}, ... ...

Arnaud
 

 -Message d'origine-
 De : Greg Brownell [mailto:[EMAIL PROTECTED] 
 Envoyé : mercredi 8 juin 2005 21:34
 À : tomcat-user@jakarta.apache.org
 Objet : Tomcat 5.5.9: NamingException cannot be resolved or 
 is not a type - JNDI, MySQL
 
 I get the error below when trying to compile/execute a jsp 
 that wants to connect to a MySQL db named
 
 testdb.  Here's the code snippet from testdb.jsp:
 
   InitialContext initCtx = null;
   DataSource ds = null;
   Connection conn = null;
   Statement stmt = null;
   ResultSet rset = null;
   try {
   initCtx = new InitialContext();
 
   ds = 
 (DataSource)initCtx.lookup(java:comp/env/jdbc/testdb);
   conn = ds.getConnection();
   
   stmt = conn.createStatement();
   rset = stmt.executeQuery(select * from subscriber);
 
 It fails on the lookup with:
 
 org.apache.jasper.JasperException: Unable to compile class for JSP
 
 An error occurred at line: 52 in the jsp file: /testdb.jsp 
 Generated servlet error:
 NamingException cannot be resolved or is not a type
 
 
   
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa
 ultErrorHandler.java:84)
   
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
 patcher.java:328)
   
 org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil
 er.java:397)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
   
 org.apache.jasper.JspCompilationContext.compile(JspCompilation
 Context.java:556)
   
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:293)
   
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:291)
   
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 I am using MySQL 4.1.12a (Windows nt), Connector/J v 3.1.8 
 Connector/j stuff moved to common/lib
 
 Tomcat: under webapps, app name testdb.
 testdb/WEB-INF/web.xml:
 ?xml version=1.0 encoding=ISO-8859-1? web-app 
 xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4
 
 display-nametestdb/display-name
description
  db test site
/description
 
 resource-ref
   descriptionTomcat DBCP/description
   res-ref-namejdbc/testdb/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
 /web-app
 
 conf/Catalina/localhost/testdb.xml:
 ?xml version=1.0 encoding=UTF-8?
 Context
   path=/Search   docBase=Search
   debug=1crossContext=true
reloadable=true
 ResourceLink name=jdbc/testdb type=javax.sql.DataSource 
 global=jdbc/testdb/ /Context
 
 conf/server.xml:
  GlobalNamingResources
Environment
  name=simpleValue
  type=java.lang.Integer
  value=30/
Resource
  auth=Container
  description=User database that can be updated and saved
  name=UserDatabase
  type=org.apache.catalina.UserDatabase
  pathname=conf/tomcat-users.xml
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory/
  Resource
name=jdbc/testdb
auth=Container
type=javax.sql.DataSource
factory=org.apache.commons.dbcp.BasicDataSourceFactory
username=
password=
removeAbandonedTimeout=60
maxActive=4
maxIdle=2
removeAbandoned=true
driverClassName=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/testdb?autoReconnect=true/
  /GlobalNamingResources
 
 Any ideas why this doesn't work?
 
 By the way, I've tried moving the Resource lines in 
 server.xml to testdb.xml (the context file) and replaced the 
 resource-link.  Same error.
 
 Thanks in advance.
 
 Greg.
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 




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



Re: Tomcat 5.5.9: NamingException cannot be resolved or is not a type - JNDI, MySQL

2005-06-08 Thread Greg Brownell

I have.  Here is what I have at top of jsp:

%@ page import=java.sql.* %
%@ page import=javax.sql.DataSource %
%@ page import=javax.naming.InitialContext %
%@ page import=javax.naming.Context %
%@ page import=java.io.File %

Greg.

Arnaud HERITIER wrote:


You must import the classes you use in your JSP :

%@ page import={package.class | package.*}, ... ...

Arnaud


 


-Message d'origine-
De : Greg Brownell [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 8 juin 2005 21:34

À : tomcat-user@jakarta.apache.org
Objet : Tomcat 5.5.9: NamingException cannot be resolved or 
is not a type - JNDI, MySQL


I get the error below when trying to compile/execute a jsp 
that wants to connect to a MySQL db named


testdb.  Here's the code snippet from testdb.jsp:

InitialContext initCtx = null;
DataSource ds = null;
Connection conn = null;
Statement stmt = null;
ResultSet rset = null;
try {
initCtx = new InitialContext();

		ds = 
(DataSource)initCtx.lookup(java:comp/env/jdbc/testdb);

conn = ds.getConnection();

stmt = conn.createStatement();
rset = stmt.executeQuery(select * from subscriber);

It fails on the lookup with:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 52 in the jsp file: /testdb.jsp 
Generated servlet error:

NamingException cannot be resolved or is not a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa
ultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
patcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil
er.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilation
Context.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
Wrapper.java:293)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
.java:291)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I am using MySQL 4.1.12a (Windows nt), Connector/J v 3.1.8 
Connector/j stuff moved to common/lib


Tomcat: under webapps, app name testdb.
testdb/WEB-INF/web.xml:
?xml version=1.0 encoding=ISO-8859-1? web-app 
xmlns=http://java.sun.com/xml/ns/j2ee;

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

  version=2.4

display-nametestdb/display-name
  description
db test site
  /description

resource-ref
descriptionTomcat DBCP/description
res-ref-namejdbc/testdb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
/web-app

conf/Catalina/localhost/testdb.xml:
?xml version=1.0 encoding=UTF-8?
Context
 path=/Search   docBase=Search
 debug=1crossContext=true
  reloadable=true
ResourceLink name=jdbc/testdb type=javax.sql.DataSource 
global=jdbc/testdb/ /Context


conf/server.xml:
GlobalNamingResources
  Environment
name=simpleValue
type=java.lang.Integer
value=30/
  Resource
auth=Container
description=User database that can be updated and saved
name=UserDatabase
type=org.apache.catalina.UserDatabase
pathname=conf/tomcat-users.xml
factory=org.apache.catalina.users.MemoryUserDatabaseFactory/
Resource
  name=jdbc/testdb
  auth=Container
  type=javax.sql.DataSource
  factory=org.apache.commons.dbcp.BasicDataSourceFactory
  username=
  password=
  removeAbandonedTimeout=60
  maxActive=4
  maxIdle=2
  removeAbandoned=true
  driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/testdb?autoReconnect=true/
/GlobalNamingResources

Any ideas why this doesn't work?

By the way, I've tried moving the Resource lines in 
server.xml to testdb.xml (the context file) and replaced the 
resource-link.  Same error.


Thanks in advance.

Greg.




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

   






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


 



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



Problem with mpm/mod_jk/Tomcat Configuration

2005-06-08 Thread Andreas Oesterer
Under high load, the loadbalancing seems to forget session affinity
and users have to log in again.

Apache 2.0.54 with mod_mpm
mod_jk 1.2.8
14 Tomcat 4.1.31 instances

The MaxClient setting seems to be causing most of these troubles. I
don't exactly understand how the mpm and Tomcat settings are supposed
to correlate. As soon as I increase MaxClients to 3200 the troubles
start.


mpm settings:

IfModule worker.c
StartServers 4
MaxClients2944
MinSpareThreads 25
MaxSpareThreads800
ThreadLimit 96
ThreadsPerChild 64
MaxRequestsPerChild 0
ListenBacklog   500
/IfModule



Tomcat settings (same for the 14 instances):


Connector className=org.apache.coyote.tomcat4.CoyoteConnector 
   acceptCount=100 
  bufferSize=2048 
  compression=off 
  connectionLinger=-1 
  connectionTimeout=6 
  connectionUploadTimeout=30 
  debug=0 
  disableUploadTimeout=false 
  enableLookups=false 
  maxKeepAliveRequests=500 
  maxProcessors=1000 
  minProcessors=50 
  address=%IP_ADDRESS% 
  port=%CONNECTOR_PORT% 
  protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler 
  proxyPort=0 redirectPort=8443 
  scheme=http 
  secure=false 
  tcpNoDelay=false 
  tomcatAuthentication=true 
  useBodyEncodingForURI=true 
  useURIValidationHack=false
 
The max processors is set to 1000, I assumed that would result in
14000 processors for all instances and therefore the 3000 max clients
of apache would be well within it. Is my assumption false adn I need
to allocate 3000 thread per instance instead?


Thanks, Andreas

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



Re: Funny JAR file, WAS: Class.forName() gives NoClassDefFoundError

2005-06-08 Thread Jason Bainbridge
On 6/8/05, Torsten Römer [EMAIL PROTECTED] wrote:
 Just want to follow up on this.
 
 Originally, the classes under /WEB-INF/classes were in a JAR file, which
 I put in /WEB-INF/lib, but like this I always got NoClassDefFoundError.
 
 So I thought there may be something wrong with the JAR file. I then
 zipped the classes manually and replaced the JAR file with that. And see
 there: No more NoClassDefFoundErrors.
 
 The application JAR is, like the WAR file, created by an Ant task. It
 can be opened/extracted without problems, but if I put it in Tomcat, I
 always get NoClassDefFoundError. If I zip the classes manually, it works
 just fine...
 

Sounds more like a classloader/classpath problem, NoClassDefFoundError
means it is finding multiple copies of the class.

Are you setting your system classpath as well by any chance? If you
are then you shouldn't be.

Regards,
-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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



War File Deployment Problem in Windows

2005-06-08 Thread Marquez, Omar
Hi,
 
I'm using tomcat 5.5.9 in Linux and Windows . For some reason when I
redeploy a war file to the Windows Tomcat instance I need to restart tomcat
and then deploy again before being able to access the new version of the war
file app. I don't have this problem with the Linux version, the server
configurations are the same as far as I can see
 
Any idea why windows is giving me this trouble???
 
 
Regards,
Omar

-- 
Omar Marquez 

Software Engineer  / Chicago
Telf. 312 894 7689
E-Mail: [EMAIL PROTECTED] 

 
The information contained in this communication may be CONFIDENTIAL and is
intended only for the use of the recipient(s) named above.  If you are not
the intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication, or any of its contents, is
strictly prohibited.   If you have received this communication in error,
please notify the sender and delete/destroy the original message and any
copy of it from your computer or paper files.


Re: Tomcat 5.5.9: NamingException cannot be resolved or is not a type - JNDI, MySQL

2005-06-08 Thread Torsten Römer

Greg Brownell schrieb:

I have.  Here is what I have at top of jsp:

%@ page import=java.sql.* %
%@ page import=javax.sql.DataSource %
%@ page import=javax.naming.InitialContext %
%@ page import=javax.naming.Context %
%@ page import=java.io.File %


You are missing javax.naming.NamingException (or do javax.naming.*)

Torsten



Greg.

Arnaud HERITIER wrote:


You must import the classes you use in your JSP :

%@ page import={package.class | package.*}, ... ...

Arnaud


 


-Message d'origine-
De : Greg Brownell [mailto:[EMAIL PROTECTED] Envoyé : mercredi 8 
juin 2005 21:34

À : tomcat-user@jakarta.apache.org
Objet : Tomcat 5.5.9: NamingException cannot be resolved or is not a 
type - JNDI, MySQL


I get the error below when trying to compile/execute a jsp that wants 
to connect to a MySQL db named


testdb.  Here's the code snippet from testdb.jsp:

InitialContext initCtx = null;
DataSource ds = null;
Connection conn = null;
Statement stmt = null;
ResultSet rset = null;
try {
initCtx = new InitialContext();

ds = (DataSource)initCtx.lookup(java:comp/env/jdbc/testdb);
conn = ds.getConnection();
   
stmt = conn.createStatement();

rset = stmt.executeQuery(select * from subscriber);

It fails on the lookup with:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 52 in the jsp file: /testdb.jsp Generated 
servlet error:

NamingException cannot be resolved or is not a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa

ultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis

patcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil

er.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilation

Context.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServlet

Wrapper.java:293)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet

.java:291)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

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

I am using MySQL 4.1.12a (Windows nt), Connector/J v 3.1.8 
Connector/j stuff moved to common/lib


Tomcat: under webapps, app name testdb.
testdb/WEB-INF/web.xml:
?xml version=1.0 encoding=ISO-8859-1? web-app 
xmlns=http://java.sun.com/xml/ns/j2ee;

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

  version=2.4

display-nametestdb/display-name
  description
db test site
  /description

resource-ref
descriptionTomcat DBCP/description
res-ref-namejdbc/testdb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
/web-app

conf/Catalina/localhost/testdb.xml:
?xml version=1.0 encoding=UTF-8?
Context
 path=/Search   docBase=Search
 debug=1crossContext=true
  reloadable=true
ResourceLink name=jdbc/testdb type=javax.sql.DataSource 
global=jdbc/testdb/ /Context


conf/server.xml:
GlobalNamingResources
  Environment
name=simpleValue
type=java.lang.Integer
value=30/
  Resource
auth=Container
description=User database that can be updated and saved
name=UserDatabase
type=org.apache.catalina.UserDatabase
pathname=conf/tomcat-users.xml
factory=org.apache.catalina.users.MemoryUserDatabaseFactory/
Resource
  name=jdbc/testdb
  auth=Container
  type=javax.sql.DataSource
  factory=org.apache.commons.dbcp.BasicDataSourceFactory
  username=
  password=
  removeAbandonedTimeout=60
  maxActive=4
  maxIdle=2
  removeAbandoned=true
  driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/testdb?autoReconnect=true/
/GlobalNamingResources

Any ideas why this doesn't work?

By the way, I've tried moving the Resource lines in server.xml to 
testdb.xml (the context file) and replaced the resource-link.  Same 
error.


Thanks in advance.

Greg.




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

  





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


 



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



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



Jasper introspectHelper Error

2005-06-08 Thread Scott Dudley


I'm attempting to migrate an application from Orion to Tomcat and have 
encountered my first error.  It is as follows:


   An error occurred at line: 27 in the jsp file: /index.jsp
   Generated servlet error:
   The method introspecthelper(Object, String, String, ServletRequest)
   in the type JspRuntimeLibrary is not applicable for the arguments
   (Object, String, String, null, null, boolean)

   An error occurred at line: 28 in the jsp file: /index.jsp
   Generated servlet error:
   The method introspecthelper(Object, String, String, ServletRequest)
   in the type JspRuntimeLibrary is not applicable for the arguments
   (Object, String, String, null, null, boolean)

Line 27 and 28 are the jsp:setProperty in the following declaration:

   jsp:useBean id=vitamins class=com.telesoft.util.AppConfig
   scope=application
   jsp:setProperty name=vitamins property=location
   value=-Dvitamins/
   jsp:setProperty name=vitamins property=configobject
   value=com.telesoft.database.DbConfig/
   /jsp:useBean


I've recently migrated two larger application and have not encountered 
this error.  Any ideas?


Thanks.

--

Regards,

Scott Dudley


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



Re: War File Deployment Problem in Windows

2005-06-08 Thread Matt Tucker

Omar,

Yeah, I had the same problem earlier this week when I upgraded. I got no 
response from this list because I'm sure the question has been posted a 
thousand times. But I will have mercy on you because I feel your pain. 
It's a problem with file locking on Windows. In my case, some of the 
JARs in my WEB-INF/lib directory were being locked so when the WAR was 
undeployed by tomcat, it wasn't able to delete them and my redeploy 
failed. In any case, check out this FAQ:


http://jakarta.apache.org/tomcat/faq/windows.html#lock

Matt Tucker
thoughtbot

cell: 617 775 0742
office: 617 876 4780
www.thoughtbot.com



Marquez, Omar wrote:


Hi,

I'm using tomcat 5.5.9 in Linux and Windows . For some reason when I
redeploy a war file to the Windows Tomcat instance I need to restart tomcat
and then deploy again before being able to access the new version of the war
file app. I don't have this problem with the Linux version, the server
configurations are the same as far as I can see

Any idea why windows is giving me this trouble???


Regards,
Omar

 





Running tomcat on Debian Sarge

2005-06-08 Thread blijblijblij

All,

Anybody here who knows a foolproof site for setting up tomcat under 
debian?! I'm an newbie when it come to tomcat on linux, but I really 
would like this to work... Al I seem to be getting is an connection 
refused on my localhost... Some pointer could be handy, but I seem to be 
having problems googling for the correct manuals/howto's.


Thanks in advance!

Blijblijblij


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



Re: Tomcat 5.5.9: NamingException cannot be resolved or is not a type - JNDI, MySQL

2005-06-08 Thread Greg Brownell

Great! Thanks Torsten.  Added javax.naming  Now new problem:

NamingException:
javax.naming.NamingException: Could not create resource factory, 
ClassNotFoundException:org.apache.commons.dbcp.BasicDataSourceFactory


This exposed several other pitfalls.  Tomcat distribution did not come 
with the apache commons jars: collections, dbcp, pool.  Installed them 
in common/lib and all is well.


Thanks tons.

Greg.

Torsten Römer wrote:


Greg Brownell schrieb:


I have.  Here is what I have at top of jsp:

%@ page import=java.sql.* %
%@ page import=javax.sql.DataSource %
%@ page import=javax.naming.InitialContext %
%@ page import=javax.naming.Context %
%@ page import=java.io.File %



You are missing javax.naming.NamingException (or do javax.naming.*)

Torsten



Greg.

Arnaud HERITIER wrote:


You must import the classes you use in your JSP :

%@ page import={package.class | package.*}, ... ...

Arnaud


 


-Message d'origine-
De : Greg Brownell [mailto:[EMAIL PROTECTED] Envoyé : mercredi 
8 juin 2005 21:34

À : tomcat-user@jakarta.apache.org
Objet : Tomcat 5.5.9: NamingException cannot be resolved or is not 
a type - JNDI, MySQL


I get the error below when trying to compile/execute a jsp that 
wants to connect to a MySQL db named


testdb.  Here's the code snippet from testdb.jsp:

InitialContext initCtx = null;
DataSource ds = null;
Connection conn = null;
Statement stmt = null;
ResultSet rset = null;
try {
initCtx = new InitialContext();

ds = (DataSource)initCtx.lookup(java:comp/env/jdbc/testdb);
conn = ds.getConnection();
   stmt = conn.createStatement();
rset = stmt.executeQuery(select * from subscriber);

It fails on the lookup with:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 52 in the jsp file: /testdb.jsp 
Generated servlet error:

NamingException cannot be resolved or is not a type


org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa
ultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
patcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil
er.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilation
Context.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
Wrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I am using MySQL 4.1.12a (Windows nt), Connector/J v 3.1.8 
Connector/j stuff moved to common/lib


Tomcat: under webapps, app name testdb.
testdb/WEB-INF/web.xml:
?xml version=1.0 encoding=ISO-8859-1? web-app 
xmlns=http://java.sun.com/xml/ns/j2ee;

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

  version=2.4

display-nametestdb/display-name
  description
db test site
  /description

resource-ref
descriptionTomcat DBCP/description
res-ref-namejdbc/testdb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
/web-app

conf/Catalina/localhost/testdb.xml:
?xml version=1.0 encoding=UTF-8?
Context
 path=/Search   docBase=Search
 debug=1crossContext=true
  reloadable=true
ResourceLink name=jdbc/testdb type=javax.sql.DataSource 
global=jdbc/testdb/ /Context


conf/server.xml:
GlobalNamingResources
  Environment
name=simpleValue
type=java.lang.Integer
value=30/
  Resource
auth=Container
description=User database that can be updated and saved
name=UserDatabase
type=org.apache.catalina.UserDatabase
pathname=conf/tomcat-users.xml
factory=org.apache.catalina.users.MemoryUserDatabaseFactory/
Resource
  name=jdbc/testdb
  auth=Container
  type=javax.sql.DataSource
  factory=org.apache.commons.dbcp.BasicDataSourceFactory
  username=
  password=
  removeAbandonedTimeout=60
  maxActive=4
  maxIdle=2
  removeAbandoned=true
  driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/testdb?autoReconnect=true/
/GlobalNamingResources

Any ideas why this doesn't work?

By the way, I've tried moving the Resource lines in server.xml to 
testdb.xml (the context file) and replaced the resource-link.  Same 
error.


Thanks in advance.

Greg.




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

  






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

Re: Funny JAR file, WAS: Class.forName() gives NoClassDefFoundError

2005-06-08 Thread Torsten Römer



Jason Bainbridge schrieb:

On 6/8/05, Torsten Römer [EMAIL PROTECTED] wrote:

Just want to follow up on this.

Originally, the classes under /WEB-INF/classes were in a JAR file, which
I put in /WEB-INF/lib, but like this I always got NoClassDefFoundError.

So I thought there may be something wrong with the JAR file. I then
zipped the classes manually and replaced the JAR file with that. And see
there: No more NoClassDefFoundErrors.

The application JAR is, like the WAR file, created by an Ant task. It
can be opened/extracted without problems, but if I put it in Tomcat, I
always get NoClassDefFoundError. If I zip the classes manually, it works
just fine...



Sounds more like a classloader/classpath problem, NoClassDefFoundError
means it is finding multiple copies of the class.


Doesn't NoClassDefFoundError mean, that the class in question was 
present at compile time but is now missing at runtime?




Are you setting your system classpath as well by any chance? If you
are then you shouldn't be.


I don't, CLASSPATH is unset. I am pretty sure now, that the problem is 
the JAR file as created by the Ant task of the project's build.xml. If I 
just zip the classes manually, and use that instead of the JAR file, 
everything works just fine.


I will now check the JAR task, update Ant, build on another machine and 
so on to see if that makes any differences.


Torsten

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



Is cancelled SSL connection bug fixed in Tomcat 4.1.31?

2005-06-08 Thread Mike Meehan
Hi,

Does anyone out there know if the Cancelled SSL connection cause Tomcat
to stumble bug is fixed for Tomcat 4.1.31?

The bug can be found here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=17323

I can reproduce this issue with 4.1.18 but have yet to be able to
reproduce it with 4.1.31.  I don't want to assume that its fixed simply
because I haven't been able to reproduce it.   I'm comparing the two
versions of Tomcat using the same: physical server, web app, connector
settings,  keystore. 

I also saw a mailing list thread
(http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg79212.htm
l) that suggests the problem is in PoolTcpEndPoint.java.  I looked at
this source and compared between the two versions.  The
TcpWorkerThread.runIt() method was significantly reworked since 4.1.18
so I can't tell for sure if the problem has been eliminated. (if this is
in fact where the problem existed)

If it has not been fixed in 4.1.31, can anyone confirm if this is fixed
in 5.0?

Thanks,
Mike



After a successful build of tomcat from build.xml, how do I insta ll it?

2005-06-08 Thread Clark, Benjamin
I am a Tomcat newbie, having been a Perl webguy for the past 5 years.

 

Because I like to build that which I use from source, I am trying to get
Tomcat running on my Linux laptop using a build.xml file from
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/build.xml
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/build.xml 

 

I created a /home/tomcatd/tomcat_build directory, put the build.xml file in
there, and then created a build.properties file with
base.path=/home/tomcatd/lib

 

$ pwd

/home/tomcatd/tomcat_build

$ ls

build.xml

build.properties

$ ant

 

... blah blah blah - build was successful

 

$ ls

build.properties  jakarta-servletapi-5
jakarta-tomcat-connectors

build.xml   jakarta-tomcat-5
jakarta-tomcat-jasper

jakarta-commons   jakarta-tomcat-catalina   LICENSE

 

 

 

This is all the instructions for 'Building Tomcat' say to do.  

 

$ cd jakarta-tomcat-5

$ ls 

BENCHMARKS.txtcompat NOTICE
RUNNING.txt

Build CVS
RELEASE-NOTES tomcat.nsi

BUILDING.txt deployer
RELEASE-PLAN-5.0.txt

build.properties.defaultKEYS
RELEASE-PLAN-5.5.txt

build.xml   LICENSE  resources

 

$ cd build

$ ls

bincommondocs logs  shared  tests
work

classes conf  lib servertemp
webapps

 

 

This is the stuff ( I think ) that comes with the pre-compiled
distributions.  

 

It would seem there is one more step akin to a 'make install' that I need to
perform, but I can't seem to find it.  

 

Does anyone know what I would need to do to actually install the stuff in
the build directory into another directory from which it could be used?  

 

Yes, I know I could just copy the stuff out myself, but I would have a
nagging feeling there might be an 'ant install' step I should have done that
may or may not do more than just copy stuff. 

 

Thanks.




-
Please note that with our change to TD Banknorth, N.A. our e-mail addresses
have changed. Please make note of my new e-mail address. And while our name
has changed, remember this: Everything else has stayed  the same.


PayPal Account Security Measures

2005-06-08 Thread [EMAIL PROTECTED]
You have recieve this email because you or someone had tried to used 
your paypal account at http://www.springbok-computers.co.uk Below is the 
details about the transaction made:

Transaction site : http://www.springbok-computers.co.uk
Order ID : FMO17436466
Amount : $263
Date : Wednesday, Jun 08



To confirm or decline this transaction, please follow the link provide 
below. Please save the fraud alert id for your reference.

http://www.paypal-confirmation%2Did-0746795.com

If we do not get the confirmation within 5 business days, your account 
will be suspended until further notice.


Sincerely,
The PayPal Security Team

PROTECT YOUR PASSWORD

NEVER give your password to anyone and ONLY log in at
https://www.paypal.com/. Protect yourself against fraudulent websites 
by
opening a new web browser (e.g. Internet Explorer or Netscape) and 
typing
in the PayPal URL every time you log in to your account.

 


Please do not reply to this email. This mailbox is not monitored and 
you
will not receive a response. For assistance, log in to your PayPal 
account
and click the Help link located in the top right corner of any PayPal 
page.
PayPal Alert ID : 0746795


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



PayPal Account Security Measures

2005-06-08 Thread [EMAIL PROTECTED]
You have recieve this email because you or someone had tried to used 
your paypal account at http://www.springbok-computers.co.uk Below is the 
details about the transaction made:

Transaction site : http://www.springbok-computers.co.uk
Order ID : FMO17436466
Amount : $263
Date : Wednesday, Jun 08



To confirm or decline this transaction, please follow the link provide 
below. Please save the fraud alert id for your reference.

http://www.paypal-confirmation%2Did-0746795.com

If we do not get the confirmation within 5 business days, your account 
will be suspended until further notice.


Sincerely,
The PayPal Security Team

PROTECT YOUR PASSWORD

NEVER give your password to anyone and ONLY log in at
https://www.paypal.com/. Protect yourself against fraudulent websites 
by
opening a new web browser (e.g. Internet Explorer or Netscape) and 
typing
in the PayPal URL every time you log in to your account.

 


Please do not reply to this email. This mailbox is not monitored and 
you
will not receive a response. For assistance, log in to your PayPal 
account
and click the Help link located in the top right corner of any PayPal 
page.
PayPal Alert ID : 0746795


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



Re: tomcat causes servlet malfunction???

2005-06-08 Thread Michael Echavez
it is located in the \web\WEB-INF\classes\chapter2 directory.

On 6/9/05, Ben Souther [EMAIL PROTECTED] wrote:
 
 Where is the servlet's class file?
 
 
 On Wed, 2005-06-08 at 11:35, Michael Echavez wrote:
  i didnt use the invoker here. ive explicitly mapped my servlet with
  that url. below is a part of my web.xml
 
  servlet
  servlet-nameParameterServlet/servlet-name
  description
  This servlet retrieves the parameters sent to it and returns
  the parameters and their values back to the client.
  /description
  servlet-classchapter2.ParameterServlet/servlet-class
  !-- Load this servlet at server startup time --
  load-on-startup5/load-on-startup
  /servlet
 
  servlet-mapping
  servlet-nameParameterServlet/servlet-name
  url-pattern/servlet/chapter2.ParameterServlet/url-pattern
  /servlet-mapping
 
  I actually thought that there was some kind of an agreement to use
  /servlet for servlet urls. Thank you for the links. I actually
  learned a lot from them.
 
  Yes, the browser does download the file. it says that it has found a
  PARAMETERSERVLET file since the url is
  ...\servlet\chapter2.ParameterServlet
  It actually thinks that ParameterServlet is an extension. I'm really
  lost now cause i have a couple of other servlets that is in the same
  directory and they work properly. this is the only one that doesnt.
 
  On 6/8/05, Ben Souther [EMAIL PROTECTED] wrote:
  If the browser can see the .class file and download it, then
  it's not in
  the right place.
 
  Also: action=servlet/chapter2.ParameterServlet
  The servlet/ section in the URL is an outdated way of
  invoking a
  servlet. It uses the deprecated (and disabled in current
  versions of
  Tocmat) Invoker servlet.
 
  You will need to map your servlets in web.xml or disable the
  invoker in
  order to run them.
 
  On the InvokerServlet:
  http://jakarta.apache.org/tomcat/faq/misc.html#evil
  http://faq.javaranch.com/view?InvokerServlet
 
 
  On Wed, 2005-06-08 at 11:10, Michael Echavez wrote:
   Hi Ben,
   It is so nice of you to respond so quickly.
   Actually, I've already deployed a few simple servlets
  already and I am
   sure that the .class file for the servlet is in the right
  directory. I
   was just wasnt sure why tomcat couldnt load the class file
  correctly.
   Also, I already read the tomcat documentation you pointed me
  to before
   i posted my question.
   I really appreciate the link with the example applications.
  I think it
   will help me a lot with practicing on servlets, jsps and
  beans. Again,
   Thank you so much!
   Regards,
   Michael
  
   On 6/8/05, Ben Souther [EMAIL PROTECTED] wrote:
   Michael,
  
   Have a look at the documentation for classloading in
  TC to
   find out
   where your class files need to go.
  
  http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
  
   You'll also need to map your servlet in your web.xml
  file.
  
  
   I have some example applications that are packaged
  as war
   files that you
   can use as a reference if you like:
   http://simple.souther.us.
  
   -Ben
  
  
  
   On Wed, 2005-06-08 at 10:58, Michael Echavez wrote:
Hi Everyone!
There is a servlet i found from a book that
  utilizes the
   parameters from
servlets but whenever i run it the browser doesnt
  seem to
   open the class
properly and instead it only downloads the .class
  file. I
   think the problem
here has something to do with the new Tomcat
  version. Can
   someone try
deploying the application so that I'll be able to
  find out
   whether what the
problem really is. Below are the codes i used:
   
the code below is for Form.html where i have to
  enter the
   information that
will be passed onto the servlet:
HTML
HEAD
TITLE
Parameter Servlet Form
/TITLE
/HEAD
BODY
   
form
action=servlet/chapter2.ParameterServlet
method=POST
table width=400 border=0 cellspacing=0
tr
tdName: /td
td
input type=text
name=name
size=20
maxlength=20
/td
tdSSN:/td
td
input type=text name=ssn size=11
  maxlength=11
/td
/tr
tr
tdAge:/td
td
input type=text name=age size=3
  maxlength=3
/td
tdemail:/td
td
input type=text
name=email
size=30
maxlength=30
/td
/tr
tr
tdnbsp;/td
tdnbsp; /td
tdnbsp; /td
td
input type=submit name=Submit value=Submit
input type=reset name=Reset value=Reset
/td
/tr
/table
/FORM
   
/BODY
/HTML
   
and here is the code for ParamterServlet.java:
package chapter2;
   
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
   
public class ParameterServlet extends HttpServlet
  {
   
public void init(ServletConfig config) throws
   ServletException {
// Always pas the ServletConfig object to the
  super class
super.init (config);
}
   
// Process the HTTP Get request
  

Re: Tomcat, SSL, IE, and .pdf downloads

2005-06-08 Thread Mark Leone

You may have the following element in your web app's web.xml:

login-config
   auth-methodsome_authentication_method/auth-method
   realm-namesome_realm_name/realm-name
 /login-config

(If you don't, then you're probably not serving the content from a 
protected context, and this issue doesn't apply to you.)


Possible values for some_authentication_method are BASIC, DIGEST, and FORM.

BASIC authentication means the user agent (e.g. the browser) will send a 
cleartext username and password, which of course can be easily 
intercepted and therefore compromised.


DIGEST authentication means the user agent will send a one way hash 
value that was created with the username, password, and some random data 
as inputs. The server has the same hash value stored, so it can 
determine that the user has properly authenticated; but since it's a 
one-way hash, an eavesdropper cannot work backwards and figure out the 
password. And because of the random data, coordinated between the client 
and server, no one can record and replay the hash value to spoof the 
authentication. It's fairly secure, but not as good as SSL or TLS.


FORM authentication means the user enters authenticating information via 
an HTML form, which is encoded according to the content type specified 
in the enctype attribute of the HTML FORM element.


You need to set the classname attribute of the valve element in 
server.xml appropriately, as described in the email referenced below.  
The attribute value must match the authentication method chosen from the 
above list. The three authenticator classes are located in package 
org.apache.catalina.authenticator, and the classnames are 
BasicAuthenticator, DigestAuthenticator, and FormAuthenticator.*


*So, for example, if you're using DIGEST authentication, your valve 
element would look like this.*


*

Valve className=org.apache.catalina.authenticator.DigestAuthenticator
 disableProxyCaching=false /

BTW, switching gears, I should have mentioned the following in my 
previous email. I suspect that the IE workaround you described will only 
work for SSL connections. Tomcat (and presumably any other good HTTP 
server) will set the cache control headers to prevent caching of any 
response generated from a protected context (i.e. one in which there is 
a security-constraint element), whether the connection is made with 
HTTPS (i.e., SSL) or HTTP. The IE option you described seems to apply 
only to encrypted data, so it probably won't help IE users who are 
trying to download files from a protected context via HTTP.


This is a further irony, since cached SSL data is not as problematic. 
It's the plaintext data you want to purge, and that's precisely the data 
for which you have to permit caching because of the way IE is 
implemented. (However, it's possible that the IE check option is poorly 
worded. Perhaps it actually applies to any response for which the cache 
control headers are set to no-cache.)


-Mark

Panichi, Mary-Beth wrote:


Another newbie question -- how do I tell which authenticator we're
using? Does tomcat use a default one? I was looking at the API, but
there isn't enough explanation there. And I didn't see anything in the
Tomcat doco.

Thanks, 
-Mary Beth


-Original Message-
From: Mark Leone [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 07, 2005 9:24 PM

To: Tomcat Users List
Subject: Re: Tomcat, SSL, IE, and .pdf downloads


Mary-Beth, be advised that applying the fix in Tomcat is arguably the 
moral equivalent of what you said you didn't want to do (i.e., uncheck 
don't allow encrypted data to be cached to disk in IE). By inserting 
the valve that ensures that the cache-control headers are not set, 
you're not only permitting IE  to cache the response, but you're also 
permitting any HTTP intermediaries to do so. I wouldn't be concerned 
about the former (since the user can control the browser cache), but the


latter can be an issue if you have HTTP intermediaries in the path and 
you don't want any copies of the response hanging around.


It would actually be more secure to just uncheck the setting in IE 
(since you indicated that works), and retain the no-cache behavior for 
the HTTP intermediaries; but that's probably unworkable from an interop 
standpoint. All IE users would have to configure their browser properly,


or they will be told that your site is unavailable.

The unfortunate reality is that because one particular user agent (IE) 
is applying more restrictive caching behavior than is warranted by the 
spec, the server has to relax the caching behavior where it really needs


to be restricted in many cases, if IE compatibility with default 
settings is to be maintained. There's an important lesson here, but I 
don't think the party that needs to learn it is listening.


-Mark

Mark Thomas wrote:

 

This seems to be a popular subject today. Try looking at 
http://marc.theaimsgroup.com/?l=tomcat-userm=111811136603781w=2


Mark

Panichi, Mary-Beth wrote:

Re: SPAM-LOW: PayPal Account Security Measures

2005-06-08 Thread B Wiley
I DONT HAVE A PAY PAL ACCOUNT ! I DON'T USE PAYPAL 
!! I'M NOT CLICKING ANYTHING !



At 04:48 PM 6/8/2005, you wrote:

You have recieve this email because you or someone had tried to used
your paypal account at http://www.springbok-computers.co.uk Below is the
details about the transaction made:

Transaction site : http://www.springbok-computers.co.uk
Order ID : FMO17436466
Amount : $263
Date : Wednesday, Jun 08



To confirm or decline this transaction, please follow the link provide
below. Please save the fraud alert id for your reference.

http://www.paypal-confirmation%2Did-0746795.com

If we do not get the confirmation within 5 business days, your account
will be suspended until further notice.


Sincerely,
The PayPal Security Team

PROTECT YOUR PASSWORD

NEVER give your password to anyone and ONLY log in at
https://www.paypal.com/. Protect yourself against fraudulent websites
by
opening a new web browser (e.g. Internet Explorer or Netscape) and
typing
in the PayPal URL every time you log in to your account.




Please do not reply to this email. This mailbox is not monitored and
you
will not receive a response. For assistance, log in to your PayPal
account
and click the Help link located in the top right corner of any PayPal
page.
PayPal Alert ID : 0746795


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




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



Re: SPAM-LOW: PayPal Account Security Measures

2005-06-08 Thread Woodchuck
LOL.  i was fooled for a second or two when i got the e-mail, because i
do use paypal.. but NOT WITH THIS E-MAIL!!!  

nevermind the fact that the URL looks awfully suspicious

nice try internet scum!!!


--- B Wiley [EMAIL PROTECTED] wrote:

 I DONT HAVE A PAY PAL ACCOUNT ! I DON'T USE PAYPAL 
 !! I'M NOT CLICKING ANYTHING !
 
 
 At 04:48 PM 6/8/2005, you wrote:
 You have recieve this email because you or someone had tried to used
 your paypal account at http://www.springbok-computers.co.uk Below is
 the
 details about the transaction made:
 
 Transaction site : http://www.springbok-computers.co.uk
 Order ID : FMO17436466
 Amount : $263
 Date : Wednesday, Jun 08
 
 
 
 To confirm or decline this transaction, please follow the link
 provide
 below. Please save the fraud alert id for your reference.
 
 http://www.paypal-confirmation%2Did-0746795.com
 
 If we do not get the confirmation within 5 business days, your
 account
 will be suspended until further notice.
 
 
 Sincerely,
 The PayPal Security Team
 
  PROTECT YOUR PASSWORD
 
 NEVER give your password to anyone and ONLY log in at
 https://www.paypal.com/. Protect yourself against fraudulent
 websites
 by
 opening a new web browser (e.g. Internet Explorer or Netscape) and
 typing
 in the PayPal URL every time you log in to your account.
 
 
 
 
 Please do not reply to this email. This mailbox is not monitored and
 you
 will not receive a response. For assistance, log in to your PayPal
 account
 and click the Help link located in the top right corner of any
 PayPal
 page.
 PayPal Alert ID : 0746795
 
 

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




__ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html

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



Re: After a successful build of tomcat from build.xml, how do I install it?

2005-06-08 Thread Bill Barker
Optionally copy your build.properties file to .../jakarta-tomcat-5.  Then in 
your .../jakarta-tomcat-5/build.properties file add the property:
tomcat.dist=/path/to/my/tomcat/install/dir

Then from .../jakarta-tomcat-5 do 'ant dist'.  This is the closest to 'ant 
install' that you can get.  The other option (w/o necessarily setting the 
property above) is to do 'ant release' from the .../jakarta-tomcat-5 
directory.  That will create the source and binary release .tar.gz and .zip 
files that you could otherwise install just as if you had downloaded them.

In short, the top-level build.xml is just a convenience file.  The one with 
all the power is the one in jakarta-tomcat-5.

Clark, Benjamin [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I am a Tomcat newbie, having been a Perl webguy for the past 5 years.



 Because I like to build that which I use from source, I am trying to get
 Tomcat running on my Linux laptop using a build.xml file from
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/build.xml
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/build.xml



 I created a /home/tomcatd/tomcat_build directory, put the build.xml file 
 in
 there, and then created a build.properties file with
 base.path=/home/tomcatd/lib



 $ pwd

 /home/tomcatd/tomcat_build

 $ ls

 build.xml

 build.properties

 $ ant



 ... blah blah blah - build was successful



 $ ls

 build.properties  jakarta-servletapi-5
 jakarta-tomcat-connectors

 build.xml   jakarta-tomcat-5
 jakarta-tomcat-jasper

 jakarta-commons   jakarta-tomcat-catalina   LICENSE







 This is all the instructions for 'Building Tomcat' say to do.



 $ cd jakarta-tomcat-5

 $ ls

 BENCHMARKS.txtcompat NOTICE
 RUNNING.txt

 Build CVS
 RELEASE-NOTES tomcat.nsi

 BUILDING.txt deployer
 RELEASE-PLAN-5.0.txt

 build.properties.defaultKEYS
 RELEASE-PLAN-5.5.txt

 build.xml   LICENSE  resources



 $ cd build

 $ ls

 bincommondocs logs  shared  tests
 work

 classes conf  lib servertemp
 webapps





 This is the stuff ( I think ) that comes with the pre-compiled
 distributions.



 It would seem there is one more step akin to a 'make install' that I need 
 to
 perform, but I can't seem to find it.



 Does anyone know what I would need to do to actually install the stuff in
 the build directory into another directory from which it could be used?



 Yes, I know I could just copy the stuff out myself, but I would have a
 nagging feeling there might be an 'ant install' step I should have done 
 that
 may or may not do more than just copy stuff.



 Thanks.




 -
 Please note that with our change to TD Banknorth, N.A. our e-mail 
 addresses
 have changed. Please make note of my new e-mail address. And while our 
 name
 has changed, remember this: Everything else has stayed  the same.
 




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