Configutaion Problems NT <=> Linux

2001-07-26 Thread Loïc Lefèvre

Hi

It's me again... Last time, tomcat was configured perfectly
for NT4. Still I must install it on linux now and after copying
exactly (but directories ;) ) the result is not the one expected:
nothing appears !

Any suggestion?

Loïc Lefèvre




starting problem for Tomcat

2001-07-26 Thread Mehul S Dave

Hi
  I am getting this error when i try to start tomcat. i am under Linux 7.1

Error
please give me the solution to start my server
Starting tomcat. Check logs/tomcat.log for error messages
FATAL:java.net.BindException: Permission denied
java.net.BindException: Permission denied
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:363)
at java.net.ServerSocket.(ServerSocket.java:138)
at java.net.ServerSocket.(ServerSocket.java:102)
at
org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97)
at
org.apache.tomcat.service.SimpleTcpEndpoint.startEndpoint(SimpleTcpEndpoint.java:186)
at
org.apache.tomcat.service.SimpleTcpConnector.start(SimpleTcpConnector.java:142)
at
org.apache.tomcat.core.ContextManager.start(ContextManager.java:253)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:157)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)

*
Mehul S Dave
Scientific Officer, (STCS Dept.),
Tata Institute of Fundamental Research
Phone - 2152971 Extn - 2372
Mumbai .
webpage:- http://www.csc.tifr.res.in/~mehul
*




Re: mod_jk on Solaris 2.6 : undefined symbols

2001-07-26 Thread Fabrice Colin

John Bazeley wrote:
> As a matter of interest, why no -G?
> 
> > my $CFG_LD_SHLIB  = q(ld);
> > my $CFG_LDFLAGS_SHLIB = q();  # I don't use -G
> > my $CFG_LIBS_SHLIB= q();

Because with -G ld ignores undefined symbols and when I start
Apache, it complains about that same exact symbol, ie :

[root@mybox /export/home/apache]# bin/apachectl start
Syntax error on line 979 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/mod_jk.so into server: ld.so.1:
/usr/local/apache/bin/httpd: fatal: relocation error: file
/usr/local/apache/libexec/mod_jk.so: symbol __lshrdi3: referenced symbol
not found
bin/apachectl start: httpd could not be started

Fabrice



problem when running on 8080 port

2001-07-26 Thread Mehul S Dave

Hello
 still i am trying to run my tomcat but it failed.
 I tried to run on port 8080 & it should me this error

java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.close(PlainSocketImpl.java:408)
at java.net.SocketImpl.reset(SocketImpl.java:227)
at java.net.ServerSocket.implAccept(ServerSocket.java:207)
at java.net.ServerSocket.accept(ServerSocket.java:181)
at
org.apache.tomcat.service.SimpleTcpEndpoint.acceptSocket(SimpleTcpEndpoint.java:267)
at
org.apache.tomcat.service.SimpleTcpEndpoint.acceptConnections(SimpleTcpEndpoint.java:248)
at
org.apache.tomcat.service.TcpListenerThread.run(SimpleTcpEndpoint.java:319)
at java.lang.Thread.run(Thread.java)
Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] shutdown
due to exception: java.net.SocketException: Socket closed
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.close(PlainSocketImpl.java:408)
at java.net.SocketImpl.reset(SocketImpl.java:227)
at java.net.ServerSocket.implAccept(ServerSocket.java:207)
at java.net.ServerSocket.accept(ServerSocket.java:181)
at
org.apache.tomcat.service.SimpleTcpEndpoint.acceptSocket(SimpleTcpEndpoint.java:267)
at
org.apache.tomcat.service.SimpleTcpEndpoint.acceptConnections(SimpleTcpEndpoint.java:248)
at
org.apache.tomcat.service.TcpListenerThread.run(SimpleTcpEndpoint.java:319)
at java.lang.Thread.run(Thread.java)
Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8007] shutdown
due to exception: java.net.SocketException: Socket closed

Thanks.


*
Mehul S Dave
Scientific Officer, (STCS Dept.),
Tata Institute of Fundamental Research
Phone - 2152971 Extn - 2372
Mumbai .
webpage:- http://www.csc.tifr.res.in/~mehul
*




RE: starting problem for Tomcat

2001-07-26 Thread Loïc Lefèvre

Try this ;) and look at Gautam Sinha's answer:

http://mikal.org/interests/java/tomcat/archive/search?search=BindException

Loïc Lefèvre

-Message d'origine-
De : Mehul S Dave [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 26 juillet 2001 10:20
À : Tomcat User archive
Objet : starting problem for Tomcat


Hi
  I am getting this error when i try to start tomcat. i am under Linux 7.1

Error
please give me the solution to start my server
Starting tomcat. Check logs/tomcat.log for error messages
FATAL:java.net.BindException: Permission denied
java.net.BindException: Permission denied
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:363)
at java.net.ServerSocket.(ServerSocket.java:138)
at java.net.ServerSocket.(ServerSocket.java:102)
at
org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerS
ocketFactory.java:97)
at
org.apache.tomcat.service.SimpleTcpEndpoint.startEndpoint(SimpleTcpEndpoint.
java:186)
at
org.apache.tomcat.service.SimpleTcpConnector.start(SimpleTcpConnector.java:1
42)
at
org.apache.tomcat.core.ContextManager.start(ContextManager.java:253)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:157)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)

*
Mehul S Dave
Scientific Officer, (STCS Dept.),
Tata Institute of Fundamental Research
Phone - 2152971 Extn - 2372
Mumbai .
webpage:- http://www.csc.tifr.res.in/~mehul
*




ClassCastException on a bean

2001-07-26 Thread Paul Foxton

Hi,

I've just had an odd problem I thought I'd see if anyone else had come
accross:
Running tomcat 3.2.2, apache 1.3.19 on RH linux 7.1, I got a
ClassCastException for a bean (called DbUtilities) I use in a JSP page.

The code from the compiled servlet of the jsp is as follows: 

DbUtilities db = null;
boolean _jspx_specialdb = false;
 synchronized(application) {
   db = (DbUtilities)  < this line caused the
ClassCastException
   pageContext.getAttribute("db",pageContext.APPLICATION_SCOPE);
 
Its odd because both the bean and JSP had been working fine for a week or so
& I hadn't modified either.

I restarted tomcat and apache and everything was fine again - just a little
concernred, I don't want this happenning when the site goes live!

Has anyone else seen anything like this?

cheers,

Paul



Re: virtual hosting conf question

2001-07-26 Thread Kaneda K

I Might be wrong, but in order to allow Apache to communicate with tomcat, 
you need to use ajp13 instead of 12. and did you correctly set mod_jk.so. ?

At 07:01 26/07/2001 +0800, you wrote:
>Hi All,
>
>We are using Tomact3.2.3 and Apache1.3.20 with mod_jk.so.
>
>it works fine when use Directory:
>
> Alias /loc "/home/.../path"
>
> 
> Options Indexes FollowSymLinks
> 
> JkMount /loc/servlet/* ajp12
> JkMount /loc/*.jsp ajp12
>
>But when trying virtual hosting:
>
>NameVirutalHost ip
>
> 
> ServerName www.domain.com
> DocumentRoot "/home/.../path"
> JkMount /servlet/* ajp12
> JkMount /*.jsp ajp12
> 
> Options Includes Indexes FollowSymlinks
> AllowOverride AuthConfig FileInfo Indexes Limit Options
> Order allow, deny
> Allow from all
> 
>
> 
>
>WE are geting 404 error for all .jsp files and looks like the apache to 
>tomcat redirect not works
>
>anything missing?
>
>
>TIA
>
>Jerry
>
>
>
>
>




Re: Configutaion Problems NT <=> Linux

2001-07-26 Thread Jeff Hoare

What happens?
If this fits your situation then this may help.
If u are using the sun jdk1.3.1 and u are using a 2.4 kernel then one thing 
that can happen is that the jdk won't start because of the default stack 
size. In this case you'll get nothing, the thing will try to start tehn die.

If this sounds like you then try
ulimit  -s 2048

Jeff
PS failing that u really need to provide more info, are any logs produced?

On Thursday 26 July 2001 17:57, you wrote:
> Hi
>
> It's me again... Last time, tomcat was configured perfectly
> for NT4. Still I must install it on linux now and after copying
> exactly (but directories ;) ) the result is not the one expected:
> nothing appears !
>
> Any suggestion?
>
> Loïc Lefèvre



Re: Configutaion Problems NT <=> Linux

2001-07-26 Thread Jeff Hoare

oops...
ulimit applies to the user that you run tomcat as

Jeff
On Friday 27 July 2001 15:47, you wrote:
> What happens?
> If this fits your situation then this may help.
> If u are using the sun jdk1.3.1 and u are using a 2.4 kernel then one thing
> that can happen is that the jdk won't start because of the default stack
> size. In this case you'll get nothing, the thing will try to start tehn
> die.
>
> If this sounds like you then try
> ulimit  -s 2048
>
> Jeff
> PS failing that u really need to provide more info, are any logs produced?
>
> On Thursday 26 July 2001 17:57, you wrote:
> > Hi
> >
> > It's me again... Last time, tomcat was configured perfectly
> > for NT4. Still I must install it on linux now and after copying
> > exactly (but directories ;) ) the result is not the one expected:
> > nothing appears !
> >
> > Any suggestion?
> >
> > Loïc Lefèvre



Weird thread/security problem

2001-07-26 Thread Sam Joseph
Hi,

So I think this is a thread/security issue, but I am not sure.  However
it is definitely weird.

I have been conducting some tests with multiple users.  Various servlets
are contacted that supply pages to each user, that include information
such as user name etc.  The version of tomcat in use is 3.2.1, and
clearly I should upgrade to 3.2.3, but the tomcat is provided by my
service provider so that might take some time.

Anyway, the problem is that sometimes when two users are accessing the
system simulatenously the information for one user will be displayed,
briefly, to the other user.  The system I have developed is quite
complicated so I can't rule out that this is a problem with the code,
but I'm not using static variables or anything that would allow this
swap over.  I mean each user has an object associated with them that
contains their user name, but these are local variables to the servlet.

Are there or have there been problems with tomcat that would explain
this problem?  I mean tomcat creates a separate thread for each servlet
right? Different user, different thread, so their data shouldn't be
available to each other.

Am I overlooking something here?  Should I be mailing to the developer's
list?

And on the same topic, does anyone know of any software that will
simulate multiple users, without me having all my friends test the
system.  I mean some software (ideally free or shareware) that would
simulate the stream of http requests, I guess I could hack something
together myself, but if there's something already out there that would
be great.

Thanks in advance.

CHEERS> SAM


RE: Weird thread/security problem

2001-07-26 Thread Michael Weissenbacher
that is a simple problem of understanding: there is only one servlet object
that is used by multiple threads. by having this in mind, your object
variables are also shared, as would be static variables...


-Original Message-
From: Sam Joseph [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 11:18 AM
To: [EMAIL PROTECTED]
Subject: Weird thread/security problem


Hi,

So I think this is a thread/security issue, but I am not sure.  However
it is definitely weird.

I have been conducting some tests with multiple users.  Various servlets
are contacted that supply pages to each user, that include information
such as user name etc.  The version of tomcat in use is 3.2.1, and
clearly I should upgrade to 3.2.3, but the tomcat is provided by my
service provider so that might take some time.

Anyway, the problem is that sometimes when two users are accessing the
system simulatenously the information for one user will be displayed,
briefly, to the other user.  The system I have developed is quite
complicated so I can't rule out that this is a problem with the code,
but I'm not using static variables or anything that would allow this
swap over.  I mean each user has an object associated with them that
contains their user name, but these are local variables to the servlet.

Are there or have there been problems with tomcat that would explain
this problem?  I mean tomcat creates a separate thread for each servlet
right? Different user, different thread, so their data shouldn't be
available to each other.

Am I overlooking something here?  Should I be mailing to the developer's
list?

And on the same topic, does anyone know of any software that will
simulate multiple users, without me having all my friends test the
system.  I mean some software (ideally free or shareware) that would
simulate the stream of http requests, I guess I could hack something
together myself, but if there's something already out there that would
be great.

Thanks in advance.

CHEERS> SAM


howto redirect

2001-07-26 Thread Bernhard Wraase

In the docs it seems simple...
Even in the thread recently

But it don't work.
Each request works:
http://127.0.0.1:8080 ->http://127.0.0.1:8080/index.html
https://127.0.0.1:8443 ->https://127.0.0.1:8443/index.html

But I want this:
http://127.0.0.1:8080 ->https://127.0.0.1:8443/index.html

The server.xml looks like:

  







  

 --snip--
--snap--
 

Any suggestions?
--
TIA Bernhard Wraase





RE: howto redirect

2001-07-26 Thread Rams

this is not possible..

Rams

-Original Message-
From: Bernhard Wraase [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 3:12 PM
To: [EMAIL PROTECTED]
Subject: howto redirect


In the docs it seems simple...
Even in the thread recently

But it don't work.
Each request works:
http://127.0.0.1:8080 ->http://127.0.0.1:8080/index.html
https://127.0.0.1:8443 ->https://127.0.0.1:8443/index.html

But I want this:
http://127.0.0.1:8080 ->https://127.0.0.1:8443/index.html

The server.xml looks like:

  







  

 --snip--
--snap--
 

Any suggestions?
--
TIA Bernhard Wraase




RE: Configutaion Problems NT <=> Linux

2001-07-26 Thread Loïc Lefèvre

In fact, I hink it's a VHost configuration problem, the Apache's 'ErrorLog'
file
indicates:

[Thu Jul 26 08:15:29 2001] [error] [client 192.1.1.33] File does not exist:
/usr/local/tomcat/jakarta-tomcat-3.2.3/webapps/lol/lol

and my VHost is the following:

ServerName lol.fivia.com
DocumentRoot /usr/local/tomcat/jakarta-tomcat-3.2.3/webapps/lol

JkMount /lol/* ajp12
JkMount /*.jsp ajp12

RedirectMatch /index.html $1/start/index.html

ErrorLog /usr/local/tomcat/log/lol_error_html.log
TransferLog /usr/local/tomcat/log/lol_access_html.log

RewriteEngine on
RewriteLog /usr/local/tomcat/log/lol_rewrite.log
RewriteLogLevel 9

RewriteCond %{REQUEST_URI} ^/servlet* [NC]
RewriteRule ^/servlet/(.*) /lol/$1 [PT]

RewriteCond %{REQUEST_URI} !^/lol* [NC]
RewriteCond %{REQUEST_URI} !^/Image* [NC]
RewriteCond %{REQUEST_URI} !^/Elemtech* [NC]
RewriteCond %{REQUEST_URI} !^/Erreur* [NC]
RewriteCond %{REQUEST_URI} ^/.*/.*
RewriteRule ^/(.*) /lol/AdFront?access=/$1 [PT,QSA]



so...

Loïc Lefèvre

-Message d'origine-
De : Jeff Hoare [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi 27 juillet 2001 07:48
À : [EMAIL PROTECTED]
Objet : Re: Configutaion Problems NT <=> Linux


What happens?
If this fits your situation then this may help.
If u are using the sun jdk1.3.1 and u are using a 2.4 kernel then one thing
that can happen is that the jdk won't start because of the default stack
size. In this case you'll get nothing, the thing will try to start tehn die.

If this sounds like you then try
ulimit  -s 2048

Jeff
PS failing that u really need to provide more info, are any logs produced?

On Thursday 26 July 2001 17:57, you wrote:
> Hi
>
> It's me again... Last time, tomcat was configured perfectly
> for NT4. Still I must install it on linux now and after copying
> exactly (but directories ;) ) the result is not the one expected:
> nothing appears !
>
> Any suggestion?
>
> Loïc Lefèvre




Re: WELCOME to tomcat-user@jakarta.apache.org (fwd)

2001-07-26 Thread Arne Meyer Hansen



--On torsdag, juli 26, 2001 14:17:22 +1000 Dmitri Colebatch 
<[EMAIL PROTECTED]> wrote:

> for those of you that are having trouble unsubscribing I have attached my
> copy of the initial mail that I received when I subscribed this
> address.  I suggest you try sending an email to the list owner.

Also, in every mail, you'll find the following "hidden" in the header of 
the mail:

  list-help: 
  list-unsubscribe: 
  list-post: 

Regards,
Arne Meyer Hansen

--
System Developer

Polygnosis AS
Gjerdrums vei 10A
0484 Oslo

Tlf: 22239040
WWW: http://www.polygnosis.com



isapi_redirect.dl

2001-07-26 Thread Furer Alexander



Hi! I'm useing Tomcat3.2 with 
isapi_redirect.dll. 
Here is part of my server.xml config file: 
 
 

 When i run servlets directly 
(hostname:8080/servle/myservlet) the concurrency is OK, i see that requests 
arrive almost in the same time, but when i run through 
isapi_redirect.dll(hostname/servlet/myservlet), the requests arrive one 
after another. What am i doing wrong ? May be i should specify same 
configurations in some ather places ?
Is isapi_redirect.dll multithreaded 
?
 Thanks
 
 
Best regards,Furer 
Alexandertel.055-908925
 
When a password just isn't secure enough, and 
email confirmations don't quite cut it, You need Voice 
authentication.You need Sentry-Com.www.voiceprove.com


Re: Weird thread/security problem

2001-07-26 Thread Francis Pallini

Hi,

Application-wide data (within a container in the case of balanced servers) 
can be put in instance variables, but access must then be synchronized. 
User-related data must be put in the session object...

Regards,

Francis Pallini

At 06:18 PM 7/26/01 +0900, you wrote:
>Hi,
>
>So I think this is a thread/security issue, but I am not sure.  However
>it is definitely weird.
>
>I have been conducting some tests with multiple users.  Various servlets
>are contacted that supply pages to each user, that include information
>such as user name etc.  The version of tomcat in use is 3.2.1, and
>clearly I should upgrade to 3.2.3, but the tomcat is provided by my
>service provider so that might take some time.
>
>Anyway, the problem is that sometimes when two users are accessing the
>system simulatenously the information for one user will be displayed,
>briefly, to the other user.  The system I have developed is quite
>complicated so I can't rule out that this is a problem with the code,
>but I'm not using static variables or anything that would allow this
>swap over.  I mean each user has an object associated with them that
>contains their user name, but these are local variables to the servlet.
>
>Are there or have there been problems with tomcat that would explain
>this problem?  I mean tomcat creates a separate thread for each servlet
>right? Different user, different thread, so their data shouldn't be
>available to each other.
>
>Am I overlooking something here?  Should I be mailing to the developer's
>list?
>
>And on the same topic, does anyone know of any software that will
>simulate multiple users, without me having all my friends test the
>system.  I mean some software (ideally free or shareware) that would
>simulate the stream of http requests, I guess I could hack something
>together myself, but if there's something already out there that would
>be great.
>
>Thanks in advance.
>
>CHEERS> SAM




Re: Configutaion Problems NT <=> Linux

2001-07-26 Thread Jeff Hoare

ok,
so httpd -t will tell u for sure if you have a syntax problem.
I not really familiar with virtual host config, to know if this is correct/ 
or not. 

Is the directory readable by the use that runs the web server?

Should you DocumentRoot stop at webapps? as its seems to be looking for 
webapps/lol/lol ?

Maybe that someone else can assist further.

Jeff
On Thursday 26 July 2001 20:02, you wrote:
> In fact, I hink it's a VHost configuration problem, the Apache's 'ErrorLog'
> file
> indicates:
>
> [Thu Jul 26 08:15:29 2001] [error] [client 192.1.1.33] File does not exist:
> /usr/local/tomcat/jakarta-tomcat-3.2.3/webapps/lol/lol
>
> and my VHost is the following:
> 
> ServerName lol.fivia.com
> DocumentRoot /usr/local/tomcat/jakarta-tomcat-3.2.3/webapps/lol
>
> JkMount /lol/* ajp12
> JkMount /*.jsp ajp12
>
> RedirectMatch /index.html $1/start/index.html
>
> ErrorLog /usr/local/tomcat/log/lol_error_html.log
> TransferLog /usr/local/tomcat/log/lol_access_html.log
>
> RewriteEngine on
> RewriteLog /usr/local/tomcat/log/lol_rewrite.log
> RewriteLogLevel 9
>
> RewriteCond %{REQUEST_URI} ^/servlet* [NC]
> RewriteRule ^/servlet/(.*) /lol/$1 [PT]
>
> RewriteCond %{REQUEST_URI} !^/lol* [NC]
> RewriteCond %{REQUEST_URI} !^/Image* [NC]
> RewriteCond %{REQUEST_URI} !^/Elemtech* [NC]
> RewriteCond %{REQUEST_URI} !^/Erreur* [NC]
> RewriteCond %{REQUEST_URI} ^/.*/.*
> RewriteRule ^/(.*) /lol/AdFront?access=/$1 [PT,QSA]
>
> 
>
> so...
>
> Loïc Lefèvre
>
> -Message d'origine-
> De : Jeff Hoare [mailto:[EMAIL PROTECTED]]
> Envoyé : vendredi 27 juillet 2001 07:48
> À : [EMAIL PROTECTED]
> Objet : Re: Configutaion Problems NT <=> Linux
>
>
> What happens?
> If this fits your situation then this may help.
> If u are using the sun jdk1.3.1 and u are using a 2.4 kernel then one thing
> that can happen is that the jdk won't start because of the default stack
> size. In this case you'll get nothing, the thing will try to start tehn
> die.
>
> If this sounds like you then try
> ulimit  -s 2048
>
> Jeff
> PS failing that u really need to provide more info, are any logs produced?
>
> On Thursday 26 July 2001 17:57, you wrote:
> > Hi
> >
> > It's me again... Last time, tomcat was configured perfectly
> > for NT4. Still I must install it on linux now and after copying
> > exactly (but directories ;) ) the result is not the one expected:
> > nothing appears !
> >
> > Any suggestion?
> >
> > Loïc Lefèvre



