Easy Question - If you know the answer.

Discussion in 'Java' started by gwoodhouse@gmail.com, Jan 17, 2008.

  1. Guest

    Hello everyone,

    All im trying to do is set up a small app right now. Very simple jsp
    page.

    My problem is the project refuses to use the taglib files that in jars
    in my build path!

    "org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-html
    cannot be resolved in either web.xml or the jar files deployed with
    thi"

    This is annoying me because i have struts.jar in my projects buildpath
    and it explicitly contains both the tld's in its META-INF folder and
    everything these tags need.

    Has anyone had this problem before? Please help! >.<
    , Jan 17, 2008
    #1
    1. Advertising

  2. GArlington Guest

    On Jan 17, 2:29 pm, "" <>
    wrote:
    > Hello everyone,
    >
    > All im trying to do is set up a small app right now. Very simple jsp
    > page.
    >
    > My problem is the project refuses to use the taglib files that in jars
    > in my build path!
    >
    > "org.apache.jasper.JasperException: The absolute uri:http://struts.apache.org/tags-html
    > cannot be resolved in either web.xml or the jar files deployed with
    > thi"
    >
    > This is annoying me because i have struts.jar in my projects buildpath
    > and it explicitly contains both the tld's in its META-INF folder and
    > everything these tags need.
    >
    > Has anyone had this problem before? Please help! >.<


    The path you show (uri:http://struts.apache.org/tags-html) gets 404
    response, so, what is your question?
    GArlington, Jan 18, 2008
    #2
    1. Advertising

  3. Lew Guest

    GArlington wrote:
    > On Jan 17, 2:29 pm, "" <>
    > wrote:
    >> Hello everyone,
    >>
    >> All im trying to do is set up a small app right now. Very simple jsp
    >> page.
    >>
    >> My problem is the project refuses to use the taglib files that in jars
    >> in my build path!
    >>
    >> "org.apache.jasper.JasperException: The absolute uri:http://struts.apache.org/tags-html
    >> cannot be resolved in either web.xml or the jar files deployed with
    >> thi"
    >>
    >> This is annoying me because i have struts.jar in my projects buildpath
    >> and it explicitly contains both the tld's in its META-INF folder and
    >> everything these tags need.
    >>
    >> Has anyone had this problem before? Please help! >.<

    >
    > The path you show (uri:http://struts.apache.org/tags-html) gets 404
    > response, so, what is your question?


    That is completely irrelevant. It's a URI, not a URL. Even as a URL you'd
    have to strip the leading "uri:" off the string.

    The question is why the namespace is not recognized. I am no expert but it
    usually takes no more than putting the Struts JAR in the WEB-INF/lib/ for the
    taglib descriptors and all just to snap into place.

    It's not the build class path that counts as much as the run class path. Make
    sure the Struts libs are either in the Tomcat shared libs, or equivalent for
    your app server, or in the app libs, the WEB-INF/lib/ directory of the
    *deployed* application.

    --
    Lew
    Lew, Jan 18, 2008
    #3
  4. Guest

    On Jan 18, 2:09 pm, Lew <> wrote:
    > GArlington wrote:
    > > On Jan 17, 2:29 pm, "" <>
    > > wrote:
    > >> Hello everyone,

    >
    > >> All im trying to do is set up a small app right now. Very simple jsp
    > >> page.

    >
    > >> My problem is the project refuses to use the taglib files that in jars
    > >> in my build path!

    >
    > >> "org.apache.jasper.JasperException: The absolute uri:http://struts.apache.org/tags-html
    > >> cannot be resolved in either web.xml or the jar files deployed with
    > >> thi"

    >
    > >> This is annoying me because i have struts.jar in my projects buildpath
    > >> and it explicitly contains both the tld's in its META-INF folder and
    > >> everything these tags need.

    >
    > >> Has anyone had this problem before? Please help! >.<

    >
    > > The pathyoushow (uri:http://struts.apache.org/tags-html) gets 404
    > > response, so, what is your question?

    >
    > That is completely irrelevant. It's a URI, not a URL. Even as a URLyou'd
    > have to strip the leading "uri:" off the string.
    >
    > The question is why the namespace is not recognized. I am no expert but it
    > usually takes no more than putting the Struts JAR in the WEB-INF/lib/ for the
    > taglib descriptors and all just to snap into place.
    >
    > It's not the build class path that counts as much as the run class path. Make
    > sure the Struts libs are either in the Tomcat shared libs, or equivalent for
    > your app server, or in the app libs, the WEB-INF/lib/ directory of the
    > *deployed* application.
    >
    > --
    > Lew


    Thanks Lew,

    Again your advice is very much appreciated. Unfortunatly i already
    double checked all of those things before posting the question (I'm
    using the tomcat-server-in-eclipse setup).

    The JAR files deffinatly have to be in the deployed applications WEB-
    INF/lib as opposed to the Tomcat/lib directory - Im working from a
    working product where this is true.

    After not figuring it out i gave up and wrote normal HTML in there for
    now - im going to go back if i have time at the end of the project
    (seeing as ive got 2 days left i very much doubt it! :D)

    I guess ill check on this thread now and again hoping that someone
    else has the problem in future (how evil of me) and also hope they
    come up with a solution which they can post here for us to see.

    Again, Thanks Lew, this isnt the first time you have helped me out!

    Graeme
    , Jan 23, 2008
    #4
  5. Godofredo Guest

    Guess this answer is as silly as it looks, but I had problems using
    TagLibs when they weren't inside a package. The JSP files using the
    tags failed to locate those. After including the Tag Library classes
    inside a package, everything worked fine.
    Godofredo, Jan 25, 2008
    #5
  6. Lew Guest

    Godofredo wrote:
    > Guess this answer is as silly as it looks, but I had problems using
    > TagLibs when they weren't inside a package. The JSP files using the
    > tags failed to locate those. After including the Tag Library classes
    > inside a package, everything worked fine.


    Never make production code in the default package. There are all kinds of
    limitations to its use, and it is even mentioned in the JLS that the default
    package is only intended for throwaway code.

    Never put code in the default package in production.

    --
    Lew
    Lew, Jan 25, 2008
    #6
    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. Shawn

    need quick answer to easy question

    Shawn, Mar 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    338
    Shawn
    Mar 6, 2004
  2. Richard
    Replies:
    15
    Views:
    3,675
    nice.guy.nige
    Feb 13, 2005
  3. Charles Taylor
    Replies:
    0
    Views:
    115
    Charles Taylor
    Oct 24, 2005
  4. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    216
    Gregory Toomey
    Apr 23, 2004
  5. Replies:
    12
    Views:
    170
    -berlin.de
    Nov 19, 2006
Loading...

Share This Page