Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


How display data base errors on web console by using the
Struts Framework?

Answers were Sorted based on User's Feedback



How display data base errors on web console by using the Struts Framework?..

Answer / ranjith nambiar

In hibernate configuration file, hibernate.cfg.xml, with in <session-factory> put <property name="show_sql">true</property>.

Is This Answer Correct ?    1 Yes 2 No

How display data base errors on web console by using the Struts Framework?..

Answer / m gangadhar

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 2 No

Post New Answer

More Struts Interview Questions

What types of Actions we have in Struts?

3 Answers   TCS,


How to upload struts file?

0 Answers  


Can explain about the validations and in your project where did u used the validations?

4 Answers   NIIT,


Explain the components of struts?

0 Answers  


What is strut web xml?

0 Answers  






What is the differnce between 2-tier architecture and 3- tier architecture in java?

3 Answers  


How do struts work?

0 Answers  


What configuration changes are required to use resource files in Struts?

0 Answers  


How client side validation is enabled on a jsp form?

0 Answers  


How can link tag’s action attribute be used?

0 Answers  


shall we use any name for deployment descriptor of struts instead of struts-config.xml

3 Answers   Polaris,


What are Struts properties?

2 Answers   VI eTrans,






Categories