1

This is my jsp code that Iam using in my Spring Application.

<form:label path="username">Enter your user-name</form:label>
            <form:input id="username" name="uName" path="" /><br>
            <form:label path="username">Please enter your password</form:label>
            <form:password id="password" name="password" path="" /><br>
            <input type="submit" value="Submit" />

Can someone please explain me what is the use of label path attribute. What it does Exactly. Because when I cahnge this path value it is throwing me an error while displaying. Can someone please explain me what it is.?

Mohan raj
  • 19
  • 3
  • Possible duplicate of [Path attribute in Spring](http://stackoverflow.com/questions/17647050/path-attribute-in-spring) – BackSlash Apr 22 '17 at 12:51
  • 1
    http://stackoverflow.com/questions/21593988/what-is-the-advantage-of-formlabel-tag-in-spring – RïshïKêsh Kümar Apr 22 '17 at 12:51
  • 1
    Possible duplicate of [What is the advantage of form:label tag in Spring?](http://stackoverflow.com/questions/21593988/what-is-the-advantage-of-formlabel-tag-in-spring) – Slava Semushin Apr 24 '17 at 10:30

1 Answers1

0

The Path label is used for binding data.

Given that label isn't an input, you can use labels with "for" attribute instead, such as:

<label for="inputField"><spring:message code="label.input"/></label>
woliveirajr
  • 9,433
  • 1
  • 39
  • 49
PanBrambor
  • 89
  • 9