• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with my first jsp program

 
Javas Starter
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm really new to this jsp. I've installed jdk and tomcat server. Configured the server to point my jdk/bin also.
when I ran my first program to display date I'm getting this error--
org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated.
C:\jakarta-tomcat-3.3.2\work\DEFAULT\Practice\first_1.java:10: Undefined variable, class, or package name: java
java.util.Date X = java.util.Date();
^
can someone help me with this.
Thanks,
JS
 
Ariel Valentin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi JS,
First things first, are your CATALINA_HOME and CLASSPATH variables set?
Did you place the $J2SE_HOME/bin in your PATH value?
do you have the source code on the page that you could post?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)
C:\jakarta-tomcat-3.3.2\
First thing you'll want to consider is not using this version of Tomcat. It is *very* old.

Tomcat is up to 4.1.30 and 5.0.19 for the Servlet 2.3 and 2.4 spec.

2)
"configured the server to point to jdk/bin directory" ?? How'd you do that? It's probably a tomcat 3.x thing, but for newer versions of Tomcat, your JAVA_HOME environment variable should point to your JDK's 'home' (root) directory, not jdk/bin directory.

3)
Don't touch your CLASSPATH. Tomcat does *not* use the system classpath. It uses JAVA_HOME and either TOMCAT_HOME or CATALINA_HOME (depending on the tomcat version).

Also, your JDK should be a recent version (not lower than 1.3.1)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic