  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | -none- | -none- 2007-10-01 - By mikeh96
Back
Thanks for taking the time.. unfortunately, the exceptions are still percolating up. Do you have it working?
Brian Trzupek wrote: > > I am not 100% sure on this, but I think you need to have > struts.devMode = false in struts.properties. > > Give that a whirl. > > Brian- > > On Sep 30, 2007, at 9:43 PM, mikeh96 wrote: > >> >> I am unable to trap an exception and it's being pushed up until it >> becomes a >> 500 Servlet Exception. >> >> Basically, I want to catch the exception if a user mistypes an >> action name >> >> I am using struts2 (2.0.9). >> >> Here's the top of the trace: >> org.apache.velocity.exception.ResourceNotFoundException: >> Unable to find resource '/templates/screens/inddd2ex.vm' >> at >> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource( >> ResourceManagerImpl.java:458) >> >> Here's my struts.xml file >> >> (thanks for helping) >> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ >> <package name="default" extends="struts-default"> >> >> <interceptors> >> <interceptor-stack name="simpleStack"> >> <interceptor-ref name="defaultStack" /> >> </interceptor-stack> >> </interceptors> >> >> >> <global-results> >> <result name="Exception" type="velocity" >>> /templates/screens/exception.vm</result> >> </global-results> >> >> <global-exception-mappings> >> <exception-mapping >> exception="java.lang.Exception" >> result="Exception"/> >> <exception-mapping >> exception="org.apache.velocity.exception.ResourceNotFoundException" >> result="Exception"/> >> <exception-mapping >> exception="java.lang.Runtime" >> result="Exception"/> >> </global-exception-mappings> >> >> >> <action name="*" class="com.opensymphony.xwork2.ActionSupport"> >> <interceptor-ref name="exception" /> >> <interceptor-ref name="defaultStack" /> >> <result type="velocity">/templates/screens/{1}.vm</result> >> </action> >> >> </package> >> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- >> -- --- >> -- >> View this message in context: http://www.nabble.com/Struts-2 (See http://uts-2.ora-code.com)%3A-- >> Unable-to-catch-exceptions-via-global-exception-mappings- >> tf4545971.html#a12972599 >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ >> To unsubscribe, e-mail: user-unsubscribe@(protected) >> For additional commands, e-mail: user-help@(protected) >> > > > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ > To unsubscribe, e-mail: user-unsubscribe@(protected) > For additional commands, e-mail: user-help@(protected) > > >
-- View this message in context: http://www.nabble.com/Struts-2 (See http://uts-2.ora-code.com)%3A--Unable-to -catch-exceptions-via-global-exception-mappings-tf4545971.html#a12978952 Sent from the Struts - User mailing list archive at Nabble.com.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |