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

Discussion in 'Java' started by Laurent Leconte, Oct 7, 2003.

  1. 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 ?

    --
    Laurent
    Laurent Leconte, Oct 7, 2003
    #1
    1. Advertising

  2. Laurent Leconte

    Chris Smith Guest

    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
    Chris Smith, Oct 7, 2003
    #2
    1. Advertising

  3. Chris Smith <> 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
    Laurent Leconte, Oct 14, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sufia
    Replies:
    0
    Views:
    4,783
    sufia
    Jul 7, 2003
  2. Nachiketh

    package does not exist error

    Nachiketh, Apr 17, 2004, in forum: Java
    Replies:
    1
    Views:
    15,028
    Roedy Green
    Apr 18, 2004
  3. Replies:
    0
    Views:
    4,354
  4. Stefan Seefeld
    Replies:
    3
    Views:
    960
  5. per9000
    Replies:
    7
    Views:
    404
    Magnus Lycka
    Feb 27, 2006
Loading...

Share This Page