ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Struts
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
How display data base errors on web console by using the 
Struts Framework?
 Question Submitted By :: Ganesh_hyd
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How display data base errors on web console by using the Struts Framework?
Answer
# 1
hi,
define a base class which handles all error related
operations. get Error code from E.getErrorCode() in Catch
block and then throw that error to action class.
Example.
Error code 00001: is defined for Unique constraint
voilation. for this 
catch{
  if(errorCode == 00001){
    throw new UniqueKeyException();
  } 
}
// this unique exception is userdefined exception in my
framework.

and catch this exception in your action class. and be
remember in your struts-config file action tag define
input="/ErrorPage.do" property. then only it redirects to
that page in what u defined in input tag action path.

if any thing regarding this one feel free to mail me.
Thanks a lot
 
Is This Answer Correct ?    0 Yes 0 No
M Gangadhar
 

 
 
 
Other Struts Interview Questions
 
  Question Asked @ Answers
 
multiple instances for action class is it possible iFlex7
What is the use of ActionErrors in Struts? HCL1
wahts the diif between Mvc1 and Mvc2? Wipro3
What is Model 1 and Model 2?  3
collection framework hirarchy?  2
What is MVC Architecture? HCL10
project architechture in java IBM2
Difference between JSF Framework and Struts Framework. Accenture8
If we close the browser,when the specific user session is active.Again if we open browse how to retrive it same user??what code i have to da??? TCS3
Is Struts Action class Thread Safe? Wipro6
how can i fetch combo box value into my DAO using struts 2?  2
what is mean by custom tag? Wipro4
what is the purpose of load_on_startup entry in struts- config.xml? Satyam6
what are componeents presents in Strutsconfig.xml? HCL2
how you implement and maintain your struts project by using MVC2 arch? Wipro2
its a ActionForm controller or model? Wipro13
How data transfered from one formbean to another formbean?  4
Hai all.What is the use of <logic:iterate>tag in struts application. TCS1
Is struts thread safe? HCL3
how the error can be showed in the jsp page in struts? Wipro2
 
For more Struts Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com