M
Mike
I'm trying to get a basic struts example to work so I can get to more
advanced coding.
The example is similar to that at beginning of the Wrox book
"Professional Jakarta Struts"
I get the error "Attribute name invalid for tag form according to TLD"
when I run the view page below.
Obviously the attribute "name" is in struts-html.tld
Anyone spot what I'm doing wrong?
Below is my view page and struts config file:
..................... view page ......................
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html>
<head>
<title>Wrox Struts Application</title>
<body>
<html:form action="Lookup" name="lookupForm" type="ch03.LookupForm" >
Symbol: <html:text property="symbol" /><br><br>
<html:submit /><br><br>
</html:form>
</body></html>
................ struts config ............
<?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="ch03.LookupForm" />
</form-beans>
<action-mappings>
<action path="/Lookup" type="ch03.LookupAction"
name="lookupForm">
<forward name="success" path="/quote.jsp"/>
<forward name="failure" path="/index.jsp">
</action>
</action-mappings>
</struts-config>
advanced coding.
The example is similar to that at beginning of the Wrox book
"Professional Jakarta Struts"
I get the error "Attribute name invalid for tag form according to TLD"
when I run the view page below.
Obviously the attribute "name" is in struts-html.tld
Anyone spot what I'm doing wrong?
Below is my view page and struts config file:
..................... view page ......................
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html>
<head>
<title>Wrox Struts Application</title>
<body>
<html:form action="Lookup" name="lookupForm" type="ch03.LookupForm" >
Symbol: <html:text property="symbol" /><br><br>
<html:submit /><br><br>
</html:form>
</body></html>
................ struts config ............
<?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="ch03.LookupForm" />
</form-beans>
<action-mappings>
<action path="/Lookup" type="ch03.LookupAction"
name="lookupForm">
<forward name="success" path="/quote.jsp"/>
<forward name="failure" path="/index.jsp">
</action>
</action-mappings>
</struts-config>