how can u handle run time exceptions in struts and jsp plz
explain briefly not single word answer?
Answer Posted / gangadhar m
Hi.
In Struts we can handle the run time exceptions in two ways.
1). by using try& catch Blocks in ActionSubClass
2). by Using <exception> in struts-config.xml this is two ways
a) Either handle exceptions globally by using
<global-exceptions>
<exception-type>java.lang.Exception</exception-type>
<exception-location>1.jsp</exception-location>
</global-exceptions>
In this approach if u get exception any jsp page it
automatically goes to 1.jsp and their u dispay the errors by
using <html-errors/>
b) or u can handle the exceptions as locally i.e particular
to action class
<action-mappings>
<action
name=""
type=""
validate="true"
input="1.jsp">
</action>
</action-mappings>
| Is This Answer Correct ? | 21 Yes | 7 No |
Post New Answer View All Answers
How is the action mapping specified?
What is the purpose of interceptors?
Explain design patterns which is used in struts?
how to develop the submit and search operations in single jsp using struts?
What is the apache struts vulnerability?
What are the sections into which a strut configuration file can be divided?
Why was reload removed from struts (since 1.1)?
What is the need of struts?
Is struts mvc framework?
What are struts in java?
What is the purpose of execute() method?
Describe the mvc on struts?
What configuration changes are required to use Tiles in Struts?
What is execute method in struts?
What types of validations are available in xml based validation in struts2?