java - can i put the form-login-page html in a library for a webapp? -


i trying create app login page authentication. , same added <form-login-page> web.xml (as shown below).

i jar'ed logon.html , logonerror.html , , added them library along .war webapp file. (under web-inf/lib/logon.jar) .

but when deploying app , getting error 404 , logon.html not found error. pointers why ? cant keep logon files (htmls,js,css files) in library ?

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

my understanding war expose resources contained within own root file structure. hence work-arounds (weblets, maven config) mentioned in answers this question. make custom build script unpacked content of logon.jar war, wouldn't recommend sort of hack. little more information concerning why want may able provide better approach.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -