struts <bean:write>
Hi,
I got a problem with displaying infor from database in struts.
the jsp page code:
<%@taglib uri = "/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@taglib uri = "/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><bean:message key = "welcomeForm.title"/></title>
</head>
<body>
<bean:write name="userFormBean" property = "firstName"/>
<bean:write name="userFormBean" property = "lastName"/>,
<bean:message key = "welcomeForm.subtitle1"/>
</body>
</html>
struts-config.xml setting form-bean:
<form-beans>
<form-bean name="userCredentials" type="com.SurveyMaker.userManagement.UserCredentials" />
<form-bean name="userFormBean" type="com.SurveyMaker.userManagement.UserFormBean"/>
</form-beans>
Error message:
org.apache.jasper.JasperException: Exception in JSP: /pages/welcome.jsp:9
6: <title><bean:message key = "welcomeForm.title"/></title>
7: </head>
8: <body>
9: <bean:write name="userFormBean" property = "firstName"/>
10: <bean:write name="userFormBean" property = "lastName"/>,
11: <bean:message key = "welcomeForm.subtitle1"/>
12: </body>
javax.servlet.ServletException: Cannot find bean userFormBean in any scope
See the bean name in my jsp page and xml are matched, why do i still get this error?
Rgs
Ming

