Exception with html form action

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Exception with html form action

anuradha
This is my html form

<form name="form" id="registerForm" th:action="@{${T(com.anuradha.Constants).REGISTER}}" method="post" th:autocomplete="off">
                        <div class="form-group">
                            <label>Email address</label>
                            <input type="text" class="form-control" name="login" id="login" maxlength="126" placeholder="email@domain.com" th:value="${response?.data?.login}" />
                            <input type="text" style="display:none;"/>
                        </div>
                        <div class="form-group">
                            <label class="lbl-pwd">Password </label>
                            <input type="password" style="display:none;"/>
                            <input type="password" class="form-control" name="password" id="password" maxlength="21" data-toggle="tooltip" data-placement="top" autocomplete="new-password"/>
                        </div>
                        <div class="btn-footer">
                            <div class="foot-right"><button type="submit" id="submitRegisterFormSubmitBtn" class="cta gradient-disabled">Register</button></div>
                        </div>
                    </form>

This is My Controller method

@RequestMapping(value = Constants.REGISTER, method = RequestMethod.POST)
    public String registerUser(RegistrationClz registrationClz, RedirectAttributes redirectAttributes) {
        ---------
        userService.registerUser(registrationClz, registrationClz.getPassword());
        ---------
        return Constants.Redirects.REGISTER;
    }

Some times it gives me below exception

        at java.lang.Thread.run(Thread.java:748)
Caused by: org.attoparser.ParseException: Error during execution of processor 'org.thymeleaf.spring4.processor.SpringActionTagProcessor' (template: "/register/register" - line 29, col 57)
        at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:393)
        at org.attoparser.MarkupParser.parse(MarkupParser.java:257)
        at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:230)
        ... 109 common frames omitted
Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'org.thymeleaf.spring4.processor.SpringActionTagProcessor' (template: "/register/register" - line 29, col 57)

Here line 29, col 57 is "th:action"