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 mvc design pattern used in struts framework?
How does struts2 token work?
What do you mean by the abstract package in struts2, and what is its utilization?
What are inner class and anonymous class?
What is the procedure of operation of a form tag?
Which technologies can be used at view layer in struts?
What are the custom tags?
What is action class? What are the types of action class?
What are the advantages of spring mvc over struts mvc?
How the flow of various requests happens in struts application?
What's mvc pattern ?
What is spring hibernate and struts in java?
Can we integrate struts with spring?
How do I access token?
Why is action servlet a singleton in struts?