이 질문은 제가 본 적이 있지만 게시 된 솔루션으로 내 문제가 해결되지 않았습니다. 다시 jsf 2.0을 다루고 있고 2 페이지를 가지고 있습니다 : login.xhtml과 index.xhtml, 나는 또한 인증 용도로 SpringSecurity를 사용하고 있습니다. index.xhtml은 렌더링은 괜찮지 만 로그인은하지 않습니다 (페이지 소스는 jsf 태그가 파싱되지 않음을 보여줍니다). 벌써 SpringSecurity를 비활성화하여 문제를 해결했는지 여부를 확인했습니다. 문제가 아니지만 운이 없다면 ... 코드를 잘못 (2 일 연속으로 알아 내려고 노력하고 있습니다.) 알 수 없으므로 도움이 될 것입니다. 대단히 감사하겠습니다.JSf 태그가 렌더링되지 않습니다.
web.xml을 login.xhtml
<h:head>
<title>Ejemplo JSF 2 AJAX</title>
</h:head>
<h:body>
<h:form id="login">
<h:panelGrid columns="2">
<h:outputLabel for="Usuario" value="Usuario:"/>
<h:inputText id="Usuario" value="#{loginBean.userName}" required="true"/>
<h:outputLabel for="Password" value="Contraseña:"/>
<h:inputSecret id="Password" value="#{loginBean.password}" required="true"/>
</h:panelGrid>
<h:commandButton value="Ingresar" actionListener="#{loginBean.doLogin}"/>
<h:messages/>
</h:form>
</h:body>
어떤 아이디어의
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<!-- Spring Security -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Spring Security -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>JSF2Example/index.xhtml</welcome-file>
</welcome-file-list>
부분 : 여기에 내 코드입니까? 고마워요!
안녕 BalusC, 도움 주셔서 감사합니다. 나는/faces/*에서 * .xhtml로 url-pattern을 바꾸는 문제를 해결했다. 어쨌든 오래된 패턴은 스프링 - 보안 설정으로 intefer되었다. – William
여기에 있습니다. * .xhtml로 전환해야했습니다 ... –