Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ERROR :: cannot find ActionMappings or ActionFormBeans

 
kranti kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got the following error when I am trying to run my struts application.


ERROR::

/***************************
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.registration_jsp._jspService(registration_jsp.java:100)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:798)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
org.apache.jsp.registration_jsp._jspx_meth_html_005fform_005f0(registration_jsp.java:117)
org.apache.jsp.registration_jsp._jspService(registration_jsp.java:90)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


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

***************************/


My web.xml contains ::

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<display-name>REprj</display-name>
<welcome-file-list>
<welcome-file>registration.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>

</web-app>



My struts-config.xml contains ::


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">


<struts-config>
<form-beans>
<form-bean name="regform" type="net.com.struts.form.RegistrationForm" />
</form-beans>
<global-exceptions>
</global-exceptions>
<global-forwards>
</global-forwards>
<action-mappings>
<action path="register"
name="regform"
validate="true"
input="/registration.jsp"
type="net.com.struts.action.RegistrationAction">
<forward name="success" path="/pass.jsp" />
<forward name="failure" path="/fail.jsp" />
</action>
</action-mappings>
<message-resources parameter="MessageResources" />
</struts-config>



My registration.jsp page contains::


<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<HTML>
<HEAD>
</HEAD>
<BODY>
<html:form action="register">
<bean:message key="label.firstname"/>
<html:text property="firstName"></html:text>
<html:errors property="firstName" />
<br>
<bean:message key="label.lastname"/>
<html:text property="lastName"></html:text>
<html:errors property="lastName" />
<br>
<bean:message key="label.username"/>
<html:text property="userName"></html:text>
<html:errors property="userName" />
<br>
<bean:message key="label.password" />
<html assword property="password"></html assword>
<html:errors property="password" />
<br>
<bean:message key="label.repassword"/>
<html:text property="repassword"></html:text>
<html:errors property="repassword" />
<br>
<html:submit />
<html:reset />
</html:form>
</BODY>
</HTML>



Anyone can solve this problem.

Thank you.






Regards
kranthi
 
kranti kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,


please solve my problem. I am unable to findout what was wrong with my code.

Any help is appreciate.



Thanking you.


.....
kranthi
 
kranti kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Myself found the soution for this one.


Thanking you.







.....
kranthi
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kranti kumar:

Myself found the soution for this one.


OK, Good, Just quote the code with [CODE] tags ! You can find them below, with UBB tags, that help us to read code clearly !

And use only one thread per question.
 
thirumal raps
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi kranthi/everyone,

i got the same error which you got kranthi..

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection

how did you solved your problem. where should i check...

thanks
 
Srinivasa Manohar Andhavarapu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thirumal raps wrote:hi kranthi/everyone,

i got the same error which you got kranthi..

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection

how did you solved your problem. where should i check...

thanks


Hi All,

I got the same error in Struts1.2.9. Did anybody find the solution for this problem.

Thanks
- Manohar
 
Samba Mitra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am facing a similar problem in my struts project. Please let me know what solution did you get for this problem.

Thanks in advance..
Sam
 
pavan kumarsam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[quote=pavan
]Hi all,

I am facing a similar problem in my struts project. Please let me know what solution did you get for this problem.
please send the solutions
 
pavan kumarsam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException:



cannot find action mappings and formbeans

please send me the reply for this....
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pavan kumarsam wrote:org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException:
cannot find action mappings and formbeans
please send me the reply for this....

Pavan, please start a new topic for your problem by clicking . Also specify your problem more clearly i.e. when are you getting the error, where have you put the struts configuration files, also which version of struts you are using (it should be struts 1 but still its better if you mention it)...
 
pavan kumarsam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi this is pavan i want to downloading files using java script(or)php....if any one know please help me its urgent ...
in my site there are 50 pdf are there i want to put download option...user can able to download those files.............ok bye,..........
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pavan as I told you before, start a new topic for your problem by clicking . Also this won't be an appropriate forum for your topic. If you want a javascript solution, ask the question in the HTML-JavaScript forum...
 
Venkat Chadaram
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for replying to a post which have been started years ago. I got the same problem with which this thread started but I found out why. I am demonstrating a sample login application to a class and I got this issue
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:741)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)
at jsp_servlet._pages.__login._jsp__tag0(__login.java:130)
at jsp_servlet._pages.__login._jspService(__login.java:106)
....
I have googled a lot but couldnt find an explaination why this error occured. In my application I have two action classes - One action class just pulls some data from the database and forwards it to a display jsp page. Whenver I hit this .do url directly first I dont have any problem. Another Action class is LoginAction to which the input is a login jsp page. Whenever I access this page first after deploying the application I get this above error.

Solution:
Whenver this page is accessed first - by that time if the ActionServlet is not loaded - the configuration is not loaded and thats the reason why we get this error. To enforce loading of this servlet use <load-on-startup>1</load-on-startup> in web.xml - that will load the servlet during the deployment itself and it will find the required mappings when we access the jsp page.

I am sorry if this solution is already published anywhere on net - just that I couldnt find it on google.
 
Venkat Chadaram
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Venkat Chadaram wrote:Sorry for replying to a post which have been started years ago. I got the same problem with which this thread started but I found out why. I am demonstrating a sample login application to a class and I got this issue
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:741)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)
at jsp_servlet._pages.__login._jsp__tag0(__login.java:130)
at jsp_servlet._pages.__login._jspService(__login.java:106)
....
I have googled a lot but couldnt find an explaination why this error occured. In my application I have two action classes - One action class just pulls some data from the database and forwards it to a display jsp page. Whenver I hit this .do url directly first I dont have any problem. Another Action class is LoginAction to which the input is a login jsp page. Whenever I access this page first after deploying the application I get this above error.

Solution:
Whenver this page is accessed first - by that time if the ActionServlet is not loaded - the configuration is not loaded and thats the reason why we get this error. To enforce loading of this servlet use <load-on-startup>1</load-on-startup> in web.xml - that will load the servlet before and it will find the required mappings when we access the jsp page.

I am sorry if this solution is already published anywhere on net - just that I couldnt find it on google.
 
Dval Patel
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was got same error & I solved it by adding proper jar file to my project.

You need to check jars required for struts.

commons-digester.jar
commons-beanutils.jar
struts.jar

this should be in your lib directory.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic