我正在尝试通过页面重定向实现简单的登录表单:
@Query(value = "SELECT COUNT(n) from Noleggio n " +
"WHERE n.libroId = ?1 AND n.utenteId=?2 AND CURRENT_DATE() BETWEEN ?3 AND ?4")
Long countByUtenteIdAndLibroId(Long idLibro, Long idUtente, LocalDate inizioPrestito, LocalDate finePrestito);
控制器:
<h:form class="rd-mailform text-left">
<div class="form-group form-group-outside">
<h:outputLabel for="username" value="Username:" class="form-label form-label-outside" />
<h:inputText id="username" value="#{loginController.username}" label="username" class="form-control" autocomplete="off"/>
</div>
<div class="form-group form-group-outside">
<h:outputLabel for="password" value="Password:" class="form-label form-label-outside" />
<h:inputSecret id="password" value="#{loginController.password}" label="password" class="form-control" autocomplete="off"/>
</div>
<div class="offset-top-20">
<h:commandButton value="Login" type="submit" action="#{loginController.userAuthanticate}" class="btn btn-block btn-primary" />
</div>
</h:form>
我提交表格时没有任何反应。您知道如何解决此问题吗? 也许我对页面重定向使用了错误的配置?