Reputation: 4906
So I've got this particular form set up :
<form class="navbar-form pull-right" method="post" action="<c:url value="j_spring_security_check" />">
<input class="span2" type="text" placeholder="Email" name="j_username" value="<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>">
<input class="span2" type="password" placeholder="Password" name="j_password">
<button type="submit" class="btn">Sign In</button>
</form>
But the form ends up looking like this :
How do I fix this? Here are my includes :
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="html" tagdir="/WEB-INF/tags/html" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
A bit about my configuration- I'm using Spring MVC 3.2, Apache Tiles 3, Spring Security 3, Tomcat 7.
Upvotes: 1
Views: 2767
Reputation: 4906
I got the answer. The problem was that the <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
tag is not being included in the template.jsp file. This is a file that people usually configure for Apache Tiles. I manually copied and pasted that line into the same file as my form.
Upvotes: 1