Global Exception in struts2 -


I am trying to configure global exceptions in struts.xml. When I include the global-exception mapping tag, the project is not starting I get the following message in the log,

  July 27, 2010 6:33:07 PM org .apache.catalina.core.StandardContext Starters SEVERE: Filter Filters Error July 27, 2010 6:33: 07 PM start org.apache.catalina.core.StandardContext: Reference [/ ehspreg2] Startup failed due to previous errors log4j: Error log manager. The repository selector was empty due to an error in reloading the class, using the NOPLoggerRepository.  

is the Struts.xml file,

  & lt; Expands package name = "default" = "string-default" & gt; & Lt; Result-type & gt; & Lt; Result-type name = "tiles" class = "org.apache.struts2.views.tiles.TilesResult" /> & Lt; / Result-type & gt; & Lt; Interceptor & gt; & Lt; Interceptor-Stack name = "ehs pre2 stack" & gt; & Lt; Interceptor-Rif name = "Parachansprereparam stack" & gt; & Lt; Param name = "validation.excludeMethods" & gt; List, weighted, deleted, executed, reset & lt; / Param & gt; & Lt; Param name = "exception.log enabled" & gt; True & lt; / Param & gt; & Lt; Param name = "exception.logLevel" & gt; Error & lt; / Param & gt; & Lt; / Interceptor-referee & gt; & Lt; / Interceptor-pile & gt; & Lt; / Interceptor & gt; & Lt; Default-interceptor-rif name = "ehs pre2 stack" /> & Lt; Global-exception-mapping & gt; & Lt; Exception-mapping exception = "java.lang.Exception" result = "exception" /> & Lt; / Global-exception-mapping & gt; & Lt; Global results & gt; & Lt; Result name = "exception" & gt; Jsp / common / error.jsp & lt; / Results & gt; & Lt; / Global results & gt; & Lt; Action Name = "Home" & gt; & Lt; Result type = "tiles" name = "success" & gt; ShowHome & lt; / Results & gt; & Lt; / Action & gt; & Lt; Action Name = "Login" class = "com.mmm.ehspreg2.web.action.WelcomeAction" & gt; & Lt; Result type = "tiles" name = "local" & gt; Show Login & lt; / Results & gt; & Lt; / Action & gt; & Lt; / Package & gt;  

I should know the problem. Please help with this very important help.

your & lt; Global-exception-mapping & gt; to your & lt; Global-results & gt; There is a need to define according to .

  & lt; Global results & gt; & Lt; Result name = "exception" & gt; Jsp / common / error.jsp & lt; / Results & gt; & Lt; / Global results & gt; & Lt; Global-exception-mapping & gt; & Lt; Exception-mapping exception = "java.lang.Exception" result = "exception" /> & Lt; / Global-exception-mapping & gt;  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -