java - After upgarding to Struts 2.3.16.3 s:submit does not work -


i upgraded struts 2.3.16.3 i.e latest version of release 2.3.15.1

now submit buttons have stopped working when use -

<s:submit align="center" action='login_loginuser' value="login"/> 

my action mapping below -

<action name="login_*" method="{1}" class="com.xxxx.xxxx.xxx.loginaction">     <result name="input" type="tiles">login.tiles</result>     <result name="success">/jsp/common/success.jsp</result> </action> 

my struts.xml below -

<?xml version="1.0" encoding="utf-8" ?> <!doctype struts public   "-//apache software foundation//dtd struts configuration 2.3//en"   "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts>     <constant name="struts.enable.dynamicmethodinvocation" value="true"/>     <constant name="struts.action.extension" value="action"/>     <include file="com/emsproject/system/sysconfig/login.xml"/>  </struts> 

my web.xml below -

<web-app id="webapp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">     <display-name>eschoolmate</display-name>     <filter>         <filter-name>struts2</filter-name>         <filter-class>org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter</filter-class>         <init-param>             <param-name>actionpackages</param-name>             <param-value>com.mypackages</param-value>         </init-param>     </filter>     <filter-mapping>         <filter-name>struts2</filter-name>         <url-pattern>*.action</url-pattern>     </filter-mapping>     <filter-mapping>         <filter-name>struts2</filter-name>         <url-pattern>/struts/*</url-pattern>     </filter-mapping>      <listener>         <listener-class>org.apache.struts2.tiles.strutstileslistener</listener-class>     </listener>     <listener>         <description>sessionlistener</description>         <listener-class>com.emsproject.action.common.sessionlistener</listener-class>     </listener>     <context-param>         <param-name>tilesdefinitions</param-name>         <param-value>/web-inf/tiles.xml</param-value>     </context-param>     <welcome-file-list>         <welcome-file>/jsp/common/index.html</welcome-file>     </welcome-file-list>     <servlet>         <servlet-name>myinfo</servlet-name>         <servlet-class>com.mypackage.action.common.myservlet</servlet-class>     </servlet>     <servlet-mapping>         <servlet-name>myinfo</servlet-name>         <url-pattern>/eapp/*</url-pattern>     </servlet-mapping>  </web-app> 

i tried exclude parameter change mentioned in release notes, nothing seems work.

if change s:submit html input type button & call action javascript below -

function calllogin(){     document.getelementbyid('sysform').target="_self";     document.getelementbyid('sysform').action='/coms/common/login_loginuser.action';     document.getelementbyid('sysform').submit(); } 

this works fine huge change throughout application :(.

not sure why action mappings not resolved in version works fine in struts 2.3.15.1.

any appreciated.

thanks

many security fixes, including s2-016, occurred latest release, features or functionality disabled default. enable using action attribute in submit tag use following constant in struts.xml

<constant name="struts.mapper.action.prefix.enabled" value="true"/> 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -