This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Spring and the fly likes Query on <form:form method=" title="" /> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Query on <form:form method="post" action="">" Watch "Query on <form:form method="post" action="">" New topic

Query on <form:form method="post" action="">

shivang sarawagi
Ranch Hand

Joined: Jun 19, 2008
Posts: 153
In Spring why do we use a namespace for a form

unlike html <form></form> tag.

Is there a specific reason behind that?
Ayan mallick
Ranch Hand

Joined: Nov 17, 2012
Posts: 46
This is custom tag .It gives us several benefit like using model attribute,using validation.basically when the page is executed java classes are executed which is defined in tld file. This way we can separate business logic from view layer.
Lalit Mehra
Ranch Hand

Joined: Jun 08, 2010
Posts: 384


Unlike HTML's <form> tag which is quite simple to understand i guess <form:form> is a custom tag and quite intelligent too.
A Custom Tag is something which has a proper java code written behind it so that it can provide some useful and specific functionality.

Behind every tag there's a tag handler where the code for that tag is written. When your JSP (at runtime) is compiled into a servlet these tags become active and process the code written for them in the tag handler. You can create a tag of your own too ... take a look here Creating Simple Tag Handler

shivang sarawagi
Ranch Hand

Joined: Jun 19, 2008
Posts: 153
Thanks a lot guys for the reply ...
I agree. Here's the link:
subject: Query on <form:form method="post" action="">
It's not a secret anymore!