Wednesday, February 15, 2006

Common Struts Errors and Causes

Errors and exceptions are commonly encountered during web application development using Struts. Along with the exception or error messages themselves, potential causes of these errors are often listed along with links to additional resources.

Look at some of the common errors we get using struts....

Cannot retrieve mapping for action
Exception javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login
Probable Cause No action defined in struts-config.xml to match that specified in the JSP's

Cannot retrieve definition for form bean null
Exception org.apache.jasper.JasperException: Cannot retrieve definition for form bean null
Probable Cause This exception typically occurs because Struts cannot find the form bean it expects for a specific action according to the mapping in the struts-config.xml file. Most often, this is probably because the name given to the form in the name attribute of the form-bean element does not match the name attribute of the associated action's action element. In other words, the action and form should each have a name attribute that matches exactly, including case. It has been reported that this error has been seen when no name attribute is associated with the action. If there is no name attribute in an action element, no form is associated with the action. Others have reported this error as merely a symptom of something completely unrelated (all too common), but the mismatch of name attributes in the form-bean and action elements in the struts-config.xml file is the usual culprit.

for more Struts errors visit this link

Categories: , , , , , , , Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Comments on "Common Struts Errors and Causes"