Java Developer
Java Developer

Reputation: 1901

how to send form values using spring form?

In my login.jsp have the following code..

    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<fieldset id="signin_menu">
    <form:form action="login/processLogin" modelAttribute="LOGIN">
        -----
    </form:form>
</fieldset>

And my LoginForm have userName,password and setters and getters.. When ever click the Submit Button Form values coming ...

But when we click Forgot Password? link Form values not coming hear null values coming..

Upvotes: 1

Views: 114

Answers (1)

Arun P Johny
Arun P Johny

Reputation: 388316

You need to do a form submision to get the form values

$('.submit_forgotPassword').click(function(e){
    e.preventDefault();
    var frm = $(this).parents('form');
    frm.attr('action', 'login/forgotPassword');
    frm.submit();
});

Upvotes: 2

Related Questions