This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes Cannot find ActionMapping or ActionFormBean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Cannot find ActionMapping or ActionFormBean" Watch "Cannot find ActionMapping or ActionFormBean" New topic
Author

Cannot find ActionMapping or ActionFormBean

Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16

I am trying to build a demo struts application that simply takes in an username & password value from a JSP.

However, I am stuck with a stupid/silly problem, with no probable root cause in sight. I am posting every details about this application. Please help.


My action controller is :

package com;

public class LoginAction extends Action
{
private static Properties props = new Properties();

public ActionForward execute(ActionMapping pMapping, ActionForm pForm,
HttpServletRequest pRequest, HttpServletResponse pResponse) throws Exception
{
props.load(new FileInputStream("java.properties"));
LoginPageElements logger = (LoginPageElements) pForm;

String userNameToken = props.getProperty("userName");
String passwordToken = props.getProperty("password");

String userName = pRequest.getParameter(userNameToken);
String password = pRequest.getParameter(passwordToken);

System.out.println("username = "+userName+" password = "+password);

//No real business logic in here. Just dummy stuff.

return pMapping.findForward("NoGo");
}
}


The struts-config.xml is as follows :


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>

<form-beans>
<form-bean name="intro" type="com.LoginAction"/>
</form-beans>
<action-mappings>
<action path="/Login"
type="com.LoginAction"
name="intro"
scope="request"
validate="false"
input="jsp/Login.jsp">
<forward name="GoAhead" path="/html/Success.htm">
</forward>
<forward name="NoGo" path="/html/Failure.htm">
</forward>
</action>
</action-mappings>

</struts-config>


The web.xml :


<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Demo</display-name>
<description>Demo</description>

<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>
<load-on-startup>0</load-on-startup>
</servlet>

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

<session-config>
<session-timeout>30</session-timeout>
</session-config>

<welcome-file-list>
<welcome-file>jsp/Login.jsp</welcome-file>
</welcome-file-list>


<taglib>
<taglib-uri>/WEB-INF/taglib/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/taglib/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/taglib/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/taglib/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/taglib/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/taglib/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/taglib/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/taglib/struts-nested.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/taglib/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/taglib/struts-template.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/taglib/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/taglib/struts-tiles.tld</taglib-location>
</taglib>

</web-app>


All tld files are in location. No problem with that.

The JSP file is:



<%@ page language="java" import="java.sql.*" %>
<%@ taglib uri="/WEB-INF/taglib/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/taglib/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/taglib/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/taglib/struts-nested.tld" prefix="nested"%>
<%@ taglib uri="/WEB-INF/taglib/struts-template.tld" prefix="template"%>
<%@ taglib uri="/WEB-INF/taglib/struts-tiles.tld" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html:html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Login</title>
<style type="text/css">

body
{
background-color: #FFFFFF;
background-image: url('Login.jpg');
background-repeat: repeat-y;
}
.style2 {
font-family: AnkeHand;
font-weight: bold;
color: #0080FF;
}
.style3 {
color: #0080FF;
font-weight: bold;
}

</style></head>

<body>
<html:errors/>
<html:form action="/Login.do">
<p>
span class="style2">User Name:</span><span class="style3">:</span>  
<bean:message key="label.userID" />
<html:text property="UserName"></html:text>
</p>
<p> span class="style2">Password:</span><span class="style2">
<bean:message key="label.password" />
<html:text property="Password"></html:text>
</span></p>

<p>

<html:submit value="Go"></html:submit>
<html:reset value="Undo"></html:reset>
</p>
</form>
</html:form>
</body>

</html:html>


I am deploying this application on Apache Tomcat 7.0.0 with JVM version 1.6.0_20-b02.

The list of lib files included with the WAR file is :
+++++++++++++
beanutils.jar
commons-collections.jar
commons-digester.jar
commons-fileupload.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
servlet.jar
struts.jar
classes12.jar
+++++++++++++

When hitting the welcome page of this app, I get the following error:

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

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: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:498)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:409)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:898)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:827)
org.apache.jsp.jsp.Login_jsp._jspService(Login_jsp.java:101)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:73)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:378)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
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.jsp.Login_jsp._jspx_meth_html_005fform_005f0(Login_jsp.java:195)
org.apache.jsp.jsp.Login_jsp._jspx_meth_html_005fhtml_005f0(Login_jsp.java:150)
org.apache.jsp.jsp.Login_jsp._jspService(Login_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:73)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:378)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

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

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

The Tomcat console has the following message :


Jul 28, 2011 3:08:43 PM org.apache.struts.util.PropertyMessageResources <init>INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
Jul 28, 2011 3:08:43 PM org.apache.struts.util.PropertyMessageResources <init>INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Jul 28, 2011 3:08:43 PM org.apache.struts.util.PropertyMessageResources <init>INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
Jul 28, 2011 3:08:44 PM org.apache.struts.util.PropertyMessageResources <init>INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true



[Thumbnail for ErrorConsoleStack.jpg]

Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

in your struts-config verify the form bean specified

You are providing the action class instead of the form bean, try more


Have Fun with Java
little,little.. little by little makes a lot..
Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16

Implemented this, but no improvement !

My form-beans tag now points to :

<form-bean name="intro" type="com.LoginPageElements"/>



Same error, same issue.





Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 365
Hi,

In Your Web.xml




Action servlet should be loaded on start up of server. change it as 1 and your code should work.


Thanks,
Shailesh
Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16

Shailesh Narkhede wrote:Hi,

In Your Web.xml




Action servlet should be loaded on start up of server. change it as 1 and your code should work.





