You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Torsten Krah (JIRA)" <ji...@apache.org> on 2008/11/10 13:53:38 UTC

[jira] Created: (WW-2862) s:form generates wrong action url - ".action" suffix is missing

s:form generates wrong action url - ".action" suffix is missing
---------------------------------------------------------------

                 Key: WW-2862
                 URL: https://issues.apache.org/struts/browse/WW-2862
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Portlet, Plugin - Tags
    Affects Versions: 2.0.11.2
         Environment: Pluto 1.1.6, JDK 1.5, Tomcat 6.0.13
            Reporter: Torsten Krah


Hi.
I am using Struts2 in a portlet / servlet environment.
Using portlets s:form behaves well.
But if i use actions through the FilterDispatcher, the url generated is wrong:

It should look like:

<form action="abc.action">
...
</form>

but using <s:form action="acb"> ... it generates:

<form action="abc">

and this is a non functional form as there is no url names abc, but abc.action.

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


[jira] Commented: (WW-2862) s:form generates wrong action url - ".action" suffix is missing

Posted by "Torsten Krah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44943#action_44943 ] 

Torsten Krah commented on WW-2862:
----------------------------------

Yeah thats what i am trying but whats not working like i thought it should.
Ok than i have to use "other" jsps doing things for servlets. thx.

> s:form generates wrong action url - ".action" suffix is missing
> ---------------------------------------------------------------
>
>                 Key: WW-2862
>                 URL: https://issues.apache.org/struts/browse/WW-2862
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Portlet, Plugin - Tags
>    Affects Versions: 2.0.11.2
>         Environment: Pluto 1.1.6, JDK 1.5, Tomcat 6.0.13
>            Reporter: Torsten Krah
>
> Hi.
> I am using Struts2 in a portlet / servlet environment.
> Using portlets s:form behaves well.
> But if i use actions through the FilterDispatcher, the url generated is wrong:
> It should look like:
> <form action="abc.action">
> ...
> </form>
> but using <s:form action="acb" namespace="rules"> ... it generates:
> <form action="abc">
> Where
> and this is a non functional form as there is no url names abc, but abc.action. The rules namespace is child of the root view namespace. (/view/rules/index.action is the url which generates the form and to which the post should go back).
> Interesting notes about action config stuff:
> Using the initial "request" when calling the url namespace is "/view/rules" and action="index" - getActionConfig in DefaultConfiguration XWork class does find an action config.
> When the form is rendered the namespace only reads "rules" instead of "/view/rules" and i get this warning:
> 15:48:28,520 WARN  [org.apache.struts2.components.Form] No configuration found for the specified action: 'index' in namespace: 'rules'. Form action defaulting to 'action' attribute's literal value.
> I am using it primarily for portlets and my default namespace is /view - this does work fine in s:form tags requested through portletDispachter - using the same with FilterDispatcher won't work, because the /view is missing.
> This is inconsistent because it won't allow me to use a page from portlet and servlets.
> Any ideas how to solve this? Is there a way to tell the FilterDispatcher he should "prepend" the "/view"?

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


[jira] Resolved: (WW-2862) s:form generates wrong action url - ".action" suffix is missing

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nils-Helge Garli resolved WW-2862.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.3

> s:form generates wrong action url - ".action" suffix is missing
> ---------------------------------------------------------------
>
>                 Key: WW-2862
>                 URL: https://issues.apache.org/struts/browse/WW-2862
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Portlet, Plugin - Tags
>    Affects Versions: 2.0.11.2
>         Environment: Pluto 1.1.6, JDK 1.5, Tomcat 6.0.13
>            Reporter: Torsten Krah
>             Fix For: 2.1.3
>
>
> Hi.
> I am using Struts2 in a portlet / servlet environment.
> Using portlets s:form behaves well.
> But if i use actions through the FilterDispatcher, the url generated is wrong:
> It should look like:
> <form action="abc.action">
> ...
> </form>
> but using <s:form action="acb" namespace="rules"> ... it generates:
> <form action="abc">
> Where
> and this is a non functional form as there is no url names abc, but abc.action. The rules namespace is child of the root view namespace. (/view/rules/index.action is the url which generates the form and to which the post should go back).
> Interesting notes about action config stuff:
> Using the initial "request" when calling the url namespace is "/view/rules" and action="index" - getActionConfig in DefaultConfiguration XWork class does find an action config.
> When the form is rendered the namespace only reads "rules" instead of "/view/rules" and i get this warning:
> 15:48:28,520 WARN  [org.apache.struts2.components.Form] No configuration found for the specified action: 'index' in namespace: 'rules'. Form action defaulting to 'action' attribute's literal value.
> I am using it primarily for portlets and my default namespace is /view - this does work fine in s:form tags requested through portletDispachter - using the same with FilterDispatcher won't work, because the /view is missing.
> This is inconsistent because it won't allow me to use a page from portlet and servlets.
> Any ideas how to solve this? Is there a way to tell the FilterDispatcher he should "prepend" the "/view"?

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


[jira] Commented: (WW-2862) s:form generates wrong action url - ".action" suffix is missing

Posted by "Nils-Helge Garli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44942#action_44942 ] 

Nils-Helge Garli commented on WW-2862:
--------------------------------------

No, there's no way to tell the FilterDispatcher to add the /view namespace other than specifying it in the namespace attribute. Is the problem that you're trying to use the same view in a servlet and as a portlet? I can see how this could cause "portability" issues. The easiest way to create urls for servlets is using "value" instead of "action" in the url and form tags.

