- This topic has 4 replies, 2 voices, and was last updated 19 years, 3 months ago by Andrew Shackleton.
-
AuthorPosts
-
Andrew ShackletonMemberIs there a way to default the taglib directives to use the tlds in my project, instead of http pointers back to the jakarta project?
I looked for a way in the ME preferences but didn’t see anything so obvious as a way to manipulate the directives that get automatically inserted when creating a JSP page using the wizard.
Thanks.
Robin.
Riyad KallaMemberRobin,
Take a look at this entry to better understand what those URIs actually are doing: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-31.html#251If your TLDs are in the META-INF dir of one of the JARs in your classpath, and the <uri> defined in them is the default URI you are using in your JSP page, then the actual TLD being used is the one in the JAR. If you are talking about a custom Taglib, you will need to add <taglib> entries to your web.xml file in order for those URIs to resolve to a real file.
Andrew ShackletonMemberThanks for the article.
So, it seems that adding the mappings to web.xml is a manual process and not part of the struts configuration wizard. Is that correct or is their a way to automatically add the <jsp-config> tags when adding struts capabilities?
Thanks.
Riyad KallaMemberCorrect it is manual because it is not needed. The URIs we use for all our taglibs (Struts, JSTL, JSF, etc.) in our templates are all the default ones specified in the TLDs that are in the JARs for each of the supported technologies.
If we chose to do custom mappings as part of the wizard (“enter your URI”) then we would be forced to add not only the <taglib> entries to the web.xml file, but also the TLD files into the WEB-INF dir someplace. As it stands now you merely need the JARs in your build path and that’s it.
TO get an idea of what I mean, use WinZip or some other archive program to actually open up your struts.jar file, notice the META-INF dir? Look inside it, see the different TLDs? Open them up, look around the 5th line down, you should see a tag like:
<uri>http://blahblah</uri>That is the default URI that is used to map that taglib without you needing to do anything. So if you use the default URI in your JSP’s, there is no more work to be done.
Andrew ShackletonMemberkewl, thanks.
-
AuthorPosts