@Shailesh : Tried that too. No good ! Same issue continues...
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 365
Please check your console on server start up, if any exception is coming please post that.
Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16

Yes, there is an exception while starting up the server. I'm posting the screen caps here:




[Thumbnail for Error.jpg]

Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16

How to resolve this? Please help ! I'm stuck.
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Looks like there is some problem in the config files (.xml) which is not getting parsed properly. Provide the log content which would be more clear instead of screen shot which is incomplete.
Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16


Here goes the complete console logs, in text format :


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Aug 2, 2011 1:06:26 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_20\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;j:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;j:\server setup\jdk 6.20;j:\psg\player\bin;j:\server setup\apache-tomcat-7.0.0\bin;I:\Apps\Matlab\bin\win32;I:\Apps\Flash Magic;C:\Documents and Settings\Agniva\Start Menu\Programs\Accessories\Communications\HyperTerminal;J:\Server Setup\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145;;I:\Apps\FLASHM~1
Aug 2, 2011 1:06:29 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3575 ms
Aug 2, 2011 1:06:29 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 2, 2011 1:06:29 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.0
Aug 2, 2011 1:06:30 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive Blogger.war
Aug 2, 2011 1:06:32 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(J:\Server Setup\apache-tomcat-7.0.0\webapps\Blogger\WEB-INF\lib\servlet2_3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Aug 2, 2011 1:06:33 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-bean is already defined
Aug 2, 2011 1:06:33 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-logic is already defined
Aug 2, 2011 1:06:33 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-nested is already defined
Aug 2, 2011 1:06:33 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-tiles is already defined
Aug 2, 2011 1:06:33 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-html is already defined
Aug 2, 2011 1:06:33 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-template is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-bean is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-html is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-logic is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-nested is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-template is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-tiles is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-bean is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-html is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-logic is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-nested is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-template is already defined
Aug 2, 2011 1:06:34 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/struts/tags-tiles is already defined
Aug 2, 2011 1:06:35 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Aug 2, 2011 1:06:35 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Aug 2, 2011 1:06:35 PM org.apache.struts.action.ActionServlet handleConfigException
SEVERE: Parsing error processing resource path
java.net.UnknownHostException: jakarta.apache.org
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1282)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1194)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1090)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1003)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1006)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
at javax.servlet.GenericServlet.init(GenericServlet.java:214)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1164)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1118)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1005)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4529)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4800)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:558)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:987)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:540)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:355)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:312)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:292)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:998)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Aug 2, 2011 1:06:35 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Aug 2, 2011 1:06:35 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Aug 2, 2011 1:06:37 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory FlashTest
Aug 2, 2011 1:06:37 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
Aug 2, 2011 1:06:37 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Aug 2, 2011 1:06:37 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Aug 2, 2011 1:06:37 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8888
Aug 2, 2011 1:06:38 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8888
Aug 2, 2011 1:06:38 PM org.apache.coyote.ajp.AjpProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Aug 2, 2011 1:06:38 PM org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Aug 2, 2011 1:06:38 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8486 ms
Aug 2, 2011 1:06:56 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
Aug 2, 2011 1:06:56 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Aug 2, 2011 1:06:56 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
Aug 2, 2011 1:06:56 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 365
Hi,

Remove servlet2_3.jar from your WEB-INF\lib folder due to that following exception log file.

INFO: validateJarFile(J:\Server Setup\apache-tomcat-7.0.0\webapps\Blogger\WEB-INF\lib\servlet2_3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class


Now I was tried all given code on my machine with small changes, that is in form beans in struts-config.xml. I was creates LoginForm.java below,


and put respective tlds in WEB-INF\taglib\ folder,
JSP as below,




after those changes I am to see Login.jsp & also not getting exception on server start up.
Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16

Copy pasted the entire thing into my system, and removed the jar file too. Still didn't work !!!
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 365
Now what exception you are getting on console. post your whole stacktrace......
Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16

I'm getting the following error when I hit the frontend(Login.jsp):

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Aug 4, 2011 2:56:26 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:798)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
at org.apache.jsp.jsp.Login_jsp._jspx_meth_html_005fform_005f0(Login_jsp.java:189)
at org.apache.jsp.jsp.Login_jsp._jspx_meth_html_005fhtml_005f0(Login_jsp.java:144)
at org.apache.jsp.jsp.Login_jsp._jspService(Login_jsp.java:90)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:378)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:556)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:402)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:249)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:267)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:245)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:260)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



One more thing that came to my notice is that I'm using struts.jar version - 1.2, but my struts-taglib.jar is of version 2.0.
Could this be a root cause?




Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16

Could you please post the list of jar files that you used to make this app run in your system ?
Agniva Sengupta
Greenhorn

Joined: Jul 26, 2011
Posts: 16

I re-coded the entire application !


It's up and kicking, big time.
saleem basha
Greenhorn

Joined: May 03, 2011
Posts: 5

Modify this <html:form action="/Login.do"> As <html:form action="Login"> that means remove '/' symbol from form tag...............try it


sk.saleem
Hyderabad
India
ganesh Ithape
Greenhorn

Joined: Mar 15, 2012
Posts: 1
include following tag in web.xml ---->
<servlet>
.
.
.
.
.

<load-on-startup>1</load-on-startup>
</servlet>
swallow jxy
Greenhorn

Joined: Jul 06, 2012
Posts: 1
HI all,
i got the same error........
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot find ActionMapping or ActionFormBean
 
Similar Threads
java.lang.NullPointerException in a simple servlet
Cannot find ActionMappings or ActionFormBeans
org.apache.jasper.JasperException: Module 'null' not found.
struts page display error
error while creating struts application