facebook

Problem in running Silple STRUTS App

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #239937 Reply

    Harsh
    Member

    The error what i am getting is that :-

    Cannot find ActionMappings or ActionFormBeans collection

    The Full Error is :-
    **************************************************************************
    type Exception report

    message

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

    exception

    javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
    org.apache.jsp.register_jsp._jspService(org.apache.jsp.register_jsp:79)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    root cause

    javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
    org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:741)
    org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)
    org.apache.jsp.register_jsp._jspx_meth_html_form_0(org.apache.jsp.register_jsp:95)
    org.apache.jsp.register_jsp._jspService(org.apache.jsp.register_jsp:69)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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

    *****************************************************************************

    the Directory Structers is that:-

    register
    |
    |register.jsp
    |success.jsp
    |failure.jsp
    |
    |+WEB-INF
    |+ calsses
    | |+app
    | |RegisterAction.class
    | |RegisterForm.class
    |+lib
    | |struts.jar
    |
    |
    |struts-html.tld
    |web.xml
    |struts-config.xml

    ********************************

    Now the File web.xml :-

    ***********************************************
    <?xml version=”1.0″ encoding=”ISO-8859-1″?>

    <!DOCTYPE web-app
    PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN”
    http://java.sun.com/j2ee/dtds/web-app_2_2.dtd”&gt;

    <web-app>

    <!– Action Servlet Configuration –>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    </servlet>
    <!– Action Servlet Mapping –>

    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>

    <!– Struts Tag Library Descriptors –>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>

    </web-app>

    ***********************************************

    Now struts-config.xml :-
    *******************************************
    <?xml version=”1.0″ encoding=”ISO-8859-1″ ?>

    <!DOCTYPE struts-config PUBLIC
    “-//Apache Software Foundation//DTD Struts Configuration 1.0//EN”
    http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd”&gt;

    <struts-config>

    <form-beans>
    <form-bean name=”registerForm” type=”app.RegisterForm”/>
    </form-beans>

    <action-mappings>
    <action path=”/register”
    type=”app.RegisterAction”
    name=”registerForm”>
    <forward name=”success” path=”/success.jsp”/>
    <forward name=”failure” path=”/failure.jsp”/>
    </action>
    </action-mappings>
    </struts-config>

    ******************************************

    PL help Me i can’t able to understand that why i am getting thi problem cab u help me

    i am not using any tool like eclips etc.
    PL gelp me solve thst problem

    #239985 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev.

    Try and use one of the example web apps as a shell to start working frmo, to rule out any setup issues if you are not using any tools like you mention below.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Problem in running Silple STRUTS App

You must be logged in to post in the forum log in