Yeah, I've got the example apps running. Didn't have a default constructor, but it didn't help after I added one.
The code for my LogonForm is: ------------------------------- package form; import org.apache.struts.action.*; import javax.servlet.http.*; import java.util.Date; public class LogonForm extends ActionForm { private String userName; private String password; public LogonForm() { } public String getPassword() { return password; } public String getUserName() { return userName; } public void setPassword(String password) { this.password = password; } public void setUserName(String userName) { this.userName = userName; } } ----------------------------- And my LogonAction: ----------------------------- package action; import org.apache.struts.action.*; import javax.servlet.http.*; import java.sql.SQLException; import form.*; import beans.*; public class LogonAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { LogonForm tmpForm = (LogonForm)form; String username = tmpForm.getUserName(); String password = tmpForm.getPassword(); if(username == null || password == null) return mapping.findForward("failure"); User user = new User(); try { user.authenticate(username, password); } catch(SQLException sqle) { return mapping.findForward("failure"); } if(user != null) return mapping.findForward("succes"); else return mapping.findForward("failure"); } } ------------------------------------ And finally the jsp where I instantiate an object of type LogonForm to check that Orions classloader finds the class, and it works: ------------------------------------ <html> <body> Hei.. <% form.LogonForm usr = new form.LogonForm(); %> </body> </html> ------------------------------------ The rest of the files were posted on the last mail. I'm really stuck here :( Geir Morten Hagen On Tue, 2002-10-15 at 15:50, [EMAIL PROTECTED] wrote: > Does your LogonForm class have a default constructor? Maybe you could > post the code for that. I assume you've gotten the Struts example apps > to run? > > Greg > > > -----Original Message----- > > From: Gekka [mailto:[EMAIL PROTECTED]] > > Sent: Monday, October 14, 2002 5:03 PM > > To: [EMAIL PROTECTED] > > Subject: Can't find my classes. > > > > > > 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]> > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>