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 kind of mvc is struts 2?

0 Answers  


What do you know about validation plugin ?

0 Answers  


What’s the difference between struts and turbine?

0 Answers  


What is the purpose of @urlvalidator annotation?

0 Answers  


explain the Struts flow?

4 Answers   Wipro,






Even though Servlets and JSP are web based concepts .wht is the use of using Struts using then

8 Answers   TCS,


Hi Friends, am new to struts.I read that " you can store variables in xml file(properties file) and for future enhancements we just call properties file . Now i want to implement this , where can i call properties file to enhance my application. My question is where this properties file will be called.

1 Answers  


Why are struts tightly coupled?

0 Answers  


How many struts config file in a struts application?

0 Answers  


How is token generated?

0 Answers  


What does apache struts do?

0 Answers  


What is http redirect?

0 Answers  


Categories