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: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
>


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

Reply via email to