evergreean43
Technical User
I keep getting error message on my Tomcat 5.5 container Struts page saying:
My form page:
Here is my web.xml
My struts-config.xml
In the application folder (Tomcat 5.5\webapps\myproject\WEB-INF)
I have the following tld files -
struts-html.tld
struts-logic.tld
struts-bean.tld
I have the struts jar in the \WEB-INF\lib folder.
Please advise.
Code:
org.apache.jasper.JasperException: Cannot find ActionMappings or ActionFormBeans collection
My form page:
Code:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<head><title>Submit example</title></head>
<h1>Login Page</h1>
<html:form action="/login">
<html:errors property="Username"/><BR>
Username: <html:text property="username"/><BR>
<html:errors property="Password"/><BR>
Password: <html:password property="password"/><BR>
<html:submit /><BR>
</html:form>
Here is my web.xml
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"[URL unfurl="true"]http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">[/URL]
<web-app>
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>resources.application</param-value>
</init-param>
<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>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</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-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>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</web-app>
My struts-config.xml
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"[URL unfurl="true"]http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">[/URL]
<struts-config>
<form-beans>
<form-bean name=“loginUserForm” type=“LoginUserForm”/>
</form-beans>
<action-mappings>
<action path=“/login” name=“loginUserForm” scope=“request” validate=“false”
type=“LoginUserAction”
input=“/loginPage.jsp”>
<forward name=“success” path=“/mainMenu.jsp”/>
</action>
</action-mappings>
</struts-config>
In the application folder (Tomcat 5.5\webapps\myproject\WEB-INF)
I have the following tld files -
struts-html.tld
struts-logic.tld
struts-bean.tld
I have the struts jar in the \WEB-INF\lib folder.
Please advise.