facebook

[Closed] Struts 1.2 Tag Libs

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #240187 Reply

    Hi MyEclipse Support Team,

    I found a bug in your Struts 1.2 JSP Code Generation. The URI for the tag lib that are generated are:

    <%@ page language=”java” pageEncoding=”UTF-8″%>

    <%@ 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” %>

    and they should be:

    <%@ page language=”java” pageEncoding=”UTF-8″%>

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

    If these ARE correct, then the vaildators need to be synched up, as the previous form are being flagged as errors immediately following code generation. We have found a very similar situation in EJB 3.0. I hope this is helpful.

    richard.markle@gmail.com

    FYI, Here’s my config:

    <SNIP>

    #240225

    Riyad Kalla
    Member

    Richard,
    We appreciate the report, however the URIs are correct. Struts became an Apache top-level project between it’s 1.1 and 1.2 release, subsequently their URL changed and they updated the URIs in all their taglibs to the struts.apache.org/ style. You can verify this by opening up your struts.jar file and going into the META-INF directory then opening uip any of the TLDs. If you are still seeing the jakarta.apache.org addresses then you are most likely still using Struts 1.1, or some nightly build between the two releases.

    #240235

    @support-rkalla wrote:

    Richard,
    We appreciate the report, however the URIs are correct. Struts became an Apache top-level project between it’s 1.1 and 1.2 release, subsequently their URL changed and they updated the URIs in all their taglibs to the struts.apache.org/ style. You can verify this by opening up your struts.jar file and going into the META-INF directory then opening uip any of the TLDs. If you are still seeing the jakarta.apache.org addresses then you are most likely still using Struts 1.1, or some nightly build between the two releases.

    And I appreciate your quick response, but then why is MyEclipse flagging the URI’s as errors?

    #240238

    Riyad Kalla
    Member

    This could be for many different reasons, did you try stepping into your struts.jar file like I mentioned above and check the META-INF/*.tld files for their default URIs? (4th or 5th tag down from the top). If you are showing the jakarta ones then you are using Struts 1.1, in which case if you are using our File > New > JSP templates, be sure you are selecting Struts 1.1 templates and not Struts 1.2 templates, and visa versa of course.

    I received your PM as well and think what might also be causing some confusion is that the templates are not generated on the fly based off of the project’s capabilities. So when you create a new JSP file and select the template to use, it’s possible to select the Struts 1.1 Templates in a Struts 1.2 project, in which case they would be marked as errors because the templates and Struts versions do not match up. We have an open enhancement to make the templates smarter based on the current project capabilities, but right now they are somewhat manual in that nature.

    I would also add that you don’t need to unzip your TLDs into your WEB-INF dir or add web.xml entries if you plan on using the default URIs (the ones we specify in the templates).

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] Struts 1.2 Tag Libs

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