You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Wes Wannemacher (JIRA)" <ji...@apache.org> on 2009/11/27 19:15:13 UTC

[jira] Updated: (WW-3343) multiple forms on a single page renders wrong namespace in form action url

     [ https://issues.apache.org/struts/browse/WW-3343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes Wannemacher updated WW-3343:
--------------------------------

    Attachment: testForm.zip

this is a simple web-app to demonstrate the problem. You can unzip it and `mvn tomcat:run` it to see the problem. Go to http://localhost:8080/testForm/index.action and then view the source. Compare it against the JSP and what you would expect.

> multiple forms on a single page renders wrong namespace in form action url
> --------------------------------------------------------------------------
>
>                 Key: WW-3343
>                 URL: https://issues.apache.org/struts/browse/WW-3343
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.8.1
>            Reporter: Wes Wannemacher
>         Attachments: testForm.zip
>
>
> so, this has been bugging me for a while, I decided to test it out. A JSP like that contains something like the following - 
> <%@ taglib uri="/struts-tags" prefix="s" %>
> <html>
> <body>
> <h2>Hello World!</h2>
> <s:form action="foo" namespace="/">
> <s:submit />
> </s:form>
> <s:form action="bar" namespace="/baz">
> <s:submit />
> </s:form>
> </body>
> </html>
> When the page is rendered, the second form will not respect the /baz namespace. I created a sample app and will upload it here. I suspect the ServletUrlRenderer is the culprit, but I'll research more. If someone gets this fixed before me, that's fine, I wanted to post it to JIRA quick because this bug is a pain in my tuches. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.