Hi Rajaneesh,
You are right they are completely different. But it is very simple to fire struts framework just by making up right url :-)
Regards,
-- Viktar.
----- Original Message ----- From: "Rajaneesh" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <user@struts.apache.org>
Sent: Friday, March 11, 2005 12:04 PM
Subject: RE: using Taglibs
Hi Viktar,
Having the tags <html:form> would execute for the tag library classes in the package org.apache.struts.taglib.html. Hence <html:form> and <form> are quite different.
Regards Rajaneesh
-----Original Message----- From: Viktar Duzh [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 2:48 PM To: Struts Users Mailing List; Dakota Jack Subject: Re: using Taglibs
Jack,
I suppose you are not right. There is no problem of using ordinary <form>
HTML tag in a plain JSP. But that form must have a correct url and names of
the input elements within the page to make the framework pick up right
action and populate form bean respectively.
I will give a example.
1. Suppose you have the following in your config file:
<action path="/save-customer" type="com.action.SaveAction" name="CustomerForm"> <forward name="sucess" path="/SavePage.jsp"/> </action>
2. Your Customer.jsp would be: ... <form action="save-customer.do"> <input type="text" name="customerName" ... /> <input type="submit" ... /> </form>
3. Your CustomerForm is expected to have the customerName property.
Thus, when a user click on the submit button the request comes in and the
struts tries to find an action with "save-customer" path. Having found it,
it instantiates the CustomerForm object and then tries to populate the
properties of the bean based on HTT request parameters (customerName here).
In the end, your class action class has acess to the parameters submitted by
the ordinary HTML form.
But here is one thing. Customer.jsp usually shows some data. So a deveoper
should manually set the value of the form's fields. I means it should get a
bean that holds the customer data and set the value of the customerName
field by some other tag.
To make clear why some people are trying to do it. An application would be
built on the struts framework plus jstl tags. Using the jstls tags is taken
because struts html tags might not cover some attributes of some html
elements.
Regards,
-- Viktar
----- Original Message ----- From: "Dakota Jack" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Friday, March 11, 2005 9:56 AM Subject: Re: using Taglibs
You need to use <html:form>, so the answer is that you have to use the taglibs unless you do some serious coding changes to the framework. Why do you want to use the form but not the taglibs? If you just want to do that, build your own ActionForm with your own autopopulation classes, etc.?
What you are trying to do or why is not clear.
Sounds like you are a bit unacquainted with Struts and I would recommend that you take a closer look before deciding what you want to do.
Jack
On Thu, 10 Mar 2005 23:46:40 -0800 (PST), nitin dubey <[EMAIL PROTECTED]> wrote:Hello,
Can we use struts without using its taglibs ? We will just write plain JSPs. If yes how do we get the values into and from our ActionForms ?
regards,
Nitin
__________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]