JDBCRealm: change password without logging out

2001-08-19 Thread Taavi Tiirik

Dear tomcat users,

Can you please guide me how to let tomcat know that I have changed
user password in database (JDBCRealm, Tomcat 3.2.3, form based login).
I am currently altering session variable j_password but I realize
this is very tomcat 3.2.3 specific and can possibly not work with
future versions. Is there something in servlet api that I have not
seen?

with best wishes,
Taavi





mod_jk.log messages

2001-08-19 Thread Aravind Naidu


I have got TC 3.2.3 with AJP13 connector to Apache on RedHat 7.1
Everything is working fine.

I have these messages in the log file for mod_jk

[jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL
par
ameter
[jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL p
arameters


What are they ?

-- Aravind




Problem with ajp13

2001-08-19 Thread Roy K. Mayr R.

When using ajp13, I get the exception;
java.net.SocketException: Connection reset by peer: Connection reset by
peer

Is there a problem with my ajp13?

Roy




Can't stop tomcat.exe windows service

2001-08-19 Thread Michael Chen


I'm running TC 4.0 (7) as a service on win2k. I just can't stop it.
I've tried both the shutdown shortcut from start|program and also
the shutdown script under /bin. 

C:\Program Files\Jakarta Tomcat 4.0\binC:\jbuilder5\jdk1.3\bin\java -jar 
-Dcatalina.home=C:\Program Files\Jakarta Tomcat 4.0 bootstrap.jar stop
Catalina.stop: java.net.ConnectException: Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
at java.net.Socket.init(Socket.java:273)
at java.net.Socket.init(Socket.java:100)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:788)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:659)
at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)

C:\Program Files\Jakarta Tomcat 4.0\binshutdown
Using CLASSPATH: ..\bin\bootstrap.jar;c:\jbuilder5\jdk1.3\lib\tools.jar
Catalina.stop: java.net.ConnectException: Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
at java.net.Socket.init(Socket.java:273)
at java.net.Socket.init(Socket.java:100)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:788)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:659)
at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)



Tomcat and Apache, can't get it up and running

2001-08-19 Thread Gero Vermaas

Hi,

I'm trying to get the combination of Apache and Tomcat 3.3-b1 up and 
running, but without success till now. Both run OK themselves but when I 
try to access TomCat webapps via Apache nothing happens. I following the 
  HOWTO on the jakarta site but without luck.

- Accessing JSP pages by connection to port 8080 (TomCat) works fine
- Accessing plain HTML via port 80 (Apache web server) is also no problem.

However, I can't get Apache to forward requests to Tomcat:

I used the auto config option in Tomcat and it generates a nice 
mod_jk.conf file in the conf/auto directory of tomcat.

I added the following line to httpd.conf of apache:

Include /opt/tomcat-3.3-b1/conf/auto/mod_jk.conf

The contents of mod_jk.conf is:
## Auto generated on Sun Aug 19 16:47:43 GMT+02:00 2001##

IfModule !mod_jk.c
   LoadModule jk_module /etc/httpd/modules/mod_jk.so
/IfModule

JkWorkersFile /opt/tomcat-3.3-b1/conf/jk/workers.properties
JkLogFile /opt/tomcat-3.3-b1/logs/mod_jk.log


JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /admin ajp13
JkMount /admin/* ajp13


When I try to access the examples I get the following messages in the 
apache log
[Sun Aug 19 17:33:14 2001] [error] [client 10.0.0.150] Directory index 
forbidden by rule: /opt/tomcat-3.3-b1/webapps/examples/


Then I added the following to the httpd.conf file:


Directory /opt/tomcat-3.3-b1/webapps
AllowOverride None
Options Indexes Includes FollowSymLinks ExecCGI
order deny,allow
allow from all
/Directory

But this resulted in:
[Sun Aug 19 17:35:31 2001] [error] [client 10.0.0.150] File does not 
exist: /var/www/html/examples/

Any ideas whta could be wrong?

Thanks in advance,

Gero




RE: Can't stop tomcat.exe windows service

2001-08-19 Thread Rob S.

Did you happen to change the value of the Server port between startup and
attempted shutdown?

- r

 -Original Message-
 From: Michael Chen [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, August 19, 2001 10:40 AM
 To: [EMAIL PROTECTED]
 Subject: Can't stop tomcat.exe windows service



 I'm running TC 4.0 (7) as a service on win2k. I just can't stop it.
 I've tried both the shutdown shortcut from start|program and also
 the shutdown script under /bin.

 C:\Program Files\Jakarta Tomcat
 4.0\binC:\jbuilder5\jdk1.3\bin\java -jar
 -Dcatalina.home=C:\Program Files\Jakarta Tomcat 4.0 bootstrap.jar stop
 Catalina.stop: java.net.ConnectException: Connection refused: connect
 java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
 at
 java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
 at java.net.Socket.init(Socket.java:273)
 at java.net.Socket.init(Socket.java:100)
 at org.apache.catalina.startup.Catalina.stop(Catalina.java:788)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:659)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)

 C:\Program Files\Jakarta Tomcat 4.0\binshutdown
 Using CLASSPATH: ..\bin\bootstrap.jar;c:\jbuilder5\jdk1.3\lib\tools.jar
 Catalina.stop: java.net.ConnectException: Connection refused: connect
 java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
 at
 java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
 at java.net.Socket.init(Socket.java:273)
 at java.net.Socket.init(Socket.java:100)
 at org.apache.catalina.startup.Catalina.stop(Catalina.java:788)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:659)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)





RE: Tomcat and Apache, can't get it up and running

2001-08-19 Thread Rob S.

Hi Gero,

 - Accessing JSP pages by connection to port 8080 (TomCat) works fine
 - Accessing plain HTML via port 80 (Apache web server) is also no problem.

Ok, this is a good start =)

 When I try to access the examples I get the following messages in the
 apache log
 [Sun Aug 19 17:33:14 2001] [error] [client 10.0.0.150] Directory index
 forbidden by rule: /opt/tomcat-3.3-b1/webapps/examples/

This looks good so far, the /examples request is resolving relative to
Tomcat's examples Context.  Try to request an actual JSP file, not the
directory.

 But this resulted in:
 [Sun Aug 19 17:35:31 2001] [error] [client 10.0.0.150] File does not
 exist: /var/www/html/examples/

...exactly.  Now your request isn't getting forwarded to Tomcat, and Apache
is looking at it's DocumentRoot for /examples/ and it doesn't exist.

- r




RE: Can't stop tomcat.exe windows service

2001-08-19 Thread Michael Chen


I did not change any of the values for the default install as
service. My server tag is:

Server port=8005 shutdown=SHUTDOWN debug=0

Reply-To: [EMAIL PROTECTED]
 Rob S. [EMAIL PROTECTED] [EMAIL PROTECTED] RE: Can't stop 
tomcat.exe windows serviceDate: Sun, 19 Aug 2001 12:02:43 -0400

Did you happen to change the value of the Server port between startup and
attempted shutdown?

- r

 -Original Message-
 From: Michael Chen [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, August 19, 2001 10:40 AM
 To: [EMAIL PROTECTED]
 Subject: Can't stop tomcat.exe windows service



 I'm running TC 4.0 (7) as a service on win2k. I just can't stop it.
 I've tried both the shutdown shortcut from start|program and also
 the shutdown script under /bin.

 C:\Program Files\Jakarta Tomcat
 4.0\binC:\jbuilder5\jdk1.3\bin\java -jar
 -Dcatalina.home=C:\Program Files\Jakarta Tomcat 4.0 bootstrap.jar stop
 Catalina.stop: java.net.ConnectException: Connection refused: connect
 java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
 at
 java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
 at java.net.Socket.init(Socket.java:273)
 at java.net.Socket.init(Socket.java:100)
 at org.apache.catalina.startup.Catalina.stop(Catalina.java:788)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:659)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)

 C:\Program Files\Jakarta Tomcat 4.0\binshutdown
 Using CLASSPATH: ..\bin\bootstrap.jar;c:\jbuilder5\jdk1.3\lib\tools.jar
 Catalina.stop: java.net.ConnectException: Connection refused: connect
 java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
 at
 java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
 at java.net.Socket.init(Socket.java:273)
 at java.net.Socket.init(Socket.java:100)
 at org.apache.catalina.startup.Catalina.stop(Catalina.java:788)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:659)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)




RE: Can't stop tomcat.exe windows service

2001-08-19 Thread Rob S.

Hmm...  the only time I've gotten that when shutting down is:

1) Ajp12 port commented out (in Tomcat 3.x)
2) Value of port changed between startup and shutdown (in TC3 and TC4)
3) Server is already shutdown =)
4) Firewall or something not allowing connections to that port.

HTH!

- r

 -Original Message-
 From: Michael Chen [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, August 19, 2001 12:16 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Can't stop tomcat.exe windows service



 I did not change any of the values for the default install as
 service. My server tag is:

 Server port=8005 shutdown=SHUTDOWN debug=0

 Reply-To: [EMAIL PROTECTED]
  Rob S. [EMAIL PROTECTED] [EMAIL PROTECTED]
 RE: Can't stop tomcat.exe windows serviceDate: Sun, 19 Aug 2001
 12:02:43 -0400
 
 Did you happen to change the value of the Server port between
 startup and
 attempted shutdown?
 
 - r
 
  -Original Message-
  From: Michael Chen [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, August 19, 2001 10:40 AM
  To: [EMAIL PROTECTED]
  Subject: Can't stop tomcat.exe windows service
 
 
 
  I'm running TC 4.0 (7) as a service on win2k. I just can't stop it.
  I've tried both the shutdown shortcut from start|program and also
  the shutdown script under /bin.
 
  C:\Program Files\Jakarta Tomcat
  4.0\binC:\jbuilder5\jdk1.3\bin\java -jar
  -Dcatalina.home=C:\Program Files\Jakarta Tomcat 4.0
 bootstrap.jar stop
  Catalina.stop: java.net.ConnectException: Connection refused: connect
  java.net.ConnectException: Connection refused: connect
  at java.net.PlainSocketImpl.socketConnect(Native Method)
  at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
  at
  java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
  at java.net.Socket.init(Socket.java:273)
  at java.net.Socket.init(Socket.java:100)
  at org.apache.catalina.startup.Catalina.stop(Catalina.java:788)
  at
 org.apache.catalina.startup.Catalina.execute(Catalina.java:659)
  at
 org.apache.catalina.startup.Catalina.process(Catalina.java:178)
  at java.lang.reflect.Method.invoke(Native Method)
  at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)
 
  C:\Program Files\Jakarta Tomcat 4.0\binshutdown
  Using CLASSPATH: ..\bin\bootstrap.jar;c:\jbuilder5\jdk1.3\lib\tools.jar
  Catalina.stop: java.net.ConnectException: Connection refused: connect
  java.net.ConnectException: Connection refused: connect
  at java.net.PlainSocketImpl.socketConnect(Native Method)
  at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
  at
  java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
  at java.net.Socket.init(Socket.java:273)
  at java.net.Socket.init(Socket.java:100)
  at org.apache.catalina.startup.Catalina.stop(Catalina.java:788)
  at
 org.apache.catalina.startup.Catalina.execute(Catalina.java:659)
  at
 org.apache.catalina.startup.Catalina.process(Catalina.java:178)
  at java.lang.reflect.Method.invoke(Native Method)
  at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)
 





Re: Can't stop tomcat.exe windows service

2001-08-19 Thread Pier P. Fumagalli

Michael Chen at [EMAIL PROTECTED] wrote:

 
 I'm running TC 4.0 (7) as a service on win2k. I just can't stop it.
 I've tried both the shutdown shortcut from start|program and also
 the shutdown script under /bin.

If you're running it as a service, the only way in which you'll be able to
stop Tomcat is from the services control panel... As a security precaution,
when running as a Service, Tomcat will not respond to shutdown thru the
network interface.

Pier




Re: Can't stop tomcat.exe windows service

2001-08-19 Thread Pier P. Fumagalli

Michael Chen at [EMAIL PROTECTED] wrote:

 
 I did not change any of the values for the default install as
 service. My server tag is:
 
 Server port=8005 shutdown=SHUTDOWN debug=0

This directive is ignored when running Tomcat 4.0 as a Service.

Pier




Re: Can't stop tomcat.exe windows service

2001-08-19 Thread Pier P. Fumagalli

Rob S. at [EMAIL PROTECTED] wrote:

 Hmm...  the only time I've gotten that when shutting down is:
 
 1) Ajp12 port commented out (in Tomcat 3.x)
 2) Value of port changed between startup and shutdown (in TC3 and TC4)
 3) Server is already shutdown =)
 4) Firewall or something not allowing connections to that port.
 
 HTH!

Tomcat 4.0 is different on that... We don't get network shutdowns if you're
running as a service... :)

Pier




RE: Can't stop tomcat.exe windows service

2001-08-19 Thread Rob S.

 If you're running it as a service, the only way in which you'll be able to
 stop Tomcat is from the services control panel... As a security 
 precaution,
 when running as a Service, Tomcat will not respond to shutdown thru the
 network interface.

A definite FAQ entry!  Thanks for the tip ;)

- r




Re: http vs https

2001-08-19 Thread John Baker

On Saturday 18 August 2001 17:17 pm, you wrote:
  without the SSL engine. They want to use their own SSL
  accelarator however

 freeware geekNo doubt one they're going to charge your company for!/fg

You must be joking. We're charging them :) It's just the twisted way they 
like to deploy things.

  It must detect that as it isn't doing the SSL, and the SSL
  accelarator has
  decoded the SSL stream from the user, the connection is insecure and it
  therefore uses HTTP and not HTTPS.

 I would agree.  Tomcat has no knowledge that SSL is in use and returns the
 appropriate URL.

  Is there anyway to override this behaviour?

 Hmm...  generate all URLs by hand with a custom tag?

 myTags:encodeURL/someDir/somePage.jsp/

 ...and I don't think you'd be able to use a RequestDispatcher to forward
 requests either.  Maybe one of the TC devs can reply if interceptors or
 valves or something could help.

 I'm not too experienced with all of this, but I figured I'd try and help
 out nonetheless ;)

ta :) Well I can't really recode the urls. I have no problems using my own 
urls, infact I have an object which reads a .rc file that tells the web 
engine where it's deployed, so it can create links like:

%= WebDefaults.ROOT_PATH + myImages/moo.gif %

WebDefaults.ROOT_PATH is the path from / that this jsp is deployed. But I 
started using this in my novice days. I'm sure there is a method to get that 
for me ? :)

The actualy problem is the initial redirect when the client says to the 
server:

GET / HTTP/1.0

and the server returns a redirect to:

http://whatever/index.jsp

but of course that needs to be:

https://whatever

if the accelarator is in use.


John

 - r

-- 
John Baker, BSc CS.
Java Developer, TEAM Slb. (http://www.teamenergy.com)
The views expressed in this mail are my own.



RE: Help Installing Tomcat on Win95

2001-08-19 Thread Sheila Ratnam

Rob  Pier, thanks for the help in getting my Tomcat server going.

Now it's my first servlet that's not compiling! I have set the CLASSPATH to 
c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar; where the servlet.jar file 
is. But when I try to compile the servlet, the error message says 
javax.servlet package does not exist

What else could be the problem?

TIA,
Sheila


From: Rob S. [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Help Installing Tomcat on Win95
Date: Sat, 18 Aug 2001 08:16:26 -0400

AH

You're trying to request your server through the WarpConnector port and not
the HTTP port?  This was what a lot of people used to do, try and make
requests to Tomcat 3.x through the AJP port 8007 (by default).  Pier, maybe
the default WarpConnector should be at 8007? (assuming it's 8008)

- r

  -Original Message-
  From: Sheila Ratnam [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 10:28 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Help Installing Tomcat on Win95
 
 
  Pier,
  I did try using the ip address instead of 'localhost', but it
  didn't work.
  Probably the error is what the log shows?
 
  Sheila
 
 
 
  From: Sheila Ratnam [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: Help Installing Tomcat on Win95
  Date: Sat, 18 Aug 2001 02:21:22 +
  
  Rob, Pier,
  
  I noticed the following error logged in apache.log file.
  
  2001-08-17 20:42:46 [org.apache.catalina.connector.warp.WarpConnector]
  Error
  accepting requests
  java.net.SocketException: socket closed
  at java.net.PlainSocketImpl.socketAccept(Native Method)
  at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:424)
  at java.net.ServerSocket.implAccept(ServerSocket.java:246)
  at java.net.ServerSocket.accept(ServerSocket.java:225)
  at
  org.apache.catalina.connector.warp.WarpConnector.run(WarpConnecto
  r.java:554)
  at java.lang.Thread.run(Thread.java:484)
  
  As you correctly expected, the CATALINA_HOME_Log file is empty.
  How can I correct this?
  
  No problem with 'hitting' as long as I get this to work:)
  
  Thanks,
  Sheila
  
  
  
  From: Pier P. Fumagalli [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: Help Installing Tomcat on Win95
  Date: Sat, 18 Aug 2001 02:52:14 +0100
  
  Rob S. at [EMAIL PROTECTED] wrote:
  
I should add that I tried changing the port number in the 
server.xml
  file
inside conf folder as mentioned in the RUNNING.txt. Also checked 
and
  made
sure that the browser is not trying to access a proxy server. But
it hasn't
worked.
Thanks,
Sheila
   
?!  This brings a joyous tear to my eye! =~)  Someone has read the
documentation and acted upon it.  Sheila, you've made my
  day!  So your
Tomcat has started at 8080 and http://localhost:8080/ doesn't do 
the
trick...  Did you check the log files ($CATALINA_HOME/logs) for any
  activity
when you make a request?  If nothing at all appears in those files, 
I
  don't
think the request is getting there.
  
  Another good test on Windows is to try to send your request to
  http://127.0.0.1:8080/ as sometimes Windows forgets about the meaning 
of
  localhost (I believe it was EXACTLY Win95, and was later fixed
  on Win98).
  
  And, BTW, Rob, stop trying to hit on girls on the mailing list
  :) :) :) :)
  I tried it in the past, doesn't work! :) :) :) :)
  
   Pier
  
  
  
  _
  Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
 


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




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




RE: Help Installing Tomcat on Win95

2001-08-19 Thread Dmitri Colebatch

I'm assuming its a type.. but you have
c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar rather than
c:\jakarta-tomcat-4.0-b7\common\lib\servlet.jar - from memory that will be
resolved from the current c dir... so may not even be finding servlet.jar

then again - if its just an email typo weird...

cheers
dim

On Mon, 20 Aug 2001, Sheila Ratnam wrote:

 Rob  Pier, thanks for the help in getting my Tomcat server going.
 
 Now it's my first servlet that's not compiling! I have set the CLASSPATH to 
 c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar; where the servlet.jar file 
 is. But when I try to compile the servlet, the error message says 
 javax.servlet package does not exist
 
 What else could be the problem?
 
 TIA,
 Sheila
 
 
 From: Rob S. [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Help Installing Tomcat on Win95
 Date: Sat, 18 Aug 2001 08:16:26 -0400
 
 AH
 
 You're trying to request your server through the WarpConnector port and not
 the HTTP port?  This was what a lot of people used to do, try and make
 requests to Tomcat 3.x through the AJP port 8007 (by default).  Pier, maybe
 the default WarpConnector should be at 8007? (assuming it's 8008)
 
 - r
 
   -Original Message-
   From: Sheila Ratnam [mailto:[EMAIL PROTECTED]]
   Sent: Friday, August 17, 2001 10:28 PM
   To: [EMAIL PROTECTED]
   Subject: Re: Help Installing Tomcat on Win95
  
  
   Pier,
   I did try using the ip address instead of 'localhost', but it
   didn't work.
   Probably the error is what the log shows?
  
   Sheila
  
  
  
   From: Sheila Ratnam [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Re: Help Installing Tomcat on Win95
   Date: Sat, 18 Aug 2001 02:21:22 +
   
   Rob, Pier,
   
   I noticed the following error logged in apache.log file.
   
   2001-08-17 20:42:46 [org.apache.catalina.connector.warp.WarpConnector]
   Error
   accepting requests
   java.net.SocketException: socket closed
   at java.net.PlainSocketImpl.socketAccept(Native Method)
   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:424)
   at java.net.ServerSocket.implAccept(ServerSocket.java:246)
   at java.net.ServerSocket.accept(ServerSocket.java:225)
   at
   org.apache.catalina.connector.warp.WarpConnector.run(WarpConnecto
   r.java:554)
   at java.lang.Thread.run(Thread.java:484)
   
   As you correctly expected, the CATALINA_HOME_Log file is empty.
   How can I correct this?
   
   No problem with 'hitting' as long as I get this to work:)
   
   Thanks,
   Sheila
   
   
   
   From: Pier P. Fumagalli [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Re: Help Installing Tomcat on Win95
   Date: Sat, 18 Aug 2001 02:52:14 +0100
   
   Rob S. at [EMAIL PROTECTED] wrote:
   
 I should add that I tried changing the port number in the 
 server.xml
   file
 inside conf folder as mentioned in the RUNNING.txt. Also checked 
 and
   made
 sure that the browser is not trying to access a proxy server. But
 it hasn't
 worked.
 Thanks,
 Sheila

 ?!  This brings a joyous tear to my eye! =~)  Someone has read the
 documentation and acted upon it.  Sheila, you've made my
   day!  So your
 Tomcat has started at 8080 and http://localhost:8080/ doesn't do 
 the
 trick...  Did you check the log files ($CATALINA_HOME/logs) for any
   activity
 when you make a request?  If nothing at all appears in those files, 
 I
   don't
 think the request is getting there.
   
   Another good test on Windows is to try to send your request to
   http://127.0.0.1:8080/ as sometimes Windows forgets about the meaning 
 of
   localhost (I believe it was EXACTLY Win95, and was later fixed
   on Win98).
   
   And, BTW, Rob, stop trying to hit on girls on the mailing list
   :) :) :) :)
   I tried it in the past, doesn't work! :) :) :) :)
   
Pier
   
   
   
   _
   Get your FREE download of MSN Explorer at
 http://explorer.msn.com/intl.asp
  
 
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 
 
 
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 
 




RE: Help Installing Tomcat on Win95

2001-08-19 Thread Sheila Ratnam

Sorry, it was a typo in my email (unfortunately!). I do have the correct 
path specified. But thanks for your sharp eyes :).

Do I have to place the servlet.java file in any specific directory to 
compile it? I have placed it inside a directory under ROOT, and from dos 
prompt made it the current directory and am trying to compile. Is that 
correct?

I also tried compiling it in another directory, outside the tomcat 
structure, where I usually compile other java projects. But it gives the 
same error.

Sheila


From: Dmitri Colebatch [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Help Installing Tomcat on Win95
Date: Mon, 20 Aug 2001 10:41:27 +1000

I'm assuming its a type.. but you have
c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar rather than
c:\jakarta-tomcat-4.0-b7\common\lib\servlet.jar - from memory that will be
resolved from the current c dir... so may not even be finding servlet.jar

then again - if its just an email typo weird...

cheers
dim

On Mon, 20 Aug 2001, Sheila Ratnam wrote:

  Rob  Pier, thanks for the help in getting my Tomcat server going.
 
  Now it's my first servlet that's not compiling! I have set the CLASSPATH 
to
  c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar; where the servlet.jar 
file
  is. But when I try to compile the servlet, the error message says
  javax.servlet package does not exist
 
  What else could be the problem?
 
  TIA,
  Sheila
 



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




RE: Help Installing Tomcat on Win95

2001-08-19 Thread Dmitri Colebatch

On Mon, 20 Aug 2001, Sheila Ratnam wrote:
 Do I have to place the servlet.java file in any specific directory to 
 compile it? I have placed it inside a directory under ROOT, and from dos 
 prompt made it the current directory and am trying to compile. Is that 
 correct?
Ok - shouldn't make any difference where the source file is (I assume that
by servlet.java you mean the servlet you are trying to compile).

you should have something like:

SET CLASSPATH=c:\jakarta-tomcat-4.0-b7\common\lib\servlet.jar
javac servlet.java

the only other thing I can think of is windows and long filenames might be
having arguments... a windows person might be better equipped to answer
that... 

 I also tried compiling it in another directory, outside the tomcat 
 structure, where I usually compile other java projects. But it gives the 
 same error.
with the other projects... do you have any long filenames?

I suppose that getting _really_ paranoid, something like:

cd \
C:\ mkdir test
C:\ cd test
C:\test\ copy c:\jakarta-tomcat-4.0-b7\common\lib\servlet.jar .
C:\test\ copy _your_servlet_ .
C:\test\ SET CLASSPATH=servlet.jar
C:\test\ javac _your_servlet_

should work mind you thats _very_ ridiculous and over the top, but if
the problem is the long filenames, then it will get around it

hth
cheers
dim


 
 Sheila
 
 
 From: Dmitri Colebatch [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Help Installing Tomcat on Win95
 Date: Mon, 20 Aug 2001 10:41:27 +1000
 
 I'm assuming its a type.. but you have
 c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar rather than
 c:\jakarta-tomcat-4.0-b7\common\lib\servlet.jar - from memory that will be
 resolved from the current c dir... so may not even be finding servlet.jar
 
 then again - if its just an email typo weird...
 
 cheers
 dim
 
 On Mon, 20 Aug 2001, Sheila Ratnam wrote:
 
   Rob  Pier, thanks for the help in getting my Tomcat server going.
  
   Now it's my first servlet that's not compiling! I have set the CLASSPATH 
 to
   c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar; where the servlet.jar 
 file
   is. But when I try to compile the servlet, the error message says
   javax.servlet package does not exist
  
   What else could be the problem?
  
   TIA,
   Sheila
  
 
 
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 
 




RE: More understanding on startup.sh and shutdown.sh

2001-08-19 Thread Kennice Low

Hi Rob and Larry,
Thank you for yours advice.  Your are right, I shouldn't set 
tomcat-internal-related and the webapps. I have remove the unnecessary 
setting on CLASSPATH and the jsp and servlet work fine.  But, the message 
still displayed when I shutdown and startup tomcat :
Exception in thread main java.lang.NoClassDefFoundError:
org/apache/tomcat/shell/Startup

1) Do you have any ideals ?  I suspect one of the servlet or xml file is 
looking for the directory org/apache/tomcat/shell/Startup, but the directory 
is not there.

2) Forgot to mention the jsp and servlet work fine all the time.  The only 
thing is I would like to learn more who does the startup and shutdown work.

3) Back to the 1st mail, do your have any ideal what is $BASEDIR.

best regards,
Kennice


Rob  wrote on 17/8/01 :
There should be nothing tomcat-internal-related in your CLASSPATH.  Tomcat
sets the CLASSPATH for you, by automatically adding all of the jars from
your $TOMCAT_HOME/lib directory to your CLASSPATH.

Larry wrote on 17/8/01:
$TOMCAT_HOME/webapps/ROOT/WEB-INF/classes shouldn't be in your
CLASSPATH since it is part of a web application.  If it is there
to get something to work, what goes wrong when it isn't there.

Larry

  -Original Message-
  From: Kennice Low [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 2:32 AM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: RE: More understanding on startup.sh and shutdown.sh
 
 
  Hi Rob,
  Thank you for your helps.
 
  when you do set | grep TOMCAT_HOME you should get
  something like this:
  TOMCAT_HOME=/var/jakarta-tomcat-3.2.2
 
  Have you set the TOMCAT_HOME and JAVA_HOME environment
  variables?  The
  error
  you're getting seems to be that the server's jar file isn't in the
  CLASSPATH
  (which Tomcat sets for you).
 
  here is my setting of profile.
 
  --
  --
  . /home/pseudo/profile
 
  alias ls='ls -l'
  alias la='ls -a'
  export PS1=\w
 
  . .java
 
  #export JAVA_HOME=/local/pkg/jdk/1.3
  export TOMCAT_HOME=/var/jakarta-tomcat-3.2.2
  export MYSQL_HOME=/usr/local/mysql-3.23.39-pc-linux-gnu-i686
  export BIN=/usr/bin
  export APACHE=/etc/init.d
 
  export
  PATH=$JAVA_HOME/bin:$MYSQL_HOME/bin:$TOMCAT_HOME:$BIN:$APACHE:$PATH
 
  export
  CLASSPATH=$TOMCAT_HOME/lib/servlet.jar:$TOMCAT_HOME/lib/jasper
  .jar:$TOMCAT_HOME/lib/webserver.jar:$TOMCAT_HOME/webapps/ROOT/
  WEB-INF/classes:$TOMCAT_HOME/lib/mm.m
  ysql-2.0.6.jar:$TOMCAT_HOME/conn
 
  ---end of profile---
  Is there any error on the setting ?
 
  Thank you :-)
  regards
  Kennice
 
 
 
  From: Rob S. [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RE: More understanding on startup.sh and shutdown.sh
  Date: Thu, 16 Aug 2001 07:16:09 -0400
  
  Hiya Ken,
  
  Have you set the TOMCAT_HOME and JAVA_HOME environment
  variables?  The
  error
  you're getting seems to be that the server's jar file isn't in the
  CLASSPATH
  (which Tomcat sets for you).  I can only think that you've
  improperly set
  TOMCAT_HOME.
  
  when you do set | grep TOMCAT_HOME you should get
  something like this:
  
  TOMCAT_HOME=/usr/local/tomcat
  
  where that is the root of your tomcat installation.  Make
  sure that's set
  correctly and let us know what happens...
  
  - r
  
-Original Message-
From: Kennice Low [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 5:33 AM
To: [EMAIL PROTECTED]
Subject: More understanding on startup.sh and shutdown.sh
   
   
Hi,
   
I am using Linux o/s.  I am very new to tomcat.  Can anyone
enlightened me
on the starting and stopping of Tomcat ?
   
Here is my startup.sh  and shutdown.sh
startup.sh:
   
  --
  --
BASEDIR=`dirname $0`
   
$BASEDIR/tomcat.sh start $@
   
  -end--
  --
shutdown.sh:
   
  --
  --
BASEDIR=`dirname $0`
   
$BASEDIR/tomcat.sh stop $@
---end
  -
   
   
Here is my questions :
1)What is $BASEDIR ?
2)Whenever I run startup.sh or shutdown.sh, the 1st line shown:
Exception in thread main java.lang.NoClassDefFoundError:
org/apache/tomcat/shell/Startup
I counld not find the directory /shell from the server. Where the
system get
these directory ?
   
Any help or info is appreciated. Thank you.
   
Best Regards,
Kennice
   
   
 
 
  _
  Get your FREE download of MSN Explorer at
  http://explorer.msn.com/intl.asp
 


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


RE: More understanding on startup.sh and shutdown.sh

2001-08-19 Thread Rob S.

Hi Kennice,

Unsetting your CLASSPATH before starting Tomcat is a good idea.  You really
shouldn't need to bother with the startup and shutdown scripts.  If you want
to mess with the Java command line used to start Tomcat, you can export
TOMCAT_OPTS to those options.

- r

 Hi Rob and Larry,
 Thank you for yours advice.  Your are right, I shouldn't set
 tomcat-internal-related and the webapps. I have remove the unnecessary
 setting on CLASSPATH and the jsp and servlet work fine.  But, the message
 still displayed when I shutdown and startup tomcat :
 Exception in thread main java.lang.NoClassDefFoundError:
 org/apache/tomcat/shell/Startup

 1) Do you have any ideals ?  I suspect one of the servlet or xml file is
 looking for the directory org/apache/tomcat/shell/Startup, but
 the directory
 is not there.

 2) Forgot to mention the jsp and servlet work fine all the time.
 The only
 thing is I would like to learn more who does the startup and
 shutdown work.

 3) Back to the 1st mail, do your have any ideal what is $BASEDIR.

 best regards,
 Kennice


 Rob  wrote on 17/8/01 :
 There should be nothing tomcat-internal-related in your
 CLASSPATH.  Tomcat
 sets the CLASSPATH for you, by automatically adding all of the jars from
 your $TOMCAT_HOME/lib directory to your CLASSPATH.

 Larry wrote on 17/8/01:
 $TOMCAT_HOME/webapps/ROOT/WEB-INF/classes shouldn't be in your
 CLASSPATH since it is part of a web application.  If it is there
 to get something to work, what goes wrong when it isn't there.
 
 Larry
 
   -Original Message-
   From: Kennice Low [mailto:[EMAIL PROTECTED]]
   Sent: Friday, August 17, 2001 2:32 AM
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Subject: RE: More understanding on startup.sh and shutdown.sh
  
  
   Hi Rob,
   Thank you for your helps.
  
   when you do set | grep TOMCAT_HOME you should get
   something like this:
   TOMCAT_HOME=/var/jakarta-tomcat-3.2.2
  
   Have you set the TOMCAT_HOME and JAVA_HOME environment
   variables?  The
   error
   you're getting seems to be that the server's jar file isn't in the
   CLASSPATH
   (which Tomcat sets for you).
  
   here is my setting of profile.
  
   --
   --
   . /home/pseudo/profile
  
   alias ls='ls -l'
   alias la='ls -a'
   export PS1=\w
  
   . .java
  
   #export JAVA_HOME=/local/pkg/jdk/1.3
   export TOMCAT_HOME=/var/jakarta-tomcat-3.2.2
   export MYSQL_HOME=/usr/local/mysql-3.23.39-pc-linux-gnu-i686
   export BIN=/usr/bin
   export APACHE=/etc/init.d
  
   export
   PATH=$JAVA_HOME/bin:$MYSQL_HOME/bin:$TOMCAT_HOME:$BIN:$APACHE:$PATH
  
   export
   CLASSPATH=$TOMCAT_HOME/lib/servlet.jar:$TOMCAT_HOME/lib/jasper
   .jar:$TOMCAT_HOME/lib/webserver.jar:$TOMCAT_HOME/webapps/ROOT/
   WEB-INF/classes:$TOMCAT_HOME/lib/mm.m
   ysql-2.0.6.jar:$TOMCAT_HOME/conn
  
   ---end of profile---
   Is there any error on the setting ?
  
   Thank you :-)
   regards
   Kennice
  
  
  
   From: Rob S. [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: RE: More understanding on startup.sh and shutdown.sh
   Date: Thu, 16 Aug 2001 07:16:09 -0400
   
   Hiya Ken,
   
   Have you set the TOMCAT_HOME and JAVA_HOME environment
   variables?  The
   error
   you're getting seems to be that the server's jar file isn't in the
   CLASSPATH
   (which Tomcat sets for you).  I can only think that you've
   improperly set
   TOMCAT_HOME.
   
   when you do set | grep TOMCAT_HOME you should get
   something like this:
   
   TOMCAT_HOME=/usr/local/tomcat
   
   where that is the root of your tomcat installation.  Make
   sure that's set
   correctly and let us know what happens...
   
   - r
   
 -Original Message-
 From: Kennice Low [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 16, 2001 5:33 AM
 To: [EMAIL PROTECTED]
 Subject: More understanding on startup.sh and shutdown.sh


 Hi,

 I am using Linux o/s.  I am very new to tomcat.  Can anyone
 enlightened me
 on the starting and stopping of Tomcat ?

 Here is my startup.sh  and shutdown.sh
 startup.sh:

   --
   --
 BASEDIR=`dirname $0`

 $BASEDIR/tomcat.sh start $@

   -end--
   --
 shutdown.sh:

   --
   --
 BASEDIR=`dirname $0`

 $BASEDIR/tomcat.sh stop $@
 ---end
   -


 Here is my questions :
 1)What is $BASEDIR ?
 2)Whenever I run startup.sh or shutdown.sh, the 1st line shown:
 Exception in thread main java.lang.NoClassDefFoundError:
 org/apache/tomcat/shell/Startup
 I counld not find the directory /shell from the server. Where the

RE: http vs https

2001-08-19 Thread Rob S.

 You must be joking. We're charging them :) It's just the twisted way they
 like to deploy things.

their own SSL accelerator sounded like they had their own... my bad =)

 but of course that needs to be:

 https://whatever

 if the accelarator is in use.

Wouldn't *any* web server behind this accelerator have a similar problem?
Where it wouldn't know that it's being SSL'd and thus return HTTP as the
scheme?  Sounds to me like something the authors of this accelerator should
know about... actually deploying it =)

- r




RE: More understanding on startup.sh and shutdown.sh

2001-08-19 Thread Kennice Low

Hi Rob,
Can you enlightened me on TOMCAT_OPTS :-?   TQ.

regards,
Kennice

From: Rob S. [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Kennice Low [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: RE: More understanding on startup.sh and shutdown.sh
Date: Sun, 19 Aug 2001 22:15:03 -0400

Hi Kennice,

Unsetting your CLASSPATH before starting Tomcat is a good idea.  You really
shouldn't need to bother with the startup and shutdown scripts.  If you 
want
to mess with the Java command line used to start Tomcat, you can export
TOMCAT_OPTS to those options.

- r

  Hi Rob and Larry,
  Thank you for yours advice.  Your are right, I shouldn't set
  tomcat-internal-related and the webapps. I have remove the unnecessary
  setting on CLASSPATH and the jsp and servlet work fine.  But, the 
message
  still displayed when I shutdown and startup tomcat :
  Exception in thread main java.lang.NoClassDefFoundError:
  org/apache/tomcat/shell/Startup
 
  1) Do you have any ideals ?  I suspect one of the servlet or xml file is
  looking for the directory org/apache/tomcat/shell/Startup, but
  the directory
  is not there.
 
  2) Forgot to mention the jsp and servlet work fine all the time.
  The only
  thing is I would like to learn more who does the startup and
  shutdown work.
 
  3) Back to the 1st mail, do your have any ideal what is $BASEDIR.
 
  best regards,
  Kennice
 
 
  Rob  wrote on 17/8/01 :
  There should be nothing tomcat-internal-related in your
  CLASSPATH.  Tomcat
  sets the CLASSPATH for you, by automatically adding all of the jars 
from
  your $TOMCAT_HOME/lib directory to your CLASSPATH.
 
  Larry wrote on 17/8/01:
  $TOMCAT_HOME/webapps/ROOT/WEB-INF/classes shouldn't be in your
  CLASSPATH since it is part of a web application.  If it is there
  to get something to work, what goes wrong when it isn't there.
  
  Larry
  
-Original Message-
From: Kennice Low [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 2:32 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: More understanding on startup.sh and shutdown.sh
   
   
Hi Rob,
Thank you for your helps.
   
when you do set | grep TOMCAT_HOME you should get
something like this:
TOMCAT_HOME=/var/jakarta-tomcat-3.2.2
   
Have you set the TOMCAT_HOME and JAVA_HOME environment
variables?  The
error
you're getting seems to be that the server's jar file isn't in the
CLASSPATH
(which Tomcat sets for you).
   
here is my setting of profile.
   
--
--
. /home/pseudo/profile
   
alias ls='ls -l'
alias la='ls -a'
export PS1=\w
   
. .java
   
#export JAVA_HOME=/local/pkg/jdk/1.3
export TOMCAT_HOME=/var/jakarta-tomcat-3.2.2
export MYSQL_HOME=/usr/local/mysql-3.23.39-pc-linux-gnu-i686
export BIN=/usr/bin
export APACHE=/etc/init.d
   
export
PATH=$JAVA_HOME/bin:$MYSQL_HOME/bin:$TOMCAT_HOME:$BIN:$APACHE:$PATH
   
export
CLASSPATH=$TOMCAT_HOME/lib/servlet.jar:$TOMCAT_HOME/lib/jasper
.jar:$TOMCAT_HOME/lib/webserver.jar:$TOMCAT_HOME/webapps/ROOT/
WEB-INF/classes:$TOMCAT_HOME/lib/mm.m
ysql-2.0.6.jar:$TOMCAT_HOME/conn
   
---end of profile---
Is there any error on the setting ?
   
Thank you :-)
regards
Kennice
   
   
   
From: Rob S. [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: More understanding on startup.sh and shutdown.sh
Date: Thu, 16 Aug 2001 07:16:09 -0400

Hiya Ken,

Have you set the TOMCAT_HOME and JAVA_HOME environment
variables?  The
error
you're getting seems to be that the server's jar file isn't in the
CLASSPATH
(which Tomcat sets for you).  I can only think that you've
improperly set
TOMCAT_HOME.

when you do set | grep TOMCAT_HOME you should get
something like this:

TOMCAT_HOME=/usr/local/tomcat

where that is the root of your tomcat installation.  Make
sure that's set
correctly and let us know what happens...

- r

  -Original Message-
  From: Kennice Low [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, August 16, 2001 5:33 AM
  To: [EMAIL PROTECTED]
  Subject: More understanding on startup.sh and shutdown.sh
 
 
  Hi,
 
  I am using Linux o/s.  I am very new to tomcat.  Can anyone
  enlightened me
  on the starting and stopping of Tomcat ?
 
  Here is my startup.sh  and shutdown.sh
  startup.sh:
 
--
--
  BASEDIR=`dirname $0`
 
  $BASEDIR/tomcat.sh start $@
 
-end--
--
  shutdown.sh:
 
--
--
  

RE: More understanding on startup.sh and shutdown.sh

2001-08-19 Thread Rob S.

Hey Kennice,

Coincidentally, the C-man just sent out an email about them to the dev list:

fromCraig
You can tell Tomcat to start with this variable, without modifying the
startup scripts, by setting TOMCAT_OPTS (Tomcat 3.x) or CATALINA_OPTS
(Tomcat 4.x) to the set of options you want to pass to the JVM.  For
instance, you can run with the -server switch and set max heap size to 128
megabytes with:

  CATALINA_OPTS=-server -Xmx=128m

or

  TOMCAT_OPTS=-server -Xmx=128m

Craig
/fromCraig

- r

 -Original Message-
 From: Kennice Low [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, August 19, 2001 10:31 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: More understanding on startup.sh and shutdown.sh


 Hi Rob,
 Can you enlightened me on TOMCAT_OPTS :-?   TQ.

 regards,
 Kennice

 From: Rob S. [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: Kennice Low [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: RE: More understanding on startup.sh and shutdown.sh
 Date: Sun, 19 Aug 2001 22:15:03 -0400
 
 Hi Kennice,
 
 Unsetting your CLASSPATH before starting Tomcat is a good idea.
 You really
 shouldn't need to bother with the startup and shutdown scripts.  If you
 want
 to mess with the Java command line used to start Tomcat, you can export
 TOMCAT_OPTS to those options.
 
 - r
 
   Hi Rob and Larry,
   Thank you for yours advice.  Your are right, I shouldn't set
   tomcat-internal-related and the webapps. I have remove the unnecessary
   setting on CLASSPATH and the jsp and servlet work fine.  But, the
 message
   still displayed when I shutdown and startup tomcat :
   Exception in thread main java.lang.NoClassDefFoundError:
   org/apache/tomcat/shell/Startup
  
   1) Do you have any ideals ?  I suspect one of the servlet or
 xml file is
   looking for the directory org/apache/tomcat/shell/Startup, but
   the directory
   is not there.
  
   2) Forgot to mention the jsp and servlet work fine all the time.
   The only
   thing is I would like to learn more who does the startup and
   shutdown work.
  
   3) Back to the 1st mail, do your have any ideal what is $BASEDIR.
  
   best regards,
   Kennice
  
  
   Rob  wrote on 17/8/01 :
   There should be nothing tomcat-internal-related in your
   CLASSPATH.  Tomcat
   sets the CLASSPATH for you, by automatically adding all of the jars
 from
   your $TOMCAT_HOME/lib directory to your CLASSPATH.
  
   Larry wrote on 17/8/01:
   $TOMCAT_HOME/webapps/ROOT/WEB-INF/classes shouldn't be in your
   CLASSPATH since it is part of a web application.  If it is there
   to get something to work, what goes wrong when it isn't there.
   
   Larry
   
 -Original Message-
 From: Kennice Low [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 2:32 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: More understanding on startup.sh and shutdown.sh


 Hi Rob,
 Thank you for your helps.

 when you do set | grep TOMCAT_HOME you should get
 something like this:
 TOMCAT_HOME=/var/jakarta-tomcat-3.2.2

 Have you set the TOMCAT_HOME and JAVA_HOME environment
 variables?  The
 error
 you're getting seems to be that the server's jar file
 isn't in the
 CLASSPATH
 (which Tomcat sets for you).

 here is my setting of profile.

 --
 --
 . /home/pseudo/profile

 alias ls='ls -l'
 alias la='ls -a'
 export PS1=\w

 . .java

 #export JAVA_HOME=/local/pkg/jdk/1.3
 export TOMCAT_HOME=/var/jakarta-tomcat-3.2.2
 export MYSQL_HOME=/usr/local/mysql-3.23.39-pc-linux-gnu-i686
 export BIN=/usr/bin
 export APACHE=/etc/init.d

 export

 PATH=$JAVA_HOME/bin:$MYSQL_HOME/bin:$TOMCAT_HOME:$BIN:$APACHE:$PATH

 export
 CLASSPATH=$TOMCAT_HOME/lib/servlet.jar:$TOMCAT_HOME/lib/jasper
 .jar:$TOMCAT_HOME/lib/webserver.jar:$TOMCAT_HOME/webapps/ROOT/
 WEB-INF/classes:$TOMCAT_HOME/lib/mm.m
 ysql-2.0.6.jar:$TOMCAT_HOME/conn

 ---end of
 profile---
 Is there any error on the setting ?

 Thank you :-)
 regards
 Kennice



 From: Rob S. [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: More understanding on startup.sh and shutdown.sh
 Date: Thu, 16 Aug 2001 07:16:09 -0400
 
 Hiya Ken,
 
 Have you set the TOMCAT_HOME and JAVA_HOME environment
 variables?  The
 error
 you're getting seems to be that the server's jar file
 isn't in the
 CLASSPATH
 (which Tomcat sets for you).  I can only think that you've
 improperly set
 TOMCAT_HOME.
 
 when you do set | grep TOMCAT_HOME you should get
 something like this:
 
 TOMCAT_HOME=/usr/local/tomcat
 
 where that is the root of your tomcat installation.  Make
 sure that's set
 

ClassLoader Reloading issues

2001-08-19 Thread Andrés Aguiar

I have a JAR file in my web-inf\lib directory that has an object pool. The
pool is kept as a singleton, so, I have a static member with it.

The problem is that when a class in web-inf\classes is reloaded, it seems to
use a new classloader, so the static member is gets not the same as it was,
and I end having multiple object pool instances.

If I put the .JAR in the Tomcat classpath, it obviously works ok.

The problem is that I must keep running in the same servlet-engine instance
several applications each of which could a have a different version of my
.JAR file, so I can't put it in the classpath.

The same happens running the app in Resin.

Now, in the servlet spec says:

'Although a Container Provider implementation of a class reloading scheme
for ease of development is not required, any such implementation must ensure
that all servlets, and classes that they may use, are loaded in the scope of
a single class loader. This requirement is needed to guarantee that the
application will behave as expected by the Developer. 

As a development aid, containers are encouraged to maintain the full
semantics of notification to session binding listeners if they
determine to terminate sessions in order to reload classes.

Previous generations of containers created new class loaders to load a
servlet, distinct from class loaders used to load other servlets or classes
used in the servlet context. This could cause object references within a
servlet context to point at unexpected classes or objects, and cause
unexpected behavior.'

I'm not sure if this paragraph is referring to the case I'm describing, but
if not, it seems pretty close...

Any ideas? Is this the way it's supposed to work?

Thanks.





Re: ClassLoader Reloading issues

2001-08-19 Thread Dmitri Colebatch

On Mon, 20 Aug 2001, [iso-8859-1] Andrés Aguiar wrote:
 Now, in the servlet spec says:
 
 'Although a Container Provider implementation of a class reloading scheme
 for ease of development is not required, any such implementation must ensure
 that all servlets, and classes that they may use, are loaded in the scope of
 a single class loader. This requirement is needed to guarantee that the
 application will behave as expected by the Developer. 
 
 As a development aid, containers are encouraged to maintain the full
 semantics of notification to session binding listeners if they
 determine to terminate sessions in order to reload classes.
 
 Previous generations of containers created new class loaders to load a
 servlet, distinct from class loaders used to load other servlets or classes
 used in the servlet context. This could cause object references within a
 servlet context to point at unexpected classes or objects, and cause
 unexpected behavior.'
 
 I'm not sure if this paragraph is referring to the case I'm describing, but
 if not, it seems pretty close...

my two bob - from a non-tc developer... in tc3.x I think you can cause a
ClassCastException by recompiling the entire web-inf/classes dir - this is
because servlets will be reloaded but beans wont.  the above paragraphs I
think state that its an all or nothing and everything must be reloaded, or
nothing at all.  that said, what you've described makes sense to me, and
seems to conform to the spec.

again - my 2c

cheesr
dim




Re: ClassLoader Reloading issues

2001-08-19 Thread Craig R. McClanahan



On Mon, 20 Aug 2001, Andrés Aguiar wrote:

 I have a JAR file in my web-inf\lib directory that has an object pool. The
 pool is kept as a singleton, so, I have a static member with it.
 

And because the class itself is loaded by the webapp class loader, the
static is in fact global *only* within this particular web app.

 The problem is that when a class in web-inf\classes is reloaded, it seems to
 use a new classloader,

That's correct -- there is no way to unload a class in Java except for
throwing away the class loader that loaded it (and therefore all of the
classes loaded by that old class loader).

 so the static member is gets not the same as it was,
 and I end having multiple object pool instances.
 
 If I put the .JAR in the Tomcat classpath, it obviously works ok.
 
 The problem is that I must keep running in the same servlet-engine instance
 several applications each of which could a have a different version of my
 .JAR file, so I can't put it in the classpath.
 
 The same happens running the app in Resin.
 
 Now, in the servlet spec says:
 
 'Although a Container Provider implementation of a class reloading scheme
 for ease of development is not required, any such implementation must ensure
 that all servlets, and classes that they may use, are loaded in the scope of
 a single class loader. This requirement is needed to guarantee that the
 application will behave as expected by the Developer. 
 
 As a development aid, containers are encouraged to maintain the full
 semantics of notification to session binding listeners if they
 determine to terminate sessions in order to reload classes.
 
 Previous generations of containers created new class loaders to load a
 servlet, distinct from class loaders used to load other servlets or classes
 used in the servlet context. This could cause object references within a
 servlet context to point at unexpected classes or objects, and cause
 unexpected behavior.'
 

Very early containers used a different class loader for every servlet, not
for every web app.  To ensure consistent behavior, this is no longer
allowed.

 I'm not sure if this paragraph is referring to the case I'm describing, but
 if not, it seems pretty close...
 
 Any ideas? Is this the way it's supposed to work?
 

Yes, it is working the way it is supposed to work (given the limitations
on what Java allows for class reloading).

What you need to do is make sure that your class is aware of when the
application is being shut down and started up again, so that you can save
away the contents of the object pool (at shutdown time) and restore them
(at startup time).  At shutdown time, you'll need to save the state of the
object pool in some fashion that can be used to reconstruct it upon the
subsequent startup.  A common technique is to serialize the pooled objects
to a sequential file (Tomcat 4 does this with all of the currently active
sessions when you shut it down or do an application reload).

To make sure your object pool class is notified, you've got a couple of
choices:

* [Servlet 2.3 only] You can use the new application event listener
  APIs and make sure your class is notified on the application startup
  and application shutdown events.  This will work in Tomcat 4 and other
  containers that implement the new servlet spec.

* You might have a servlet defined as load-on-startup that initializes
  the object pool in its init() method and saves it away in its destroy()
  method.  This depends on the servlet container *not* removing this
  servlet from service at any time *other* than application shutdown --
  while commonly implemented that way, this is not guaranteed by the
  servlet spec (it would work in all versions of Tomcat, though).

 Thanks.

Craig McClanahan





Error-Log file ?

2001-08-19 Thread Kenny Ma

I am using Tomcat 3.2.3/Redhat 7.1

I have a servlet program, the program line 1 is System.err.println(TEST)

when i run the servlet, the output goes into console

I want the err.println output to a file , what can I do ?
or how to config Tomcat ?

ps. I checked /usr/local/tomcat/logs/
It havent output to those files.

/* Kenny Ma
   [EMAIL PROTECTED] */




