facebook

Taglib file not found error

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #235135 Reply

    Atone
    Member

    HI,

    I get taglib files not found errors on a number of jsps (but not all), complete with red X’s all over the place. My code compiles and runs correctly, so I know there really isn’t a problem. The errors in eclipse make it difficult to keep track of real errors. I tried to search for related issues but didn’t find one that matched my issue directly.

    I have two folders that contain JSP files to seperate help files from normal content files. Both use struts tiles, which mean the pages are further broken down into smaller jsp fragments. I use a taglib.jsp file that aggregates all the <%@ taglib uri=”someUri” prefix=”someprefix” %> in one file, which is included in each jsp file (one for normal content and another for help content). It works great.

    In my help folder I have a similar thing going on, with a diffent taglib include file (helpTaglib.jsp) that is included in all helpxxx.jsps. But I find that several, not all, jsps get two sets of conflicting errors that I don’t get on my normal content pages.

    File "/WEB-INF/tags/struts-tiles.tld" not found.  NOTE: No JSP line number was avaliable so line 1 was used for the marker

    follwed by

    No tag "insert" defined in tag library imported with prefix "tiles"

    The first looks like it is saying it cant find the file, then it says there is no “insert” defined in that file.

    The strange part is the code is identical (because of importing taglibs into each page and both taglib.jsp’s are pretty much cut and paste copies) and not all help jsp pages give the same error dipite the exact same code, other than the template stuff. Yet I have no issues with the same code in my content directoriess

    web/
    helpFiles/
    helpTaglibs.jsp
    xxxxHelpTilespage.jsp
    xxxxHelpTilespageContent.jsp
    jsp/
    taglib.jsp
    xxxxTilespage.jsp
    xxxxTilesPageContent.jsp

    The taglibs directives both are identical(cut and paste) and point to the web.xml. Proven because the normal content pages work.

    Any Ideas?

    PS, This is an existing struts app which doesn’t follow the exploded war layout (I know, I know… but it isn’t my call to change it), so I havn’t enabled struts and I forgot if I enabled web capibilities. Perhaps this might be an issue. Also, durring a search I saw something saying that myEclipse might be moving to support none exploded war structures. Is there any idea if this is sooner rather than later thing? I think it is important be cause you may have an app that is segregated by other needs. It would be better to configure the an IDE to point to the correct structure rather than force it on the app. Perhaps this is a different topic….

    Thanks
    Tom

    #235158 Reply

    Riyad Kalla
    Member

    I forgot if I enabled web capibilities. Perhaps this might be an issue

    This would be the first problem if you didn’t enable web capabilities that would explain quickly why the taglibs cannot be resolved.

    Any Ideas?

    What I suggest doing is including the taglib.jsp file using <%@include %> statement, instead of a tiles entry. The JSP editor understands the <%@include %> directive and will honor the imported taglib statements, but has no knowledge of the tiles include tag.

    Also I would suggest you read this FAQ entry to get a good idea of how the URIs work, and if you want to use a non-standard URI (/WEB-INF/bglahblahb) then you need to add web.xml mapping entries: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-31.html#251

    #235162 Reply

    Atone
    Member

    Thanks,

    Actually, I do have web capibilities enabled….I just looked. The problem is the inconsitency. Some are OK and others are not. I already use the <%@include %> for the taglib.jsp on each jsp, which works on most pages but not all. I have read that link on the URI and I am in complience with it. All taglibs are declared in the Web.xml.

    Again, some code is fine and others display errors dispite all being the same.

    Tom

    #235164 Reply

    Riyad Kalla
    Member

    Ok cool, atleast we are on the same page there. Next step, please outline your entire project (General) structure, and which files have errors to me. Use the code button below so it keeps it’s formatting. Also note what is your webroot, source and output dirs.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Taglib file not found error

You must be logged in to post in the forum log in