로그인 페이지 인증을 사용하여 앱을 만들려고했습니다. 그리고 같은 것을 위해 web.xml에 <form-login-page>
을 추가했습니다 (아래 그림 참조).webapp 용 라이브러리에 form-login-page html을 넣을 수 있습니까?
logon.html 및 logonerror.html을 jar'ed하고 .war 웹 응용 프로그램 파일과 함께 라이브러리로 추가했습니다. (WEB-INF/lib/logon.jar 아래).
하지만 앱을 배포 할 때 오류 404가 발생하고 logon.html 오류가 없습니다. 이유에 대한 조언이 있으십니까? 라이브러리에 로그온 파일 (htmls, js, css 파일)을 보관할 수 있습니까?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
<filter>
<filter-name>MyFilter</filter-name>
<filter-class>MyFilter</filter-class>
<init-param>
<param-name>Domainname</param-name>
<param-value></param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>MyFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>SecuredResources</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Default_Role</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONF</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/logon.html</form-login-page>
<form-error-page>/logonerror.html</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>Default_Role</role-name>
</security-role>
</web-app>