Hi,
i am trying to create a jsp page with a form on it using the Struts
framwork.
The problem is that i get an exception when i try to load the jsp page. The
error is the following:
<May 30, 2001 11:53:31 AM GMT+02:00> <Error> <HTTP>
<[WebAppServletContext(66629
69,form)] Root cause of ServletException
javax.servlet.jsp.JspException: Cannot find bean
org.apache.struts.taglib.html.B
EAN in scope null
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:486)
at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.ja
va:188)
at jsp_servlet._form._jspService(_form.java:127)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:213)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:246)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:1265)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:1622)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
I have also included the used files in this message.
I have no idea what causes this error and i hope anyone can help me with
this problem.
Greetings,
Rene Boere
web.xml
***
<web-app>
<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>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>form.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
</web-app>
***
struts-config.xml
****
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
<form-beans>
<form-bean name="TestForm" type="form.TestForm"/>
</form-beans>
<action-mappings>
<action path="/test" type="form.TestAction"
name="TestForm">
<forward name="test" path="/test.jsp" />
</action>
</action-mappings>
</struts-config>
***
form.jsp
***
<%@page language="java" contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:form action="test.do"/>
test: <html:text property="test"/><br>
<html:submit value="OK"/>
</form>
***