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:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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

Reply via email to