Re: Error-Log file ?

2001-08-19 Thread Dmitri Colebatch

On Mon, 20 Aug 2001, Kenny Ma wrote:
 I have a servlet program, the program line 1 is System.err.println(TEST)
you would be better off using log(TEST);

 when i run the servlet, the output goes into console
stderr will... are you running linux or windows?  afaik tomcat doesn't do
anything to redirect the stdout/stderr streams.

 I want the err.println output to a file , what can I do ?
 or how to config Tomcat ?
again... I'd advise using servlet.log at least, or preferably some logging
packages like log4j (http://jakarta.apache.org/log4j).

you might also want to change your server.xml so that tc_log goes to
logs/tomcat.log if you haven't already.

 ps. I checked /usr/local/tomcat/logs/
 It havent output to those files.
servlet.log will go there (o:

hth,
cheesr
dim

 
 /* Kenny Ma
[EMAIL PROTECTED] */
 
 




RE: Help Installing Tomcat on Win95

2001-08-19 Thread Sheila Ratnam

Dmitri,

I tried your method, but it didn't work. So it doesn't seem to be the long 
name problem. I also checked and confirmed that there is no other version of 
servlet.jar on my pc.

Infact I am surprised that (both the servlet  jsp) examples at 
http://localhost:8080/ work perfectly!
Could there be any other reason for package javax not being found?

Sheila



From: Sheila Ratnam [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Help Installing Tomcat on Win95
Date: Mon, 20 Aug 2001 00:04:36 +

Rob  Pier, thanks for the help in getting my Tomcat server going.

Now it's my first servlet that's not compiling! I have set the CLASSPATH to
c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar; where the servlet.jar 
file
is. But when I try to compile the servlet, the error message says
javax.servlet package does not exist

What else could be the problem?

TIA,
Sheila


From: Rob S. [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Help Installing Tomcat on Win95
Date: Sat, 18 Aug 2001 08:16:26 -0400

AH

You're trying to request your server through the WarpConnector port and 
not
the HTTP port?  This was what a lot of people used to do, try and make
requests to Tomcat 3.x through the AJP port 8007 (by default).  Pier, 
maybe
the default WarpConnector should be at 8007? (assuming it's 8008)

- r

  -Original Message-
  From: Sheila Ratnam [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 10:28 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Help Installing Tomcat on Win95
 
 
  Pier,
  I did try using the ip address instead of 'localhost', but it
  didn't work.
  Probably the error is what the log shows?
 
  Sheila
 
 
 
  From: Sheila Ratnam [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: Help Installing Tomcat on Win95
  Date: Sat, 18 Aug 2001 02:21:22 +
  
  Rob, Pier,
  
  I noticed the following error logged in apache.log file.
  
  2001-08-17 20:42:46 [org.apache.catalina.connector.warp.WarpConnector]
  Error
  accepting requests
  java.net.SocketException: socket closed
  at java.net.PlainSocketImpl.socketAccept(Native Method)
  at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:424)
  at java.net.ServerSocket.implAccept(ServerSocket.java:246)
  at java.net.ServerSocket.accept(ServerSocket.java:225)
  at
  org.apache.catalina.connector.warp.WarpConnector.run(WarpConnecto
  r.java:554)
  at java.lang.Thread.run(Thread.java:484)
  
  As you correctly expected, the CATALINA_HOME_Log file is empty.
  How can I correct this?
  
  No problem with 'hitting' as long as I get this to work:)
  
  Thanks,
  Sheila
  
  
  
  From: Pier P. Fumagalli [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: Help Installing Tomcat on Win95
  Date: Sat, 18 Aug 2001 02:52:14 +0100
  
  Rob S. at [EMAIL PROTECTED] wrote:
  
I should add that I tried changing the port number in the
server.xml
  file
inside conf folder as mentioned in the RUNNING.txt. Also checked
and
  made
sure that the browser is not trying to access a proxy server. But
it hasn't
worked.
Thanks,
Sheila
   
?!  This brings a joyous tear to my eye! =~)  Someone has read the
documentation and acted upon it.  Sheila, you've made my
  day!  So your
Tomcat has started at 8080 and http://localhost:8080/ doesn't do
the
trick...  Did you check the log files ($CATALINA_HOME/logs) for 
any
  activity
when you make a request?  If nothing at all appears in those 
files,
I
  don't
think the request is getting there.
  
  Another good test on Windows is to try to send your request to
  http://127.0.0.1:8080/ as sometimes Windows forgets about the meaning
of
  localhost (I believe it was EXACTLY Win95, and was later fixed
  on Win98).
  
  And, BTW, Rob, stop trying to hit on girls on the mailing list
  :) :) :) :)
  I tried it in the past, doesn't work! :) :) :) :)
  
   Pier
  
  
  
  _
  Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
 


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




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



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




RE: Help Installing Tomcat on Win95

2001-08-19 Thread Artigas, Ricardo Y.

Isn't c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar; supposed to be:
c:\jakarta-tomcat-4.0-b7\common\lib\servlet.jar;?
HTH.


:~)
Ricky Y. Artigas
Analyst/Programmer /
Database Administrator
Information Technology Division
Easycall Communications Phils., Inc.
 ---
 IMPORTANT NOTICE: 
  
 This message (and any attachment hereto) may contain privileged and/or
 confidential information specific to EasyCall. If you are not the intended
 addressee indicated in this message, you may not copy or disseminate this
 message (or any attachment hereto) to anyone. Instead, please destroy this
 message (and any attachment hereto), and kindly notify the sender by reply
 email. Any information in this message (and any attachment thereto) that
 do not relate to the official business of EasyCall shall be understood as
 neither given nor endorsed by the company.
 
 
 -Original Message-
 From: Sheila Ratnam [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, August 20, 2001 12:48 PM
 To:   [EMAIL PROTECTED]
 Subject:  RE: Help Installing Tomcat on Win95
 
 Dmitri,
 
 I tried your method, but it didn't work. So it doesn't seem to be the long
 
 name problem. I also checked and confirmed that there is no other version
 of 
 servlet.jar on my pc.
 
 Infact I am surprised that (both the servlet  jsp) examples at 
 http://localhost:8080/ work perfectly!
 Could there be any other reason for package javax not being found?
 
 Sheila
 
 
 
 From: Sheila Ratnam [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Help Installing Tomcat on Win95
 Date: Mon, 20 Aug 2001 00:04:36 +
 
 Rob  Pier, thanks for the help in getting my Tomcat server going.
 
 Now it's my first servlet that's not compiling! I have set the CLASSPATH
 to
 c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar; where the servlet.jar 
 file
 is. But when I try to compile the servlet, the error message says
 javax.servlet package does not exist
 
 What else could be the problem?
 
 TIA,
 Sheila
 
 
 From: Rob S. [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Help Installing Tomcat on Win95
 Date: Sat, 18 Aug 2001 08:16:26 -0400
 
 AH
 
 You're trying to request your server through the WarpConnector port and 
 not
 the HTTP port?  This was what a lot of people used to do, try and make
 requests to Tomcat 3.x through the AJP port 8007 (by default).  Pier, 
 maybe
 the default WarpConnector should be at 8007? (assuming it's 8008)
 
 - r
 
   -Original Message-
   From: Sheila Ratnam [mailto:[EMAIL PROTECTED]]
   Sent: Friday, August 17, 2001 10:28 PM
   To: [EMAIL PROTECTED]
   Subject: Re: Help Installing Tomcat on Win95
  
  
   Pier,
   I did try using the ip address instead of 'localhost', but it
   didn't work.
   Probably the error is what the log shows?
  
   Sheila
  
  
  
   From: Sheila Ratnam [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Re: Help Installing Tomcat on Win95
   Date: Sat, 18 Aug 2001 02:21:22 +
   
   Rob, Pier,
   
   I noticed the following error logged in apache.log file.
   
   2001-08-17 20:42:46
 [org.apache.catalina.connector.warp.WarpConnector]
   Error
   accepting requests
   java.net.SocketException: socket closed
   at java.net.PlainSocketImpl.socketAccept(Native Method)
   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:424)
   at java.net.ServerSocket.implAccept(ServerSocket.java:246)
   at java.net.ServerSocket.accept(ServerSocket.java:225)
   at
   org.apache.catalina.connector.warp.WarpConnector.run(WarpConnecto
   r.java:554)
   at java.lang.Thread.run(Thread.java:484)
   
   As you correctly expected, the CATALINA_HOME_Log file is empty.
   How can I correct this?
   
   No problem with 'hitting' as long as I get this to work:)
   
   Thanks,
   Sheila
   
   
   
   From: Pier P. Fumagalli [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Re: Help Installing Tomcat on Win95
   Date: Sat, 18 Aug 2001 02:52:14 +0100
   
   Rob S. at [EMAIL PROTECTED] wrote:
   
 I should add that I tried changing the port number in the
 server.xml
   file
 inside conf folder as mentioned in the RUNNING.txt. Also
 checked
 and
   made
 sure that the browser is not trying to access a proxy server.
 But
 it hasn't
 worked.
 Thanks,
 Sheila

 ?!  This brings a joyous tear to my eye! =~)  Someone has read
 the
 documentation and acted upon it.  Sheila, you've made my
   day!  So your
 Tomcat has started at 8080 and http://localhost:8080/ doesn't do
 the
 trick...  Did you check the log files ($CATALINA_HOME/logs) for 
 any
   activity
 when you make a request?  If nothing at all appears in those 
 files,
 I
   don't
 think the request is getting there.
   
   Another good test on Windows is to try to send your request to
   http://127.0.0.1:8080/ as sometimes Windows forgets about the
 

RE: Help Installing Tomcat on Win95

2001-08-19 Thread Dmitri Colebatch

On Mon, 20 Aug 2001, Sheila Ratnam wrote:
 I tried your method, but it didn't work. So it doesn't seem to be the long 
 name problem. I also checked and confirmed that there is no other version of 
 servlet.jar on my pc.
 
 Infact I am surprised that (both the servlet  jsp) examples at 
 http://localhost:8080/ work perfectly!
 Could there be any other reason for package javax not being found?

weird well, I'm assuming that servlet.jar is in tact I suppose you
could check that though (jar -tf servlet.jar).  we're looking at real
weirdness here, I think that in reality there's probably something simple
that we've missed... sorry (o:

cheesr
dim


 
 Sheila
 
 
 
 From: Sheila Ratnam [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Help Installing Tomcat on Win95
 Date: Mon, 20 Aug 2001 00:04:36 +
 
 Rob  Pier, thanks for the help in getting my Tomcat server going.
 
 Now it's my first servlet that's not compiling! I have set the CLASSPATH to
 c:jakarta-tomcat-4.0-b7\common\lib\servlet.jar; where the servlet.jar 
 file
 is. But when I try to compile the servlet, the error message says
 javax.servlet package does not exist
 
 What else could be the problem?
 
 TIA,
 Sheila
 
 
 From: Rob S. [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Help Installing Tomcat on Win95
 Date: Sat, 18 Aug 2001 08:16:26 -0400
 
 AH
 
 You're trying to request your server through the WarpConnector port and 
 not
 the HTTP port?  This was what a lot of people used to do, try and make
 requests to Tomcat 3.x through the AJP port 8007 (by default).  Pier, 
 maybe
 the default WarpConnector should be at 8007? (assuming it's 8008)
 
 - r
 
   -Original Message-
   From: Sheila Ratnam [mailto:[EMAIL PROTECTED]]
   Sent: Friday, August 17, 2001 10:28 PM
   To: [EMAIL PROTECTED]
   Subject: Re: Help Installing Tomcat on Win95
  
  
   Pier,
   I did try using the ip address instead of 'localhost', but it
   didn't work.
   Probably the error is what the log shows?
  
   Sheila
  
  
  
   From: Sheila Ratnam [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Re: Help Installing Tomcat on Win95
   Date: Sat, 18 Aug 2001 02:21:22 +
   
   Rob, Pier,
   
   I noticed the following error logged in apache.log file.
   
   2001-08-17 20:42:46 [org.apache.catalina.connector.warp.WarpConnector]
   Error
   accepting requests
   java.net.SocketException: socket closed
   at java.net.PlainSocketImpl.socketAccept(Native Method)
   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:424)
   at java.net.ServerSocket.implAccept(ServerSocket.java:246)
   at java.net.ServerSocket.accept(ServerSocket.java:225)
   at
   org.apache.catalina.connector.warp.WarpConnector.run(WarpConnecto
   r.java:554)
   at java.lang.Thread.run(Thread.java:484)
   
   As you correctly expected, the CATALINA_HOME_Log file is empty.
   How can I correct this?
   
   No problem with 'hitting' as long as I get this to work:)
   
   Thanks,
   Sheila
   
   
   
   From: Pier P. Fumagalli [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Re: Help Installing Tomcat on Win95
   Date: Sat, 18 Aug 2001 02:52:14 +0100
   
   Rob S. at [EMAIL PROTECTED] wrote:
   
 I should add that I tried changing the port number in the
 server.xml
   file
 inside conf folder as mentioned in the RUNNING.txt. Also checked
 and
   made
 sure that the browser is not trying to access a proxy server. But
 it hasn't
 worked.
 Thanks,
 Sheila

 ?!  This brings a joyous tear to my eye! =~)  Someone has read the
 documentation and acted upon it.  Sheila, you've made my
   day!  So your
 Tomcat has started at 8080 and http://localhost:8080/ doesn't do
 the
 trick...  Did you check the log files ($CATALINA_HOME/logs) for 
 any
   activity
 when you make a request?  If nothing at all appears in those 
 files,
 I
   don't
 think the request is getting there.
   
   Another good test on Windows is to try to send your request to
   http://127.0.0.1:8080/ as sometimes Windows forgets about the meaning
 of
   localhost (I believe it was EXACTLY Win95, and was later fixed
   on Win98).
   
   And, BTW, Rob, stop trying to hit on girls on the mailing list
   :) :) :) :)
   I tried it in the past, doesn't work! :) :) :) :)
   
Pier
   
   
   
   _
   Get your FREE download of MSN Explorer at
 http://explorer.msn.com/intl.asp
  
 
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 
 
 
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 
 
 
 _
 Get your FREE 

Re: ClassLoader Reloading issues

2001-08-19 Thread Vladimir Grishchenko

somewhat related issue I've found with T3.2.2.
After class reloading the old class isn't GC'ed, is a reference to previous
class that's kept around somewhere? Actually I noticed it because I had a
cleanup thread running infinitely, and after the class reload I ended up
having two threads running.

Could also be that runtime keeps a reference to a running Thread (which is
the inner class) preventing a class (outer class) from being GC'ed? Sounds
like a good explanation...

--V.



- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 19, 2001 8:25 PM
Subject: Re: ClassLoader  Reloading issues




On Mon, 20 Aug 2001, Andrés Aguiar wrote:

 I have a JAR file in my web-inf\lib directory that has an object pool. The
 pool is kept as a singleton, so, I have a static member with it.


And because the class itself is loaded by the webapp class loader, the
static is in fact global *only* within this particular web app.

 The problem is that when a class in web-inf\classes is reloaded, it seems
to
 use a new classloader,

That's correct -- there is no way to unload a class in Java except for
throwing away the class loader that loaded it (and therefore all of the
classes loaded by that old class loader).

 so the static member is gets not the same as it was,
 and I end having multiple object pool instances.

 If I put the .JAR in the Tomcat classpath, it obviously works ok.

 The problem is that I must keep running in the same servlet-engine
instance
 several applications each of which could a have a different version of my
 .JAR file, so I can't put it in the classpath.

 The same happens running the app in Resin.

 Now, in the servlet spec says:

 'Although a Container Provider implementation of a class reloading scheme
 for ease of development is not required, any such implementation must
ensure
 that all servlets, and classes that they may use, are loaded in the scope
of
 a single class loader. This requirement is needed to guarantee that the
 application will behave as expected by the Developer.

 As a development aid, containers are encouraged to maintain the full
 semantics of notification to session binding listeners if they
 determine to terminate sessions in order to reload classes.

 Previous generations of containers created new class loaders to load a
 servlet, distinct from class loaders used to load other servlets or
classes
 used in the servlet context. This could cause object references within a
 servlet context to point at unexpected classes or objects, and cause
 unexpected behavior.'


Very early containers used a different class loader for every servlet, not
for every web app.  To ensure consistent behavior, this is no longer
allowed.

 I'm not sure if this paragraph is referring to the case I'm describing,
but
 if not, it seems pretty close...

 Any ideas? Is this the way it's supposed to work?


Yes, it is working the way it is supposed to work (given the limitations
on what Java allows for class reloading).

What you need to do is make sure that your class is aware of when the
application is being shut down and started up again, so that you can save
away the contents of the object pool (at shutdown time) and restore them
(at startup time).  At shutdown time, you'll need to save the state of the
object pool in some fashion that can be used to reconstruct it upon the
subsequent startup.  A common technique is to serialize the pooled objects
to a sequential file (Tomcat 4 does this with all of the currently active
sessions when you shut it down or do an application reload).

To make sure your object pool class is notified, you've got a couple of
choices:

* [Servlet 2.3 only] You can use the new application event listener
  APIs and make sure your class is notified on the application startup
  and application shutdown events.  This will work in Tomcat 4 and other
  containers that implement the new servlet spec.

* You might have a servlet defined as load-on-startup that initializes
  the object pool in its init() method and saves it away in its destroy()
  method.  This depends on the servlet container *not* removing this
  servlet from service at any time *other* than application shutdown --
  while commonly implemented that way, this is not guaranteed by the
  servlet spec (it would work in all versions of Tomcat, though).

 Thanks.

Craig McClanahan






tomcat and jdbc

2001-08-19 Thread e.chan



Hi
I am using tomcat in a win 98 environment.
I registered my db as an ODBC data source.
I have tried to go to the tomcat conf file looking for server.xml
To enable the jdbc realm to be loaded but 
Tomcat is not connecting to jdbc.
Please help... I have checkd with friends with same settings as I have -
theirs work and mine doesn’t...

Can you point me in the right direction plse. 
liz