Results 1 to 2 of 2

Thread: What is path here ?

  1. #1

    Default What is path here ?

    Spring has form tags ...

    Example:

    <form:input path="password"></form:input>

    What is path here ?

  2. #2
    Join Date
    Aug 2011
    Posts
    24

    Default

    name of the property in your modelAttribute.

    Login.java
    {
    private String userId;
    private String password;
    //getters and setters
    }

    In your LoginController you will add the Login object as model with name "login".

    And in your view file login.jsp

    <form:form method="post" modelAttribute="login">
    <form:input path="password"/> <!-- this will bind the input filed to the model-->
    </form:form>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •