GeeCON Prague 2014*
The moose likes Tomcat and the fly likes Problem with my first jsp program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problem with my first jsp program" Watch "Problem with my first jsp program" New topic
Author

Problem with my first jsp program

Javas Starter
Greenhorn

Joined: Apr 07, 2004
Posts: 1
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

Joined: Jan 30, 2004
Posts: 44
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?


A. Valentin
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

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)
 
GeeCON Prague 2014
 
subject: Problem with my first jsp program