org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
error: Invalid class file format in C:\Program Files\Java\jdk1.6.0_02\jre\lib\rt.jar(java/lang/Object.class). The major.minor version '49.0' is too recent for this tool to understand.

I'm not sure what to do to fix this error tomcat 4.0; any help?

Why you using Tomcat 4?
There is already version 6.0.14, if not sure about it you still can use last stable from version 5 which is 5.5.23