1.1 --- a/java/nekurak.net-web/web/WEB-INF/web.xml Tue Mar 23 00:50:39 2010 +0100
1.2 +++ b/java/nekurak.net-web/web/WEB-INF/web.xml Tue Apr 27 16:13:36 2010 +0200
1.3 @@ -1,81 +1,89 @@
1.4 <?xml version="1.0" encoding="UTF-8"?>
1.5 <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">
1.6 <session-config>
1.7 - <session-timeout>30</session-timeout>
1.8 + <session-timeout>30</session-timeout>
1.9 </session-config>
1.10 <welcome-file-list>
1.11 - <welcome-file>index.jsp</welcome-file>
1.12 + <welcome-file>index.jsp</welcome-file>
1.13 </welcome-file-list>
1.14 <!-- <chybovéStránky> -->
1.15 <error-page>
1.16 - <!-- Stránka nenalezena -->
1.17 - <error-code>404</error-code>
1.18 - <location>/WEB-INF/chyby/404.jsp</location>
1.19 + <!-- Stránka nenalezena -->
1.20 + <error-code>404</error-code>
1.21 + <location>/WEB-INF/chyby/404.jsp</location>
1.22 </error-page>
1.23 <error-page>
1.24 - <!-- Interní chyba serveru -->
1.25 - <error-code>500</error-code>
1.26 - <location>/WEB-INF/chyby/500.jsp</location>
1.27 + <!-- Interní chyba serveru -->
1.28 + <error-code>500</error-code>
1.29 + <location>/WEB-INF/chyby/500.jsp</location>
1.30 </error-page>
1.31 <!-- </chybovéStránky> -->
1.32 <!-- <definiceServletů> -->
1.33 <servlet>
1.34 - <servlet-name>atom</servlet-name>
1.35 - <jsp-file>/WEB-INF/atom/atom.jsp</jsp-file>
1.36 + <servlet-name>atom</servlet-name>
1.37 + <jsp-file>/WEB-INF/atom/atom.jsp</jsp-file>
1.38 </servlet>
1.39 <servlet>
1.40 - <description>
1.41 + <description>
1.42 Servlet zpřístupňující fotky umístěné ve zvláštním adresáři
1.43 (data oddělená od aplikace).
1.44 </description>
1.45 - <servlet-name>fotky</servlet-name>
1.46 - <servlet-class>cz.frantovo.nekurak.servlet.Fotky</servlet-class>
1.47 - <init-param>
1.48 - <description>
1.49 + <servlet-name>fotky</servlet-name>
1.50 + <servlet-class>cz.frantovo.nekurak.servlet.Fotky</servlet-class>
1.51 + <init-param>
1.52 + <description>
1.53 Adresář na disku, který obsahuje fotky podniků.
1.54 Musí existovat při startu aplikace.
1.55 </description>
1.56 - <param-name>adresar</param-name>
1.57 - <param-value>/var/www/nekurak.net/fotky</param-value>
1.58 - </init-param>
1.59 - <load-on-startup>1</load-on-startup>
1.60 + <param-name>adresar</param-name>
1.61 + <param-value>/var/www/nekurak.net/fotky</param-value>
1.62 + </init-param>
1.63 + <load-on-startup>1</load-on-startup>
1.64 + </servlet>
1.65 + <servlet>
1.66 + <servlet-name>Kaptcha</servlet-name>
1.67 + <servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>
1.68 </servlet>
1.69 <!-- </definiceServletů> -->
1.70 <!-- <mapováníServletů> -->
1.71 <servlet-mapping>
1.72 - <servlet-name>fotky</servlet-name>
1.73 - <url-pattern>/fotky/*</url-pattern>
1.74 + <servlet-name>fotky</servlet-name>
1.75 + <url-pattern>/fotky/*</url-pattern>
1.76 </servlet-mapping>
1.77 <servlet-mapping>
1.78 - <servlet-name>atom</servlet-name>
1.79 - <url-pattern>/atom/*</url-pattern>
1.80 + <servlet-name>atom</servlet-name>
1.81 + <url-pattern>/atom/*</url-pattern>
1.82 + </servlet-mapping>
1.83 + <servlet-mapping>
1.84 + <servlet-name>Kaptcha</servlet-name>
1.85 + <url-pattern>/kaptcha.jpg</url-pattern>
1.86 </servlet-mapping>
1.87 <!-- </mapováníServletů> -->
1.88 <context-param>
1.89 - <!-- Pro případ, že chybí hlavička „Accept-language“ v HTTP požadavku -->
1.90 - <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
1.91 - <param-value>cs</param-value>
1.92 + <!-- Pro případ, že chybí hlavička „Accept-language“ v HTTP požadavku -->
1.93 + <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
1.94 + <param-value>cs</param-value>
1.95 </context-param>
1.96 <!-- <zabezpečení> -->
1.97 <security-role>
1.98 - <role-name>opravneny</role-name>
1.99 + <role-name>opravneny</role-name>
1.100 </security-role>
1.101 <security-constraint>
1.102 - <web-resource-collection>
1.103 - <web-resource-name>Správa Nekuřák.net</web-resource-name>
1.104 - <url-pattern>/sprava/*</url-pattern>
1.105 - </web-resource-collection>
1.106 - <auth-constraint>
1.107 - <role-name>opravneny</role-name>
1.108 - </auth-constraint>
1.109 + <web-resource-collection>
1.110 + <web-resource-name>Správa Nekuřák.net</web-resource-name>
1.111 + <url-pattern>/sprava/*</url-pattern>
1.112 + </web-resource-collection>
1.113 + <auth-constraint>
1.114 + <role-name>opravneny</role-name>
1.115 + </auth-constraint>
1.116 </security-constraint>
1.117 <login-config>
1.118 - <auth-method>FORM</auth-method>
1.119 - <realm-name>nekurakNET</realm-name>
1.120 - <form-login-config>
1.121 - <form-login-page>/?akce=prihlaseni</form-login-page>
1.122 - <form-error-page>/?akce=prihlaseni&chyba=ano</form-error-page>
1.123 - </form-login-config>
1.124 + <auth-method>FORM</auth-method>
1.125 + <realm-name>nekurakNET</realm-name>
1.126 + <form-login-config>
1.127 + <form-login-page>/?akce=prihlaseni</form-login-page>
1.128 + <form-error-page>/?akce=prihlaseni&chyba=ano</form-error-page>
1.129 + </form-login-config>
1.130 </login-config>
1.131 <!-- </zabezpečení> -->
1.132 </web-app>