LOL....never mind. James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org
> -----Original Message----- > From: James Mitchell [mailto:jmitchtx@;telocity.com] > Sent: Friday, October 18, 2002 3:04 PM > To: Struts Developers List > Subject: RE: WHY! Won't Form Classes Load > > > I absolutely hate making exceptions for vendors, but this should be in our > Docs somewhere, don�t you think??? > > (Assuming the below solution is true) > > > > James Mitchell > Software Engineer/Struts Evangelist > http://www.open-tools.org > > > > > > -----Original Message----- > > From: Ortega, Carlos [mailto:cortega@;water.ca.gov] > > Sent: Friday, October 18, 2002 2:47 PM > > To: Struts Users Mailing List > > Subject: RE: WHY! Won't Form Classes Load > > > > > > SOLUTION! > > > > iPlanet 6.0 or (SUN ONE) cannot load any ActionForm objects > > you've defined unless they "implements java.io.Serializable", > > otherwise the servlet engine will give you the following silly error: > > > > >javax.servlet.ServletException: Exception creating bean of class > > >[YourActionFormClassHere!] > > > > I've been working on this for days. I was pulling my hair out. > > Thank God. I hope the good people at Sun will create a document > > outlining the steps to get Struts working on their platform, > > since they state that their server engine works with Struts. > > > > Thanks for all the previous suggestions. > > > > Best Regards, > > Carlos Ortega > > > > > > -----Original Message----- > > From: David Graham [mailto:dgraham1980@;hotmail.com] > > Sent: Wednesday, October 16, 2002 9:10 PM > > To: [EMAIL PROTECTED] > > Subject: Re: WHY! Won't Form Classes Load > > > > > > Your relay action does the same thing as ForwardAction that comes with > > struts, look at the docs for that. Why are you deploying a beta > > 1 version? > > Why not beta 2? Does the struts example app work? If that doesn't work > > then you've got container configuration issues. I always make sure the > > example works before trying my own. > > > > I believe ActionForms only get created when there an action > > associated with > > them is executed OR a jsp with the <html:form> tag is run. If > neither of > > these situations is occuring then the form bean won't exist. > > > > David > > > > >From: "Ortega, Carlos" <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > >To: <[EMAIL PROTECTED]> > > >Subject: WHY! Won't Form Classes Load > > >Date: Wed, 16 Oct 2002 20:32:17 -0700 > > > > > > > > >It's four hours after I promissed my wife I'd be home and I'm > sitting in > > >the office scratching my head, wondering WHY struts won't load > > ActionForm > > >classes. > > > > > >In a previous thread I mentioned that when I deploy a working > > beta 1 Struts > > >application on iPlanet 6.0 and attempt to load a JSP that > references any > > >ActionForm I get the following silly error: > > > > > >javax.servlet.ServletException: Exception creating bean of class > > >[YourActionFormClassHere!] > > > > > >The form bean is found, but cannot be loaded?!? It get's even more > > >interesting. I discovered that if I bypassed the JSP page and > called the > > >".do" instead, in this case "logon.do", the form would actually > > load. The > > >page had validation errors, as if the user had attempted to > > login without > > >entering their user name and password. > > > > > >After mentioning this on a previous thread Greg wisely mentioned > > using the > > >controller to front all of my JSPs. In other words, create an > > action class > > >that I would call to access the JSPs. So I created a class named > > >RelayAction, designed to accept a "forward" name as an argument. > > >Unfortuneatly, using it resulted in the same error. Here's where > > the head > > >scratching begins. Why was the form able to load when I called the > > >"Logon.do" and fail when I used RelayAction? > > > > > >Long story short (and I may be too late), I discovered a key difference > > >between the LogonAction and the RelayAction is how they are defined in > > >struts-config.xml. Take a look at the two definitions: > > > > > >LogonAction > > >------------------------------- > > ><action > > > path="/logon" > > > name="logonForm" > > > type="app.forms.LogonAction" > > > scope="request" > > > input="/logon.jsp"> > > ></action> > > > > > >RelayAction > > >------------------------------- > > ><action > > > path="/relay" > > > type="app.forms.RelayAction"> > > ></action> > > > > > >I now know that calling "Logon.do" was able to load the form > > because when > > >LogonAction fails, it forwards control to the "input" page, > > which is set to > > >"/logon.jsp" above. The LogonAction code that does this is below: > > > > > >if (!errors.empty()) { > > > saveErrors(request, errors); > > > return (new ActionForward(mapping.getInput())); > > >} > > > > > >I don't understand why LogonAction class is able to load > LogonForm using > > >mapping.getInput() and the RelayAction cannot using > mapping.findForward? > > >They both return ActionForward. Can it be because there is a difference > > >between mapping.getInput() and mapping.findForward()!? > > > > > >If you've got pointers, please point-on. I need help here. > > > > > >(going home now...) > > > > > >Carlos Ortega > > > > > > > > >-- > > >To unsubscribe, e-mail: > > ><mailto:struts-user-unsubscribe@;jakarta.apache.org> > > >For additional commands, e-mail: > > ><mailto:struts-user-help@;jakarta.apache.org> > > > > > > _________________________________________________________________ > > Protect your PC - get McAfee.com VirusScan Online > > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > > > > -- > > To unsubscribe, e-mail: > <mailto:struts-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: > <mailto:struts-user-help@;jakarta.apache.org> > > > -- > To unsubscribe, e-mail: > <mailto:struts-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: > <mailto:struts-user-help@;jakarta.apache.org> > > > > -- > To unsubscribe, e-mail: > <mailto:struts-dev-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: > <mailto:struts-dev-help@;jakarta.apache.org> > > -- To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>
