java/nekurak.net-web/web/WEB-INF/web.xml
author František Kučera <franta-hg@frantovo.cz>
Thu, 25 Feb 2010 09:10:01 +0100
changeset 41 2c3451cc396c
parent 40 67d332d48562
child 42 77c8271add7d
permissions -rw-r--r--
Formulářová autentizace + odhlašování.
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <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">
     3     <session-config>
     4         <session-timeout>
     5 	    30
     6 	</session-timeout>
     7     </session-config>
     8     <welcome-file-list>
     9         <welcome-file>index.jsp</welcome-file>
    10     </welcome-file-list>
    11     <error-page>
    12         <!-- Stránka nenalezena -->
    13         <error-code>404</error-code>
    14         <location>/WEB-INF/chyby/404.jsp</location>
    15     </error-page>
    16     <error-page>
    17         <!-- Interní chyba serveru -->
    18         <error-code>500</error-code>
    19         <location>/WEB-INF/chyby/500.jsp</location>
    20     </error-page>
    21     <context-param>
    22         <!-- Pro případ, že chybí hlavička „Accept-language“ v HTTP požadavku -->
    23         <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
    24         <param-value>cs</param-value>
    25     </context-param>
    26     <!--  <zabezpečení> -->
    27     <security-role>
    28         <role-name>opravneny</role-name>
    29     </security-role>
    30     <security-constraint>
    31         <web-resource-collection>
    32             <web-resource-name>Správa Nekuřák.net</web-resource-name>
    33             <url-pattern>/sprava/*</url-pattern>
    34         </web-resource-collection>
    35         <auth-constraint>
    36             <role-name>opravneny</role-name>
    37         </auth-constraint>
    38     </security-constraint>    
    39     <login-config>
    40         <auth-method>FORM</auth-method>
    41         <realm-name>nekurakNET</realm-name>
    42 	<form-login-config>
    43 	    <form-login-page>/?akce=prihlaseni</form-login-page>
    44 	    <form-error-page>/?akce=prihlaseni&amp;chyba=ano</form-error-page>
    45 	</form-login-config>
    46     </login-config>
    47     <!--  </zabezpečení> -->
    48 </web-app>