JSP: problem with import ("package does not exist")

  • Thread starter Laurent Leconte
  • Start date
L

Laurent Leconte

Hi all, I'm having trouble with a JSP page.

The page includes the following lines :

<%@ page import = "data.DispGestores" %>
<%@ page import = "data.DispGestoresBean" %>

I put DispGestores.class and DispGestoresBean.class in
WEB-INF/classes/data, and the source for both class begins with
"package data;".

But when I try to load the page with Tomcat 4.1.27, I get the
following error message :

org.apache.jasper.JasperException: No se puede compilar la clase para
JSP

An error occurred at line: 4 in the jsp file: /oratest.jsp

Generated servlet error:
[javac] Compiling 1 source file

C:\DOCUME~1\lleconte\CONFIG~1\Temp\oratest_jsp.java:7: package data
does not exist
import data.DispGestores;
^
C:\DOCUME~1\lleconte\CONFIG~1\Temp\oratest_jsp.java:8: package data
does not exist
import data.DispGestoresBean;
^
.... (more "package data

8 errors

[rest of the error message snipped]

Does anyone have any suggestions as what went wrong? As far as I can
make out, I've used the exact same setup in other pages without
problems. Where did I go wrong ?
 
C

Chris Smith

Laurent said:
Does anyone have any suggestions as what went wrong? As far as I can
make out, I've used the exact same setup in other pages without
problems. Where did I go wrong ?

No idea. Can you post more detail (such as your server.xml file if you
do anything there, and the full paths of all these components)?

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
L

Laurent Leconte

Chris Smith said:
No idea. Can you post more detail (such as your server.xml file if you
do anything there, and the full paths of all these components)?

First of all, sorry for replying so late.

Actually, I changed the package name from data to datastruct, made the
appropriate changes in my files, and the problem disappeared... I'd
like to blame it on voodoo or quantum mechanics, but I probably just
corrected an earlier error without noticing, or maybe this is an issue
with Tomcat's class-loading mechanism (I think I've read somewhere
that it's broken, but I dunno much more).

Thanks anyway...

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,065
Members
48,770
Latest member
ElysaD

Latest Threads

Top