facebook

[Closed] Struts JSP taglib URI Incorrect

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #259851 Reply

    Timothy Seibert
    Participant

    Eclipse:
    Version: 3.2.0
    Build id: M20060629-1905
    MyEeclipse 5.0-
    OS: Windows XP SP2
    System Setup

    – Message Body ——————————-
    The tld’s and the struts.jar supplied with the do not match the inserted (xdoclet?) taglib references inserted into the JSP by the wizard. The taglib references is shown below:

    <%@ taglib uri=”http://struts.apache.org/tags-bean&#8221; prefix=”bean” %>
    <%@ taglib uri=”http://struts.apache.org/tags-html&#8221; prefix=”html” %>
    <%@ taglib uri=”http://struts.apache.org/tags-logic&#8221; prefix=”logic” %>
    <%@ taglib uri=”http://struts.apache.org/tags-tiles&#8221; prefix=”tiles” %>

    However, if we look at the tld we find:

    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>html</shortname>
    <uri>http://jakarta.apache.org/struts/tags-html</uri&gt;

    Note the mis-match of the URI. Similarly, if we crack open the struts.jar in the lib directory we
    find:

    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>html</shortname>
    <uri>http://jakarta.apache.org/struts/tags-html</uri&gt;

    It is the same as above. As a result there is a jasper error on deployment.

    In addition, the JSP specs calls for the tld files to be placed in the META-INF directory as they are in the struts.jar.

    Am I missing something? Apart from the hand recoding is there a fix?

    Regards,

    Bob Nicholls
    MIT Lincoln Laboratory

    #259894 Reply

    Riyad Kalla
    Member

    Bob,
    When you go to create a new JSP file, and use the template dropdown, notice how there are templates for both Struts 1.1 and 1.2? The change in taglib URIs is exactly why there are two separate sets of templates. It looks like you added Struts 1.1 libraries to your project, but are using the Struts 1.2 templates to create the JSPs. Please use the Struts 1.1 templates and you should be fine.

    Also, according to the spec the TLDs can exist exclusively in the JAR file under the META-INF dir and be resolved, so you don’t need to copy them anywhere in your project. It’s a nice way to keep things tidy.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: [Closed] Struts JSP taglib URI Incorrect

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