/hibernate.cfg.xml not found
Problem: Many a times we get a problem in hibernate saying /hibernate.cfg.xml not found
Solution: As per Java Persistence with Hibernate book, you should keep the hibernate configuration file directly in the source directory of your project outside any package. In Rational Application Developer, I have solved this problem by placing it directly src folder.
Struts showing blank page
Problem: When you submit a JSP page in struts sometimes you get a blank page.
Solution: One of the solution I found is to check whether the action class class execute method is properly overridden or not. If it is not properly overridden, some other execute method of base Action class’ will be called.
There are two execute method in org.apache.struts.action.Action class
1)
ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
2)
ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
For HTTP request struts calls the first execute method. If the signature of your execute method inadvertently says ServletRequest and ServletResponse as parameters then you will get a blank page because parent’s execute method with HttpServletRequest and HttpServletResponse is called and it returns null.