hi all,
i just upgraded
struts 2 from 2.2.3 to 2.3.4 and found a problem, tried a night to fix but still no idea... Anyone can help ??
my application is written in portlet, which use Jsr168Dispatcher of struts2-portlet-plugin-2.3.4.jar. Everything was fine before upgrade but it does not work after changing struts version.
portlet.xml
<portlet>
<portlet-name>abcportlet</portlet-name>
<portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
<init-param>
<name>portletNamespace</name>
<value>/abcportlet</value>
</init-param>
<init-param>
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<init-param>
<name>defaultViewAction</name>
<value>input</value>
</init-param>
[...]
</portlet>
struts.xml
<package name="abcportletView" namespace="/abcportlet/view" extends="struts-portlet-default">
<action name="updateForm" method="updateForm" class="xyz.myActionClass">
[...]
jsp
<s:form id="sampleForm" name="sampleForm" action="updateForm" namespace="" theme="css_xhtml" method="post" enctype="multipart/form-data" >
[...]
</s:form>
Problem 1 - Resolved
default action input will show the jsp, inside the jsp having a submit button to submit the form with action "updateForm".
My first problem is: after the submit, it said invalid action /abcportlet/updateForm.action, which i does not have action extension in my application. i have originally configured to put extension as blank, with the following config value in struts.xml, but it seems changed the logic of reading that...
<constant name="struts.action.extension" value="" />
From reference, i changed to the following:
<constant name="struts.action.extension" value="," />
then, it seems working...
Problem 2
another problem comes...
09:39:31,349 ERROR [jsp:154] Unable to locate action mapping for request, probably due to an invalid action path: /abcportlet/updateForm - [unknown location]
Anyone can help ??? wanna see if it is my configuration problem using new version of struts or it is a bug in struts 2.3.4 ?? Thanks thanks !!!