You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sean Owen <sr...@yahoo.com> on 2002/03/03 19:02:31 UTC

Re: struts-user Digest 3 Mar 2002 09:11:43 -0000 Issue 1190

In my opinion, it is fine to use some Struts tags and not 
others. Tags look innocent enough, though they do translate into 
a non-trivial chunk of code in the compiled servlet! As Ted 
said - depending on your container, heavy use of tags can create 
a performance problem. So the question is which tags are worth 
their cost in your container.

The whole Struts tag package is great, but in my opinion, "html" 
and "template" provide the most value. Use *everything* in 
"html", and use "template" if you have the need. "bean" and 
"logic" do things that could mostly be handled as easily in an 
equally clear scriptlet (though "bean" is vital if you're doing 
i18n).

Sean


On Sunday, March 3, 2002, at 04:11  AM, struts-user-digest-
help@jakarta.apache.org wrote:

> -----Original Message-----
> From: Eddie Bush [mailto:ekbush@swbell.net]
> Sent: Friday, March 01, 2002 2:23 PM
> To: Struts Users Mailing List
> Subject: Re: newbie question: is it ok to use struts selectively?
>
>
> You certainly can pick and choose which pieces you want to 
> use.  You can use
> the tag library without a thought of using the controller 
> servlet.  However,
> which would you rather write?
>
> <input type-"submit" name="submit" value="Login">
>
> or
>
> <html:submit value="Login"/>
>
> The tag library (in many cases) isn't used because it provides 
> functionalty
> you can't write youself, but because it makes it so much easier 
> to write the
> same things you can write yourself.
>
> ... at least that's what I gather.  Don't let me be the final 
> word - I'm
> just a lazy developer that likes cutting what I have to type in half =)
>
> Other opinions?
>
> Regards,
>
> Eddie
> ----- Original Message -----
> From: <rg...@dentalxchange.com>
> To: <st...@jakarta.apache.org>
> Sent: Friday, March 01, 2002 4:09 PM
> Subject: newbie question: is it ok to use struts selectively?
>
>
>> Suppose I have a login page, with username and password and 
>> submit button.
>> Is it ok to have something like the following?
>> is it ok to use struts html tags only for the input type form 
>> but not for
>> the others?
>> if the output of the tags is same as what I have here, why should I be
>> inclined to use, or is it a convention to use? or is it a 
>> personal choice?
>> <html:form action="/login.do" name="frm1"
>> type="mypackage.struts.login.LoginForm" focus="username">
>> <table cellpadding="4" cellspacing="2" border="0" align="center">
>> <tr>
>> <td colspan="2"><html:errors/></td>
>> </tr>
>> <tr bgcolor="#ebf5fe">
>> <td class="b" width="120">Username: </td>
>> <td><input type="text" name="username"
>> value="<%=request.getParameter("username")%>" size="20"
> maxlength="60"></td>
>> </tr>
>> <tr bgcolor="#ebf5fe">
>> <td class="b" width="120">Password: </td>
>> <td><input type="password" name="pwd"
>> value="<%=request.getParameter("pwd")%>" size="20" 
>> maxlength="12"></td>
>> </tr>
>> <tr>
>> <td>&nbsp;</td>
>> <td align="center"><input type="submit" name="submit" 
>> value="Login"></td>
>> </tr>
>> </table>
>> </html:form>
>> Regards,
>> Rumpa Giri
>>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>