• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with my first jsp program

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
reply
    Bookmark Topic Watch Topic
  • New Topic