You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sastry Varanasi <sa...@cisco.com> on 2001/08/26 20:54:19 UTC
Forms without beans
Hello all,
I have a set of Java classes that process an XML configuration file to
generate HTML form parameter information dynamically. I use this
information in a JSP file to serve my Form onto the browsers.
I have a servlet to handle the form submission and to validate the user
data. These validations are configurable through XML. I keep the user data
in a Java collection class and pass it on to next layer for backend processing.
My question is, is it possible to use struts for my application? Can I
make the Servlet as an Action class without having a FormBean to hold the
data? Is it mandatory to have FormBean whenever I use a Form and an Action
class?
Can some one please throw some ideas on this? If this discussion had
already happened on this mailing list, I would appreciate if someone could
send me a reference to that thread.
Thanks in advance,
Sastry.
Re: Forms without beans
Posted by Ted Husted <hu...@apache.org>.
The form beans are optional. If you have some other method for getting
input, you can just leave out name property from the ActionMappings.
Obviously, I can't speak to how easy it would be to cast the rest of
your Servlet as an Action, though since the ActionServlet is available
through the servlet property, you should be able to do all the same
things.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/
Sastry Varanasi wrote:
>
> Hello all,
>
> I have a set of Java classes that process an XML configuration file to
> generate HTML form parameter information dynamically. I use this
> information in a JSP file to serve my Form onto the browsers.
>
> I have a servlet to handle the form submission and to validate the user
> data. These validations are configurable through XML. I keep the user data
> in a Java collection class and pass it on to next layer for backend processing.
>
> My question is, is it possible to use struts for my application? Can I
> make the Servlet as an Action class without having a FormBean to hold the
> data? Is it mandatory to have FormBean whenever I use a Form and an Action
> class?
>
> Can some one please throw some ideas on this? If this discussion had
> already happened on this mailing list, I would appreciate if someone could
> send me a reference to that thread.
>
> Thanks in advance,
> Sastry.