using apache access control?

2003-02-15 Thread Nick Wesselman
I'm using mod_jk w/ TC 4.1.18 Coyote connector. Is it possible to get 
apache to apply access control directives (e.g. basic auth, deny  
allow) to files mounted to tomcat? I'd like to be able to keep my 
access control in apache, so I don't have to set it up separately for 
my static and dynamic content.

Nick


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



TC 4.1.18 Socket closed -- please help!

2003-01-31 Thread Nick Wesselman
TC 4.1.18, Coyote JK over AJP13 w/ mod_jk. We're seeing a message like  
this in our logs for virtually every request:

Jan 29, 2003 11:34:40 AM org.apache.jk.common.ChannelSocket  
processConnection
SEVERE: Error, processing connection
java.net.SocketException: Socket closed
at COM.jrockit.net.TTSNativeIO.read()I(Unknown Source)
at  
COM.jrockit.net.SocketNativeIO.read(Ljava.io.FileDescriptor;III)I(Unknow 
n Source)
at java.net.AbstractSocketImpl$1.read(II)I(Unknown Source)
at COM.jrockit.io.NativeIOInputStream.read([BII)I(Unknown  
Source)
at java.io.BufferedInputStream.fill()V(Unknown Source)
at java.io.BufferedInputStream.read1([BII)I(Unknown Source)
at java.io.BufferedInputStream.read([BII)I(Unknown Source)
at  
org.apache.jk.common.ChannelSocket.read(Lorg.apache.jk.core.MsgContext;[ 
BII)I(Unknown Source)
at  
org.apache.jk.common.ChannelSocket.receive(Lorg.apache.jk.core.Msg;Lorg. 
apache.jk.core.MsgContext;)I(Unknown Source)
at  
org.apache.jk.common.ChannelSocket.processConnection(Lorg.apache.jk.core 
.MsgContext;)V(Unknown Source)
at  
org.apache.jk.common.SocketConnection.runIt([Ljava.lang.Object;)V(Unknow 
n Source)
at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()V(Unknown 
 Source)
at java.lang.Thread.run()V(Unknown Source)
at  
java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)

I realize that Socket closed errors are going to happen sometimes, but  
this often? Our logs build up quickly and we've gotten report of error  
500's which may be related.

Any thoughts? What could cause so many Socket closed errors?

What's also funny is that other code in the JVM that uses Sockets gets  
a lot of Socket closed errors as well. The same code outside tomcat  
works fine. What gives???

Nick


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



TC 4.1.18 Socket closed

2003-01-29 Thread Nick Wesselman
TC 4.1.18, Coyote JK over AJP13 w/ mod_jk. We're seeing a message like  
this in our logs for virtually every request:

Jan 29, 2003 11:34:40 AM org.apache.jk.common.ChannelSocket  
processConnection
SEVERE: Error, processing connection
java.net.SocketException: Socket closed
at COM.jrockit.net.TTSNativeIO.read()I(Unknown Source)
at  
COM.jrockit.net.SocketNativeIO.read(Ljava.io.FileDescriptor;III)I(Unknow 
n Source)
at java.net.AbstractSocketImpl$1.read(II)I(Unknown Source)
at COM.jrockit.io.NativeIOInputStream.read([BII)I(Unknown  
Source)
at java.io.BufferedInputStream.fill()V(Unknown Source)
at java.io.BufferedInputStream.read1([BII)I(Unknown Source)
at java.io.BufferedInputStream.read([BII)I(Unknown Source)
at  
org.apache.jk.common.ChannelSocket.read(Lorg.apache.jk.core.MsgContext;[ 
BII)I(Unknown Source)
at  
org.apache.jk.common.ChannelSocket.receive(Lorg.apache.jk.core.Msg;Lorg. 
apache.jk.core.MsgContext;)I(Unknown Source)
at  
org.apache.jk.common.ChannelSocket.processConnection(Lorg.apache.jk.core 
.MsgContext;)V(Unknown Source)
at  
org.apache.jk.common.SocketConnection.runIt([Ljava.lang.Object;)V(Unknow 
n Source)
at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run()V(Unknown 
 Source)
at java.lang.Thread.run()V(Unknown Source)
at  
java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)

I realize that Socket closed errors are going to happen sometimes, but  
this often? Our logs build up quickly and we've gotten report of error  
500's which may be related.

Any thoughts? What could cause so many Socket closed errors?

Nick


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



jk connection timeout reached

2003-01-17 Thread Nick Wesselman
I'm seeing a lot of messages like this in my catalina.out with TC 
4.1.18.

Jan 16, 2003 3:20:40 PM org.apache.jk.common.ChannelSocket 
processConnection
INFO: connection timeout reached
Jan 16, 2003 3:20:40 PM org.apache.jk.common.ChannelSocket 
processConnection
INFO: connection timeout reached
Jan 16, 2003 3:20:40 PM org.apache.jk.common.ChannelSocket 
processConnection
INFO: server has been restarted or reset this connection

First off, do I need to worry about these? Second, if not, how can I 
disable them? I have debug=0 for everything in my server.xml.

Nick Wesselman
Digital Visions, Inc.


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



connection timeout reached

2003-01-16 Thread Nick Wesselman
I'm seeing a lot of messages like this in my catalina.out with TC 
4.1.18.

Jan 16, 2003 3:20:40 PM org.apache.jk.common.ChannelSocket 
processConnection
INFO: connection timeout reached
Jan 16, 2003 3:20:40 PM org.apache.jk.common.ChannelSocket 
processConnection
INFO: connection timeout reached
Jan 16, 2003 3:20:40 PM org.apache.jk.common.ChannelSocket 
processConnection
INFO: server has been restarted or reset this connection

First off, do I need to worry about these? Second, if not, how can I 
disable them? I have debug=0 for everything in my server.xml.

Nick Wesselman
Digital Visions, Inc.


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



Re: Sun JDK 1.4 production quality?

2002-11-22 Thread Nick Wesselman
On Friday, November 22, 2002, at 11:33 AM, Shapira, Yoav wrote:


GC has markedly improved, although we did have to experiment
a bit with the new GC options.


What conclusions did you come to? My understanding is that 
ConcMarkSweepGC might be helpful for Tomcat, since you could avoid the 
problem of the OS gathering too many network connections for Tomcat 
while it's garbage collecting.

Nick


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



Re: subdirs under WEB-INF/lib????

2002-11-22 Thread Nick Wesselman
well personally i could see how having a large number of JARs under 
WEB-INF/lib could get messy :-) there is something to be said about 
being able to group xml/xsl jars, JDBC drivers, in-house JARs, taglibs, 
etc. Know what I mean? Maybe it's time to submit a suggestion via the 
JCP :-)

Nick

On Friday, November 22, 2002, at 05:18 PM, micael wrote:

I am curious why you asked this question.  I cannot think of a reason 
why you would want to do that, but you must have had a reason to ask 
the question.

At 08:43 PM 11/22/2002 +0100, you wrote:
Hello,
is it possible to take some jars in subirs under WEB-INF/lib? e.g.

WEB-INF/lib/xml/xerces.jar
WEB-INF/lib/log/log4j.jar

I'm using Tomcat 4.1.12.


thanks
Juergen


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

Micael

---

This electronic mail  transmission and any accompanying documents 
contain information belonging to the sender which may be confidential 
and legally privileged.  This information is intended only for the use 
of the individual or entity to whom this electronic mail transmission 
was sent as indicated above. If you are not the intended recipient, 
any disclosure, copying, distribution, or action taken in reliance on 
the contents of the information contained in this transmission is 
strictly prohibited.  If you have received this transmission in error, 
please delete the message.  Thank you


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


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




apache2 + mod_jk(1) + tc 4.1.12 + load balancing

2002-11-19 Thread Nick Wesselman
I'm having trouble with load balancing the above combination. I can get 
failover to work but no load balancing. This happens w/ both Coyote and 
Ajp13 connectors. I have my jvmRoute's set correctly.

worker.flek2_flek.port=8015
worker.flek2_flek.host=flek2.flekbikes.com
worker.flek2_flek.type=ajp13
worker.flek2_flek.lbfactor=1

worker.flek1_flek.port=8009
worker.flek1_flek.host=ulysses.digivis.com
worker.flek1_flek.type=ajp13
worker.flek1_flek.lbfactor=1

worker.flek.type=lb
worker.flek.balanced_workers=flek2_flek, flek1_flek

Any ideas? I had this same problem when I tried using mod_jk2.

Thanks,
Nick


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



Re: Coyote Connector won't listen on port 8004, only 8009 (Tomcat 4.1.12)

2002-11-19 Thread Nick Wesselman
You may need to add a jk2.properties to your conf dir...

handler.list=channelSocket,request,container
channelSocket.port=8004

Nick

On Tuesday, November 19, 2002, at 10:30 AM, Rodrigo Ruiz wrote:


Brandom, I experienced this problem yesterday. It was a problem with my
CATALINA_HOME variable.

I was starting a Tomcat in directory A, but CATALINA_HOME was pointing 
to
directory B, and my CATALINA_BASE was undefined. The result: tomcat was
being started up with the B configuration.

Perhaps you are in the same case :_)

- Original Message -
From: Brandon Cruz [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, November 19, 2002 5:29 PM
Subject: RE: Coyote Connector won't listen on port 8004, only 8009 
(Tomcat
4.1.12)


Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8004 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=2
   useURIValidationHack=false

protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

Even with the above configuration, this connector tries to start up on

port

8009.  Anyone know why?



Brandon


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



--
To unsubscribe, e-mail:

mailto:[EMAIL PROTECTED]

For additional commands, e-mail:

mailto:[EMAIL PROTECTED]






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


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




Re: apache2 + mod_jk(1) + tc 4.1.12 + load balancing

2002-11-19 Thread Nick Wesselman
I think I fixed my problem. The host name in server.xml apparently 
needs to be the same as it is listed in the workers.properties.

Nick

On Tuesday, November 19, 2002, at 12:00 PM, Nick Wesselman wrote:

I'm having trouble with load balancing the above combination. I can 
get failover to work but no load balancing. This happens w/ both 
Coyote and Ajp13 connectors. I have my jvmRoute's set correctly.

worker.flek2_flek.port=8015
worker.flek2_flek.host=flek2.flekbikes.com
worker.flek2_flek.type=ajp13
worker.flek2_flek.lbfactor=1

worker.flek1_flek.port=8009
worker.flek1_flek.host=ulysses.digivis.com
worker.flek1_flek.type=ajp13
worker.flek1_flek.lbfactor=1

worker.flek.type=lb
worker.flek.balanced_workers=flek2_flek, flek1_flek

Any ideas? I had this same problem when I tried using mod_jk2.

Thanks,
Nick


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


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




Re[2]: apache2 + mod_jk(1) + tc 4.1.12 + load balancing

2002-11-19 Thread Nick Wesselman
 or maybe not.

Apparently the load balancer doesn't use an exact round robin scheme. 
I'm seeing 6 requests to TC1, then 6 to TC2, and then back.

Not that I mind... just it's been hard to tell if it's working!

I recommend using lynx to hit a page that prints out something to 
stdout... then tail both logs and go nuts with lynx

lynx www.myserver.com
ctrl-c
up arrow
enter
ctrl-c 

and watch the logs.

Nick

On Tuesday, November 19, 2002, at 02:55 PM, Nick Wesselman wrote:

I think I fixed my problem. The host name in server.xml apparently 
needs to be the same as it is listed in the workers.properties.

Nick

On Tuesday, November 19, 2002, at 12:00 PM, Nick Wesselman wrote:

I'm having trouble with load balancing the above combination. I can 
get failover to work but no load balancing. This happens w/ both 
Coyote and Ajp13 connectors. I have my jvmRoute's set correctly.

worker.flek2_flek.port=8015
worker.flek2_flek.host=flek2.flekbikes.com
worker.flek2_flek.type=ajp13
worker.flek2_flek.lbfactor=1

worker.flek1_flek.port=8009
worker.flek1_flek.host=ulysses.digivis.com
worker.flek1_flek.type=ajp13
worker.flek1_flek.lbfactor=1

worker.flek.type=lb
worker.flek.balanced_workers=flek2_flek, flek1_flek

Any ideas? I had this same problem when I tried using mod_jk2.

Thanks,
Nick


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


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


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




coyote exception

2002-11-18 Thread Nick Wesselman
I'm trying to connect Apache2/mod_jk w/ Tomcat 4.1.12 Coyote via AJP13  
over tcp socket. However, I get the following exception from my tomcat.

SEVERE: Caught exception executing  
org.apache.jk.common.SocketConnection@1f06dc3, terminating thread
java.lang.NullPointerException
at  
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 
543)
at  
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool 
.java:533)
at java.lang.Thread.run(Thread.java:536)

Line 543 of ChannelSocket.java (rev 1.21 marked for Tomcat 4.1.12) is  
the highlighted line of this method:

/** Process a single ajp connection.
 */
void processConnection(MsgContext ep) {
try {
MsgAjp recv=new MsgAjp();
while( running ) {
int status= this.receive( recv, ep );
if( status = 0 ) {
if( status==-3)
log.warn( server has closed the current  
connection (-1) );
else
log.warn(Closing ajp connection  + status );
break;
}
ep.setLong( MsgContext.TIMER_RECEIVED,  
System.currentTimeMillis());

ep.setType( 0 );
status= this.invoke( recv, ep );
if( status!= JkHandler.OK ) {
log.warn(processCallbacks status  + status );
break;
}
}
this.close( ep );
} catch( Exception ex ) {
if( ex.getMessage().indexOf( Connection reset ) =0 ) {
log.warn( Server has closed connection);
} else {
log.error( Error, closing connection, ex);
}
}
}

So what is null on this line? I can only imagine it would be the  
exception's message. So what exception is being thrown in this method  
without a message, and how can I prevent it?

Config files follow.

Thanks,
Nick Wesselman
Digital Visions, Inc.

--
server.xml
snip
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8015 minProcessors=5 maxProcessors=75
   enableLookups=true
   acceptCount=10 debug=0 connectionTimeout=2
   useURIValidationHack=false

protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/
snip

jk2.properties
handler.list=channelSocket
channelSocket.port=8015
channelSocket.maxPort=port+0

workers.properties
snip
worker.ajp13.port=8015
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
snip

Re: jk2 load balancing problem (only fail-over)

2002-11-15 Thread Nick Wesselman
So there's no production quality code to let me load balance using the 
Coyote connector?

Should I use mod_jk and the older Ajp13 connector instead?

Nick

On Friday, November 15, 2002, at 01:52 AM, Bill Barker wrote:

Load balancing is still not implemented fully in Jk2 (it's still a 
Beta).
It has very nice fail-over code however.  I'm sure that the Jk2 team 
would
welcome any patches.

Nick Wesselman [EMAIL PROTECTED] wrote in message
news:2303332D-F84E-11D6-8322-000393452A4C;digivis.com...
I'm trying to set up jk2 load balancing for 2 Virtual Hosts in Apache
with 2 Tomcats each. I have it mostly working, except it doesn't
actually load balance the Tomcats... however it will do fail-over just
fine if I kill one VM.

All my server.xml's have the correct jvmRoute set for the Engine.

Any help on how to fix or debug this?

Nick Wesselman
-

Environment:
RedHat 7.2
Apache 2.0.43
Tomcat 4.1.12
mod_jk2

workers2.properties (names obfuscated to protect the innocent):
[logger]
level=DEBUG

[config:]
file=/usr/local/apache2/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

[logger.file:0]
level=DEBUG
file=/usr/local/apache2/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with
multiprocess servers
file=/usr/local/apache2/logs/jk2.shm
size=100
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0

[status:]
info=Status worker, displays runtime information

[uri:/jkstatus/*]
group=status:

[lb:vhost1]
debug=0

[channel.socket:vhost1_vm1]
port=8015
host=127.0.0.1
debug=0
group=vhost1
tomcatId=vhost1_vm1
lb_factor=1

[channel.socket:vhost1_vm2]
port=8019
host=127.0.0.1
debug=0
group=vhost1
tomcatId=vhost1_vm2
lb_factor=1

[uri:www.vhost1.com]
info=blah

[uri:www.vhost1.com/*.jsp]
group=vhost1
info=blah

[lb:vhost2]
debug=0

[channel.socket:vhost2_vm1]
port=8015
host=127.0.0.1
debug=0
group=vhost2
tomcatId=vhost2_vm1
lb_factor=1

[channel.socket:vhost2_vm2]
port=8019
host=127.0.0.1
debug=0
group=vhost2
tomcatId=vhost2_vm2
lb_factor=1

[uri:www.vhost2.com]
info=blah

[uri:www.vhost2.com/*.jsp]
group=vhost2
info=blah






--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




jk2 load balancing problem (only fail-over)

2002-11-14 Thread Nick Wesselman
I'm trying to set up jk2 load balancing for 2 Virtual Hosts in Apache 
with 2 Tomcats each. I have it mostly working, except it doesn't 
actually load balance the Tomcats... however it will do fail-over just 
fine if I kill one VM.

All my server.xml's have the correct jvmRoute set for the Engine.

Any help on how to fix or debug this?

Nick Wesselman
-

Environment:
RedHat 7.2
Apache 2.0.43
Tomcat 4.1.12
mod_jk2

workers2.properties (names obfuscated to protect the innocent):
[logger]
level=DEBUG

[config:]
file=/usr/local/apache2/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

[logger.file:0]
level=DEBUG
file=/usr/local/apache2/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=/usr/local/apache2/logs/jk2.shm
size=100
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0

[status:]
info=Status worker, displays runtime information

[uri:/jkstatus/*]
group=status:

[lb:vhost1]
debug=0

[channel.socket:vhost1_vm1]
port=8015
host=127.0.0.1
debug=0
group=vhost1
tomcatId=vhost1_vm1
lb_factor=1

[channel.socket:vhost1_vm2]
port=8019
host=127.0.0.1
debug=0
group=vhost1
tomcatId=vhost1_vm2
lb_factor=1

[uri:www.vhost1.com]
info=blah

[uri:www.vhost1.com/*.jsp]
group=vhost1
info=blah

[lb:vhost2]
debug=0

[channel.socket:vhost2_vm1]
port=8015
host=127.0.0.1
debug=0
group=vhost2
tomcatId=vhost2_vm1
lb_factor=1

[channel.socket:vhost2_vm2]
port=8019
host=127.0.0.1
debug=0
group=vhost2
tomcatId=vhost2_vm2
lb_factor=1

[uri:www.vhost2.com]
info=blah

[uri:www.vhost2.com/*.jsp]
group=vhost2
info=blah


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org



Re: multiple servlet instances?

2002-10-23 Thread Nick Wesselman
On Tuesday, October 22, 2002, at 11:30 AM, Craig R. McClanahan wrote:


The precise rule is that there is a single instance per servlet
*definition*, not per servlet *mapping*.  A servlet definition is:

* A single servlet element (no matter how many mappings point at it)
  from your web.xml file

* A dynamically created definition when you use the invoker servlet
  (i.e. the /servlet/* mapping), which is a Tomcat feature and nothing
  to do with the servlet specification.



Tomcat only creates a single definition for a servlet for use with all 
requests via the invoker, right? i.e., Multiple requests via the 
invoker use the same definition/servlet instance?

Nick


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org



multiple servlet instances?

2002-10-21 Thread Nick Wesselman
I was reading in a book today that JSP implementations are still 
permitted to create multiple instances of the ... servlet in order to 
provide improved performance. Does Tomcat/Jasper do this? Might there 
be multiple instances of a servlet (JSP-generated or otherwise) in my 
JVM?

Thanks,
Nick


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org



Re: multiple servlet instances?

2002-10-21 Thread Nick Wesselman
the book was actually referring to the case where isThreadSafe=false 
... it uses misleading wording, however.

... you also need to be aware that, even if a JSP page sets the 
isThreadSafe attribute to false, JSP implementations are still 
permitted to create multiple instances of the corresponding servlet... 
(my emph)

Web Development with Java Server Pages by Duane Fields and Mark Kolb 
... p. 62 ... I just got a fax of the page in reference to a question 
from a client. Thanks for your help!

Nick

On Monday, October 21, 2002, at 05:22 PM, Craig R. McClanahan wrote:



On Mon, 21 Oct 2002, Nick Wesselman wrote:


Date: Mon, 21 Oct 2002 16:49:18 -0500
From: Nick Wesselman [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: multiple servlet instances?

I was reading in a book today that JSP implementations are still
permitted to create multiple instances of the ... servlet in order to
provide improved performance. Does Tomcat/Jasper do this? Might there
be multiple instances of a servlet (JSP-generated or otherwise) in my
JVM?



You might want to be cautious believing anything that book says about 
any
topic, unless it correctly explains what is really going on.  What book
said this?

For anything from Servlet 2.2 on (that's quite a long while back), it 
is
not legal for the container to create more than one instance of a
particular servlet definition *unless* that servlet implements the
SingleThreadModel interface (or the JSP page has the
isThreadSafe=false attribute on its %@ page % directive).

The other thing to note is that doing this would not improve 
performance
-- at best, it will have zero impact, but it's actually pretty likely 
to
be negative (because the container is going to have to manage the 
multiple
instances, because the maximum number of simultaneous requests to that
servlet is now limited to the pool size you've configured, and because
they take up more memory space).

The only reason that SingleThreadModel exists is to allow you to 
create a
servlet or JSP page that stores per-request state information in 
instance
variables of the underlying class.  This is not a good programming
practice -- you should instead use local variables only, so that a 
single
instance of your servlet or JSP page can handle any number of 
simultaneous
requests.

Thanks,
Nick


Craig McClanahan


--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org


Re: applet jars

2002-07-15 Thread Nick Wesselman

Since it's an applet, it needs to be in the applet JAR in the browser. 
The Applet runs in the user's browser, not in tomcat.

Nick

On Monday, July 15, 2002, at 12:32 PM, Rutledge, Aaron wrote:

 Hello list,
  I have been trying to embed a simple applet in a web page and keep
 getting a ClassNotFoundException.  However, I have placed the jars in my
 webservers CLASSPATH and I am able to launch (non-applet) applications
 contained in the JAR succesfully form the server.  I am wondering if I
 need to do some sort of special configuration for applets in TomCat?  I
 have tried placing the JARS in my web ap. lib directory, the root
 directory, in the tomcat lib--everything!  Am I missing something?
 Regards to all, Aaron

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


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




too many open files

2002-07-12 Thread Nick Wesselman

On a production Tomcat 4.0.3 site, we've had a couple crashes with Too 
many open files errors. (Redhat 7.2)

If we run lsof, one particular jsp file (the most popular on the site) 
is listed many, many times--more than would be merited by the popularity 
of this site. Why should Tomcat keep open so many file handles open to a 
jsp file?

For now, we've upped the number of possible open files. But we only see 
this as a temp solution. Does Jasper have a file handle leak?

Nick Wesselman
Digital Visions, Inc.


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




Error 500, mod_jk issue

2002-06-12 Thread Nick Wesselman

We're running Tomcat 4.0.3 on RedHat w/ Apache 1.3 via the mod_jk 
connector.

We received an Error 500, which usually indicates that Tomcat is no 
longer running. However in this case it was, it hadn't crashed. A quick 
survey of the logs found these...

In catalina.out:
Ajp13Connector[8011] No processor available, rejecting this connection

In mod_jk.log:
[Wed Jun 12 13:37:04 2002]  [jk_ajp13_worker.c (381)]: Error 
ajp13_process_callback - write failed

Anyone seen this before? Our native connector binary might be a bit old. 
The name of the precompiled binary we're using is 
mod_jk-3.3-ap13-eapi.so.

Any ideas? Should we be using the mod_jk-01.so binary from the 4.0.3 
build?

Thanks,
Nick Wesselman
Digital Visions, Inc.


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




Re: Mod_jk not finding workers.properties

2002-06-12 Thread Nick Wesselman

Your mod_jk configuration (either in or included in your httpd.conf) 
specifies the location of the workers.properties file.

IfModule mod_jk.c

JkWorkersFile /usr/local/apache/conf/mod_jk/workers.properties
JkLogFile  /usr/local/apache/logs/mod_jk.log
JkLogLevel error

/IfModule

Nick

On Wednesday, June 12, 2002, at 01:53 PM, Ryan McDonough wrote:

 I'm trying to get mod_jk configured on both Mac OS X and Solaris 8. Both
 systems are running Apache 1.3.23 and Tomcat 4.0.3. I have built mod_jk 
 from
 the sources found in the jakarta-tomcat-connectors package and the build
 went smoothly on both systems. I have configured Tomcat to auto generat 
 the
 mod_jk.conf file and that too appears fine. The problem I am having 
 involves
 Apache. Each time I try to start Apache, with mod_jk enabled, the server
 will not start and I find this message in the error:

 [Wed Jun 12 14:27:40 2002] [emerg] (2)No such file or directory: Error 
 while
 opening the workers

 I do have a workers.properties file in Tomcats conf directory. I have 
 double
 check everything from permissions to making sure the file is named 
 correctly
 and I still get the same error on both systems. Any ideas?

 Ryan-


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


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




Re: mod_webapp and static content

2002-06-12 Thread Nick Wesselman

mod_jk will allow you to do this. though it's a bit more complex to set 
up.

Nick

On Wednesday, June 12, 2002, at 01:58 PM, Alex Short wrote:

 So if that is the case is there any way currently to have a static and
 dynamic content all under one directory path

 /www/Features
 index.jsp
 front.jpg
 /www/Products
 index.jsp
 product1.html
 product2.html

 I guess one solution would be to make a /jsp directory and place all jsp
 content into that, then use the mod_webapp for that /jsp to direct to
 tomcat, but is there another way to divide between apache and tomcat?
 Perhaps using another connector besides mod_webapp?

 Alex


 From the tomcat 4.0.2 release notes:

 Currently, mod_webapp forwards *all* requests under the specified 
 context
 path to Tomcat for processing.  In a futher release, it will 
 automatically
 configure itself to serve static resources from Apache *unless* the 
 resource
 is subject to filtering, or subject to a security constraint, as 
 defined in
 web.xml.  No extra configuration in httpd.conf will be required.

 So the goal is to have Tomcat serve only JSP and servlet requests, and 
 have
 Apache handle all the rest.  Tomcat stand-alone is not built to be a 
 very
 efficient static content server...for smaller sites and sites with low
 bandwidth needs Tomcat stand-alone would probably be suitable for 
 serving
 all content.  Anything bigger, with lots of images or other static 
 content,
 etc. would be much better off using a Tomcat/Apache combo, as Apache 
 is very
 good at serving static content, much better than Tomcat.


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


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




Re: Apache Web Server and Tomcat

2002-05-30 Thread Nick Wesselman


On Wednesday, May 29, 2002, at 10:35 PM, Mauricio Tia Ni Gong Lin wrote:

 Can I use virtual hosts without DNS server installed and running?

This won't work to the general world, but you can set up a hosts file 
entry for the ServerName and use that in your URL when you make a 
request to the server.

Not sure if you need to set up host file entries for the vhosts on the 
web server itself. I'm pretty sure you do.

Nick


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




jsp servlet error in NetBeans

2002-04-23 Thread Nick Wesselman

I'm asking about this over at the netbeans projects, but I figured 
someone here might be able to help. We're seeing this across multiple 
versions of Netbeans when we try to run JSPs.

cannot load servlet name: jsp
2002-04-23 10:53:20 - Ctx(  ): Exception in: R(  + /kccat_test.jsp + 
null) - java.lang.NullPointerException
 at 
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass
(AdaptiveClassLoader.java:471)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at 
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:136)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at 
org.netbeans.modules.web.tomcat.JspServlet.doLoadJSP(JspServlet.java:248)
 at 
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
 at 
org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
 at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary
(JspServlet.java:152)
 at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:164)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
 at 
org.netbeans.modules.web.tomcat.JspServlet.service(JspServlet.java:91)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:
797)
 at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection
(HttpConnectionHandler.java:210)
 at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:496)


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: jsp servlet error in NetBeans

2002-04-23 Thread Nick Wesselman

btw,

We suspect this may be related to our shared SMB filesystem and bad SMB 
file locking in OS X. Make sense at all?

Nick

On Tuesday, April 23, 2002, at 11:08 AM, Nick Wesselman wrote:

 I'm asking about this over at the netbeans projects, but I figured 
 someone here might be able to help. We're seeing this across multiple 
 versions of Netbeans when we try to run JSPs.

 cannot load servlet name: jsp
 2002-04-23 10:53:20 - Ctx(  ): Exception in: R(  + /kccat_test.jsp + 
 null) - java.lang.NullPointerException
 at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass
 (AdaptiveClassLoader.java:471)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at 
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:136)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at 
 org.netbeans.modules.web.tomcat.JspServlet.doLoadJSP(JspServlet.java:248)
 at 
 org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
 at 
 org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
 at 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary
 (JspServlet.java:152)
 at 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
 (JspServlet.java:164)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
 at 
 org.netbeans.modules.web.tomcat.JspServlet.service(JspServlet.java:91)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at 
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at 
 org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:
 797)
 at 
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at 
 org.apache.tomcat.service.http.HttpConnectionHandler.processConnection
 (HttpConnectionHandler.java:210)
 at 
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at 
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:496)


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: triggering JSP page recompilation

2002-02-01 Thread Nick Wesselman



As I mentioned before, GNUJSP keeps a
record of what files include what, and if told to, recompiles all
including files when an included file changes.  

I don't recall gnujsp doing this--I've always had to touch files when I 
change an included file with gnujsp as well.

Nick


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




tomcat build error

2002-01-29 Thread Nick Wesselman

while building tomcat:

H:\tomcat_build\jakarta-tomcat-4.0\webapps\tomcat-docs\build.xml:80: 
javax.xml.transform.TransformerFactoryConfigurationError: Provider 
org.apache.xalan.processor.TransformerFactoryImpl not found

am i just missing something from my classpath?? do i need to download Xalan?

thanks,
Nick


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: PLEASE REMOVE THE VIRUS BEFORE MAILING THE LIST...

2002-01-29 Thread Nick Wesselman

perhaps a JAMES Mailet would be appropriate? :-)


Mike Curwen wrote:

So, is an open-source Anti-Virus project (perhaps at Jakarta)
self-defeating?  ;)

-Original Message-
From: Randy Layman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 9:45 AM
To: 'Tomcat Users List'
Subject: RE: PLEASE REMOVE THE VIRUS BEFORE MAILING THE LIST...



   I would like to point out that the virus was sent by members of the
list.  Would Virus filtering of the list be useful?  Yes.  Would it be
cost-effective?  No.  (Since Jakarta has no real income to spend on this).

   Randy



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




compiling 4.0.2b2 connectors

2002-01-29 Thread Nick Wesselman

I'm having some trouble compiling the 4.0.2b2 connectors... i swear i 
had it compiled successfully earlier today. Seems like a classpath 
issue? I can't figure out what is supposed to provide 
org.apache.tomcat.util.net 

jkjava:
[javac] Compiling 17 source files to 
/root/tomcat_build/jakarta-tomcat-connectors/jk/build/WEB-INF/classes
[javac] 
/root/tomcat_build/jakarta-tomcat-connectors/jk/java/org/apache/jk/core/Worker.java:67:
 
package org.apache.tomcat.util.net does not exist
[javac] import org.apache.tomcat.util.net.*;
[javac] ^
[javac] 
/root/tomcat_build/jakarta-tomcat-connectors/jk/java/org/apache/catalina/jk/JkServlet40.java:80:
 
package org.apache.tomcat.util.net does not exist
[javac] import org.apache.tomcat.util.net.*;
[javac] ^
[javac] 
/root/tomcat_build/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkServlet.java:72:
 
package org.apache.tomcat.util.net does not exist
[javac] import org.apache.tomcat.util.net.*;
[javac] ^
[javac] 
/root/tomcat_build/jakarta-tomcat-connectors/jk/java/org/apache/jk/server/JkMain.java:69:
 
package org.apache.tomcat.util.net does not exist
[javac] import org.apache.tomcat.util.net.*;
[javac] ^
[javac] 
/root/tomcat_build/jakarta-tomcat-connectors/jk/java/org/apache/catalina/jk/Worker40.java:67:
 
cannot resolve symbol
[javac] symbol  : class PoolTcpConnector
[javac] location: package server
[javac] import org.apache.tomcat.modules.server.PoolTcpConnector;
[javac] ^
[javac] 
/root/tomcat_build/jakarta-tomcat-connectors/jk/java/org/apache/catalina/jk/Worker40.java:69:
 
package org.apache.tomcat.util.net does not exist
[javac] import org.apache.tomcat.util.net.*;
[javac] ^
[javac] 
/root/tomcat_build/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/WorkerDummy.java:67:
 
package org.apache.tomcat.util.net does not exist
[javac] import org.apache.tomcat.util.net.*;
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 7 errors

BUILD FAILED


Nick


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




4.0.1 in production?

2002-01-28 Thread Nick Wesselman

How many people are using Tomcat 4.0.1 in production currently--and how 
well is it working?

If used with Apache, which connector are you using? If you're not using 
Apache, how well is Tomcat holding up serving static content?

Thanks for any responses!!

Nick


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]