File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Why use the Struts form tag? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Why use the Struts form tag?" Watch "Why use the Struts form tag?" New topic
Author

Why use the Struts form tag?

Niklesh Mudiraj
Greenhorn

Joined: Jun 26, 2011
Posts: 10

Can you please explain what is need of using jsp form tag if we have html tag or what is the advantages of JSP Form tag .

Thanks & Regards,
Mudiraj Niklesh
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

There isn't a JSP form tag.

Are you perhaps confusing JSP with Struts or another framework?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Niklesh Mudiraj
Greenhorn

Joined: Jun 26, 2011
Posts: 10

Hi,

Thanks Bear Bibeault i get confuse can you please explain what is need of struts form tag and what is JSTL.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

Please ask only one question per topic. JSTL is the JSP Standard Tag Library. Google for more information.

I'll move this topic, along with changing its subject, to the Struts forum for a discussion of its form tag.
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
If you're using struts, then you should use the struts form tag because it make your job of writing struts pages easier.

At the end of the day it still generates an html <form> tag - but it can handle extra information related to struts.
eg what action to invoke when submitting the form - you can use


instead of


You remove from your markup
- your context web app name
- the .do extension used for struts

The form tag also acts as a container/owner for various variables that struts can use to construct your form
- the related bean/ActionForm the backs the current page (so it can populate values into the form)

Bottom line.
If you are using struts, why wouldn't you take advantage of the <html:form> tag to do some of the heavy lifting for you?

 
jQuery in Action, 2nd edition
 
subject: Why use the Struts form tag?
 
Similar Threads
Display table row value in another form
how to call JSP from Servlet
How to retrieve data from included jsp to parent jsp
url problem in struts
Calling same ActionForward from two JSP's