struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curtis Taylor <>
Subject Re: html:form complains of bean missing
Date Wed, 02 Mar 2005 04:40:58 GMT
Hi Scott,

If you choose to use the Struts html:form tag, you must declare the 
corresponding definition in the form:beans section of the struts-config 
file. That's the way the framework behaves as I've used it.


-- Curtis

Scott Purcell wrote:
> First off, as I am learning Struts I just wanted to thank those, for bearing with my
learning curve and helping out so far.
> Here is the issue:
> I want to pass all my forms, even forms without params to the com.skp.action.LoginAction
action class, because this class handles the "isLoggedIn" issue through a subclass of Action.
> Anyway, I have a jsp page that has no params, so I have no bean to collect user data,
so I configured my action like so:
> <action  path="/mainAdmin"
>     type="com.skp.action.LoginAction" >
>      <forward name="Success" path="/jsp/admin/main.jsp" redirect="true"/>
>   </action>
> Anyway, I just want to always use the LoginAction as a "Front Controller" to my web app,
and catch the status of "logged-in" etc.
> This works well, but I have to use conventional <html> code and not the html:form
> works:
> <!-- <form name="foo" action="/uniquepear/action/mainAdmin" method="POST"> -->
> does not work:
> <html:form action="mainAdmin">
> When I use the above I get this error in the browser:
> javax.servlet.ServletException: Cannot retrieve definition for form bean null
> at org.apache.jasper.runtime.PageContextImpl.handlePageException(
> at org.apache.jsp.main_jsp._jspService(
> But I have no reason to have  a bean for this action.
> How does one handle this problem?
> Thanks
> Scott

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message