Good evening :)

I've just started with struts (not new to j2ee), and have done a couple
of tutorials on Struts and all works well. Then I made my own small
application, but that didn't work. Saw a similar post, but the
recommendations there didn't work in my case.

Well, to get to the point, I'm running Orion 1.5.2 using Java 1.4.1 on
Mandrake Linux 9.0 (Kernel 2.4.19-13mdk). I've got a form.LogonForm
extending ActionForm, a action.LogonAction extending Action and a
logon.jsp. The classes compiles fine but when I request logon.jsp in my
browser I get:

--------Exception----------

javax.servlet.jsp.JspException: Exception creating bean of class
form.LogonForm: java.lang.ClassNotFoundException: form.LogonForm
        at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:568)
        at /logon.jsp._jspService(/logon.jsp.java:135) (JSP page line 13)
        at com.orionserver[Orion/1.5.2 (build
10460)].http.OrionHttpJspPage.service(Unknown Source)
        at com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source)
        at com.evermind[Orion/1.5.2 (build
10460)].server.http.JSPServlet.service(Unknown Source)
        at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source)
        at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source)
        at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source)
        at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source)
        at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source)

--------Exception-----------


The web-app structure is:

homepage/
        - META-INF/
                - application.xml (orion)
                - 
        - WEB-INF/
                - classes/
                        - form/
                                - LogonForm.class
                        - action/
                                - LogonAction.class
                - lib/
                        - struts.jar
                logon.jsp
                struts-*.tld
                struts-config.xml
                web.xml


My struts-config.xml (important part):

<struts-config>

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

        <action-mappings>
                <action path="/logon" type="action.LogonAction" name="logonForm"
scope="session" input="logon.jsp">
                        <forward name="success" path="/index.jsp"/>
                        <forward name="failure" path="/error.jsp"/>
                </action>
        </action-mappings>

</struts-config>


And my logon.jsp:

        <html:form action="logon.do">
                Username:       <html:text property="userName"/><br/>
                Password:       <html:password property="password"/><br/>
                <html:submit/>  <html:reset/>
        </html:form>


And the thing is, when I try to just instantiate an object of type
form.LogonForm on a jsp page in the web-app, I don't get any
ClassNotFoundExceptions?! So it seems to me that the servlet container
finds the class, but the inner workings (yeah, I know, I don't know alot
about struts yet ;) doesn't find them.

Anyone know a way to fix this?

Geir Morten Hagen


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to