Re: Weird thread/security problem

2001-07-26 Thread Sam Joseph
Hi

Michael Weissenbacher wrote:

> that is a simple problem of understanding: there is only one servlet object
> that is used by multiple threads. by having this in mind, your object
> variables are also shared, as would be static variables...

Francis Pallini wrote:

> Application-wide data (within a container in the case of balanced servers)
> can be put in instance variables, but access must then be synchronized.
> User-related data must be put in the session object...

Thanks for the help here.  Gods, I've been writing various servlet applications
for over a year and it seems I've been working with a fundamental
misconception.

This is what comes from spending too much time by yourself, and more
importantly assuming that single user test results extend to multiple users

I guess I have two options, either make the servlet implement the
SingleThreadModel interface, or create some new classes to encapsulate the
appropriate data, and either store that in the session or in some instance
variable like a hashtable ...

Thanks again.

CHEERS> SAM





>
> -Original Message-
> From: Sam Joseph [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 11:18 AM
> To: [EMAIL PROTECTED]
> Subject: Weird thread/security problem
>
> Hi,
>
> So I think this is a thread/security issue, but I am not sure.  However
> it is definitely weird.
>
> I have been conducting some tests with multiple users.  Various servlets
> are contacted that supply pages to each user, that include information
> such as user name etc.  The version of tomcat in use is 3.2.1, and
> clearly I should upgrade to 3.2.3, but the tomcat is provided by my
> service provider so that might take some time.
>
> Anyway, the problem is that sometimes when two users are accessing the
> system simulatenously the information for one user will be displayed,
> briefly, to the other user.  The system I have developed is quite
> complicated so I can't rule out that this is a problem with the code,
> but I'm not using static variables or anything that would allow this
> swap over.  I mean each user has an object associated with them that
> contains their user name, but these are local variables to the servlet.
>
> Are there or have there been problems with tomcat that would explain
> this problem?  I mean tomcat creates a separate thread for each servlet
> right? Different user, different thread, so their data shouldn't be
> available to each other.
>
> Am I overlooking something here?  Should I be mailing to the developer's
> list?
>
> And on the same topic, does anyone know of any software that will
> simulate multiple users, without me having all my friends test the
> system.  I mean some software (ideally free or shareware) that would
> simulate the stream of http requests, I guess I could hack something
> together myself, but if there's something already out there that would
> be great.
>
> Thanks in advance.
>
> CHEERS> SAM


Re: virtual hosting conf question

2001-07-26 Thread Jerry QU

it works by using ajp12. what I missed was vhost setting in server.xml. and I did in 
right way but the code was actually comment out . a very very stupid mistake

thanks anyway

Jerry


 
- Original Message - 
From: "Kaneda K" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 4:45 PM
Subject: Re: virtual hosting conf question


> I Might be wrong, but in order to allow Apache to communicate with tomcat, 
> you need to use ajp13 instead of 12. and did you correctly set mod_jk.so. ?
> 
> At 07:01 26/07/2001 +0800, you wrote:
> >Hi All,
> >
> >We are using Tomact3.2.3 and Apache1.3.20 with mod_jk.so.
> >
> >it works fine when use Directory:
> >
> > Alias /loc "/home/.../path"
> >
> > 
> > Options Indexes FollowSymLinks
> > 
> > JkMount /loc/servlet/* ajp12
> > JkMount /loc/*.jsp ajp12
> >
> >But when trying virtual hosting:
> >
> >NameVirutalHost ip
> >
> > 
> > ServerName www.domain.com
> > DocumentRoot "/home/.../path"
> > JkMount /servlet/* ajp12
> > JkMount /*.jsp ajp12
> > 
> > Options Includes Indexes FollowSymlinks
> > AllowOverride AuthConfig FileInfo Indexes Limit Options
> > Order allow, deny
> > Allow from all
> > 
> >
> > 
> >
> >WE are geting 404 error for all .jsp files and looks like the apache to 
> >tomcat redirect not works
> >
> >anything missing?
> >
> >
> >TIA
> >
> >Jerry
> >
> >
> >
> >
> >
> 



Re: apache+mod_jk+tomcat virtual host sample setting

2001-07-26 Thread Jerry QU

I fixed the problem

thanks 

Jerry


- Original Message - 
From: "Dmitri Colebatch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 1:14 PM
Subject: Re: apache+mod_jk+tomcat virtual host sample setting


> Hi,
> 
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/ is a wonderful
> place:
> 
> search for "httpd.conf server.xml virtual hosts example" and the sixth
> result is:
> 
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg24768.html
> 
> that should give you a start (o:
> 
> cheesr
> dim
> 
> On Thu, 26 Jul 2001, Jerry Qu wrote:
> 
> > Hi All,
> > 
> > is there any one has working sample(s) for setting apache+mod_jk+tomcat virtual 
>host in httpd.conf and server.xml (if needed )
> > 
> > thanks
> > 
> > Jerry Qu
> > 
> 



installation of tomcat on debian failed

2001-07-26 Thread Fabrice Terrasson

I used this configure settings:
./configure --with-apxs=/usr/bin/apxs --prefix=/usr/local/jserv
--with-jdk-home=/usr/lo --with-JSDK=/usr/local/jakarta-tomcat-3.2.3/lib

no errors, but when I do make:

/home/fate/ApacheJServ-1.1.2/src/java/org/apache/jserv/JServConnection.java:85:
org.apache.jserv.JServConnection should be declared abstract; it does
not define flushBuffer() in org.apache.jserv.JServConnection
public class JServConnection
   ^
/home/fate/ApacheJServ-1.1.2/src/java/org/apache/jserv/JServContext.java:90:
org.apache.jserv.JServContext should be declared abstract; it does not
define getAttributeNames() in org.apache.jserv.JServContext
class JServContext implements ServletConfig, ServletContext,
JServSendError, JServLogChannels {
^
/home/fate/ApacheJServ-1.1.2/src/java/org/apache/jserv/JServSession.java:74:
org.apache.jserv.JServSession should be declared abstract; it does not
define getAttribute(java.lang.String) in org.apache.jserv.JServSession
public class JServSession implements HttpSession, JServLogChannels,
Serializable {
   ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
3 errors
make[5]: *** [JServ.class] Error 1
make[5]: Leaving directory
`/home/fate/ApacheJServ-1.1.2/src/java/org/apache/jserv'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/home/fate/ApacheJServ-1.1.2/src/java/org/apache'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/fate/ApacheJServ-1.1.2/src/java/org'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/fate/ApacheJServ-1.1.2/src/java'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/fate/ApacheJServ-1.1.2/src'
make: *** [all-recursive] Error 1
root@brazil:~/ApacheJServ-1.1.2# uname -a
Linux brazil 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i686 unknown

Anyone got a clue ?

-- 
Cordialement,
Fabrice Terrasson. [EMAIL PROTECTED]



Multiple development using tomcat

2001-07-26 Thread Pete

Hi,

I currently am trying to setup tomcat (3.3) to connect to apache-1.3.20,
using mod_jk (apache isn't compiled with DSO support, but has mod_jk , ssl
and php4 support compiled in) .. I can get tomcat working with it fine (i am
still loading the mod_jk module for the tomcat side) ... However we have a
large userbase (students) , and each one will want there own jsp and servlet
directories for there own independant development.. Going through the
mailing list archive search i found one user that did this per user (which
if fine, i could script something to do that for all my users):

Alias /~userX "/home/userX/www"

Options Indexes FollowSymLinks

ApJServMount /~userX/servlet /~userX

However, i would rather not set the classpath for each individual user..
Also due to the large number of users, i would rather not have to restart
the server all the time (although at worst, i will have to set daily, and
users will just have to live with it).. Is it possible for each user to set
there own classpath etc? Anything else that i need to set to achieve this?

Cheers for help
Pete



tomcat.sh stop = Connection refused?

2001-07-26 Thread Richard Draucker

When I attempt to shutdown Tomcat with the tomcat.sh script I get: 

java.net.ConnectionException Connection refused

This is new since I started running RH7.1 and Java1.3.1
with Tomcat 3.1. Anyone know why? 

Of course I can kill it just fine.  But, a nice clean stop would be 
preferable. 


Thanks,
Richard


-- 
Richard Draucker [EMAIL PROTECTED]
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers




Re: Forbidden error, you are unable to access /examples from this server: please help, very urgent

2001-07-26 Thread David Smith

Just a thought on this thread and I've been guilty of this one as well, but 
you might also want to check directory and file permissions.  If the user 
apache is running under does not have at least read permissions, the whole 
thing will fail regardless of settings in any .conf file.

On Thursday 26 July 2001 01:28 am, you wrote:
> hey,
> can anyone give nme their compiled binary of mod_jk.so for apache 1.3.11. 
> I am running tomcat 3.2.2
>
>
> "black holes are,
> when GOD is dividing by zero"
>   - Original Message -
>   From: Senthil Kumar Rajamanickam
>   To: [EMAIL PROTECTED]
>   Sent: Wednesday, July 25, 2001 6:11 PM
>   Subject: RE: Forbidden error, you are unable to access /examples from
> this server: please help, very urgent
>
>
>   With the info.. I could not think of any specific reasons which might
> stop you to set this up..
>
>   just try going through following tasks..
>
>   1. ref. to mod_jk how to manual which you have got along with tomcat, and
> set up your mod_jk with apache ( you have to mount mod_jk in apache like
> this (hey, are u doing your own mod_jk .dll file from source?if that is the
> case check your source for any possible error which can be induced in the
> source??)
>
>   "include  /jakarta-tomcat-3.2.1/conf/mod_jk.conf-auto"
>   ( I would recommend using conf-auto file, so that your tomcat will give
> all the details)
>
>   2.check your apache and tomcat. (just test run your example servlet via 
> apache) If your example application works fine..
>
>   Go ahead and mount a alias directory and try calling jet speed.
>   in case you get some error, check them in apache log and tomcat log for
> error details, (I think that should help you solve the error)
>
>   let me know what is the error you are getting...So that I can try to get
> to the core issue.
>
>   Also note, if you are using winNT, check for environment variables
> setting too for tomcat_home, Apache_home and java_home settings, since in
> your tomcat configuration files, it picks up directory details calling this
> environment variables.
>
>   Note, check if your tools.jar file is accessible by your system(it should
> be in system path)
>
>   Hope this helps..
>   Cheers
>   Senthil Kumar.R
>
>
> -Original Message-
> From: raghu [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 25, 2001 5:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Forbidden error, you are unable to access /examples from
> this server: please help, veryurgent
>
>
> i did as u said, but still i am getting the same error.  I now doubt if
> mod_jk.so is working properly or not? No, i am running only tomcat with
> apache, please help
>
>
>
> "black holes are,
> when GOD is dividing by zero"
>   - Original Message -
>   From: Senthil Kumar Rajamanickam
>   To: [EMAIL PROTECTED]
>   Sent: Wednesday, July 25, 2001 4:46 PM
>   Subject: RE: Forbidden error, you are unable to access /examples from
> this server: please help, veryurgent
>
>
>   try mounting a Alias directory named "jetspeed" and tell apache its
> location.. yes, as you tell mod_jk should take care of it. But I don't
> think their would be any harm in having a alias? (I have mounted all the
> dir with a alias name along with my mod_jk configuration)
>
>   one other possibility would be, check if you are running IIS or PWS 
> with Apache, if that is the case. either stop them or assign them a
> different port number.
>
>   Regards
>   Senthil Kumar.R
>
> -Original Message-
> From: raghu [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 25, 2001 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Forbidden error, you are unable to access /examples
> from this server: please help, veryurgent
>
>
> Hello,
> I have included the mod_jk.conf-auto file in my httpd.conf.  Should
> i mount the directories separately?  My feeling is that mod_jk.conf takes
> care of it
>
>
> "black holes are,
> when GOD is dividing by zero"
>   - Original Message -
>   From: Senthil Kumar Rajamanickam
>   To: [EMAIL PROTECTED]
>   Sent: Wednesday, July 25, 2001 2:19 PM
>   Subject: RE: Forbidden error, you are unable to access /examples
> from this server: please help, veryurgent
>
>
>   Have you checked your Apache httpd.conf file ? have you mounted
> your directory in your apache?
>
>   Regards
>   Senthil Kumar.R
>
> -Original Message-
> From: raghu [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 25, 2001 12:54 PM
> To: tomcat
> Subject: Fw: Forbidden error, you are unable to access
> /examples from this server: please help, veryurgent
>
>
> From: raghu
> To: tomcat
> Sent: Tuesday, July 24, 2001 6:30 PM
> Subject: 403: Forbidden error, you are unable to access

Re: Help w/ Tomcat 4.0b6 and Apache

2001-07-26 Thread Mark Dzmura

Pier:

(I sent this last night, also - but it never seemed to make it too the list.)

SUCCESS!!  But first...

The Java part of the webapp connector does not build for the lack of the
following constant definitions in class org.apache.catalina.connector.warp.Constants:

Constants.TYPE_CBK_DONE
Constants.TYPE_CBK_DATA
Constants.TYPE_CBK_READ

I looked in the C code for corresponding definitions, found them, and added them
to the Java code.  Built and installed the new stuff.  Checked the old example tests,
then went to the app using getParameter() and found them to WORK.  YES!!

Maybe the next thing is to run the JSP test suite...

Thanks for knocking out these fixes so quickly - great job!

Mark




> I just closed bug # 2777. Can you please check it works with the latest CVS
> snapshot? THANKYOUU! :) :) :)
>
> Pier

--
Mark Dzmura
Digital Mission LLC






Problems with authentication

2001-07-26 Thread Mattias Karlsvaerd

Hello!

I've have problems with getting the authorization to
work in tomcat 3.2.2 and Apache 1.3.19. I have tried
to the example comes with tomcat. I get the login
page, but when I've typed the username and password I
get the following error:
The requested URL
/examples/jsp/security/login/j_security_check was not
found on this server.

I've searched on the web and found out that other
people have had the same problem. Is there a solution
to this problem.
What I understand j_security_check, j_username and
j_password is some kind of implicit variables. Is
there any document where this specified.

I use linux Redhat 7.1 and IBM's java2 1.3
I would be thankful for any help

=
/Mattias Karlsvärd

_
Do You Yahoo!?
[EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se



Re: Forbidden error, you are unable to access /examples from this server: please help, very urgent

2001-07-26 Thread raghu

Hi all,
I checked my apache htdocs and saw that all files do have the readme
permissions.
My mod_jk.log looks like this,  i think the error lies here.  Please check
and suggest some solutions.





> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
> [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL parameters
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
> [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL parameters
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
> [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL parameters
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
> [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL parameters
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
> [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL parameters
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
> [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL parameters
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
> [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL parameters
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter
> [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL parameters
> [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close,
NULL parameter


"black holes are,
when GOD is dividing by zero"
- Original Message -
From: David Smith <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 6:37 PM
Subject: Re: Forbidden error, you are unable to access /examples from this
server: please help, very urgent


Just a thought on this thread and I've been guilty of this one as well, but
you might also want to check directory and file permissions.  If the user
apache is running under does not have at least read permissions, the whole
thing will fail regardless of settings in any .conf file.

On Thursday 26 July 2001 01:28 am, you wrote:
> hey,
> can anyone give nme their compiled binary of mod_jk.so for apache 1.3.11.
> I am running tomcat 3.2.2
>
>
> "black holes are,
> when GOD is dividing by zero"
>   - Original Message -
>   From: Senthil Kumar Rajamanickam
>   To: [EMAIL PROTECTED]
>   Sent: Wednesday, July 25, 2001 6:11 PM
>   Subject: RE: Forbidden error, you are unable to access /examples from
> this server: please help, very urgent
>
>
>   With the info.. I could not think of any specific reasons which might
> stop you to set this up..
>
>   just try going through following tasks..
>
>   1. ref. to mod_jk how to manual which you have got along with tomcat,
and
> set up your mod_jk with apache ( you have to mount mod_jk in apache like
> this (hey, are u doing your own mod_jk .dll file from source?if that is
the
> case check your source for any possible error which can be induced in the
> source??)
>
>   "include  /jakarta-tomcat-3.2.1/conf/mod_jk.conf-auto"
>   ( I would recommend using conf-auto file, so that your tomcat will give
> all the details)
>
>   2.check your apache and tomcat. (just test run your example servlet via
> apache) If your example application works fine..
>
>   Go ahead and mount a alias directory and try calling jet speed.
>   in case you get some error, check them in apache log and tomcat log for
> error details, (I think that should help you solve the error)
>
>   let me know what is the error you are getting...So that I can try to get
> to the core issue.
>
>   Also note, if you are using winNT, check for environment variables
> setting too for tomcat_home, Apache_home and java_home settings, since in
> your tomcat configuration files, it picks up directory details calling
this
> environment variables.
>
>   Note, check if your tools.jar file is accessible by your system(it
should
> be in system path)
>
>   Hope this helps..
>   Cheers
>   Senthil Kumar.R
>
>
> -Original Message-
> From: raghu [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 25, 2001 5:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Forbidden error, you are unable to access /examples from
> this server: please help, veryurgent
>
>
> i did as u said, but still i am getting the same error.  I now doubt
if
> mod_jk.so is working properly or not? No, i am running only tomcat with
> apache, please help
>
>
>
> "black holes are,
> when GOD is dividing by zero"
>   - Original Message -
>   From: Senthil Kumar Rajamanickam
>   To: [EMAIL PROTECTED]
>   Sent: Wednesday, July 25, 2001 4:46 P

Re: howto redirect

2001-07-26 Thread Bernhard Wraase

Thank you for your response Rams,

> this is not possible..

but what does this mean?

1.) Redirect won't work at all
or
2) It should work because the server.xml seems to be okay
or
3) It can't work because the server.xml has severe failures
or
4) Something else

TIA Bernhard Wraase




Re: tomcat.sh stop = Connection refused?

2001-07-26 Thread Pete

> When I attempt to shutdown Tomcat with the tomcat.sh script I get:
> 
> java.net.ConnectionException Connection refused
> 
> This is new since I started running RH7.1 and Java1.3.1
> with Tomcat 3.1. Anyone know why?
> 
> Of course I can kill it just fine.  But, a nice clean stop would be
> preferable.

Are you shutting it down as the same user as you started it with?

Pete



Re: tomcat.sh stop = Connection refused?

2001-07-26 Thread Richard Draucker

Logged in as root, starting as root, calling tomcat.sh stop as root.  No su - 
from alternate login, its all root.  And the scripts are owned by root. 



On Thursday 26 July 2001 09:38 am, you wrote:
> > When I attempt to shutdown Tomcat with the tomcat.sh script I get:
> >
> > java.net.ConnectionException Connection refused
> >
> > This is new since I started running RH7.1 and Java1.3.1
> > with Tomcat 3.1. Anyone know why?
> >
> > Of course I can kill it just fine.  But, a nice clean stop would be
> > preferable.
>
> Are you shutting it down as the same user as you started it with?
>
> Pete

-- 
Richard Draucker [EMAIL PROTECTED]
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers




Re: Problems with authentication

2001-07-26 Thread Joseph D Toussaint

It's my understanding that j_security_check, j_username and j_password
are all used with form based authentication (specified in th web.xml).
The idea is that you create a 'custom login screen' and name you user
field j_username and your password j_password.  Then the action for that
form is j_security_check.

Thats about the extent of my knowledge, for more information I'd look at
the Servlet 2.3 spec.  Thats where I found the stuff mentioned above.


hope it helps


joe


On 26 Jul 2001 15:15:08 +0200, Mattias Karlsvaerd wrote:
> Hello!
> 
> I've have problems with getting the authorization to
> work in tomcat 3.2.2 and Apache 1.3.19. I have tried
> to the example comes with tomcat. I get the login
> page, but when I've typed the username and password I
> get the following error:
> The requested URL
> /examples/jsp/security/login/j_security_check was not
> found on this server.
> 
> I've searched on the web and found out that other
> people have had the same problem. Is there a solution
> to this problem.
> What I understand j_security_check, j_username and
> j_password is some kind of implicit variables. Is
> there any document where this specified.
> 
> I use linux Redhat 7.1 and IBM's java2 1.3
> I would be thankful for any help
> 
> =
> /Mattias Karlsvärd
> 
> _
> Do You Yahoo!?
> [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se



-- 
##
# Joseph Toussaint   #
# Caribou Lake Software  #
# http://www.cariboulake.com #
# [EMAIL PROTECTED]   #
# 952-837-98029  #
##




RE: tomcat.sh stop = Connection refused?

2001-07-26 Thread Michael Weissenbacher

maybe the ajp12 connector is disabled, because tomcat needs it to be
shutdown...

-Original Message-
From: Richard Draucker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 3:52 PM
To: Pete
Cc: Tomcat List
Subject: Re: tomcat.sh stop = Connection refused?


Logged in as root, starting as root, calling tomcat.sh stop as root.  No su
- 
from alternate login, its all root.  And the scripts are owned by root. 



On Thursday 26 July 2001 09:38 am, you wrote:
> > When I attempt to shutdown Tomcat with the tomcat.sh script I get:
> >
> > java.net.ConnectionException Connection refused
> >
> > This is new since I started running RH7.1 and Java1.3.1
> > with Tomcat 3.1. Anyone know why?
> >
> > Of course I can kill it just fine.  But, a nice clean stop would be
> > preferable.
>
> Are you shutting it down as the same user as you started it with?
>
> Pete

-- 
Richard Draucker [EMAIL PROTECTED]
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers



Re: tomcat.sh stop = Connection refused?

2001-07-26 Thread Richard Draucker

Thank you.  Not using Apache, I commented it out not realizing anything else 
made use of it.  



On Thursday 26 July 2001 09:54 am, you wrote:
> maybe the ajp12 connector is disabled, because tomcat needs it to be
> shutdown...
>
> -Original Message-
> From: Richard Draucker [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 3:52 PM
> To: Pete
> Cc: Tomcat List
> Subject: Re: tomcat.sh stop = Connection refused?
>
>
> Logged in as root, starting as root, calling tomcat.sh stop as root.  No su
> -
> from alternate login, its all root.  And the scripts are owned by root.
>
> On Thursday 26 July 2001 09:38 am, you wrote:
> > > When I attempt to shutdown Tomcat with the tomcat.sh script I get:
> > >
> > > java.net.ConnectionException Connection refused
> > >
> > > This is new since I started running RH7.1 and Java1.3.1
> > > with Tomcat 3.1. Anyone know why?
> > >
> > > Of course I can kill it just fine.  But, a nice clean stop would be
> > > preferable.
> >
> > Are you shutting it down as the same user as you started it with?
> >
> > Pete

-- 
Richard Draucker [EMAIL PROTECTED]
Protected-Data.Com www.protected-data.com
Remote Data Support For Web Developers




Tomcat reliability

2001-07-26 Thread Christophe Geraud


Hello,

I'm working with tomcat 3.2 with mod_jk & apache on linux.
But sometime tomcat shutdown and i can't find any explaination ...
Is tomcat reliable ?

Thanks for help

Christophe




locating web.xml

2001-07-26 Thread JBrawner

I have created a new directory structure for my servlet and jsp's.
Everything works ok except my servlet cannot find its web.xml file. How do
I tell Tomcat (or the servlet) where it is?  I currently have it in the
same directory as my servlet:

C:\www\PSP\servlet\

Thanks,


Jason E. Brawner





tomcat runs fine standalone but not as module of apache

2001-07-26 Thread Fabrice Terrasson

I got problem for running tomcat on a debian box,

Tomcat runs fine standalone but not as module of apache:

root@brazil:~# apachectl restart
/usr/sbin/apachectl restart: httpd restarted

but nothing appear at http://localhost:8007
http://localhost:80 is ok.

this is the end (altered by myself) of /etc/apache/httpd.conf:
---8<-
...
LoadModule jserv_module /usr/lib/apache/1.3/mod_jserv.so

# The following line is for apacheconfig - DO NOT REMOVE!
ApJServLogFile DISABLED
Include /etc/jserv/jserv.conf

 
#tomcat
Include /usr/local/jakarta-tomcat-3.2.3/conf/brazil-tomcat-apache.conf
->8


-- 
Cordialement,
Fabrice Terrasson. [EMAIL PROTECTED]



Re: locating web.xml

2001-07-26 Thread Mattias Karlsvaerd

You can read the "Developing Applications With Tomcat"
it discribes in steps how you could develop a
webapplication with Tomcat and how the directorytree
should look like. It's availible on tomcat's homepage.

The web.xml file should be placed in the WEB-INF dir
in your docbase dir.
You also have to define a context for your application
in server.xml. This file can be found in the tomcat
home dir in the conf dir.
 
--- [EMAIL PROTECTED] wrote: > I have created a new
directory structure for my
> servlet and jsp's.
> Everything works ok except my servlet cannot find
> its web.xml file. How do
> I tell Tomcat (or the servlet) where it is?  I
> currently have it in the
> same directory as my servlet:
> 
> C:\www\PSP\servlet\
> 
> Thanks,
> 
> 
> Jason E. Brawner
> 
>  

=
/Mattias Karlsvärd

_
Do You Yahoo!?
[EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se



tomcat4b6 classpath for poolman.xml

2001-07-26 Thread Matt Barre

I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have them up and
running except for some trouble with poolman. From the trace before it kills tomcat, it
looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have this file 
in
my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a copy for
tomcat 4 to access? I'm on win2k with 2.0.4 of poolman.

Thanks,
Matt




Re: tomcat4b6 classpath for poolman.xml

2001-07-26 Thread Matt Barre

I guess it might help to include the trace from the out screen. :)

Starting service Tomcat-Standalone
Apache Tomcat/4.0-b6
Starting service Tomcat-Apache
Apache Tomcat/4.0-b6
null
java.lang.NullPointerException
java.lang.NullPointerException
at com.codestudio.management.PoolManConfiguration.parseXML(PoolManConfig
uration.java:121)
at com.codestudio.management.PoolManConfiguration.loadConfiguration(Pool
ManConfiguration.java:75)
at com.codestudio.management.PoolManBootstrap.(PoolManBootstrap.ja
va:61)


Matt


- Original Message -
From: "Matt Barre" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 9:32 AM
Subject: tomcat4b6 classpath for poolman.xml


> I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have them up 
>and
> running except for some trouble with poolman. From the trace before it kills tomcat, 
>it
> looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have this 
>file
in
> my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a copy for
> tomcat 4 to access? I'm on win2k with 2.0.4 of poolman.
>
> Thanks,
> Matt




Re: locating web.xml

2001-07-26 Thread JBrawner


Does tomcat require a WEB-INF directory? I would like to replace the
default:
\WEB-INF\classesdirectory with simply:
\servlet
and have my web.xml be in \servlet instead of \WEB-INF\classes

Is this possible?


Jason E. Brawner
Silenus Group
(248) 735-8077


   
 
Mattias Karlsvaerd 
 
   cc:   
 
 Subject: Re: locating web.xml 
 
07/26/2001 10:27   
 
AM 
 
Please respond to  
 
tomcat-user
 
   
 
   
 




You can read the "Developing Applications With Tomcat"
it discribes in steps how you could develop a
webapplication with Tomcat and how the directorytree
should look like. It's availible on tomcat's homepage.

The web.xml file should be placed in the WEB-INF dir
in your docbase dir.
You also have to define a context for your application
in server.xml. This file can be found in the tomcat
home dir in the conf dir.

--- [EMAIL PROTECTED] wrote: > I have created a new
directory structure for my
> servlet and jsp's.
> Everything works ok except my servlet cannot find
> its web.xml file. How do
> I tell Tomcat (or the servlet) where it is?  I
> currently have it in the
> same directory as my servlet:
>
> C:\www\PSP\servlet\
>
> Thanks,
>
>
> Jason E. Brawner
>
>

=
/Mattias Karlsvärd

_
Do You Yahoo!?
[EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se







Re: Tomcat reliability

2001-07-26 Thread akilus

Which version are u using? Tomcat3.2.1 or Tomcat 3.2.2?



>Hello,
>
>I'm working with tomcat 3.2 with mod_jk & apache on linux.
>But sometime tomcat shutdown and i can't find any explaination ...
>Is tomcat reliable ?
>
>Thanks for help
>
>Christophe


akilus
[EMAIL PROTECTED]




Re: locating web.xml

2001-07-26 Thread Mattias Karlsvaerd

This is specified in the java servlet 2.3 spec.
srv 9.5.

 --- [EMAIL PROTECTED] wrote: > 
> Does tomcat require a WEB-INF directory? I would
> like to replace the
> default:
> \WEB-INF\classesdirectory with simply:
> \servlet
> and have my web.xml be in \servlet instead of
> \WEB-INF\classes
> 
> Is this possible?
> 
> 
> Jason E. Brawner
> Silenus Group
> (248) 735-8077
> 
> 
> 
> 
>   
> Mattias Karlsvaerd  
> 
>   
>  [EMAIL PROTECTED]  
>   
> @yahoo.se>   cc:
> 
>   
> 
> Subject: Re: locating web.xml   
>   
> 07/26/2001 10:27
> 
>   
> AM  
> 
>   
> Please respond to   
> 
>   
> tomcat-user 
> 
>   
> 
> 
>   
> 
> 
>   
> 
> 
> 
> 
> You can read the "Developing Applications With
> Tomcat"
> it discribes in steps how you could develop a
> webapplication with Tomcat and how the directorytree
> should look like. It's availible on tomcat's
> homepage.
> 
> The web.xml file should be placed in the WEB-INF dir
> in your docbase dir.
> You also have to define a context for your
> application
> in server.xml. This file can be found in the tomcat
> home dir in the conf dir.
> 
> --- [EMAIL PROTECTED] wrote: > I have created a
> new
> directory structure for my
> > servlet and jsp's.
> > Everything works ok except my servlet cannot find
> > its web.xml file. How do
> > I tell Tomcat (or the servlet) where it is?  I
> > currently have it in the
> > same directory as my servlet:
> >
> > C:\www\PSP\servlet\
> >
> > Thanks,
> >
> >
> > Jason E. Brawner
> >
> >
> 
> =
> /Mattias Karlsvärd
> 
>
_
> Do You Yahoo!?
> [EMAIL PROTECTED] - skaffa en gratis mailadress på
> http://mail.yahoo.se
> 
> 
> 
>  

=
/Mattias Karlsvärd

_
Do You Yahoo!?
[EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se



How to initialise the Servlets

2001-07-26 Thread Mehul S Dave

I am using Tomcat on NT.
I wanna know how to initialise the servlet .
In which conf file & how.
Thank U


*
Mehul S Dave
Scientific Officer, (STCS Dept.),
Tata Institute of Fundamental Research
Phone - 2152971 Extn - 2372
Mumbai .
webpage:- http://www.csc.tifr.res.in/~mehul
*




Re: Tomcat reliability

2001-07-26 Thread Christophe Geraud

Tomcat 3.2 as said in the previous mail.

akilus a écrit :

> Which version are u using? Tomcat3.2.1 or Tomcat 3.2.2?
>
> >Hello,
> >
> >I'm working with tomcat 3.2 with mod_jk & apache on linux.
> >But sometime tomcat shutdown and i can't find any explaination ...
> >Is tomcat reliable ?
> >
> >Thanks for help
> >
> >Christophe
>
> akilus
> [EMAIL PROTECTED]




tomcat on Port 80 through IIS 5 on Win2K

2001-07-26 Thread Curtis Dougherty

I have a site we have written to use tomcat... call it foosite
we have been accessing it internally as
http://my_site:8080/foosite/index.jsp

I want to set it up on an exposed server...call it foo_net so that from the
big/bad internet we can access it by entering
http://foo_net or even better https://foo_net (ssl - 443)

Can Tomcat support IIS5 as a proxy through port 80 on foo_net or SSL on port
443.  We're using Tomcat 4 Beta6 and I can't find any documentation on how
to do this?

Can someone send me the link or tell what I need to do?  

Thanks in advance.
CurtisD



Tomcat 4.0 b5 does not recognize changes in deployed applications

2001-07-26 Thread [EMAIL PROTECTED]

Please help me as I have been unable to solve this problem.
I am using tomcat 4.0 beta 5 on Windows 98
Every time I deploy a new application to tomcat i.e make a new folder under
"Tomcat-Home\webapps" it is automatically recognized on a server restart.
But any JSP pages that I subsequently add to the folder are not recognized
by the server even after a server restart.
Similarly if this correctly functioning (initially) application is
duplicated with a different name under "Tomcat-Home\webapps" and the server
is restarted the duplicated application is visible to the server but the
duplicated JSP's don't get compiled and I get the following message "a
servlet exception has occurred"
I would be grateful if someone tells me how the incremental changes to ones
application can be correctly reflected to tomcat.
Anwar





Re: Help w/ Tomcat 4.0b6 and Apache

2001-07-26 Thread Pier P. Fumagalli

Mark Dzmura at [EMAIL PROTECTED] wrote:

> Pier:
> 
> (I sent this last night, also - but it never seemed to make it too the list.)
> 
> SUCCESS!!  But first...
> 
> The Java part of the webapp connector does not build for the lack of the
> following constant definitions in class
> org.apache.catalina.connector.warp.Constants:
> 
> Constants.TYPE_CBK_DONE
> Constants.TYPE_CBK_DATA
> Constants.TYPE_CBK_READ
> 
> I looked in the C code for corresponding definitions, found them, and added
> them to the Java code.  Built and installed the new stuff.  Checked the old
> example tests, then went to the app using getParameter() and found them to
> WORK.  YES!!

Fuck... :) Thanks Mark... Fixed in CVS now...

> Maybe the next thing is to run the JSP test suite...

Go ahead... :) 

> Thanks for knocking out these fixes so quickly - great job!

No problems... We'll see how fast I knock out the ones coming out of the JSP
test suite :)

Pier




RE: keeping sessions when switching from http to https

2001-07-26 Thread Li Liang

It seems that Tomcat treats "http" and "https" as different domains. So
that it can't encode the "http" session id into "https" url. Maybe you
should post this question to Tomcat-dev mailing list if you can't get
the answer here. I am sure the developers must realize this issue since
this is something happening in many cases.

Thanks.

-Original Message-
From: Brigger Patrick [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 2:40 AM
To: '[EMAIL PROTECTED]'
Subject: RE: keeping sessions when switching from http to https



I access a JSP SessionTest.jsp using http. The jsp contains a link which
looks like:

go to new link

Nothing is added to the encoded url, i.e. no url rewriting takes place.

When I access the same JSP page using https to start with, the rewriting
works fine.

I wonder if it has something to do how the virtual servers (the http and
the
https) are set up?

Pat

P.S. To the best of my knowledge, this e-mail should be sent in plain
text
format, not html, at least that is what my browser tells me. Please
advice
if incorrect.



-Original Message-
From: Li Liang [mailto:[EMAIL PROTECTED]]
Sent: Mittwoch, 25. Juli 2001 20:09
To: [EMAIL PROTECTED]
Subject: RE: keeping sessions when switching from http to https


I guess that's the way Tomcat parses the session info from request. When
it gets the cookie, everything is fine that it can get "jsessionid" from
the cookie and passes it back.

But without cookie, it needs to rewrite the url. I saw somebody said
that "https" and "http" are different schemes that
HttpServletResponse.encodueURL() cannot encode the existing session id
(for "http") into the "https" URL, thus practically prevents the session
passed on to "https".

This IS a problem. Many handheld devices don't support cookie at all. I
am supprised that nobody has declared successfully solving this problem
yet.

Brigger, can you please check when turning off cookie, is the
"jsessionid" correctly encoded into the returned "https" url?

Thanks.
Li

-Original Message-
From: William Kaufman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 11:04 AM
To: '[EMAIL PROTECTED]'
Subject: RE: keeping sessions when switching from http to https


Are you encoding the cross-protocol links (with
HttpServletResponse.encode[Redirect]URL())?

The only reason I ask is that it seems strange that it does OK with
cookies
but not with URL encoding: the code paths are similar, so I'd expect it
to
fail with both or succeed with both.

-- Bill K.

> -Original Message-
> From: Brigger Patrick [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 11:05 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: keeping sessions when switching from http to https
>
>
> When I try with cookies enabled, it works both on Netscape and IE 5.
>
> Cookies disabled does not work on either.
>
> Pat
>
> -Original Message-
> From: Mike Spreitzer [mailto:[EMAIL PROTECTED]]
> Sent: Dienstag, 24. Juli 2001 19:13
> To: [EMAIL PROTECTED]
> Subject: Re: keeping sessions when switching from http to https
>
>
> Be careful when you experiment and report on this.  I have
> found that IE 5
> carries cookies from http to https but Netscape 4 does not. 
> I have only
> tested this with cookies, not URL-rewriting.  I'm grumped by
> this problem,
> but it's not critcal for me yet --- for my current site, I
> think I can get
> away with only having sessions on the https side.
>
> Mike
>



RE: Help!! Apache won't redirect to tomcat

2001-07-26 Thread Nance, Michael

Dmitri.. I don't think I am getting teh 146 error because I cleaned out my
mod_jk.log
restarted everything and tried again... I still get a 404 error and there is
nothing in my mod_jk.log
Where should I check to make sure the 12/13 connectors are started Or is
there something else I should check?

Thanks for your time
Mike

-Original Message-
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 5:03 PM
To: [EMAIL PROTECTED]
Subject: RE: Help!! Apache won't redirect to tomcat


something else that may be worth checking... are apache and tomcat running
on the same box?  the default workers.properties assumes they are, so if
you're using that and tomcat is on a different box apache will be trying
to connect to localhost when it should be looking for the box that tomcat
is on...  just a thought.

cheesr
dim

On Thu, 26 Jul 2001, John Bazeley wrote:

> Yep, that'll teach me to read the email thoroughly!
> 
> Whatever happens, it's trying to connect to something that
> isn't there.
> 
> Backing up, then, is your ajp12 handler running?
> 
> Did tomcat mention in its startup:
> 
> 2001-07-25 09:34:43 - PoolTcpConnector: Starting Ajp12ConnectionHandler on
> 8007
> 
> or similar?
> 
> If it did, I'm out of ideas. If not, server.xml should have
> 
> 
> 
value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
> 
> 
> 
> or similar.
> 
> To add Ajp13 support, copy those lines and change the 12 to 13 and
> 8007 to 8009 in the copied set.
> 
> Cheers,
> --
> John
> 
> 
> > -Original Message-
> > From: Nance, Michael [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 26 July 2001 09:07
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: Help!! Apache won't redirect to tomcat
> >
> >
> > I checked if tomcat was startred by bringing up one of the examples.  It
> > worked...
> > Can you send me the format for the server.xml... I got the one I
> > have out of
> > the how to...
> > but mine I thought were using the ajp12
> >
> >
> > -Original Message-
> > From: John Bazeley [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 25, 2001 1:52 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Help!! Apache won't redirect to tomcat
> >
> >
> > you're on Solaris, right?
> >
> > 146 is 'connection refused'.
> >
> > Your ajp13 handler isn't running. Either:
> >
> > tomcat isn't started
> > ajp13 handler is not activated in server.xml.
> >
> > --
> > John
> >
> > > -Original Message-
> > > From: Nance, Michael [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, 26 July 2001 06:55
> > > To: [EMAIL PROTECTED]
> > > Subject: Help!! Apache won't redirect to tomcat
> > >
> > >
> > > Someone please Help.
> > >
> > > I have copied the auto conf genereated by tomcat and included that in
> > > my httpd.conf file  with the following line
> > >
> > > Include
> > > /opt/pokemon/bin/col_bin/tomcat/tomcat35_322/conf/tomcat-mod_jk-ap
> > > ache.conf
> > >
> > > I added lines to tomcat-mod_jk-apache.conf to hopefully recognize my
url
> > > JkMount /buy/* ajp12
> > > JkMount /olympics/*  ajp12
> > > JkMount /sloc2002/* ajp12
> > > JkMount /maintenance/* ajp12
> > > JkMount /xml/* ajp12
> > >
> > > but it doesn't seem to recognize the url
> > >
> > > I am getting
> > > [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146
> > > [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
> > >
> > > in my mod_jk.log and no errors in my apache http_error.log
> > >
> > > I started tomcat first.
> > >
> > >
> > > Can Anyone offer some help?
> > >
> > > Thanks
> > > Mike
> > >
> >
> 
> 



Re: Weird thread/security problem

2001-07-26 Thread Dmitri Colebatch

Application wide content should be stored in the context, not as servlet
variables.  This is because if the servlets are load balanced across
multiple jvms, or if servles implement the SingleThreadedModel then tomcat
will need to ensure that all instances of servlets on all jvms share the
one object.  correct?

cheesr
dim

On Thu, 26 Jul 2001, Francis Pallini wrote:

> Hi,
> 
> Application-wide data (within a container in the case of balanced servers) 
> can be put in instance variables, but access must then be synchronized. 
> User-related data must be put in the session object...
> 
> Regards,
> 
> Francis Pallini
> 
> At 06:18 PM 7/26/01 +0900, you wrote:
> >Hi,
> >
> >So I think this is a thread/security issue, but I am not sure.  However
> >it is definitely weird.
> >
> >I have been conducting some tests with multiple users.  Various servlets
> >are contacted that supply pages to each user, that include information
> >such as user name etc.  The version of tomcat in use is 3.2.1, and
> >clearly I should upgrade to 3.2.3, but the tomcat is provided by my
> >service provider so that might take some time.
> >
> >Anyway, the problem is that sometimes when two users are accessing the
> >system simulatenously the information for one user will be displayed,
> >briefly, to the other user.  The system I have developed is quite
> >complicated so I can't rule out that this is a problem with the code,
> >but I'm not using static variables or anything that would allow this
> >swap over.  I mean each user has an object associated with them that
> >contains their user name, but these are local variables to the servlet.
> >
> >Are there or have there been problems with tomcat that would explain
> >this problem?  I mean tomcat creates a separate thread for each servlet
> >right? Different user, different thread, so their data shouldn't be
> >available to each other.
> >
> >Am I overlooking something here?  Should I be mailing to the developer's
> >list?
> >
> >And on the same topic, does anyone know of any software that will
> >simulate multiple users, without me having all my friends test the
> >system.  I mean some software (ideally free or shareware) that would
> >simulate the stream of http requests, I guess I could hack something
> >together myself, but if there's something already out there that would
> >be great.
> >
> >Thanks in advance.
> >
> >CHEERS> SAM
> 
> 




Power reset on NT/IIS kills Tomcat?

2001-07-26 Thread Ken Grigg

Hi all,

I am running Tomcat 3.2.3 on NT/IIS with the Jikes compiler, and noticed if
the server is reset (i.e. power glitch) without a normal shutdown, the work
directory seems to get corrupted. The symptoms are that the JSPs can't be
compiled until the associated class files (that otherwise compile fine) are
deleted from the work directory.

I couldn't find any discussion on this problem in the archives or the web,
except for the possibly related discussion at:

http://www.javaclue.org/tomcat/patch32b6/letspatch.html#step5

I was surprised to see that patch (against 3.2.1) hadn't been applied to
3.2.3, but it didn't work anyway.

In case it was Jikes, I tried manually recompiling the JSP source in the
work directory, and that worked fine. (The JSP source gets regenerated OK...
it just won't compile).

Any advice/ideas would be greatly appreciated!

The jasper.log file gives:
2001-07-26 11:33:06 - JspEngine --> /contextAdmin/contextAdmin.jsp
2001-07-26 11:33:06 -ServletPath: /contextAdmin/contextAdmin.jsp
2001-07-26 11:33:06 -   PathInfo: null
2001-07-26 11:33:06 -   RealPath:
C:\jakarta-tomcat\webapps\admin\contextAdmin\contextAdmin.jsp
2001-07-26 11:33:06 - RequestURI:
/admin/contextAdmin/contextAdmin.jsp
2001-07-26 11:33:06 -QueryString:
submit=View+All+Contexts&addContextPath=&addContextDocBase=&removeContextNam
e=
2001-07-26 11:33:06 - Request Params: 
2001-07-26 11:33:06 -removeContextName = 
2001-07-26 11:33:06 -addContextPath = 
2001-07-26 11:33:06 -submit = View All Contexts
2001-07-26 11:33:06 -addContextDocBase = 
2001-07-26 11:33:06 - Classpath according to the Servlet Engine is:
C:\jakarta-tomcat\webapps\admin\WEB-INF\classes
2001-07-26 11:33:06 - Package name is: contextAdmin
2001-07-26 11:33:06 - Class file name is:
C:\jakarta-tomcat\work\localhost_8080%2Fadmin\_0002fcontextAdmin_0002fcontex
tAdmin_0002ejspcontextAdmin.class

The tomcat.log file gives:
2001-07-26 11:33:06 - Ctx( /admin ): JasperException: R( /admin +
/contextAdmin/contextAdmin.jsp + null) Unable to compile class for JSP

And the browser response is:
Root cause: 
java.lang.ArrayIndexOutOfBoundsException
at
org.apache.jasper.compiler.ClassName.processClassData(ClassName.java:89)
at
org.apache.jasper.compiler.ClassName.getClassName(ClassName.java:191)
at
org.apache.jasper.compiler.JspCompiler.getRealClassName(JspCompiler.java:136
)
at
org.apache.jasper.compiler.JspCompiler.getClassName(JspCompiler.java:150)
at
org.apache.jasper.compiler.Compiler.computeServletClassName(Compiler.java:31
2)
at
org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:615)
at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:258)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:268)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
2)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Unknown Source)

---
Ken Grigg
mailto:[EMAIL PROTECTED]



Re: Problems with authentication

2001-07-26 Thread Mattias Karlsvaerd

Thank you! this will help me understand how it works
with j_security_check, j_username and j_password
better.
But i still have the problem that the authorization
doesn't work with apcach + tomcat.
I've read that other people that have the problem have
got it to work on tomcat standalone server!?


 --- Joseph D Toussaint <[EMAIL PROTECTED]>
wrote: > It's my understanding that j_security_check,
> j_username and j_password
> are all used with form based authentication
> (specified in th web.xml).
> The idea is that you create a 'custom login screen'
> and name you user
> field j_username and your password j_password.  Then
> the action for that
> form is j_security_check.
> 
> Thats about the extent of my knowledge, for more
> information I'd look at
> the Servlet 2.3 spec.  Thats where I found the stuff
> mentioned above.
> 
> 
> hope it helps
> 
> 
> joe
> 
> 
> On 26 Jul 2001 15:15:08 +0200, Mattias Karlsvaerd
> wrote:
> > Hello!
> > 
> > I've have problems with getting the authorization
> to
> > work in tomcat 3.2.2 and Apache 1.3.19. I have
> tried
> > to the example comes with tomcat. I get the login
> > page, but when I've typed the username and
> password I
> > get the following error:
> > The requested URL
> > /examples/jsp/security/login/j_security_check was
> not
> > found on this server.
> > 
> > I've searched on the web and found out that other
> > people have had the same problem. Is there a
> solution
> > to this problem.
> > What I understand j_security_check, j_username and
> > j_password is some kind of implicit variables. Is
> > there any document where this specified.
> > 
> > I use linux Redhat 7.1 and IBM's java2 1.3
> > I would be thankful for any help
> > 
> > =
> > /Mattias Karlsvärd
> > 
> >
>
_
> > Do You Yahoo!?
> > [EMAIL PROTECTED] - skaffa en gratis mailadress
> på http://mail.yahoo.se
> 
> 
> 
> -- 
> ##
> # Joseph Toussaint   #
> # Caribou Lake Software  #
> # http://www.cariboulake.com #
> # [EMAIL PROTECTED]   #
> # 952-837-98029  #
> ##
>  

=
/Mattias Karlsvärd

_
Do You Yahoo!?
[EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se



RE: Help!! Apache won't redirect to tomcat

2001-07-26 Thread Dmitri Colebatch

Mike,

Sorry for being forgetful... but what page are you requesting?  I'm just
checking that you do have a valid JkMount that will match the page
requested, and that it matches something that can be requested via tomcat
directly.

For example.  If you are trying to request
http://localhost/examples/Foo then you should have JkMount /examples
ajp12 or similar in your httpd conf, and also
http://localhost:8080/examples/FooServlet should work.  Does this sound
right?  

Sorry I haven't completely followed this so I hope I'm not suggesting
things that might've already been suggested.

cheers
dim

On Thu, 26 Jul 2001, Nance, Michael wrote:

> Dmitri.. I don't think I am getting teh 146 error because I cleaned out my
> mod_jk.log
> restarted everything and tried again... I still get a 404 error and there is
> nothing in my mod_jk.log
> Where should I check to make sure the 12/13 connectors are started Or is
> there something else I should check?
> 
> Thanks for your time
> Mike
> 
> -Original Message-
> From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 25, 2001 5:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Help!! Apache won't redirect to tomcat
> 
> 
> something else that may be worth checking... are apache and tomcat running
> on the same box?  the default workers.properties assumes they are, so if
> you're using that and tomcat is on a different box apache will be trying
> to connect to localhost when it should be looking for the box that tomcat
> is on...  just a thought.
> 
> cheesr
> dim
> 
> On Thu, 26 Jul 2001, John Bazeley wrote:
> 
> > Yep, that'll teach me to read the email thoroughly!
> > 
> > Whatever happens, it's trying to connect to something that
> > isn't there.
> > 
> > Backing up, then, is your ajp12 handler running?
> > 
> > Did tomcat mention in its startup:
> > 
> > 2001-07-25 09:34:43 - PoolTcpConnector: Starting Ajp12ConnectionHandler on
> > 8007
> > 
> > or similar?
> > 
> > If it did, I'm out of ideas. If not, server.xml should have
> > 
> > 
> >  >
> value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
> > 
> > 
> > 
> > or similar.
> > 
> > To add Ajp13 support, copy those lines and change the 12 to 13 and
> > 8007 to 8009 in the copied set.
> > 
> > Cheers,
> > --
> > John
> > 
> > 
> > > -Original Message-
> > > From: Nance, Michael [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, 26 July 2001 09:07
> > > To: '[EMAIL PROTECTED]'
> > > Subject: RE: Help!! Apache won't redirect to tomcat
> > >
> > >
> > > I checked if tomcat was startred by bringing up one of the examples.  It
> > > worked...
> > > Can you send me the format for the server.xml... I got the one I
> > > have out of
> > > the how to...
> > > but mine I thought were using the ajp12
> > >
> > >
> > > -Original Message-
> > > From: John Bazeley [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, July 25, 2001 1:52 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: Help!! Apache won't redirect to tomcat
> > >
> > >
> > > you're on Solaris, right?
> > >
> > > 146 is 'connection refused'.
> > >
> > > Your ajp13 handler isn't running. Either:
> > >
> > > tomcat isn't started
> > > ajp13 handler is not activated in server.xml.
> > >
> > > --
> > > John
> > >
> > > > -Original Message-
> > > > From: Nance, Michael [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, 26 July 2001 06:55
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Help!! Apache won't redirect to tomcat
> > > >
> > > >
> > > > Someone please Help.
> > > >
> > > > I have copied the auto conf genereated by tomcat and included that in
> > > > my httpd.conf file  with the following line
> > > >
> > > > Include
> > > > /opt/pokemon/bin/col_bin/tomcat/tomcat35_322/conf/tomcat-mod_jk-ap
> > > > ache.conf
> > > >
> > > > I added lines to tomcat-mod_jk-apache.conf to hopefully recognize my
> url
> > > > JkMount /buy/* ajp12
> > > > JkMount /olympics/*  ajp12
> > > > JkMount /sloc2002/* ajp12
> > > > JkMount /maintenance/* ajp12
> > > > JkMount /xml/* ajp12
> > > >
> > > > but it doesn't seem to recognize the url
> > > >
> > > > I am getting
> > > > [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146
> > > > [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
> > > >
> > > > in my mod_jk.log and no errors in my apache http_error.log
> > > >
> > > > I started tomcat first.
> > > >
> > > >
> > > > Can Anyone offer some help?
> > > >
> > > > Thanks
> > > > Mike
> > > >
> > >
> > 
> > 
> 




Tomcat VHost configuration under Linux

2001-07-26 Thread Loïc Lefèvre

Hi
After 3 days passed on the configuration of Apache 1.3.12+Tomcat 3.2.3
(mod_jk)
I'm going mad !!! :( Could someone please send me their configuration files
(mod_jk.conf + server.xml + web.xml (tomcat + appli)). Note: the files for a
web archive which work !

After that, I'm going to work in source files >:)

Loïc Lefèvre




RE: Help!! Apache won't redirect to tomcat

2001-07-26 Thread Nance, Michael

No need to be sorry your help is GREATLY appreciated.
The page I am requestiong is 

http://localhost/buy/MLBEventInfo

I include a file tomcat-mod_jk-apache.conf by using include ... in my httpd
file
in there I have  these mounts
JkMount /buy/* ajp13
JkMount /olympics/*  ajp13
JkMount /sloc2002/* ajp13
JkMount /maintenance/* ajp13
JkMount /xml/* ajp13

Thank you again for your help..I am getting very frustrated and discouraged
-Original Message-
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 9:06 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Help!! Apache won't redirect to tomcat


Mike,

Sorry for being forgetful... but what page are you requesting?  I'm just
checking that you do have a valid JkMount that will match the page
requested, and that it matches something that can be requested via tomcat
directly.

For example.  If you are trying to request
http://localhost/examples/Foo then you should have JkMount /examples
ajp12 or similar in your httpd conf, and also
http://localhost:8080/examples/FooServlet should work.  Does this sound
right?  

Sorry I haven't completely followed this so I hope I'm not suggesting
things that might've already been suggested.

cheers
dim

On Thu, 26 Jul 2001, Nance, Michael wrote:

> Dmitri.. I don't think I am getting teh 146 error because I cleaned out my
> mod_jk.log
> restarted everything and tried again... I still get a 404 error and there
is
> nothing in my mod_jk.log
> Where should I check to make sure the 12/13 connectors are started Or
is
> there something else I should check?
> 
> Thanks for your time
> Mike
> 
> -Original Message-
> From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 25, 2001 5:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Help!! Apache won't redirect to tomcat
> 
> 
> something else that may be worth checking... are apache and tomcat running
> on the same box?  the default workers.properties assumes they are, so if
> you're using that and tomcat is on a different box apache will be trying
> to connect to localhost when it should be looking for the box that tomcat
> is on...  just a thought.
> 
> cheesr
> dim
> 
> On Thu, 26 Jul 2001, John Bazeley wrote:
> 
> > Yep, that'll teach me to read the email thoroughly!
> > 
> > Whatever happens, it's trying to connect to something that
> > isn't there.
> > 
> > Backing up, then, is your ajp12 handler running?
> > 
> > Did tomcat mention in its startup:
> > 
> > 2001-07-25 09:34:43 - PoolTcpConnector: Starting Ajp12ConnectionHandler
on
> > 8007
> > 
> > or similar?
> > 
> > If it did, I'm out of ideas. If not, server.xml should have
> > 
> > 
> >  >
> value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
> > 
> > 
> > 
> > or similar.
> > 
> > To add Ajp13 support, copy those lines and change the 12 to 13 and
> > 8007 to 8009 in the copied set.
> > 
> > Cheers,
> > --
> > John
> > 
> > 
> > > -Original Message-
> > > From: Nance, Michael [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, 26 July 2001 09:07
> > > To: '[EMAIL PROTECTED]'
> > > Subject: RE: Help!! Apache won't redirect to tomcat
> > >
> > >
> > > I checked if tomcat was startred by bringing up one of the examples.
It
> > > worked...
> > > Can you send me the format for the server.xml... I got the one I
> > > have out of
> > > the how to...
> > > but mine I thought were using the ajp12
> > >
> > >
> > > -Original Message-
> > > From: John Bazeley [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, July 25, 2001 1:52 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: Help!! Apache won't redirect to tomcat
> > >
> > >
> > > you're on Solaris, right?
> > >
> > > 146 is 'connection refused'.
> > >
> > > Your ajp13 handler isn't running. Either:
> > >
> > > tomcat isn't started
> > > ajp13 handler is not activated in server.xml.
> > >
> > > --
> > > John
> > >
> > > > -Original Message-
> > > > From: Nance, Michael [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, 26 July 2001 06:55
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Help!! Apache won't redirect to tomcat
> > > >
> > > >
> > > > Someone please Help.
> > > >
> > > > I have copied the auto conf genereated by tomcat and included that
in
> > > > my httpd.conf file  with the following line
> > > >
> > > > Include
> > > > /opt/pokemon/bin/col_bin/tomcat/tomcat35_322/conf/tomcat-mod_jk-ap
> > > > ache.conf
> > > >
> > > > I added lines to tomcat-mod_jk-apache.conf to hopefully recognize my
> url
> > > > JkMount /buy/* ajp12
> > > > JkMount /olympics/*  ajp12
> > > > JkMount /sloc2002/* ajp12
> > > > JkMount /maintenance/* ajp12
> > > > JkMount /xml/* ajp12
> > > >
> > > > but it doesn't seem to recognize the url
> > > >
> > > > I am getting
> > > > [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146
> > > > [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
> > > >
> > > > in my mod_jk.log and no errors in my apache ht

Re: Problems with authentication

2001-07-26 Thread Andrew Robson

Hi,
  If you get it to work in tomcat standalone (have you
tried that?) then you need to add 
JkMount /examples/jsp/security/login/j_security_check ajp13
(or ajp12 if that's the connector you are using)
to httpd.conf to get it to work with apache. 
Otherwise apache won't know to delegate the handling of
this url to tomcat.

andrew

On Thu, 26 Jul 2001, you wrote:
> Thank you! this will help me understand how it works
> with j_security_check, j_username and j_password
> better.
> But i still have the problem that the authorization
> doesn't work with apcach + tomcat.
> I've read that other people that have the problem have
> got it to work on tomcat standalone server!?
> 
> 
>  --- Joseph D Toussaint <[EMAIL PROTECTED]>
> wrote: > It's my understanding that j_security_check,
> > j_username and j_password
> > are all used with form based authentication
> > (specified in th web.xml).
> > The idea is that you create a 'custom login screen'
> > and name you user
> > field j_username and your password j_password.  Then
> > the action for that
> > form is j_security_check.
> > 
> > Thats about the extent of my knowledge, for more
> > information I'd look at
> > the Servlet 2.3 spec.  Thats where I found the stuff
> > mentioned above.
> > 
> > 
> > hope it helps
> > 
> > 
> > joe
> > 
> > 
> > On 26 Jul 2001 15:15:08 +0200, Mattias Karlsvaerd
> > wrote:
> > > Hello!
> > > 
> > > I've have problems with getting the authorization
> > to
> > > work in tomcat 3.2.2 and Apache 1.3.19. I have
> > tried
> > > to the example comes with tomcat. I get the login
> > > page, but when I've typed the username and
> > password I
> > > get the following error:
> > > The requested URL
> > > /examples/jsp/security/login/j_security_check was
> > not
> > > found on this server.
> > > 
> > > I've searched on the web and found out that other
> > > people have had the same problem. Is there a
> > solution
> > > to this problem.
> > > What I understand j_security_check, j_username and
> > > j_password is some kind of implicit variables. Is
> > > there any document where this specified.
> > > 
> > > I use linux Redhat 7.1 and IBM's java2 1.3
> > > I would be thankful for any help
> > > 
> > > =
> > > /Mattias Karlsvärd
> > > 
> > >
> >
> _
> > > Do You Yahoo!?
> > > [EMAIL PROTECTED] - skaffa en gratis mailadress
> > på http://mail.yahoo.se
> > 
> > 
> > 
> > -- 
> > ##
> > # Joseph Toussaint   #
> > # Caribou Lake Software  #
> > # http://www.cariboulake.com #
> > # [EMAIL PROTECTED]   #
> > # 952-837-98029  #
> > ##
> >  
> 
> =
> /Mattias Karlsvärd
> 
> _
> Do You Yahoo!?
> [EMAIL PROTECTED] - skaffa en gratis mailadress på http://mail.yahoo.se
-- 






jsp not storing session state

2001-07-26 Thread Stewart Allen

I'm running Tomcat 3.2.3 from a custom classloader inside my 
application. Everything seems to be working (jsp compilation, etc) with 
the exception that it's not storing/restoring state correctly. For 
example, in the numberguess example :

  http://localhost:8080/examples/jsp/num/numguess.jsp

It always tells me I have made 1 guess. My classloader is telling me 
that a call is made to get the resource "num/NumberGuessBean.ser". Where 
is this filed supposed to come from? There exists no such file so my 
loader correctly returns null.

Any ideas would be appreciated,

stewart




Re: WebappClassLoader question

2001-07-26 Thread Vincent Massol

Thanks Alex,

I don't think the standard classloader mechanism is involved here. I believe
it is a 'feature' of Tomcat and more specifically of it's WebappClassLoader.
When you do standard java code and you have the following situation :

1st -> 2nd --- (using reflection) --> 3rd (not in classpath)

then the error always happen in the 2nd class and you can put the code
between a try catch block and you'll be able to catch the
ClassNotFoundException. However what happens here is that the error happens
when calling a method on the 1st class that instanciates the 2nd class !
This is what I don't understand.

Am I dreaming or is this a behaviour of Tomcat 4 ?

Thanks
-Vincent

- Original Message -
From: "Alex Fernández" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 3:44 PM
Subject: Re: WebappClassLoader question


> Hi Vincent!
>
> I've run into the same situation a couple of times, when one class uses
> a second class, and this second class uses a third one that is not
> present.
>
> 1st -> 2nd -> 3rd (missing)
>
> One would think that instantiating the 2nd should give an error, but
> that loading the 2nd and/or instantiating the 1st should be ok. In fact,
> all of the behaviors raise exceptions.
>
> The following paragraph in ClassLoader javadoc might be of help:
>
> "The methods and constructors of objects created by a class loader may
> reference other classes. To determine the class(es) referred to, the
> Java virtual machine calls the loadClass method of the class loader that
> originally created the class."
>
> Or, to find out what the JVM is doing, the spec is here:
> http://java.sun.com/docs/books/vmspec/
>
> Hope it helps.
>
> Un saludo,
>
> Alex.
>
> > Vincent Massol wrote:
> >
> > Hi,
> >
> > Here is the situation :
> >
> > * I have a class that makes use of JUnit (by extending the JUnit
> > TestCase class). Let's call it ServletTestCase
> > * I have a second class that is used to call a method in
> > ServletTestCase, let's call it MyProxyClass
> > * I have a third class (a servlet) that does _not_ make use of JUnit.
> > Let's call it ServletTestRedirector. This class actually instanciate
> > MyProxyClass and calls one of its method.
> > * I package these classes in a war file and I _don't_ include
> > junit.jar in this war file
> >
> > When I access the servlet, I get a ClassNotFoundException on a JUnit
> > class. So far it is normal ...
> > When I debugged it, I have actually found that the error was happening
> > when ServletTestRedirector was instancianting MyProxyClass (which does
> > _not_ make use of JUnit) and before it was calling its method.
> >
> > Here is the stack trace I got :
> >
> > java.lang.NoClassDefFoundError: junit/framework/TestCase
> >  at java.lang.ClassLoader.defineClass0(Native Method)
> >  at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> >  at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
> >  at
> >
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
ader.java:1475)
> >  at
> >
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
a:836)
> >  at
> >
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1215)
> >  at
> >
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1098)
> >  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> >  at
> >
org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTestRed
irector.java:143)
> > Here is what I imagined is happening (tell me if this correct or wrong
> > !) :
> >
> > As MyProxyClass is within the war file, the WebappClassLoader gets
> > called to load it. The WebappClassLoader, in trying to find out the
> > correct class, actually loads some other class in memory, and thus the
> > ServletTestCase, which fails to load because the junit jar is not in
> > the classpath.
> >
> > Is that correct ?
> > Don't you find it strange that the error about the missing class is
> > reported when calling a class that has nothing to do with the problem
> > ? It gets very hard to catch errors ...
> >
> > For example, in MyProxyClass, the code that calls the ServletTestCase
> > method is as follows :
> >
> > ServletTestCase testInstance = null;
> > try {
> > testClass = Class.forName(theClassName);
> > Constructor constructor = testClass.getConstructor(new
> > Class[] { String.class });
> > testInstance =
> > (ServletTestCase)constructor.newInstance(new Object[] { theMethod });
> > } catch (Exception e) {
> > logger.debug("Error instanciating class [" + theClassName
> > + "]", e);
> > e.printStackTrace();
> > throw new ServletException("Error instanciating class [" +
> > theClassName + "]", e);
> > }
> > And there is never any exception caught here  because the error
> > happens earlier in the call stack, when the ServletTestRedirect

Selectively publishing servlets on a port.

2001-07-26 Thread Mandar Joshi

Hi All,

I want to restrict a servlet on certain port (connector). 
I don't want other connectors to see it. Is it possible to do.
I am using tomcat 3.2.2 on Windows 2000 as a standalone setup.

Alternately is it possible to turn on the authentication for a single
servlet ?

Thanks in Advance
Mandar



Apxs problem

2001-07-26 Thread Aaron Cooper

HI folks

I re-installed the apache web server , building it from source.  Now I am trying to 
configure tomcat with apache using the mod_jk web adapter.  However, when I run apxs, 
it produces the following message:

gcc -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic -DSHARED_CORE -
DSHARED_MODULE -I/usr/local/apache/include -I../common -I/opt/java1.2/include -I
/opt/java1.2/include/hp-ux -DHPUX11GCC  -c ../common/jk_ajp12_worker.c
apxs:Break: Command failed with rc=255
Error with apxs


I've read the mod_jk howto website, and it says to rebuild the apache web server from 
source... but that is what I just finished doing :)

Any ideas? 

Cheers

Aaron




RE: Help!! Apache won't redirect to tomcat

2001-07-26 Thread Andrew Inggs

Nance, Michael wrote:
> The page I am requestiong is 
> 
> http://localhost/buy/MLBEventInfo
> 
> I include a file tomcat-mod_jk-apache.conf by using include 
> ... in my httpd
> file
> in there I have  these mounts
> JkMount /buy/* ajp13
> JkMount /olympics/*  ajp13
> JkMount /sloc2002/* ajp13
> JkMount /maintenance/* ajp13
> JkMount /xml/* ajp13

Since your original post, the above has changed (ajp12 to ajp13).
What does your mod_jk.log now have?

Also try "netstat -a" after starting Tomcat to check that it is
listening on port 8009 (where ajp13 listens).  If it is not,
then your server.xml isn't correctly configured for ajp13, in
which case cut and paste the relevant section and post it here
-- someone might spot something you've missed.

Also check workers.properties -- make sure ajp13 is listed on
the worker.list line and there are a few lines starting
worker.ajp13...  (this should all be fine by default, but it
doesn't hurt to check).

-- Andrew



Re: Weird thread/security problem

2001-07-26 Thread Craig R. McClanahan

Tomcat runs multiple individual threads per *request*, not per *user*.

99.9% of the time, this kind of thing is caused by application programming
errors related to threading.  For example, if you use an instance variable
in a servlet to store information specific to a particular request, and
access that servlet with more than one request at the same time, you will
observe this kind of problem.  The reason for this is that there is one
instance of the servlet class, and therefore one instance of the
(incorrectly shared) instance variable.

To avoid this kind of problem, store information specific to a particular
request *only* in local variables, request attributes, or session
attributes.  Use instance variables in your servlet *only* for things you
really do want to share.

Craig McClanahan


On Thu, 26 Jul 2001, Sam Joseph wrote:

> Hi,
> 
> So I think this is a thread/security issue, but I am not sure.  However
> it is definitely weird.
> 
> I have been conducting some tests with multiple users.  Various servlets
> are contacted that supply pages to each user, that include information
> such as user name etc.  The version of tomcat in use is 3.2.1, and
> clearly I should upgrade to 3.2.3, but the tomcat is provided by my
> service provider so that might take some time.
> 
> Anyway, the problem is that sometimes when two users are accessing the
> system simulatenously the information for one user will be displayed,
> briefly, to the other user.  The system I have developed is quite
> complicated so I can't rule out that this is a problem with the code,
> but I'm not using static variables or anything that would allow this
> swap over.  I mean each user has an object associated with them that
> contains their user name, but these are local variables to the servlet.
> 
> Are there or have there been problems with tomcat that would explain
> this problem?  I mean tomcat creates a separate thread for each servlet
> right? Different user, different thread, so their data shouldn't be
> available to each other.
> 
> Am I overlooking something here?  Should I be mailing to the developer's
> list?
> 
> And on the same topic, does anyone know of any software that will
> simulate multiple users, without me having all my friends test the
> system.  I mean some software (ideally free or shareware) that would
> simulate the stream of http requests, I guess I could hack something
> together myself, but if there's something already out there that would
> be great.
> 
> Thanks in advance.
> 
> CHEERS> SAM
> 
> 




Re: Weird thread/security problem

2001-07-26 Thread Craig R. McClanahan



On Thu, 26 Jul 2001, Sam Joseph wrote:

> 
> I guess I have two options, either make the servlet implement the
> SingleThreadModel interface, or create some new classes to encapsulate the
> appropriate data, and either store that in the session or in some instance
> variable like a hashtable ...
> 

First, SingleThreadModel deals with the "multiple simultaneous requests"
problem, but it does *not* deal with keeping per-user state information
across multiple requests.  For that, you still need to use sessions.

Second, SingleThreadModel does *not* deal with all of the issues related
to multithreading.  For example, it's very easy for the same user to
create multiple simultaneous requests, and your session variables need to
be aware that they might be accessed simultaneously by multiple
threads.  Here's two simple cases that do this:
- Framed presentation (the browser will typically send up to four
  simultaneous requests for the frames).
- User submits a long-running request, presses STOP, and then
  submits another request before the first one has finished.

Third, (at least on Tomcat) you are *not* going to like the performance
impact of using SingleThreadModel servlets.  Although the servlet spec
allows the container to create a pool of SingleThreadModel servlets,
Tomcat does not do so.  Therefore, using this technique in Tomcat is
equivalent to putting "synchronized" on the doGet() and doPost() methods
of your servlet - only one request at a time for *any* user is processed.

Can you tell I think depending on SingleThreadModel is not a good
idea?  :-)

> Thanks again.
> 
> CHEERS> SAM
> 

Craig McClanahan




RE: Help!! Apache won't redirect to tomcat

2001-07-26 Thread Nance, Michael

Yes, I changed from 12 to 13 to see if that would help.
I have nothing in my mod_jk.log now
I will try netstat -a and see what it says thanks!

-Original Message-
From: Andrew Inggs [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 9:38 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Help!! Apache won't redirect to tomcat


Nance, Michael wrote:
> The page I am requestiong is 
> 
> http://localhost/buy/MLBEventInfo
> 
> I include a file tomcat-mod_jk-apache.conf by using include 
> ... in my httpd
> file
> in there I have  these mounts
> JkMount /buy/* ajp13
> JkMount /olympics/*  ajp13
> JkMount /sloc2002/* ajp13
> JkMount /maintenance/* ajp13
> JkMount /xml/* ajp13

Since your original post, the above has changed (ajp12 to ajp13).
What does your mod_jk.log now have?

Also try "netstat -a" after starting Tomcat to check that it is
listening on port 8009 (where ajp13 listens).  If it is not,
then your server.xml isn't correctly configured for ajp13, in
which case cut and paste the relevant section and post it here
-- someone might spot something you've missed.

Also check workers.properties -- make sure ajp13 is listed on
the worker.list line and there are a few lines starting
worker.ajp13...  (this should all be fine by default, but it
doesn't hurt to check).

-- Andrew



Configuring default context

2001-07-26 Thread Wirianto . Djunaidi

Hi,

I need help with configuring the context with Tomcat 3.2.2 on Windows NT.
Basically I only want one context with my tomcat server, I had
removed other context from webapps directory except mine and
change the server.xml with this for the context:


  
and the AutoSetup ContextInterceptor is running.

Here's my problem, when I start this up on Windows it will
try to load 2 Contexts: Context( ) and Context(ROOT).

Funny thing is, I ran the exact same configuration on
a Sun box running Solaris 2.7, it load up Context( ) only
with no problem.

So, what should I do here?

Thanks,
Wirianto Djunaidi
Level (3) Communications



Re: howto redirect

2001-07-26 Thread Craig R. McClanahan



On Thu, 26 Jul 2001, Bernhard Wraase wrote:

> In the docs it seems simple...
> Even in the thread recently
> 
> But it don't work.
> Each request works:
> http://127.0.0.1:8080 ->http://127.0.0.1:8080/index.html
> https://127.0.0.1:8443 ->https://127.0.0.1:8443/index.html
> 
> But I want this:
> http://127.0.0.1:8080 ->https://127.0.0.1:8443/index.html
> 

If you want Tomcat 4.0 to automatically do this redirect for you, then you
need to set up a security constraint inside the web.xml file of your ROOT
web app, and have that constraint require SSL.  For example:

  

...


  
The Entire Web App
/*
  
  
CONFIDENTIAL
  


...

  

In this scenario, we do not have an , so we will never
challenge the user for a username or password.  However, the transport
guarantee says that this entire webapp (i.e. all URIs that match "/*") can
only be accessed via SSL, so Tomcat will do an automatic redirect (to port
8443 in this case, because of your server.xml configuration below).

Craig McClanahan


> The server.xml looks like:
> 
>   
> 
> 
>  className="org.apache.catalina.connector.http.HttpConnector"
>port="8080" minProcessors="5" maxProcessors="75"
>enableLookups="true" redirectPort="8443"
>acceptCount="10" debug="0" connectionTimeout="6"/>
> 
> 
> 
>  className="org.apache.catalina.connector.http.HttpConnector"
>port="8443" minProcessors="5" maxProcessors="75"
>enableLookups="true"
> acceptCount="10" debug="0" scheme="https" secure="true">
>className="org.apache.catalina.net.SSLServerSocketFactory"
>keystorePass="nordwest" clientAuth="false"
> protocol="TLS"/>
> 
>  --snip--
> --snap--
>  
> 
> Any suggestions?
> --
> TIA Bernhard Wraase
> 
> 
> 






Re: Tomcat 4.0 b5 does not recognize changes in deployed applications

2001-07-26 Thread Craig R. McClanahan

Update to 4.0-b6.  Beta 5 had a bug that it didn't recognize modified JSP
pages and automatically recompile them.

Craig McClanahan


On Thu, 26 Jul 2001, wasims@comsats wrote:

> Please help me as I have been unable to solve this problem.
> I am using tomcat 4.0 beta 5 on Windows 98
> Every time I deploy a new application to tomcat i.e make a new folder under
> "Tomcat-Home\webapps" it is automatically recognized on a server restart.
> But any JSP pages that I subsequently add to the folder are not recognized
> by the server even after a server restart.
> Similarly if this correctly functioning (initially) application is
> duplicated with a different name under "Tomcat-Home\webapps" and the server
> is restarted the duplicated application is visible to the server but the
> duplicated JSP's don't get compiled and I get the following message "a
> servlet exception has occurred"
> I would be grateful if someone tells me how the incremental changes to ones
> application can be correctly reflected to tomcat.
> Anwar
> 
> 
> 




Re: tomcat4b6 classpath for poolman.xml

2001-07-26 Thread Craig R. McClanahan



On Thu, 26 Jul 2001, Matt Barre wrote:

> I guess it might help to include the trace from the out screen. :)
> 
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0-b6
> Starting service Tomcat-Apache
> Apache Tomcat/4.0-b6
> null
> java.lang.NullPointerException
> java.lang.NullPointerException
> at com.codestudio.management.PoolManConfiguration.parseXML(PoolManConfig
> uration.java:121)
> at com.codestudio.management.PoolManConfiguration.loadConfiguration(Pool
> ManConfiguration.java:75)
> at com.codestudio.management.PoolManBootstrap.(PoolManBootstrap.ja
> va:61)
> 

Well, the bug is inside the parseXML() method of PoolMan, so it's pretty
hard to tell what's going on.  Where do you have the JAR file containing
PoolMan itself?

> 
> Matt
> 

Craig McClanahan

> 
> - Original Message -
> From: "Matt Barre" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 26, 2001 9:32 AM
> Subject: tomcat4b6 classpath for poolman.xml
> 
> 
> > I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have them up 
>and
> > running except for some trouble with poolman. From the trace before it kills 
>tomcat, it
> > looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have this 
>file
> in
> > my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a copy 
>for
> > tomcat 4 to access? I'm on win2k with 2.0.4 of poolman.
> >
> > Thanks,
> > Matt
> 
> 




Re: WebappClassLoader question

2001-07-26 Thread Craig R. McClanahan

On Thu, 26 Jul 2001, Vincent Massol wrote:

> Thanks Alex,
> 
> I don't think the standard classloader mechanism is involved here. I believe
> it is a 'feature' of Tomcat and more specifically of it's WebappClassLoader.
> When you do standard java code and you have the following situation :
> 
> 1st -> 2nd --- (using reflection) --> 3rd (not in classpath)
> 
> then the error always happen in the 2nd class and you can put the code
> between a try catch block and you'll be able to catch the
> ClassNotFoundException. However what happens here is that the error happens
> when calling a method on the 1st class that instanciates the 2nd class !
> This is what I don't understand.
> 
> Am I dreaming or is this a behaviour of Tomcat 4 ?
> 

The web app class loader in Tomcat 4 is based on java.net.URLClassLoader,
and has the same basic class loading behavior.  In particular, when a
class A is loaded, all the classes that A directly references (i.e. listed
in import statements, used as a variable declaration, and so on) are also
loaded.  This is done recursively on the referenced classes, until the
entire tree of references is resolved.  If the load for class A fails, you
will get ClassNotFoundException.  However, if the load for one of the
referenced classes fails, you will typically get NoClassDefError instead
(and the class named in the error message may or may not be the one that
is actually missing, which complicates debugging this problem tremendously
:-).

A good rule of thumb to avoid this kind of problem -- if you need to add
classes to your CLASSPATH at compile time (when rebuilding the entire
app), be sure all of those classes are visible to the web app at runtime.

Using reflection, on the other hand, lets you defer loading of "dependent"
classes until runtime, and you can deal with ClassNotFoundException errors
that you might run into.  Note however that, even if you load a class
dynamically, *that* class still contains direct references to other
classes that must all be resolved in the manner described above.


> Thanks
> -Vincent
> 

Craig McClanahan

PS:  One place where the Tomcat 4 class loader *does* vary from the usual
class loader behavior is in the order of places it looks to load a
class.  The usual pattern in Java2 is to delegate to the parent class
loader first, then look locally.  Tomcat 4 does the opposite -- it checks
in /WEB-INF/classes and /WEB-INF/lib of your web application *before*
looking up the parent class loader chain.  This means that, if you have a
class in the $CATALINA_HOME/lib directory (shared across web apps), and a
version of that same class in your web app, the version in your webapp
wins.


> - Original Message -
> From: "Alex Fernández" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 25, 2001 3:44 PM
> Subject: Re: WebappClassLoader question
> 
> 
> > Hi Vincent!
> >
> > I've run into the same situation a couple of times, when one class uses
> > a second class, and this second class uses a third one that is not
> > present.
> >
> > 1st -> 2nd -> 3rd (missing)
> >
> > One would think that instantiating the 2nd should give an error, but
> > that loading the 2nd and/or instantiating the 1st should be ok. In fact,
> > all of the behaviors raise exceptions.
> >
> > The following paragraph in ClassLoader javadoc might be of help:
> >
> > "The methods and constructors of objects created by a class loader may
> > reference other classes. To determine the class(es) referred to, the
> > Java virtual machine calls the loadClass method of the class loader that
> > originally created the class."
> >
> > Or, to find out what the JVM is doing, the spec is here:
> > http://java.sun.com/docs/books/vmspec/
> >
> > Hope it helps.
> >
> > Un saludo,
> >
> > Alex.
> >
> > > Vincent Massol wrote:
> > >
> > > Hi,
> > >
> > > Here is the situation :
> > >
> > > * I have a class that makes use of JUnit (by extending the JUnit
> > > TestCase class). Let's call it ServletTestCase
> > > * I have a second class that is used to call a method in
> > > ServletTestCase, let's call it MyProxyClass
> > > * I have a third class (a servlet) that does _not_ make use of JUnit.
> > > Let's call it ServletTestRedirector. This class actually instanciate
> > > MyProxyClass and calls one of its method.
> > > * I package these classes in a war file and I _don't_ include
> > > junit.jar in this war file
> > >
> > > When I access the servlet, I get a ClassNotFoundException on a JUnit
> > > class. So far it is normal ...
> > > When I debugged it, I have actually found that the error was happening
> > > when ServletTestRedirector was instancianting MyProxyClass (which does
> > > _not_ make use of JUnit) and before it was calling its method.
> > >
> > > Here is the stack trace I got :
> > >
> > > java.lang.NoClassDefFoundError: junit/framework/TestCase
> > >  at java.lang.ClassLoader.defineClass0(Native Method)
> > >  at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> > >  at
>

Re: tomcat4b6 classpath for poolman.xml

2001-07-26 Thread Matt Barre

PoolMan.jar is located inside my /tomcat/common/lib/ folder

Matt
- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 11:07 AM
Subject: Re: tomcat4b6 classpath for poolman.xml


>
>
> On Thu, 26 Jul 2001, Matt Barre wrote:
>
> > I guess it might help to include the trace from the out screen. :)
> >
> > Starting service Tomcat-Standalone
> > Apache Tomcat/4.0-b6
> > Starting service Tomcat-Apache
> > Apache Tomcat/4.0-b6
> > null
> > java.lang.NullPointerException
> > java.lang.NullPointerException
> > at com.codestudio.management.PoolManConfiguration.parseXML(PoolManConfig
> > uration.java:121)
> > at com.codestudio.management.PoolManConfiguration.loadConfiguration(Pool
> > ManConfiguration.java:75)
> > at com.codestudio.management.PoolManBootstrap.(PoolManBootstrap.ja
> > va:61)
> >
>
> Well, the bug is inside the parseXML() method of PoolMan, so it's pretty
> hard to tell what's going on.  Where do you have the JAR file containing
> PoolMan itself?
>
> >
> > Matt
> >
>
> Craig McClanahan
>
> >
> > - Original Message -
> > From: "Matt Barre" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, July 26, 2001 9:32 AM
> > Subject: tomcat4b6 classpath for poolman.xml
> >
> >
> > > I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have them 
>up
and
> > > running except for some trouble with poolman. From the trace before it kills 
>tomcat,
it
> > > looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have this
file
> > in
> > > my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a copy
for
> > > tomcat 4 to access? I'm on win2k with 2.0.4 of poolman.
> > >
> > > Thanks,
> > > Matt
> >
> >




Upgrading tomcat

2001-07-26 Thread Tia Haenni

Has anyone gone from 3.2.1 up to 3.3? Does it require a complete uninstall
of previous versions? Is it best to go with 3.3 or wait for 4.0? Thanks,

Tia




Re: tomcat4b6 classpath for poolman.xml

2001-07-26 Thread Craig R. McClanahan



On Thu, 26 Jul 2001, Matt Barre wrote:

> PoolMan.jar is located inside my /tomcat/common/lib/ folder
> 

Try putting the properties file in /tomcat/common/classes (which you might
have to create first).  That way, it will be made available through the
same class loader that the PoolMan classes are.

If that doesn't work, then some digging inside the PoolMan sources will be
needed to figure out what is going on.

> Matt

Craig


> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 26, 2001 11:07 AM
> Subject: Re: tomcat4b6 classpath for poolman.xml
> 
> 
> >
> >
> > On Thu, 26 Jul 2001, Matt Barre wrote:
> >
> > > I guess it might help to include the trace from the out screen. :)
> > >
> > > Starting service Tomcat-Standalone
> > > Apache Tomcat/4.0-b6
> > > Starting service Tomcat-Apache
> > > Apache Tomcat/4.0-b6
> > > null
> > > java.lang.NullPointerException
> > > java.lang.NullPointerException
> > > at com.codestudio.management.PoolManConfiguration.parseXML(PoolManConfig
> > > uration.java:121)
> > > at com.codestudio.management.PoolManConfiguration.loadConfiguration(Pool
> > > ManConfiguration.java:75)
> > > at com.codestudio.management.PoolManBootstrap.(PoolManBootstrap.ja
> > > va:61)
> > >
> >
> > Well, the bug is inside the parseXML() method of PoolMan, so it's pretty
> > hard to tell what's going on.  Where do you have the JAR file containing
> > PoolMan itself?
> >
> > >
> > > Matt
> > >
> >
> > Craig McClanahan
> >
> > >
> > > - Original Message -
> > > From: "Matt Barre" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, July 26, 2001 9:32 AM
> > > Subject: tomcat4b6 classpath for poolman.xml
> > >
> > >
> > > > I am moving a few of my applications from tomcat 3.2 to tomcat4-b6. I have 
>them up
> and
> > > > running except for some trouble with poolman. From the trace before it kills 
>tomcat,
> it
> > > > looks like it can't find the poolman.xml file. With tomcat 3.2 I simply have 
>this
> file
> > > in
> > > > my jdkhome/jre/lib/ext/ folder. Anyone have a tip for where I should place a 
>copy
> for
> > > > tomcat 4 to access? I'm on win2k with 2.0.4 of poolman.
> > > >
> > > > Thanks,
> > > > Matt
> > >
> > >
> 
> 




Re: Upgrading tomcat

2001-07-26 Thread Pier P. Fumagalli

Tia Haenni at [EMAIL PROTECTED] wrote:

> Has anyone gone from 3.2.1 up to 3.3? Does it require a complete uninstall
> of previous versions? Is it best to go with 3.3 or wait for 4.0? Thanks,

3.3 is still under heavy development (I believe they reached their first
milestone lately, but no beta versions yet), while 4.0 (at its 6th beta) can
be considered fairly stable and complete.

Pier




Bug 2290 - Sessions don't work => 3.2.3

2001-07-26 Thread Noble, Joseph A

Does Bug 2290 reported for Tomcat version 3.2.2, Sessions don't work at all,
apply to Tomcat version 3.2.3 also?  I appear to be having similar problems.
When I invalidate a session, under 3.2.3 in a protected directory from a JSP
page, I'm not asked to log in again, I'm just given a new session ID.  The
only time I'm asked to log in is the intial time entering the protected
context.

TIA
-joe-



losing connection to 8007

2001-07-26 Thread Gary Rather

I have a server running on solaris with tomcat 3.2.2 with mod_jk

The server runs fine for days then for some reason start getting
Errors:

[jk_ajp12_worker.c (601)]: ajpv12_handle_response, error writing back to server
[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146
[jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1

As of this point must stop the server using shutdown.sh does not work. 
(Because we can't talk to 8007)
Do a kill on the tomcat process and restart all works again.

So far we have noticed this happen on two different occasions.

Need ideas what to look for when it happens again.  We have another server 
which happens to be
running od_jserv and we have seen it here also.

Thanks in advance
Gary Rather
Sesame Technology




WAR files

2001-07-26 Thread Erin Lester

Can anyone point me to some information about creating WAR files.
Supposedly you can create them with deploytool, but I only know how to do
this with the gui version and don't have an x-windows server on the server
I'm working on.  I've also read that you can use jartool to create WAR
files, but the instructions said you will need to create your own version
of the deployment descriptor.  What does this mean?  create my own
web.xml?  I have a web.xml but don't really use it for much (not all the
servlets are in the web.xml).
 
Is there anything special we need to do in the web.xml/deployment
descriptor file? and will a WAR created with the jar tool preserve the
directory structure of the application?


Thanks!
e.




mod_jk problems

2001-07-26 Thread Andrew Ormsby

Hi,

I'm using Apache 1.3.20 and Tomcat 3.3m4 and I have the following
problem:

I have a simple servlet which responds to GET requests by returning a
web page with some binary content.  The precise content is selected by a
parameter, e.g: http://host/servlet/get?p=1

Accessing the servlet from Tomcat standalone, everything works fine.
However, when using mod_jk (AJPv13) to access Tomcat from Apache, things
work well until after the server has been under heavy load.

Once the server has been loaded up, I start getting bizarre behaviour:
Apache will return the output of the *previous* servlet invocation.
Given the sequence:
http://host/servlet/get?p=1
http://host/servlet/get?p=2
the first request will return some old result and p=2 will return the
result expected from p=1.

>From my servlet logs, I know that the p=1 request reaches the servlet
and the right content is generated (and I can confirm this by accessing
the servlet directly on port 8080, by-passing Apache).  But Apache
resolutely returns the "old" content.

This feels like some kind of buffering problem - perhaps in mod_jk, or
maybe in Apache itself.  Has anyone else seen anything like this?  Any
suggestions on how I can diagnose the problem?

--
Andy Ormsbyandy.ormsby .at. lexicle.com




Re: Upgrading tomcat

2001-07-26 Thread Pier P. Fumagalli

Pier P. Fumagalli at [EMAIL PROTECTED] wrote:

> Tia Haenni at [EMAIL PROTECTED] wrote:
> 
>> Has anyone gone from 3.2.1 up to 3.3? Does it require a complete uninstall
>> of previous versions? Is it best to go with 3.3 or wait for 4.0? Thanks,
> 
> 3.3 is still under heavy development (I believe they reached their first
> milestone lately, but no beta versions yet), while 4.0 (at its 6th beta) can
> be considered fairly stable and complete.

FIRST->FOURTH... Sorry :)

Pier




Re: WAR files

2001-07-26 Thread John Hebert

Erin Lester wrote:

> Can anyone point me to some information about creating WAR files.


http://jakarta.apache.org/tomcat/tomcat-3.3-doc/appdev/deployment.html

 > Supposedly you can create them with deploytool, but I only know
 > how to do this with the gui version and don't have an x-windows
 > server on the server I'm working on.

Very easy. Use Ant: http://jakarta.apache.org/ant/index.html . Ant is 
the default build tool (like 'make') for Jakarta applications.
And take a look at the Tomcat source examples/build.sh and 
examples/build.xml files to see how Ant builds a WAR file.

> I've also read that you can use jartool to create WAR
> files, but the instructions said you will need to create your own version
> of the deployment descriptor.  What does this mean?  create my own
> web.xml?  I have a web.xml but don't really use it for much (not all the
> servlets are in the web.xml).


Yup, it means create your own web.xml. Just make sure it is in 
appname/WEB-INF/.


> Is there anything special we need to do in the web.xml/deployment
> descriptor file?


Nope.

> and will a WAR created with the jar tool preserve the
> directory structure of the application?


Yup.




-- 
John Alex Hebert
[EMAIL PROTECTED]
System Engineer



Re: mod_jk problems

2001-07-26 Thread Jason Koeninger

I've seen this exact problem in 3.3m3, but I don't have any 
recommendations on working through it right now.  ajp12 
has been better in this respect than ajp13, but the problem 
isn't gone.  I'm planning to spend some time in August or 
September working through the mod_jk code to check on a 
number of issues I've had with it, this one being the most 
important.  Until then, I'll be interested to see what kind of 
response your message gets.

Best Regards,

Jason Koeninger
J&J Computer Consulting
http://www.jjcc.com

On Thu, 26 Jul 2001 19:31:51 +0100, Andrew Ormsby wrote:

>Hi,
>
>I'm using Apache 1.3.20 and Tomcat 3.3m4 and I have the following
>problem:
>
>I have a simple servlet which responds to GET requests by returning a
>web page with some binary content.  The precise content is selected by a
>parameter, e.g: http://host/servlet/get?p=1
>
>Accessing the servlet from Tomcat standalone, everything works fine.
>However, when using mod_jk (AJPv13) to access Tomcat from Apache, things
>work well until after the server has been under heavy load.
>
>Once the server has been loaded up, I start getting bizarre behaviour:
>Apache will return the output of the *previous* servlet invocation.
>Given the sequence:
>http://host/servlet/get?p=1
>http://host/servlet/get?p=2
>the first request will return some old result and p=2 will return the
>result expected from p=1.
>
>From my servlet logs, I know that the p=1 request reaches the servlet
>and the right content is generated (and I can confirm this by accessing
>the servlet directly on port 8080, by-passing Apache).  But Apache
>resolutely returns the "old" content.
>
>This feels like some kind of buffering problem - perhaps in mod_jk, or
>maybe in Apache itself.  Has anyone else seen anything like this?  Any
>suggestions on how I can diagnose the problem?
>
>--
>Andy Ormsbyandy.ormsby .at. lexicle.com
>





Re: Upgrading tomcat

2001-07-26 Thread John Hebert

Tia Haenni wrote:

> Has anyone gone from 3.2.1 up to 3.3? Does it require a complete uninstall
> of previous versions? Is it best to go with 3.3 or wait for 4.0? Thanks,


On a Linux box, an uninstall is not needed. I assume it is the same on 
an MS-Windows box. The different versions of Tomcat are simply installed 
parallel to each other. You do have to shutdown the old install, as the 
new install will try to use the same port numbers (8007, 8009, 8080, etc).


-- 
John Alex Hebert
[EMAIL PROTECTED]
System Engineer



RE: Servlets In A Package

2001-07-26 Thread Martin Welch
Title: Servlets In A Package



Well,
 
I'm 
completely mystified. I've taken this servlet out of the package, placed it in 
WEB-INF/classes and changed web.xml accordingly.
 
I've 
stopped and started tomcat but I get the same error:
 
java.lang.NoClassDefFoundError: 
org/jboss/docs/interest/Interest
*including* the reference to the original package 
path!
 
Is 
tomcat cacheing this stuff someplace?
 
Help!!
 
Thanks,
 
Martin

  -Original Message-From: Martin Welch 
  [mailto:[EMAIL PROTECTED]]Sent: 25 July 2001 
  09:36To: Tomcat-User (E-mail)Subject: Servlets In A 
  Package
  Hi, 
  I've recently installed JBoss-2.4.0_Tomcat-3.2.2 
  and I'm now starting to experiment with all the JBoss samples. The first, 
  Interest, contains a servlet that I'm trying to get up and running.
  This InterestServlet is in a package 
  org.jboss.docs.interest which I've compiled and placed in 
  webapps\demo\WEB-INF\classes\org\jboss\docs\interest 
  demo\WEB-INF\web.xml looks like: 
  -- 
   
       PUBLIC "-//Sun Microsystems, Inc.//DTD 
  Web Application 2.2//EN"     "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> 
  
             
      
  interest      
      
       
  org.jboss.docs.interest.InterestServlet     
       
   
       
      
       
  interest      
      
       
  /catalog      
      
-- 
  and I've added the following to 
  conf\server.xml 
  -- 
      
   
  docBase="webapps/demo"  
  crossContext="false"  
  debug="0"  
  reloadable="true" >      
  -- 
  When I enter http://localhost:8080/demo/catalog 
  in my browser I get: 
  -- 
  Location: /demo/catalog Internal Servlet Error: 
  java.lang.NoClassDefFoundError: 
  org/jboss/docs/interest/Interest 
      at 
  java.lang.Class.newInstance0(Native Method) 
      at 
  java.lang.Class.newInstance(Unknown Source) 
      at 
  org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:268) 
      at 
  org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289) 
      at 
  org.apache.tomcat.core.Handler.service(Handler.java:254) 
      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:213) 
      at 
  org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) 
      at 
  org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) 
      at 
  java.lang.Thread.run(Unknown Source) -- 
  I've looked at other TomCat samples, in 
  particular webapps\test\WEB-INF\classes\requestMap and I appear 
  to have done everything right but I can't make 
  sense of this. 
  Could someone help me? 
  Thanks, 
  Martin 


Re: mod_jk problems

2001-07-26 Thread Aaron Wald

I've seen this problem in 3.3.m4...

I just upgraded to 3.3b1 on one box and haven't seen it yet, but haven't tested it as 
thoroughly.

I'm really interested in a work around? 

In addition to this problem I occasionally get a jsp page that isn't processed 
returned. 

I've seen this on two seperate m4 installs running different sets of code. 

--aaron

On Thu, Jul 26, 2001 at 01:43:27PM -0500, Jason Koeninger wrote:
> I've seen this exact problem in 3.3m3, but I don't have any 
> recommendations on working through it right now.  ajp12 
> has been better in this respect than ajp13, but the problem 
> isn't gone.  I'm planning to spend some time in August or 
> September working through the mod_jk code to check on a 
> number of issues I've had with it, this one being the most 
> important.  Until then, I'll be interested to see what kind of 
> response your message gets.
> 
> Best Regards,
> 
> Jason Koeninger
> J&J Computer Consulting
> http://www.jjcc.com
> 
> On Thu, 26 Jul 2001 19:31:51 +0100, Andrew Ormsby wrote:
> 
> >Hi,
> >
> >I'm using Apache 1.3.20 and Tomcat 3.3m4 and I have the following
> >problem:
> >
> >I have a simple servlet which responds to GET requests by returning a
> >web page with some binary content.  The precise content is selected by a
> >parameter, e.g: http://host/servlet/get?p=1
> >
> >Accessing the servlet from Tomcat standalone, everything works fine.
> >However, when using mod_jk (AJPv13) to access Tomcat from Apache, things
> >work well until after the server has been under heavy load.
> >
> >Once the server has been loaded up, I start getting bizarre behaviour:
> >Apache will return the output of the *previous* servlet invocation.
> >Given the sequence:
> >http://host/servlet/get?p=1
> >http://host/servlet/get?p=2
> >the first request will return some old result and p=2 will return the
> >result expected from p=1.
> >
> >From my servlet logs, I know that the p=1 request reaches the servlet
> >and the right content is generated (and I can confirm this by accessing
> >the servlet directly on port 8080, by-passing Apache).  But Apache
> >resolutely returns the "old" content.
> >
> >This feels like some kind of buffering problem - perhaps in mod_jk, or
> >maybe in Apache itself.  Has anyone else seen anything like this?  Any
> >suggestions on how I can diagnose the problem?
> >
> >--
> >Andy Ormsbyandy.ormsby .at. lexicle.com
> >
> 
> 



Re: howto redirect

2001-07-26 Thread djhutchison


I asked this on another thread of discussion but never got an answer. Is
this automatic redirection to SSL new for Tomcat 4.0? I'm using 3.2.3 and
when I set this user-data-constraint it appears that Tomcat verifies access
via SSL but does not redirect if it is not. From your response below I
assume this is 4.0 only.
Thanks,
Dave





"Craig R. McClanahan" <[EMAIL PROTECTED]> on 07/26/2001 12:01:51 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Re: howto redirect




On Thu, 26 Jul 2001, Bernhard Wraase wrote:

> In the docs it seems simple...
> Even in the thread recently
>
> But it don't work.
> Each request works:
> http://127.0.0.1:8080 ->http://127.0.0.1:8080/index.html
> https://127.0.0.1:8443 ->https://127.0.0.1:8443/index.html
>
> But I want this:
> http://127.0.0.1:8080 ->https://127.0.0.1:8443/index.html
>

If you want Tomcat 4.0 to automatically do this redirect for you, then you
need to set up a security constraint inside the web.xml file of your ROOT
web app, and have that constraint require SSL.  For example:

  

...


  
The Entire Web App
/*
  
  
CONFIDENTIAL
  


...

  

In this scenario, we do not have an , so we will never
challenge the user for a username or password.  However, the transport
guarantee says that this entire webapp (i.e. all URIs that match "/*") can
only be accessed via SSL, so Tomcat will do an automatic redirect (to port
8443 in this case, because of your server.xml configuration below).

Craig McClanahan


> The server.xml looks like:
>
>   
>
> 
>  className="org.apache.catalina.connector.http.HttpConnector"
>port="8080" minProcessors="5" maxProcessors="75"
>enableLookups="true" redirectPort="8443"
>acceptCount="10" debug="0" connectionTimeout="6"/>
> 
>
> 
>  className="org.apache.catalina.connector.http.HttpConnector"
>port="8443" minProcessors="5" maxProcessors="75"
>enableLookups="true"
> acceptCount="10" debug="0" scheme="https" secure="true">
>className="org.apache.catalina.net.SSLServerSocketFactory"
>keystorePass="nordwest" clientAuth="false"
> protocol="TLS"/>
> 
>  --snip--
> --snap--
>  
>
> Any suggestions?
> --
> TIA Bernhard Wraase
>
>
>












Intermittent ferrors with ajp12 with tc3.2.1 on solaris with stronghold (apache)

2001-07-26 Thread John Thompson

kind Sir/Madam,

This problem has fixed itself twice and now appeared again

I'm running on Solaris 2.6, Tomcat 3.2.1, Stronghold 3.0 (secure apache).

I've been running happily making and testing servlets using ajp12 and ajp13, 
then it stops working.

I start tomcat, start stronghold, try the servlet and get the following in 
mod_jk.log (set to debug) each time I try a page on tomcat.

Bizarre - if I wait for a while I get java.io.IOException on the command 
line.

I get the following errors in mod_jk.log when set to debug.

[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done 
without a match
[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a 
match ajp12
[jk_worker.c (123)]: Into wc_get_worker_for_name ajp12
[jk_worker.c (127)]: wc_get_worker_for_name, done  found a worker
[jk_ajp12_worker.c (223)]: Into jk_worker_t::get_endpoint
[jk_ajp12_worker.c (121)]: Into jk_endpoint_t::service
[jk_connect.c (108)]: Into jk_open_socket
[jk_connect.c (115)]: jk_open_socket, try to connect socket = 9
[jk_connect.c (124)]: jk_open_socket, after connect ret = -1
[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 146
[jk_ajp12_worker.c (134)]: In jk_endpoint_t::service, sd = -1
[jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
[jk_ajp12_worker.c (163)]: Into jk_endpoint_t::done

The first time I waited a while and it fixed itself.  Restarting does not 
help (does it hinder?).

This time,  I wait a while,  get the IO Exception,  then try shutdown which 
fails (can't connect) then I try again and it starts working.

I assume I can't get a socket for some reason but I'm sure I checked 
'netstat -a' which showed no traffic on that port.

Please can anyone tell me what is going on.  Browsing the archives I see 
something about queues?

I have to confess that I tend to not bother restarting the webserver each 
time I restart tomcat (does this make any difference?)

Thanks in advance,
Jon.






_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




Windows 2000 compatible

2001-07-26 Thread Tao Geng

Hi,there,

I just installed Tomcat3.2.3 on my Windows NT server and it works great. I'm 
also concerned about if this version is compatible with windows 2000 for our 
server need to be upgraded to windows 2000 soon. If not, which version 
would?  Thanks a lot.

Tao

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




Re: howto redirect

2001-07-26 Thread Craig R. McClanahan



On Thu, 26 Jul 2001 [EMAIL PROTECTED] wrote:

> 
> I asked this on another thread of discussion but never got an answer. Is
> this automatic redirection to SSL new for Tomcat 4.0? I'm using 3.2.3 and
> when I set this user-data-constraint it appears that Tomcat verifies access
> via SSL but does not redirect if it is not. From your response below I
> assume this is 4.0 only.
> Thanks,
> Dave
> 

Yes it's new in Tomcat 4.0.  So is the explicit spec requirement that a
container act in this way, in Servlet 2.3 PFD3, section 12.8, p. 92).  The
servlet 2.2 spec was silent on this point, although some containers behave
that way.

Craig




RE: Tomcat VHost configuration under Linux

2001-07-26 Thread Curtis Dougherty

I need the same thing but for Win2K and IIS... (I Know MS sucks! but it's
what the suits want)...

PLEASE :-o

-Original Message-
From: John Hebert [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 2:39 PM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat VHost configuration under Linux


Loïc Lefèvre wrote:

> Hi
> After 3 days passed on the configuration of Apache 1.3.12+Tomcat 3.2.3
> (mod_jk)
> I'm going mad !!! :( Could someone please send me their configuration
files
> (mod_jk.conf + server.xml + web.xml (tomcat + appli)). Note: the files for
a
> web archive which work !
> 
> After that, I'm going to work in source files >:)
> 
> Loïc Lefèvre
> 
> 



-- 
John Alex Hebert
[EMAIL PROTECTED]
System Engineer




Re: Windows 2000 compatible

2001-07-26 Thread Pier P. Fumagalli

Tao Geng at [EMAIL PROTECTED] wrote:

> Hi,there,
> 
> I just installed Tomcat3.2.3 on my Windows NT server and it works great. I'm
> also concerned about if this version is compatible with windows 2000 for our
> server need to be upgraded to windows 2000 soon. If not, which version
> would?  Thanks a lot.

If the Virtual Machine you downloaded is certified to work with Windows NT,
then it'll run and you don't have to worry about upgrading.

Pier




Re: question about WEB-INF/lib

2001-07-26 Thread grant . quail



I suppose another solution would be to create symlinks from the "lib" directory
to the actual .jar's.

I have a feeling that our company wouldn't like the idea of actually moving
pieces of 3rd party software around =)

-g





"Craig R. McClanahan" <[EMAIL PROTECTED]> on 07/25/2001 11:55:51 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Re: question about WEB-INF/lib





On Wed, 25 Jul 2001 [EMAIL PROTECTED] wrote:

> Currently our application uses .jar files spread out all over the
> place, will tomcat v4 not work under those conditions?
>

If you expect those JAR files to be visible to all of your web
applications, then the answer is no ... until you copy those JAR files
into the "lib" directory of your Tomcat 4.0 distribution.

The CLASSPATH variable is ignored by the (standard) Tomcat 4.0 startup
scripts, which very carefully set the CLASSPATH required to run
Tomcat.  You can certainly change these scripts (it's open source, yadda
yadda) but you will quickly venture into unsupported territory, where you
have to solve your own mysteries about how class loaders work :-).







Re: WebappClassLoader question

2001-07-26 Thread Vincent Massol

Thanks Craig,

However I am still not sure this mechanism explains the problem I had. It is
not easy to describe in word so I'll write it in java code instead.

A.java

public class A implements HttpServlet
{
  public void doGet()
  {
log("before error");
B myB = new B();
log("after error");
  }
}


B.java

public class B
{
  public B()
  {
  }
  public doSomething()
  {
try {
  Class myClass = Class.forName("C");
  // call the method by reflection ...
} catch (Exception e) {
  log("I would have thought here");
}
  }
}


C.java

import junit.framework.*;

public class C extends TestCase
{
...
}


Now all of this is packaged in a war, classes A and B and in a jar put in
WEB-INF/lib and class C is put in WEB-INF/classes. The junit jar is *not*
put in WEB-INF/lib.

Calling the servlet A result in an error occurring between the logs "before
error" and "after error" and the log "I would have thought here" is never
printed because the error happens _before_ ... This is what I don't
understand.

Any idea ?
Thanks a lot
-Vincent

- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Vincent Massol" <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 6:18 PM
Subject: Re: WebappClassLoader question


On Thu, 26 Jul 2001, Vincent Massol wrote:

> Thanks Alex,
>
> I don't think the standard classloader mechanism is involved here. I
believe
> it is a 'feature' of Tomcat and more specifically of it's
WebappClassLoader.
> When you do standard java code and you have the following situation :
>
> 1st -> 2nd --- (using reflection) --> 3rd (not in classpath)
>
> then the error always happen in the 2nd class and you can put the code
> between a try catch block and you'll be able to catch the
> ClassNotFoundException. However what happens here is that the error
happens
> when calling a method on the 1st class that instanciates the 2nd class !
> This is what I don't understand.
>
> Am I dreaming or is this a behaviour of Tomcat 4 ?
>

The web app class loader in Tomcat 4 is based on java.net.URLClassLoader,
and has the same basic class loading behavior.  In particular, when a
class A is loaded, all the classes that A directly references (i.e. listed
in import statements, used as a variable declaration, and so on) are also
loaded.  This is done recursively on the referenced classes, until the
entire tree of references is resolved.  If the load for class A fails, you
will get ClassNotFoundException.  However, if the load for one of the
referenced classes fails, you will typically get NoClassDefError instead
(and the class named in the error message may or may not be the one that
is actually missing, which complicates debugging this problem tremendously
:-).

A good rule of thumb to avoid this kind of problem -- if you need to add
classes to your CLASSPATH at compile time (when rebuilding the entire
app), be sure all of those classes are visible to the web app at runtime.

Using reflection, on the other hand, lets you defer loading of "dependent"
classes until runtime, and you can deal with ClassNotFoundException errors
that you might run into.  Note however that, even if you load a class
dynamically, *that* class still contains direct references to other
classes that must all be resolved in the manner described above.


> Thanks
> -Vincent
>

Craig McClanahan

PS:  One place where the Tomcat 4 class loader *does* vary from the usual
class loader behavior is in the order of places it looks to load a
class.  The usual pattern in Java2 is to delegate to the parent class
loader first, then look locally.  Tomcat 4 does the opposite -- it checks
in /WEB-INF/classes and /WEB-INF/lib of your web application *before*
looking up the parent class loader chain.  This means that, if you have a
class in the $CATALINA_HOME/lib directory (shared across web apps), and a
version of that same class in your web app, the version in your webapp
wins.


> - Original Message -
> From: "Alex Fernández" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 25, 2001 3:44 PM
> Subject: Re: WebappClassLoader question
>
>
> > Hi Vincent!
> >
> > I've run into the same situation a couple of times, when one class uses
> > a second class, and this second class uses a third one that is not
> > present.
> >
> > 1st -> 2nd -> 3rd (missing)
> >
> > One would think that instantiating the 2nd should give an error, but
> > that loading the 2nd and/or instantiating the 1st should be ok. In fact,
> > all of the behaviors raise exceptions.
> >
> > The following paragraph in ClassLoader javadoc might be of help:
> >
> > "The methods and constructors of objects created by a class loader may
> > reference other classes. To determine the class(es) referred to, the
> > Java virtual machine calls the loadClass method of the class loader that
> > originally created the class."
> >
> > Or, to find out what the JVM is doing, the spec is here:
> > http

Re: jsp mapping

2001-07-26 Thread Craig R. McClanahan



On Thu, 12 Jul 2001, Kevin HaleBoyes wrote:

> First off, I'm running Tomcat 4b5 (standalone) on Linux RedHat 7.1.
> 
> I've been looking at (and learning from) the Java Pet Store from Sun and
> have been writing some custom Taglibs for my application.  I'm currently doing
> lists of things that use the NextFormTag and PrevFormTag extensions from
> a jsp file/program.  These tags generate  elements to move to the next
> and previous pages where you specify the "action" of the form.  Here is an
> example (snippet):
> 
>
>  
>
>
>  
>
> 
> This generates the following HTML output:
> 
> 
> 
> 
> 
> 
> 
> I'm having trouble specifying the action element of the form.  From above,
> listorders is actually a JSP file.  I need to provide a mapping from the
> actual JSP file "/cust/listorders.jsp" to "/cust/listorders" but I'm not sure
> how to go about it.
> 
> I tried to put the following in my web.xml file but it didn't work:
> 
> 
> listorders
> /cust/listorders.jsp
> 
> 

This is close but not quite right.  Try:

  
listorders
/cust/listorders.jsp
  


> 
> listorders
> /cust/listorders
> 
> 
> When I click the Next button I get the following in my browser:
> 
> HTTP Status 404 - /cust/listorders
> The requested resource (/cust/listorders) is not available. 
> 
> 
> Can anyone help?  I searched the archives at mikal but didn't come up with
> anything that was applicable.
> 

As someone else pointed out, you could also have modified your actions to
be the name of the JSP page instead (/cust/listorders.jsp).

> Many thanks,
> Kevin.
> 


Craig McClanahan




RE: WebappClassLoader question

2001-07-26 Thread Ignacio J. Ortega

Hola Vincent: 

> -Mensaje original-
> De: Vincent Massol [mailto:[EMAIL PROTECTED]]
> Enviado el: jueves 26 de julio de 2001 22:20
> Para: Craig R. McClanahan; [EMAIL PROTECTED]
> Asunto: Re: WebappClassLoader question
> 
  

> Now all of this is packaged in a war, classes A and B and in 
> a jar put in
> WEB-INF/lib and class C is put in WEB-INF/classes. The junit 
> jar is *not*
> put in WEB-INF/lib.
> 

I'm lost here, where you put the Junit.jar? , because it will be on some
place? no? to allow you load classes from , no?, i think you need the
entire inheritance chain for resolving dependencies, so you need
Junit.jar in some place in classpath AFAIK.. this is the simple dumb
explanation i know, but is what i'm seeing on your example.. 

Can you make a simple main example trying to do what you want to do,
without involving a servlet container.. i dont know how you can load (
using  reflection for it doesnt matter ) a class without his entire
inheritance chain present ... 

Only a wild thought, i'm not an expert on anything so... take it me too
seriously .. :)

Saludos ,
Ignacio J. Ortega



> Calling the servlet A result in an error occurring between 
> the logs "before
> error" and "after error" and the log "I would have thought 
> here" is never
> printed because the error happens _before_ ... This is what I don't
> understand.
> 
> Any idea ?
> Thanks a lot
> -Vincent
> 
> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Vincent Massol" 
> <[EMAIL PROTECTED]>
> Sent: Thursday, July 26, 2001 6:18 PM
> Subject: Re: WebappClassLoader question
> 
> 
> On Thu, 26 Jul 2001, Vincent Massol wrote:
> 
> > Thanks Alex,
> >
> > I don't think the standard classloader mechanism is involved here. I
> believe
> > it is a 'feature' of Tomcat and more specifically of it's
> WebappClassLoader.
> > When you do standard java code and you have the following 
> situation :
> >
> > 1st -> 2nd --- (using reflection) --> 3rd (not in classpath)
> >
> > then the error always happen in the 2nd class and you can 
> put the code
> > between a try catch block and you'll be able to catch the
> > ClassNotFoundException. However what happens here is that the error
> happens
> > when calling a method on the 1st class that instanciates 
> the 2nd class !
> > This is what I don't understand.
> >
> > Am I dreaming or is this a behaviour of Tomcat 4 ?
> >
> 
> The web app class loader in Tomcat 4 is based on 
> java.net.URLClassLoader,
> and has the same basic class loading behavior.  In particular, when a
> class A is loaded, all the classes that A directly references 
> (i.e. listed
> in import statements, used as a variable declaration, and so 
> on) are also
> loaded.  This is done recursively on the referenced classes, until the
> entire tree of references is resolved.  If the load for class 
> A fails, you
> will get ClassNotFoundException.  However, if the load for one of the
> referenced classes fails, you will typically get 
> NoClassDefError instead
> (and the class named in the error message may or may not be 
> the one that
> is actually missing, which complicates debugging this problem 
> tremendously
> :-).
> 
> A good rule of thumb to avoid this kind of problem -- if you 
> need to add
> classes to your CLASSPATH at compile time (when rebuilding the entire
> app), be sure all of those classes are visible to the web app 
> at runtime.
> 
> Using reflection, on the other hand, lets you defer loading 
> of "dependent"
> classes until runtime, and you can deal with 
> ClassNotFoundException errors
> that you might run into.  Note however that, even if you load a class
> dynamically, *that* class still contains direct references to other
> classes that must all be resolved in the manner described above.
> 
> 
> > Thanks
> > -Vincent
> >
> 
> Craig McClanahan
> 
> PS:  One place where the Tomcat 4 class loader *does* vary 
> from the usual
> class loader behavior is in the order of places it looks to load a
> class.  The usual pattern in Java2 is to delegate to the parent class
> loader first, then look locally.  Tomcat 4 does the opposite 
> -- it checks
> in /WEB-INF/classes and /WEB-INF/lib of your web application *before*
> looking up the parent class loader chain.  This means that, 
> if you have a
> class in the $CATALINA_HOME/lib directory (shared across web 
> apps), and a
> version of that same class in your web app, the version in your webapp
> wins.
> 
> 
> > - Original Message -
> > From: "Alex Fernández" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 25, 2001 3:44 PM
> > Subject: Re: WebappClassLoader question
> >
> >
> > > Hi Vincent!
> > >
> > > I've run into the same situation a couple of times, when 
> one class uses
> > > a second class, and this second class uses a third one that is not
> > > present.
> > >
> > > 1st -> 2nd -> 3rd (missing)
> > >
> > > One would think that instantiating the 2nd should give an 

test

2001-07-26 Thread manhong wu




test


oracle 8.7.1 with tomcat

2001-07-26 Thread Manhong Wu

I have a project runing fine on NT connecting to
oracle 7.3.3 by using tomcat 3.2.1 with Jbuilder. Now
I have to move the database to 8.1.7, then I download
classes111b.zip from 
http://otn.oracle.com/software/tech/java/sqlj_jdbc/software_index.htm
and map the lib to that zip file, but looks like I can
not set up connection with database.
 
Is there another suggestion ?
 
thanks

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: test

2001-07-26 Thread isleofdogs
At 04:53 PM 7/26/01 -0400, you wrote: 

test 

i didn't get this.. can you please resend it?



Re: WebappClassLoader question

2001-07-26 Thread Craig R. McClanahan

Hmm, I just tried a case like what you have below.  As long as B does not
explicitly reference class C, then it works.  In other words, in my
example where you've got the "// call the method by reflection" comment, I
added

  Object c = myClass.newInstance();

and got the class not found exception at "I would have thought here".  On
the other hand, if I changed the above line to:

  C c = (C) myClass.newInstance();

(and compiled with class C on the compiler classpath, but not in the
webapp), then I get the error in between "before error" and "after error".

This makes sense, because the latter statement makes B explicitly
dependent on C, where the former doesn't.

I'll mess around some more, playing with JAR-ing up some but not all the
classes involved.

Craig


On Thu, 26 Jul 2001, Vincent Massol wrote:

> Thanks Craig,
> 
> However I am still not sure this mechanism explains the problem I had. It is
> not easy to describe in word so I'll write it in java code instead.
> 
> A.java
> 
> public class A implements HttpServlet
> {
>   public void doGet()
>   {
> log("before error");
> B myB = new B();
> log("after error");
>   }
> }
> 
> 
> B.java
> 
> public class B
> {
>   public B()
>   {
>   }
>   public doSomething()
>   {
> try {
>   Class myClass = Class.forName("C");
>   // call the method by reflection ...
> } catch (Exception e) {
>   log("I would have thought here");
> }
>   }
> }
> 
> 
> C.java
> 
> import junit.framework.*;
> 
> public class C extends TestCase
> {
> ...
> }
> 
> 
> Now all of this is packaged in a war, classes A and B and in a jar put in
> WEB-INF/lib and class C is put in WEB-INF/classes. The junit jar is *not*
> put in WEB-INF/lib.
> 
> Calling the servlet A result in an error occurring between the logs "before
> error" and "after error" and the log "I would have thought here" is never
> printed because the error happens _before_ ... This is what I don't
> understand.
> 
> Any idea ?
> Thanks a lot
> -Vincent
> 
> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Vincent Massol" <[EMAIL PROTECTED]>
> Sent: Thursday, July 26, 2001 6:18 PM
> Subject: Re: WebappClassLoader question
> 
> 
> On Thu, 26 Jul 2001, Vincent Massol wrote:
> 
> > Thanks Alex,
> >
> > I don't think the standard classloader mechanism is involved here. I
> believe
> > it is a 'feature' of Tomcat and more specifically of it's
> WebappClassLoader.
> > When you do standard java code and you have the following situation :
> >
> > 1st -> 2nd --- (using reflection) --> 3rd (not in classpath)
> >
> > then the error always happen in the 2nd class and you can put the code
> > between a try catch block and you'll be able to catch the
> > ClassNotFoundException. However what happens here is that the error
> happens
> > when calling a method on the 1st class that instanciates the 2nd class !
> > This is what I don't understand.
> >
> > Am I dreaming or is this a behaviour of Tomcat 4 ?
> >
> 
> The web app class loader in Tomcat 4 is based on java.net.URLClassLoader,
> and has the same basic class loading behavior.  In particular, when a
> class A is loaded, all the classes that A directly references (i.e. listed
> in import statements, used as a variable declaration, and so on) are also
> loaded.  This is done recursively on the referenced classes, until the
> entire tree of references is resolved.  If the load for class A fails, you
> will get ClassNotFoundException.  However, if the load for one of the
> referenced classes fails, you will typically get NoClassDefError instead
> (and the class named in the error message may or may not be the one that
> is actually missing, which complicates debugging this problem tremendously
> :-).
> 
> A good rule of thumb to avoid this kind of problem -- if you need to add
> classes to your CLASSPATH at compile time (when rebuilding the entire
> app), be sure all of those classes are visible to the web app at runtime.
> 
> Using reflection, on the other hand, lets you defer loading of "dependent"
> classes until runtime, and you can deal with ClassNotFoundException errors
> that you might run into.  Note however that, even if you load a class
> dynamically, *that* class still contains direct references to other
> classes that must all be resolved in the manner described above.
> 
> 
> > Thanks
> > -Vincent
> >
> 
> Craig McClanahan
> 
> PS:  One place where the Tomcat 4 class loader *does* vary from the usual
> class loader behavior is in the order of places it looks to load a
> class.  The usual pattern in Java2 is to delegate to the parent class
> loader first, then look locally.  Tomcat 4 does the opposite -- it checks
> in /WEB-INF/classes and /WEB-INF/lib of your web application *before*
> looking up the parent class loader chain.  This means that, if you have a
> class in the $CATALINA_HOME/lib directory (shared across web apps), and a
> version of that same 

Re: WebappClassLoader question

2001-07-26 Thread Craig R. McClanahan



On Thu, 26 Jul 2001, Craig R. McClanahan wrote:

> Hmm, I just tried a case like what you have below.  As long as B does not
> explicitly reference class C, then it works.  In other words, in my
> example where you've got the "// call the method by reflection" comment, I
> added
> 
>   Object c = myClass.newInstance();
> 
> and got the class not found exception at "I would have thought here".  On
> the other hand, if I changed the above line to:
> 
>   C c = (C) myClass.newInstance();
> 
> (and compiled with class C on the compiler classpath, but not in the
> webapp), then I get the error in between "before error" and "after error".
> 
> This makes sense, because the latter statement makes B explicitly
> dependent on C, where the former doesn't.
> 
> I'll mess around some more, playing with JAR-ing up some but not all the
> classes involved.
> 

One more follow-up ... this works correctly for me with A and B in a jar
file under /WEB-INF/lib, and C unpacked under /WEB-INF/classes as well.

> Craig
> 

Craig


> 
> On Thu, 26 Jul 2001, Vincent Massol wrote:
> 
> > Thanks Craig,
> > 
> > However I am still not sure this mechanism explains the problem I had. It is
> > not easy to describe in word so I'll write it in java code instead.
> > 
> > A.java
> > 
> > public class A implements HttpServlet
> > {
> >   public void doGet()
> >   {
> > log("before error");
> > B myB = new B();
> > log("after error");
> >   }
> > }
> > 
> > 
> > B.java
> > 
> > public class B
> > {
> >   public B()
> >   {
> >   }
> >   public doSomething()
> >   {
> > try {
> >   Class myClass = Class.forName("C");
> >   // call the method by reflection ...
> > } catch (Exception e) {
> >   log("I would have thought here");
> > }
> >   }
> > }
> > 
> > 
> > C.java
> > 
> > import junit.framework.*;
> > 
> > public class C extends TestCase
> > {
> > ...
> > }
> > 
> > 
> > Now all of this is packaged in a war, classes A and B and in a jar put in
> > WEB-INF/lib and class C is put in WEB-INF/classes. The junit jar is *not*
> > put in WEB-INF/lib.
> > 
> > Calling the servlet A result in an error occurring between the logs "before
> > error" and "after error" and the log "I would have thought here" is never
> > printed because the error happens _before_ ... This is what I don't
> > understand.
> > 
> > Any idea ?
> > Thanks a lot
> > -Vincent
> > 
> > - Original Message -
> > From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; "Vincent Massol" <[EMAIL PROTECTED]>
> > Sent: Thursday, July 26, 2001 6:18 PM
> > Subject: Re: WebappClassLoader question
> > 
> > 
> > On Thu, 26 Jul 2001, Vincent Massol wrote:
> > 
> > > Thanks Alex,
> > >
> > > I don't think the standard classloader mechanism is involved here. I
> > believe
> > > it is a 'feature' of Tomcat and more specifically of it's
> > WebappClassLoader.
> > > When you do standard java code and you have the following situation :
> > >
> > > 1st -> 2nd --- (using reflection) --> 3rd (not in classpath)
> > >
> > > then the error always happen in the 2nd class and you can put the code
> > > between a try catch block and you'll be able to catch the
> > > ClassNotFoundException. However what happens here is that the error
> > happens
> > > when calling a method on the 1st class that instanciates the 2nd class !
> > > This is what I don't understand.
> > >
> > > Am I dreaming or is this a behaviour of Tomcat 4 ?
> > >
> > 
> > The web app class loader in Tomcat 4 is based on java.net.URLClassLoader,
> > and has the same basic class loading behavior.  In particular, when a
> > class A is loaded, all the classes that A directly references (i.e. listed
> > in import statements, used as a variable declaration, and so on) are also
> > loaded.  This is done recursively on the referenced classes, until the
> > entire tree of references is resolved.  If the load for class A fails, you
> > will get ClassNotFoundException.  However, if the load for one of the
> > referenced classes fails, you will typically get NoClassDefError instead
> > (and the class named in the error message may or may not be the one that
> > is actually missing, which complicates debugging this problem tremendously
> > :-).
> > 
> > A good rule of thumb to avoid this kind of problem -- if you need to add
> > classes to your CLASSPATH at compile time (when rebuilding the entire
> > app), be sure all of those classes are visible to the web app at runtime.
> > 
> > Using reflection, on the other hand, lets you defer loading of "dependent"
> > classes until runtime, and you can deal with ClassNotFoundException errors
> > that you might run into.  Note however that, even if you load a class
> > dynamically, *that* class still contains direct references to other
> > classes that must all be resolved in the manner described above.
> > 
> > 
> > > Thanks
> > > -Vincent
> > >
> > 
> > Craig McClanahan
> > 
> > PS:  One place where the Tomcat 4 class l

Displaying exceptions

2001-07-26 Thread Erick Todd

I am having a problem of errors that were not caught by being printed to 
the terminal.  Is their a way to redirect these to a file or to the 
tomcat logs?  

Also when an exception is handled by jakarta can I change the stacktrace 
to some default message that is a litle nicer to our friends on the web, 
and maybe even log the error?

Any help on either of these would be greatly appreciated.




  1   2   >