Thanks for your help. I haven't been doing Java in a while so bear with me.
Tomcat is entirely new to me.
java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
Output from log really puzzles me. (I uncommedted AccessValve like you said)
Here is the sequence of events:
(1) I install Tomcat and try out the HelloWorldExample. All is well and
log shows
0:0:0:0:0:0:0:1%0 - - [02/Apr/2009:15:40:11 -0400] "GET
/examples/servlets/servlet/HelloWorldExample HTTP/1.1" 200 359
(2) Next I go and recompile HelloWorldExample (saving a copy of original
class file)
javac HelloWorldExample.java
OK but whoops (class file has changed!)
ls -l HelloWorld*class*
-rw-r--r-- 1 martindunford staff 1723 Apr 2 15:46
HelloWorldExample.class
-rw-r--r-- 1 martindunford staff 2058 Apr 2 15:46
HelloWorldExample.class.orginal
(3) I restart (stop/start) Tomcat
HelloWorldExample fails.
Sure enough log shows
0:0:0:0:0:0:0:1%0 - - [02/Apr/2009:15:48:58 -0400] "GET
/examples/servlets/servlet/HelloWorldExample HTTP/1.1" 404 952
(4) Notes
- There has never been an examples/servlets/servlet directory...
puzzling..
Thanks again
Martin
Caldarale, Charles R wrote:
>
>> From: mdunford [mailto:[email protected]]
>> Subject: Tomcat 6.0.18 examples recompile ok but dont work!!
>>
>> But when I reload in my browser I get
>>
>> HTTP Status 404. The requested resource is not available.
>>
>> I restarted Tomcat. No joy either...
>
> Are you running Tomcat with a 1.6 JRE? If not, your recompiled class
> won't be loadable.
>
> Where did you put the recompiled class file?
>
> What's in the logs? Uncomment the AccessLogValve in conf/server.xml for
> more information about what requests are coming in.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/Tomcat-6.0.18-examples-recompile-ok-but-dont-work%21%21-tp22850460p22855764.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]