I have created a simple
Struts Application. When I run it I get following exception
org.apache.jasper.JasperException: Cannot find bean lookupForm in any scope
My index.jsp
<%@ page language="java"%>
<%@ taglib uri = "/WEB-INF/struts-html.tld" prefix="html"%>
<html>
<head>
<title>Wrox struts Application</title>
</head>
<body>tertwr
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td height="68" width="48%">
<div align="left">
<img src="images/new.gif">
</div>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<html:form action="Lookup" name="LookupForm" type="selectica.LookupForm">
<table width="45%" border="0">
<tr>
<td>Symbol;</td>
<td><html:text property="symbol" /></td>
</tr>
<tr>
<td colspan="2" align="center"><html:submit /></td>
</tr>
</table>
</html:form>
</body>
</html>
My struts-config.xml
<?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="LookupForm" type="selectica.LookupForm"/>
</form-beans>
<action-mappings>
<action path="/Lookup" type="selectica.LookupAction" name="LookupForm">
<forward name="success" path="/quote.jsp"/>
<forward name="failure" path="/index.jsp"/>
</action>
</action-mappings>
</struts-config>
My LookupForm.java
package selectica;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
public class LookupForm extends ActionForm
{
private
String symbol=null;
public String getSymbol()
{
return(symbol);
}
public void setSymbol(String symbol)
{
this.symbol=symbol;
}
public void reset(ActionMapping mapping, HttpServletRequest request)
{
this.symbol=null;
}
}
Kindly let me know what could be the possible problem.