I am pretty sure that the TestForm class is correctly compiled in the
correct directory

to be sure i have listed the contents of the form.war i have deployed in
WL6.0

filesystem.attributes
form.jsp
test.jsp
META-INF\MANIFEST.MF
WEB-INF\struts-config.xml
WEB-INF\struts-html.tld
WEB-INF\web.xml
WEB-INF\classes\form\filesystem.attributes
WEB-INF\classes\form\TestAction.class
WEB-INF\classes\form\TestAction.java
WEB-INF\classes\form\TestForm.class
WEB-INF\classes\form\TestForm.java
WEB-INF\lib\struts.jar


There is also an instance created of the TestForm bean. I know that because
of the System.out.println line in the constructor, which displayes
construction info in the weblogic server window.

Rene
-----Original Message-----
From: du Clos, John [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 15:36
To: '[EMAIL PROTECTED]'
Subject: RE: problem with using forms


I received this error message when i didn't have my form bean class compiled
and created in the package as specified in the "type" attribute of the
<form-bean> tag definition of the struts-config.xml file....  I noticed your
definition is as follows:

        <form-beans>
                <form-bean name="TestForm" type="form.TestForm"/>
        </form-beans>

Is "form" your package name for your "TestForm" bean form?   Based on this
definition, it looks like form is the package name for TestForm.

Not sure if this is your problem, but make sure your form bean is created
for the corresponding jsp with the correct package name AND make sure you
place your package (including classes) in your WEB-INF\classes directory.   

JD

-----Original Message-----
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 9:22 AM
To: [EMAIL PROTECTED]
Subject: RE: problem with using forms


Hi Rene,

A quick glance and I can't see anything wrong in your conf files. Have you
got the examples app to work? I ask because I suspect you have a classpath
issue. What web server are you using?

Jon.

-----Original Message-----
From: René Boere [mailto:[EMAIL PROTECTED]] 
Sent: 30 May 2001 10:59
To: '[EMAIL PROTECTED]'
Subject: problem with using forms

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>
***

Reply via email to