Velocity Tools
  1. Velocity Tools
  2. VELTOOLS-53

velstruts - problem with an example JSP/struts tags

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: VelocityStruts
    • Labels:
      None

      Description

      See: http://www.mail-archive.com/velocity-dev%40jakarta.apache.org/msg13343.html

      The Struts <html:form> tag has had a number of attributes removed in version 1.2.x. The form name, type and scope can no longer be specified on this tag - these are now looked up in the struts-config.xml.

      I'm attaching a patch which resolves the above issue. Also I noticed that the JSP example was missing the "languages" field that is on the equivalent velocity page. The patch also includes this field on the JSP pages so that the JSP/velocity pages are directly comparable.

      1. VelocityToolsStrutsApp1v2.patch
        3 kB
        Niall Pemberton
      2. VelocityToolsStrutsApp1.patch
        3 kB
        Niall Pemberton

        Activity

        Niall Pemberton created issue -
        Hide
        Niall Pemberton added a comment -

        Patch correcting the issues with the JSP pages for Struts 1.2.x

        Show
        Niall Pemberton added a comment - Patch correcting the issues with the JSP pages for Struts 1.2.x
        Niall Pemberton made changes -
        Field Original Value New Value
        Attachment VelocityToolsStrutsApp1.patch [ 12315011 ]
        Hide
        Niall Pemberton added a comment -

        Apologies - first patch I attached contained an error in the "cancel" buttons javascript - was setting the value to 'save' rather than 'list' - this patch corrects that.

        Show
        Niall Pemberton added a comment - Apologies - first patch I attached contained an error in the "cancel" buttons javascript - was setting the value to 'save' rather than 'list' - this patch corrects that.
        Niall Pemberton made changes -
        Attachment VelocityToolsStrutsApp1v2.patch [ 12315012 ]
        Hide
        Nathan Bubna added a comment -

        Thanks, Niall! Once again, you are my hero.

        http://svn.apache.org/viewcvs?rev=327082&view=rev

        Show
        Nathan Bubna added a comment - Thanks, Niall! Once again, you are my hero. http://svn.apache.org/viewcvs?rev=327082&view=rev
        Nathan Bubna made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.2 [ 12310348 ]
        Hide
        Niall Pemberton added a comment -

        Nathan, One minor point - I notice you didn't include the <jsp:useBean> statement I put in the patch for edit-address.jsp.

        The first time in to "app1" if you first select the "Velocity Version" from the examples page and then select "Edit Address (JSP)" then a ServletException (Cannot find bean address in any scope) is thrown. Having the <jsp:useBean> ensures the AddressBean is created in session scope if it doesn't exist.

        Navigating via the "JSP Version" works OK, because that JSP already has a <jsp:useBean> statement.

        Niall

        Show
        Niall Pemberton added a comment - Nathan, One minor point - I notice you didn't include the <jsp:useBean> statement I put in the patch for edit-address.jsp. The first time in to "app1" if you first select the "Velocity Version" from the examples page and then select "Edit Address (JSP)" then a ServletException (Cannot find bean address in any scope) is thrown. Having the <jsp:useBean> ensures the AddressBean is created in session scope if it doesn't exist. Navigating via the "JSP Version" works OK, because that JSP already has a <jsp:useBean> statement. Niall
        Hide
        Nathan Bubna added a comment -

        oops. missed that... i just made the changes by hand, and it worked when i tried it, so i didn't notice the oversight. thanks for catching it!

        it's fixed now. rev327683

        Show
        Nathan Bubna added a comment - oops. missed that... i just made the changes by hand, and it worked when i tried it, so i didn't notice the oversight. thanks for catching it! it's fixed now. rev327683
        Nathan Bubna made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Nathan Bubna
            Reporter:
            Niall Pemberton
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development