• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Unable to compile class exception

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I am using tomcat 3.2 on local machine,in one of my jsp page I have directive <%@ page import = "java.util.ArrayList" %> when this page is accessed in the program, tomcat gave the message :
Unable to compile class for JSPD:\tomcat\work\localhost_8080%2Fconference\_0002fsrc_0002flbm_0002fPaperManJSP_0002ejspPaperManJSP_jsp_0.java:15: Class java.util.ArrayList not found in import.
import java.util.ArrayList;
^

Can anybody give me any help on that?
Thanks in advance.
Mike
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like maybe your JAVAHOME is not correctly set. It needs to be pointed to your JDK. Are you able to run other servlets/apps on this same machine, or is this your first one, because it sure sounds like your servlet engine can't see your JDK.
 
Mike Han
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Dave
Thank you for response.
The other jsps and servlets work well.Even for this JSP page,once I changed the
import="java.util.ArrayList"
to
import="java.util.*"
compiling can go through this statement but failed at the Arraylist variable I define in the page.
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ArrayList is available in java 2 and up. You must be using jdk 1.1.something. and not jdk 1.2 or higher. You can either download JDK 1.2.2 or higher or just use a Vector instead of ArrayList.

Bosun
 
Yeah, but is it art? What do you think tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic