Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JSP: problem with import ("package does not exist")

Reply
Thread Tools

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

 
 
Laurent Leconte
Guest
Posts: n/a
 
      10-07-2003
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.jav a:7: package data
does not exist
import data.DispGestores;
^
C:\DOCUME~1\lleconte\CONFIG~1\Temp\oratest_jsp.jav a: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 ?

--
Laurent
 
Reply With Quote
 
 
 
 
Chris Smith
Guest
Posts: n/a
 
      10-07-2003
Laurent Leconte wrote:
> 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
 
Reply With Quote
 
 
 
 
Laurent Leconte
Guest
Posts: n/a
 
      10-14-2003
Chris Smith <(E-Mail Removed)> wrote in message news:<MPG.19ec86285b8de6e7989694@nntp>...
> Laurent Leconte wrote:
> > 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)?


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,
--
Laurent Leconte
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import - interpreter works but .py import does not John Boy Python 1 03-10-2008 04:07 AM
import parser does not import parser.py in same dir on win Joel Hedlund Python 2 11-11-2006 03:46 PM
import parser does not import parser.py in same dir on win Joel Hedlund Python 0 11-11-2006 11:34 AM
XML Schema question - does "import" import elements? Vitali Gontsharuk XML 2 08-25-2005 07:33 PM
IMPORT STATIC; Why is "import static" file scope? Why not class scope? Paul Opal Java 12 10-10-2004 11:01 PM



Advertisments