Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Where should struts xml be placed?

906


How can we write our own interceptor and map it for action?

1048


What is the purpose of '@keyproperty'?

1020


What is the use of namespace in action mapping in Struts2?

1047


What are the advantages of spring mvc over struts mvc?

910


When do I need “struts.jar” on my classpath?

958


How we can controlled duplicate form submission in struts?

935


Name some of the features of struts2?

1019


How many Action classes have been used in your project? Differences between struts 1.1 and 1.3?

2953


What is the flow of requests in struts based applications?

975


What is meant by custom tags?

949


What are the various struts tag libraries?

928


What is the purpose of @urlvalidator annotation?

978


Explain the difference between plain-validator and field-validator in struts?

937


What is the purpose of @emailvalidator?

963