Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10382

Form tag prepending context/servlet path breaks use for portlets

    Details

      Description

      When using the form tag for portlets, prepending the portlet's context is not wanted since we want the url to resolve to the portal's context and not the portlet's(where the form tag lives). The portlet url tags generate portlet urls within the jsp like
      /uPortal/f/s70/p/portlet-name/normal/action.uPpP_javax.portlet.action=saveItem
      which resolve to /uPortal and not /PortletName

      <form:form modelAttribute="itemForm" method="post" action="/uPortal/f/s70/p/portlet-name/normal/action.uP?pP_javax.portlet.action=saveItem">
      ...
      </form:form>
      

      renders as

      <form id="itemForm" action="/PortletName/uPortal/f/s70/p/portlet-name/normal/action.uP?pP_javax.portlet.action=saveItem" method="post">
      ...
      </form>
      

      The original idea was to have the adding-context functionality off by default and turned on by an added parameter but it wasn't implemented. That way it wouldn't break anything while letting new apps take advantage of the shortcut.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                Reporter:
                kwilkins Kevin Wilkinson
                Last updater:
                Juergen Hoeller
              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 20 weeks, 2 days ago