This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problem with my first jsp program" Watch "Problem with my first jsp program" New topic

Problem with my first jsp program

Javas Starter

Joined: Apr 07, 2004
Posts: 1
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: has been deprecated.
C:\jakarta-tomcat-3.3.2\work\DEFAULT\Practice\ Undefined variable, class, or package name: java
java.util.Date X = java.util.Date();
can someone help me with this.
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

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.

"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.

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)
It is sorta covered in the JavaRanch Style Guide.
subject: Problem with my first jsp program
It's not a secret anymore!