1

だから私はこの特定のフォームを設定しました:

<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>

しかし、フォームは次のようになります: ここに画像の説明を入力してください

これを修正するにはどうすればよいですか?これが私のインクルードです:

<%@ 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" %>

私の構成について少し-私はSpringMVC3.2、Apache Tiles 3、Spring Security 3、Tomcat7を使用しています。

4

1 に答える 1

1

私は答えを得ました。問題は、<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>タグがtemplate.jspファイルに含まれていないことでした。これは、人々が通常ApacheTiles用に構成するファイルです。その行を手動でコピーして、フォームと同じファイルに貼り付けました。

于 2013-03-16T20:13:08.437 に答える