I accidentally deleted the last mail, Greg, but I've upgraded to struts
1.1b2 now, rebuilt the application, cleared caches and the works. Still
the same error. Maybe the debug output from struts might help:

-------------------------------

Orion/1.5.2 initialized
register('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN',
'classloader:/org/apache/struts/resources/struts-config_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'classloader:/org/apache/struts/resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'classloader:/org/apache/struts/resources/web-app_2_3.dtd'
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_.dtd')
 Resolving to alternate DTD
'classloader:/org/apache/struts/resources/struts-config_1_0.dtd'
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call
org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[logonForm])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call
org.apache.struts.action.ActionMapping.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call
org.apache.struts.action.ActionMapping.addForward(ActionForward[failure])
Pop org.apache.struts.action.ActionForward
Call
org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/logon, 
type=action.LogonAction])
Pop org.apache.struts.action.ActionMapping
register('-//Apache Software Foundation//DTD Struts Configuration
1.0//EN',
'classloader:/org/apache/struts/resources/struts-config_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'classloader:/org/apache/struts/resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN',
'classloader:/org/apache/struts/resources/web-app_2_3.dtd'
resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN',
'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd')
 Resolving to alternate DTD
'classloader:/org/apache/struts/resources/web-app_2_2.dtd'
Call
org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.String,*.do/java.lang.String)

-----------------------

Anyone?

Geir Morten Hagen

On Tue, 2002-10-15 at 16:55, Gekka wrote:
> 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]>

Reply via email to