You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2022/09/14 19:19:00 UTC

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

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

Lukasz Lenart closed WW-3343.
-----------------------------
    Resolution: Not A Problem

> multiple forms on a single page renders wrong namespace in form action url
> --------------------------------------------------------------------------
>
>                 Key: WW-3343
>                 URL: https://issues.apache.org/jira/browse/WW-3343
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.8.1
>            Reporter: Wes Wannemacher
>            Priority: Major
>             Fix For: 6.1.0
>
>         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 was sent by Atlassian Jira
(v8.20.10#820010)