Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.11.2
-
None
-
Pluto 1.1.6, JDK 1.5, Tomcat 6.0.13
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"?
Attachments
Issue Links
- is related to
-
WW-2832 Add new portletUrlType to allow creation of ServletURLs with action/namespace schema
- Closed