Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using Spring jstl and spring form tags together

Is it possible to mix jstl and spring form tags in a jsp page in a spring mvc application?

<form:form method="POST" action="<c:url value='/j_spring_security_check'/>">
    code
</form:form>

The output is:

<form method="POST" action="<c:url value='/j_spring_security_check'/>">
    code
</form>

The spring tags are getting parse but the jstl tags are not getting parse. I don't know what I am doing wrong.

like image 901
h-rai Avatar asked Nov 28 '25 10:11

h-rai


1 Answers

From the accepted answer, link. we shouldn't mix up c:url tag with spring form tags, that is illegal. You have to instead do it this way

<c:url value="/j_spring_security_check" var="theAction"/>
<form:form method="POST" action="${theAction}">
code
</form:form>
like image 86
Keerthivasan Avatar answered Nov 30 '25 23:11

Keerthivasan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!