java/nekurak.net-web/web/WEB-INF/web.xml
changeset 171 e619057bad66
parent 142 44ef544460ca
child 174 ca3c7dd220fe
     1.1 --- a/java/nekurak.net-web/web/WEB-INF/web.xml	Sat Jun 19 11:19:27 2010 +0200
     1.2 +++ b/java/nekurak.net-web/web/WEB-INF/web.xml	Sat Jan 15 01:12:36 2011 +0100
     1.3 @@ -1,109 +1,109 @@
     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-config>
     1.9 -    <welcome-file-list>
    1.10 -	<welcome-file>index.jsp</welcome-file>
    1.11 -    </welcome-file-list>
    1.12 +	<session-config>
    1.13 +		<session-timeout>30</session-timeout>
    1.14 +	</session-config>
    1.15 +	<welcome-file-list>
    1.16 +		<welcome-file>index.jsp</welcome-file>
    1.17 +	</welcome-file-list>
    1.18      <!-- <chybovéStránky> -->
    1.19 -    <error-page>
    1.20 +	<error-page>
    1.21  	<!-- Stránka nenalezena -->
    1.22 -	<error-code>404</error-code>
    1.23 -	<location>/WEB-INF/chyby/404.jsp</location>
    1.24 -    </error-page>
    1.25 -    <error-page>
    1.26 +		<error-code>404</error-code>
    1.27 +		<location>/WEB-INF/chyby/404.jsp</location>
    1.28 +	</error-page>
    1.29 +	<error-page>
    1.30  	<!-- Interní chyba serveru -->
    1.31 -	<error-code>500</error-code>
    1.32 -	<location>/WEB-INF/chyby/500.jsp</location>
    1.33 -    </error-page>
    1.34 +		<error-code>500</error-code>
    1.35 +		<location>/WEB-INF/chyby/500.jsp</location>
    1.36 +	</error-page>
    1.37      <!-- </chybovéStránky> -->
    1.38      <!-- <definiceServletů> -->
    1.39 -    <servlet>
    1.40 -	<servlet-name>atom</servlet-name>
    1.41 -	<jsp-file>/WEB-INF/atom/atom.jsp</jsp-file>
    1.42 -    </servlet>
    1.43 -    <servlet>
    1.44 -	<description>
    1.45 +	<servlet>
    1.46 +		<servlet-name>atom</servlet-name>
    1.47 +		<jsp-file>/WEB-INF/atom/atom.jsp</jsp-file>
    1.48 +	</servlet>
    1.49 +	<servlet>
    1.50 +		<description>
    1.51  	    Servlet zpřístupňující fotky umístěné ve zvláštním adresáři
    1.52  	    (data oddělená od aplikace).
    1.53 -	</description>
    1.54 -	<servlet-name>fotky</servlet-name>
    1.55 -	<servlet-class>cz.frantovo.nekurak.servlet.Fotky</servlet-class>
    1.56 -	<init-param>
    1.57 -	    <description>
    1.58 +		</description>
    1.59 +		<servlet-name>fotky</servlet-name>
    1.60 +		<servlet-class>cz.frantovo.nekurak.servlet.Fotky</servlet-class>
    1.61 +		<init-param>
    1.62 +			<description>
    1.63  		Adresář na disku, který obsahuje fotky podniků.
    1.64  		Musí existovat při startu aplikace.
    1.65 -	    </description>
    1.66 -	    <param-name>adresar</param-name>
    1.67 -	    <param-value>/var/www/nekurak.net/fotky</param-value>
    1.68 -	</init-param>
    1.69 -	<load-on-startup>1</load-on-startup>
    1.70 -    </servlet>
    1.71 -    <servlet>
    1.72 -	<servlet-name>kaptcha</servlet-name>
    1.73 -	<servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>
    1.74 -    </servlet>
    1.75 -    <servlet>
    1.76 -	<description>Veřejné REST API (pak máme ještě jedno soukromé, kde musí být uživatel přihlášený)</description>
    1.77 -	<servlet-name>REST</servlet-name>
    1.78 -	<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    1.79 -	<load-on-startup>1</load-on-startup>
    1.80 -    </servlet>
    1.81 -    <servlet>
    1.82 -	<description>Odesílání a náhledy komentářů pomocí AJAXu.</description>
    1.83 -	<servlet-name>komentare</servlet-name>
    1.84 -	<servlet-class>cz.frantovo.nekurak.servlet.Komentare</servlet-class>
    1.85 -    </servlet>
    1.86 +			</description>
    1.87 +			<param-name>adresar</param-name>
    1.88 +			<param-value>/var/www/nekurak.net/fotky</param-value>
    1.89 +		</init-param>
    1.90 +		<load-on-startup>1</load-on-startup>
    1.91 +	</servlet>
    1.92 +	<servlet>
    1.93 +		<servlet-name>kaptcha</servlet-name>
    1.94 +		<servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>
    1.95 +	</servlet>
    1.96 +	<servlet>
    1.97 +		<description>Veřejné REST API (pak máme ještě jedno soukromé, kde musí být uživatel přihlášený)</description>
    1.98 +		<servlet-name>REST</servlet-name>
    1.99 +		<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
   1.100 +		<load-on-startup>1</load-on-startup>
   1.101 +	</servlet>
   1.102 +	<servlet>
   1.103 +		<description>Odesílání a náhledy komentářů pomocí AJAXu.</description>
   1.104 +		<servlet-name>komentare</servlet-name>
   1.105 +		<servlet-class>cz.frantovo.nekurak.servlet.Komentare</servlet-class>
   1.106 +	</servlet>
   1.107      <!-- </definiceServletů> -->
   1.108      <!-- <mapováníServletů> -->
   1.109 -    <servlet-mapping>
   1.110 -	<servlet-name>fotky</servlet-name>
   1.111 -	<url-pattern>/fotky/*</url-pattern>
   1.112 -    </servlet-mapping>
   1.113 -    <servlet-mapping>
   1.114 -	<servlet-name>atom</servlet-name>
   1.115 -	<url-pattern>/atom/*</url-pattern>
   1.116 -    </servlet-mapping>
   1.117 -    <servlet-mapping>
   1.118 -	<servlet-name>kaptcha</servlet-name>
   1.119 -	<url-pattern>/kaptcha.jpg</url-pattern>
   1.120 -    </servlet-mapping>
   1.121 -    <servlet-mapping>
   1.122 +	<servlet-mapping>
   1.123 +		<servlet-name>fotky</servlet-name>
   1.124 +		<url-pattern>/fotky/*</url-pattern>
   1.125 +	</servlet-mapping>
   1.126 +	<servlet-mapping>
   1.127 +		<servlet-name>atom</servlet-name>
   1.128 +		<url-pattern>/atom/*</url-pattern>
   1.129 +	</servlet-mapping>
   1.130 +	<servlet-mapping>
   1.131 +		<servlet-name>kaptcha</servlet-name>
   1.132 +		<url-pattern>/kaptcha.jpg</url-pattern>
   1.133 +	</servlet-mapping>
   1.134 +	<servlet-mapping>
   1.135  	<!-- Veřejné REST API -->
   1.136 -	<servlet-name>REST</servlet-name>
   1.137 -	<url-pattern>/zdroje/*</url-pattern>
   1.138 -    </servlet-mapping>
   1.139 -    <servlet-mapping>
   1.140 -	<servlet-name>komentare</servlet-name>
   1.141 -	<url-pattern>/komentare</url-pattern>
   1.142 -    </servlet-mapping>
   1.143 +		<servlet-name>REST</servlet-name>
   1.144 +		<url-pattern>/zdroje/*</url-pattern>
   1.145 +	</servlet-mapping>
   1.146 +	<servlet-mapping>
   1.147 +		<servlet-name>komentare</servlet-name>
   1.148 +		<url-pattern>/komentare</url-pattern>
   1.149 +	</servlet-mapping>
   1.150      <!-- </mapováníServletů> -->
   1.151 -    <context-param>
   1.152 +	<context-param>
   1.153  	<!-- Pro případ, že chybí hlavička „Accept-language“ v HTTP požadavku -->
   1.154 -	<param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
   1.155 -	<param-value>cs</param-value>
   1.156 -    </context-param>
   1.157 +		<param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
   1.158 +		<param-value>cs</param-value>
   1.159 +	</context-param>
   1.160      <!--  <zabezpečení> -->
   1.161 -    <security-role>
   1.162 -	<role-name>opravneny</role-name>
   1.163 -    </security-role>
   1.164 -    <security-constraint>
   1.165 -	<web-resource-collection>
   1.166 -	    <web-resource-name>Správa Nekuřák.net</web-resource-name>
   1.167 -	    <url-pattern>/sprava/*</url-pattern>
   1.168 -	</web-resource-collection>
   1.169 -	<auth-constraint>
   1.170 -	    <role-name>opravneny</role-name>
   1.171 -	</auth-constraint>
   1.172 -    </security-constraint>
   1.173 -    <login-config>
   1.174 -	<auth-method>FORM</auth-method>
   1.175 -	<realm-name>nekurakNET</realm-name>
   1.176 -	<form-login-config>
   1.177 -	    <form-login-page>/?akce=prihlaseni</form-login-page>
   1.178 -	    <form-error-page>/?akce=prihlaseni&amp;chyba=ano</form-error-page>
   1.179 -	</form-login-config>
   1.180 -    </login-config>
   1.181 +	<security-role>
   1.182 +		<role-name>opravneny</role-name>
   1.183 +	</security-role>
   1.184 +	<security-constraint>
   1.185 +		<web-resource-collection>
   1.186 +			<web-resource-name>Správa Nekuřák.net</web-resource-name>
   1.187 +			<url-pattern>/sprava/*</url-pattern>
   1.188 +		</web-resource-collection>
   1.189 +		<auth-constraint>
   1.190 +			<role-name>opravneny</role-name>
   1.191 +		</auth-constraint>
   1.192 +	</security-constraint>
   1.193 +	<login-config>
   1.194 +		<auth-method>FORM</auth-method>
   1.195 +		<realm-name>nekurakNET</realm-name>
   1.196 +		<form-login-config>
   1.197 +			<form-login-page>/?akce=prihlaseni</form-login-page>
   1.198 +			<form-error-page>/?akce=prihlaseni&amp;chyba=ano</form-error-page>
   1.199 +		</form-login-config>
   1.200 +	</login-config>
   1.201      <!--  </zabezpečení> -->
   1.202  </web-app>