struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alec Bau <>
Subject Can I do without Struts taglib?
Date Thu, 13 Jul 2000 18:36:12 GMT
I should admit I'm new to Struts and don't have time examining source code to
clarify behavior so, please, bear with me.

I have a problem with Struts heavy reliance on <struts:form> tag in particular
and on custom visual tags in general. Our page designers and developers
including myself use WYSIWYG html editors to design pages and complex forms.
Using custom form and input tags makes this impossible since most editors insist
on having a <form> to add input controls and render it. Also it's a myth that
for non programmer it would be easier to learn <struts:form> than to combine
familiar html <form> with <jsp:useBean>. Moreover a lot of designers are temp
consultants that move from project to project in different environments and they
really don't want to learn a new proprietary tag extension that's far from
becoming a "de facto" standard. All that in my opinion defies Model 2 principle
of maximum possible labor division between presentation design and business
implementation. In my opinion general purpose Model 2 implementation such as
Struts should be self sufficient without heavy reliance on custom taglib that's,
don't get me wrong, is nice to have but only as an icing on a cake.

So questions are:

Is it possible to easily achieve same nice form dispatching functionality based
on action.xml without using <struts:form>? My understanding is that if I want to
use <action formAttribute> bean I'll need to manually define respective session
scope bean via <useBean> like that:

<!-- action.xml: -->
    <action formAttribute="formBean" formClass="FormBeanClass" .. >

<!-- struts-form.jsp: -->
    <struts:form action="" name="formBean" type="FormBeanClass" ...>

<!-- html-form.jsp: -->
    <jsp:useBean id="formBean" class="FormBeanClass" scope="session" >
    <form action="" ...>

Will html-form.jsp work and behave in a same way as struts-form.jsp?

In case the answer is yes: Do I really need to code <jsp:useBean>? Maybe Struts
can create the scope bean if it's not present already while processing
respective mapping in a same way  org.apache.struts.taglib.FormTag does it? It
seems that all needed information is available in action.xml, right?

I think that if missing feature above is worthwhile implementing in order to
limit as much as possible intrusion of non html content within a page. Otherwise
thanks for a really well designed and much needed framework!

View raw message