- This topic has 3 replies, 2 voices, and was last updated 19 years, 4 months ago by Riyad Kalla.
-
AuthorPosts
-
AtoneMemberHI,
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.jspThe 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
Riyad KallaMemberI 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
AtoneMemberThanks,
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
Riyad KallaMemberOk 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.
-
AuthorPosts