3:13 pm - Monday December 16, 9535

Cannot find ActionMappings or ActionFormBeans collection in struts

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Exception in JSP: /first.jsp:6
3:
4:
5: <html:html>
6:      <html:form action="/myActionForm" method="get">
7:             enetr ur name:
8:             <html:text property="name" size="30" />
9:             <html:submit>next</html:submit>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:489)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

root cause

javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.first_jsp._jspService(first_jsp.java:79)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

root cause

javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:711)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:419)
org.apache.jsp.first_jsp._jspx_meth_html_005fform_005f0(first_jsp.java:127)
org.apache.jsp.first_jsp._jspx_meth_html_005fhtml_005f0(first_jsp.java:100)
org.apache.jsp.first_jsp._jspService(first_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.33 logs.


Apache Tomcat/5.5.33

Error:

<servlet>
	<servlet-name>action</servlet-name>
	<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
	<init-param>
		<param-name>config</param-name>
		<param-value>WEB-INF/struts-config.xml</param-value>
	</init-param>
	<init-param>
		<param-name>debug</param-name>
		<param-value>2</param-value>
	</init-param>
	<init-param>
		<param-name>detail</param-name>
		<param-value>2</param-value>
	</init-param>
	<load-on-startup>2</load-on-startup>
</servlet>

Correction:

<servlet>
	<servlet-name>action</servlet-name>
	<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
	<init-param>
		<param-name>config</param-name>
		<param-value>/WEB-INF/struts-config.xml </param-value>
	</init-param>
	<init-param>
		<param-name>debug</param-name>
		<param-value>2</param-value>
	</init-param>
	<init-param>
		<param-name>detail</param-name>
		<param-value>2</param-value>
	</init-param>
	<load-on-startup>2</load-on-startup>
</servlet>

Description:

This error occure when there is a error in loading struts-config.xml in application check init param tag in action servlet you may miss slash or may give incorrect path name.

Filed in: Z-AStruts Codes

Comments are closed.