[ https://issues.apache.org/jira/browse/WW-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-5060: ------------------------------ Fix Version/s: 2.6.1 (was: 2.6) > Struts 2 Rest Plugin Conversion Issue > ------------------------------------- > > Key: WW-5060 > URL: https://issues.apache.org/jira/browse/WW-5060 > Project: Struts 2 > Issue Type: Bug > Components: Other > Affects Versions: 2.3.1 > Reporter: Ronak Jain > Priority: Major > Fix For: 2.6.1 > > > I integrated strust2 convention plugin and rest plugin. > When a request come to server where my field is long and I am sending a > string then default stacktrace occurs. > I want to handle the exception from my side but before request come to any > interceptor, it is throwing exception. > > My configuration : > <bean type="org.apache.struts2.rest.handler.ContentTypeHandler" > name="jackson" class="org.apache.struts2.rest.handler.JacksonLibHandler"/> > <constant name="struts.rest.handlerOverride.json" value="jackson"/> > > <package name="sm" namespace="/sm/*" extends="rest-default, json-default"> > <result-types> > <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" > /> > <result-type name="eliteJson" > class="com.elitecore.neoxemsippbx.coreneoxemsippbx.ep.util.EliteJsonResult" /> > </result-types> > <interceptors> > <interceptor name="transaction" > class="com.elitecore.neoxemsippbx.system.interceptor.TransactionInterceptor"></interceptor> > <interceptor name="audit" > class="com.elitecore.neoxemsippbx.system.interceptor.AuditInterceptor" /> > <interceptor name="neoxRest" > class="com.elitecore.neoxemsippbx.system.interceptor.CustomRestWorkflowInterceptor"/> > <interceptor-stack name="restStack"> > <interceptor-ref name="transaction"> > <param > name="excludeMethods">deleteConfirm,cacheServerGroups,validateRuleset</param> > </interceptor-ref> > <interceptor-ref name="audit"></interceptor-ref> > <interceptor-ref name="restDefaultStack"> > <param name="restWorkflow.excludeMethods">*</param> > </interceptor-ref> > <interceptor-ref name="neoxRest"/> > </interceptor-stack> > </interceptors> > <global-results> > <result name="redirectAction" type="redirect">${actionChainUrl}</result> > <result name="exception" > type="tiles">commons/general/UnhandledException</result> > <result name="error" type="tiles">commons/general/Error</result> > <result name="unauthorize" type="tiles">${actionChainUrl}</result> > <result name="serverManagerWelcome" > type="tiles">ServerManagerWelcome</result> > <result name="redirectURL" type="tiles">${actionChainUrl}</result> > <result name="redirectURLWithoutCommit" > type="tiles">${actionChainUrl}</result> > <result name="genericPartnerSearch" type="tiles">_${actionChainUrl}</result> > <result name="redirectUploadReport" type="tiles">${actionChainUrl}</result> > <result name="dispatchView" type="tiles">${actionChainUrl}</result> > <result name="subtableurl">${actionChainUrl}</result> > <result name="ajaxSuccess" type="json"></result> > <result name="ajaxError" type="json"></result> > <result name="download" type="stream"> > <param name="contentDisposition">attachment;filename=${fileName}</param> > <param name="contentType">$(contentType)</param> > <param name="inputName">fileInputStream</param> > <param name="bufferSize">1024</param> > </result> > <result name="SearchSuccess" type="eliteJson"> > <!-- ignoreHierarchy param is used to access parent property in json --> > <param name="ignoreHierarchy">false</param> > <!-- modelProperties Params is custom property which is used to pass > dynamic includeProperites --> > <param name="modelProperties">${includeSearchProperties}</param> > </result> > </global-results> > <global-exception-mappings> > <exception-mapping result="exception" > exception="java.lang.Throwable"></exception-mapping> > <exception-mapping result="exception" > exception="java.lang.RuntimeException"></exception-mapping> > </global-exception-mappings> > </package> -- This message was sent by Atlassian Jira (v8.20.1#820001)