Re: Eclipse tag library path woes

Discussion in 'Java' started by Chris Smith, Jul 7, 2003.

  1. Chris Smith

    Chris Smith Guest

    Edward G wrote:
    > I'm having difficulty getting a simple custom tag to work under
    > Eclipse (new IDE for me). Upon requesting a page using the tag, I get
    >
    > "/hello.jsp(10,0) Unable to load class hello"
    >
    > I'm almost positive it has to do with how my environment is setup wrt
    > classpaths and such; would you be so kind as to verify what I am
    > doing?
    >
    > Here is the taglib declaration from hello.jsp residing in the webapp
    > root:
    >
    > <%@ taglib uri="/hello" prefix="examples" %>


    That URI doesn't look right. Normally, it's either a full URL that
    references an entry in web.xml, or a local path to a TLD file in the
    context. Try 'uri="/WEB-INF/tlds/hello.tld"'.

    > The Java Build Path | Source tab in the project properties specifies
    > "Use source folders contained in project" and has a single entry,
    > "HelloTag/WEB-INF/classes". (Is that right? I've tried many others to
    > no avail!).
    >
    > Finally, the "Build output folder" is set to HelloTag/bin (the
    > default). I'm not sure what the implications are of the output folder
    > is in the context of developing web apps under Eclipse; can you expand
    > on this?


    What's important, actually, is that the build output folder be set to
    WEB-INF/classes. You should fix that immediately. I've found problems
    with setting the source folder to WEB-INF/classes... namely, that Tomcat
    tries to be smart with timestamps and do dynamic recompiling of stuff,
    which you probably don't want if you're using Eclipse. As a result, I
    generally picky a different path (for example, WEB-INF/src) for source
    code.

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

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Jul 7, 2003
    #1
    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. MileHighCelt
    Replies:
    10
    Views:
    55,254
  2. shruds
    Replies:
    1
    Views:
    968
    John C. Bollinger
    Jan 27, 2006
  3. M. Fernandez

    Eclipse and java.library.path

    M. Fernandez, Mar 20, 2006, in forum: Java
    Replies:
    1
    Views:
    20,276
    Dave Mandelin
    Mar 20, 2006
  4. Ron Adam
    Replies:
    3
    Views:
    465
    Ron Adam
    Aug 2, 2005
  5. Replies:
    1
    Views:
    774
Loading...

Share This Page