[RESOLVIDO] Spring Security 3 - required não funciona

0 respostas
camilooscar

Boa tarde pessoal,

estou com um problema no login. Estou utilizando Spring Security 3. Coloquei os campos login e senha, como obrigatório, porém, ele deixa prosseguir mesmo assim.

Alguém sabe o que está errado?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sec="http://www.springframework.org/security/facelets/tags">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="EXPIRES" content="0" />
	<meta http-equiv="pragma" content="nocache" />
	<h:outputStylesheet name="/css/conf.css" />
	<title>BPP</title>

	<style type="text/css">
.ui-dialog .ui-dialog-titlebar {
	display: none !important;
}

.ui-widget-content {
	color: white;
}
</style>

</h:head>

<h:body
	style="background: url('resources/images/login/fundo_login.png') no-repeat center center fixed; webkit-background-size: cover; moz-background-size: cover; -o-background-size: cover; background-size: cover;">
	<f:loadBundle
		basename="message_#{applicationBean.configProperties['web_idioma_inicial']}"
		var="msgs" />
	<p:dialog modal="true" closable="false" position="center"
		style="background-color:#1F6794; border:none" widgetVar="modalLogin"
		minWidth="250" width="250" height="150" draggable="false"
		resizable="false" visible="true">

		<div style="text-align: center;">
			<p:messages id="mensagens" showDetail="true" showSummary="false" />
			<h:outputText style="color: red;"
				value="#{SPRING_SECURITY_LAST_EXCEPTION.message}" />

			<form action="${request.contextPath}/j_spring_security_check"
				method="post">

				<h:panelGrid columns="2">

					<h:column>
						<h:outputLabel styleClass="espacamento" value="#{msgs.global_email}:" />
					</h:column>
					<h:column>
						<h:inputText id="j_username" styleClass="espacamento" size="15" required="true"  requiredMessage="Favor preencher o login."/>
					</h:column>

					<h:column>
						<h:outputLabel styleClass="espacamento" value="#{msgs.global_password}:" />
					</h:column>
					<h:column> 
						<h:inputSecret styleClass="espacamento" id="j_password" size="15" required="true" requiredMessage="Favor preencher a senha." />
					</h:column>
				</h:panelGrid>
				<h:commandButton styleClass="btn_login" type="submit"  value="#{msgs.web_login_login}" />
			</form>
		</div>
	</p:dialog>
</h:body>
</html>
Criado 26 de setembro de 2012
Respostas 0
Participantes 1