> s:form generates wrong action url - ".action" suffix is missing
> ---------------------------------------------------------------
>
>                 Key: WW-2862
>                 URL: https://issues.apache.org/struts/browse/WW-2862
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Portlet, Plugin - Tags
>    Affects Versions: 2.0.11.2
>         Environment: Pluto 1.1.6, JDK 1.5, Tomcat 6.0.13
>            Reporter: Torsten Krah
>
> Hi.
> I am using Struts2 in a portlet / servlet environment.
> Using portlets s:form behaves well.
> But if i use actions through the FilterDispatcher, the url generated is wrong:
> It should look like:
> <form action="abc.action">
> ...
> </form>
> but using <s:form action="acb" namespace="rules"> ... it generates:
> <form action="abc">
> Where
> and this is a non functional form as there is no url names abc, but abc.action. The rules namespace is child of the root view namespace. (/view/rules/index.action is the url which generates the form and to which the post should go back).
> Interesting notes about action config stuff:
> Using the initial "request" when calling the url namespace is "/view/rules" and action="index" - getActionConfig in DefaultConfiguration XWork class does find an action config.
> When the form is rendered the namespace only reads "rules" instead of "/view/rules" and i get this warning:
> 15:48:28,520 WARN  [org.apache.struts2.components.Form] No configuration found for the specified action: 'index' in namespace: 'rules'. Form action defaulting to 'action' attribute's literal value.
> I am using it primarily for portlets and my default namespace is /view - this does work fine in s:form tags requested through portletDispachter - using the same with FilterDispatcher won't work, because the /view is missing.
> This is inconsistent because it won't allow me to use a page from portlet and servlets.
> Any ideas how to solve this? Is there a way to tell the FilterDispatcher he should "prepend" the "/view"?

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


[jira] Updated: (WW-2862) s:form generates wrong action url - ".action" suffix is missing

Posted by "Torsten Krah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Torsten Krah updated WW-2862:
-----------------------------

    Description: 
Hi.
I am using Struts2 in a portlet / servlet environment.
Using portlets s:form behaves well.
But if i use actions through the FilterDispatcher, the url generated is wrong:

It should look like:

<form action="abc.action">
...
</form>

but using <s:form action="acb" namespace="rules"> ... it generates:


<form action="abc">

Where

and this is a non functional form as there is no url names abc, but abc.action. The rules namespace is child of the root view namespace. (/view/rules/index.action is the url which generates the form and to which the post should go back).

Interesting notes about action config stuff:

Using the initial "request" when calling the url namespace is "/view/rules" and action="index" - getActionConfig in DefaultConfiguration XWork class does find an action config.
When the form is rendered the namespace only reads "rules" instead of "/view/rules" and i get this warning:

15:48:28,520 WARN  [org.apache.struts2.components.Form] No configuration found for the specified action: 'index' in namespace: 'rules'. Form action defaulting to 'action' attribute's literal value.

I am using it primarily for portlets and my default namespace is /view - this does work fine in s:form tags requested through portletDispachter - using the same with FilterDispatcher won't work, because the /view is missing.
This is inconsistent because it won't allow me to use a page from portlet and servlets.
Any ideas how to solve this? Is there a way to tell the FilterDispatcher he should "prepend" the "/view"?

  was:
Hi.
I am using Struts2 in a portlet / servlet environment.
Using portlets s:form behaves well.
But if i use actions through the FilterDispatcher, the url generated is wrong:

It should look like:

<form action="abc.action">
...
</form>

but using <s:form action="acb"> ... it generates:

<form action="abc">

and this is a non functional form as there is no url names abc, but abc.action.


> s:form generates wrong action url - ".action" suffix is missing
> ---------------------------------------------------------------
>
>                 Key: WW-2862
>                 URL: https://issues.apache.org/struts/browse/WW-2862
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Portlet, Plugin - Tags
>    Affects Versions: 2.0.11.2
>         Environment: Pluto 1.1.6, JDK 1.5, Tomcat 6.0.13
>            Reporter: Torsten Krah
>
> Hi.
> I am using Struts2 in a portlet / servlet environment.
> Using portlets s:form behaves well.
> But if i use actions through the FilterDispatcher, the url generated is wrong:
> It should look like:
> <form action="abc.action">
> ...
> </form>
> but using <s:form action="acb" namespace="rules"> ... it generates:
> <form action="abc">
> Where
> and this is a non functional form as there is no url names abc, but abc.action. The rules namespace is child of the root view namespace. (/view/rules/index.action is the url which generates the form and to which the post should go back).
> Interesting notes about action config stuff:
> Using the initial "request" when calling the url namespace is "/view/rules" and action="index" - getActionConfig in DefaultConfiguration XWork class does find an action config.
> When the form is rendered the namespace only reads "rules" instead of "/view/rules" and i get this warning:
> 15:48:28,520 WARN  [org.apache.struts2.components.Form] No configuration found for the specified action: 'index' in namespace: 'rules'. Form action defaulting to 'action' attribute's literal value.
> I am using it primarily for portlets and my default namespace is /view - this does work fine in s:form tags requested through portletDispachter - using the same with FilterDispatcher won't work, because the /view is missing.
> This is inconsistent because it won't allow me to use a page from portlet and servlets.
> Any ideas how to solve this? Is there a way to tell the FilterDispatcher he should "prepend" the "/view"?

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