java/nekurak.net-web/web/WEB-INF/web.xml
changeset 182 bb8af29610c4
parent 178 afee4e663992
child 187 e7b3ef7aaef4
     1.1 --- a/java/nekurak.net-web/web/WEB-INF/web.xml	Wed Jan 26 02:24:34 2011 +0100
     1.2 +++ b/java/nekurak.net-web/web/WEB-INF/web.xml	Wed Jan 26 18:58:02 2011 +0100
     1.3 @@ -1,124 +1,124 @@
     1.4  <?xml version="1.0" encoding="UTF-8"?>
     1.5  <web-app version="3.0" 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_3_0.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 -    <listener>
    1.39 -        <listener-class>cz.frantovo.nekurak.posluchac.OchranaProtiCSRF</listener-class>
    1.40 -    </listener>
    1.41 +	<listener>
    1.42 +		<listener-class>cz.frantovo.nekurak.posluchac.OchranaProtiCSRF</listener-class>
    1.43 +	</listener>
    1.44      <!-- <definiceServletů> -->
    1.45 -    <servlet>
    1.46 -        <servlet-name>podnik</servlet-name>
    1.47 -        <servlet-class>cz.frantovo.nekurak.servlet.PodnikServlet</servlet-class>
    1.48 -    </servlet>
    1.49 -    <servlet>
    1.50 -        <servlet-name>atom</servlet-name>
    1.51 -        <jsp-file>/WEB-INF/atom/atom.jsp</jsp-file>
    1.52 -    </servlet>
    1.53 -    <servlet>
    1.54 -        <description>
    1.55 +	<servlet>
    1.56 +		<servlet-name>podnik</servlet-name>
    1.57 +		<servlet-class>cz.frantovo.nekurak.servlet.PodnikServlet</servlet-class>
    1.58 +	</servlet>
    1.59 +	<servlet>
    1.60 +		<servlet-name>atom</servlet-name>
    1.61 +		<jsp-file>/WEB-INF/atom/atom.jsp</jsp-file>
    1.62 +	</servlet>
    1.63 +	<servlet>
    1.64 +		<description>
    1.65  	    Servlet zpřístupňující fotky umístěné ve zvláštním adresáři
    1.66  	    (data oddělená od aplikace).
    1.67  		</description>
    1.68 -        <servlet-name>fotky</servlet-name>
    1.69 -        <servlet-class>cz.frantovo.nekurak.servlet.Fotky</servlet-class>
    1.70 -        <init-param>
    1.71 -            <description>
    1.72 +		<servlet-name>fotky</servlet-name>
    1.73 +		<servlet-class>cz.frantovo.nekurak.servlet.Fotky</servlet-class>
    1.74 +		<init-param>
    1.75 +			<description>
    1.76  		Adresář na disku, který obsahuje fotky podniků.
    1.77  		Musí existovat při startu aplikace.
    1.78  			</description>
    1.79 -            <param-name>adresar</param-name>
    1.80 -            <param-value>/var/www/nekurak.net/fotky</param-value>
    1.81 -        </init-param>
    1.82 -        <load-on-startup>1</load-on-startup>
    1.83 -    </servlet>
    1.84 -    <servlet>
    1.85 -        <servlet-name>kaptcha</servlet-name>
    1.86 -        <servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>
    1.87 -    </servlet>
    1.88 -    <servlet>
    1.89 -        <description>Veřejné REST API (pak máme ještě jedno soukromé, kde musí být uživatel přihlášený)</description>
    1.90 -        <servlet-name>REST</servlet-name>
    1.91 -        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    1.92 -        <load-on-startup>1</load-on-startup>
    1.93 -    </servlet>
    1.94 -    <servlet>
    1.95 -        <description>Odesílání a náhledy komentářů pomocí AJAXu.</description>
    1.96 -        <servlet-name>komentare</servlet-name>
    1.97 -        <servlet-class>cz.frantovo.nekurak.servlet.Komentare</servlet-class>
    1.98 -    </servlet>
    1.99 +			<param-name>adresar</param-name>
   1.100 +			<param-value>/var/www/nekurak.net/fotky</param-value>
   1.101 +		</init-param>
   1.102 +		<load-on-startup>1</load-on-startup>
   1.103 +	</servlet>
   1.104 +	<servlet>
   1.105 +		<servlet-name>kaptcha</servlet-name>
   1.106 +		<servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>
   1.107 +	</servlet>
   1.108 +	<servlet>
   1.109 +		<description>Veřejné REST API (pak máme ještě jedno soukromé, kde musí být uživatel přihlášený)</description>
   1.110 +		<servlet-name>REST</servlet-name>
   1.111 +		<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
   1.112 +		<load-on-startup>1</load-on-startup>
   1.113 +	</servlet>
   1.114 +	<servlet>
   1.115 +		<description>Odesílání a náhledy komentářů pomocí AJAXu.</description>
   1.116 +		<servlet-name>komentare</servlet-name>
   1.117 +		<servlet-class>cz.frantovo.nekurak.servlet.Komentare</servlet-class>
   1.118 +	</servlet>
   1.119      <!-- </definiceServletů> -->
   1.120      <!-- <mapováníServletů> -->
   1.121 -    <servlet-mapping>
   1.122 -        <servlet-name>podnik</servlet-name>
   1.123 -        <url-pattern>/podnik/*</url-pattern>
   1.124 -    </servlet-mapping>
   1.125 -    <servlet-mapping>
   1.126 -        <servlet-name>fotky</servlet-name>
   1.127 -        <url-pattern>/fotky/*</url-pattern>
   1.128 -    </servlet-mapping>
   1.129 -    <servlet-mapping>
   1.130 -        <servlet-name>atom</servlet-name>
   1.131 -        <url-pattern>/atom/*</url-pattern>
   1.132 -    </servlet-mapping>
   1.133 -    <servlet-mapping>
   1.134 -        <servlet-name>kaptcha</servlet-name>
   1.135 -        <url-pattern>/kaptcha.jpg</url-pattern>
   1.136 -    </servlet-mapping>
   1.137 -    <servlet-mapping>
   1.138 +	<servlet-mapping>
   1.139 +		<servlet-name>podnik</servlet-name>
   1.140 +		<url-pattern>/podnik/*</url-pattern>
   1.141 +	</servlet-mapping>
   1.142 +	<servlet-mapping>
   1.143 +		<servlet-name>fotky</servlet-name>
   1.144 +		<url-pattern>/fotky/*</url-pattern>
   1.145 +	</servlet-mapping>
   1.146 +	<servlet-mapping>
   1.147 +		<servlet-name>atom</servlet-name>
   1.148 +		<url-pattern>/atom/*</url-pattern>
   1.149 +	</servlet-mapping>
   1.150 +	<servlet-mapping>
   1.151 +		<servlet-name>kaptcha</servlet-name>
   1.152 +		<url-pattern>/kaptcha.jpg</url-pattern>
   1.153 +	</servlet-mapping>
   1.154 +	<servlet-mapping>
   1.155          <!-- Veřejné REST API -->
   1.156 -        <servlet-name>REST</servlet-name>
   1.157 -        <url-pattern>/zdroje/*</url-pattern>
   1.158 -    </servlet-mapping>
   1.159 -    <servlet-mapping>
   1.160 -        <servlet-name>komentare</servlet-name>
   1.161 -        <url-pattern>/komentare</url-pattern>
   1.162 -    </servlet-mapping>
   1.163 +		<servlet-name>REST</servlet-name>
   1.164 +		<url-pattern>/zdroje/*</url-pattern>
   1.165 +	</servlet-mapping>
   1.166 +	<servlet-mapping>
   1.167 +		<servlet-name>komentare</servlet-name>
   1.168 +		<url-pattern>/komentare</url-pattern>
   1.169 +	</servlet-mapping>
   1.170      <!-- </mapováníServletů> -->
   1.171 -    <context-param>
   1.172 +	<context-param>
   1.173          <!-- Pro případ, že chybí hlavička „Accept-language“ v HTTP požadavku -->
   1.174 -        <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
   1.175 -        <param-value>cs</param-value>
   1.176 -    </context-param>
   1.177 -    <context-param>
   1.178 -        <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
   1.179 -        <param-value>cz.frantovo.nekurak.preklady</param-value>
   1.180 -    </context-param>
   1.181 +		<param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
   1.182 +		<param-value>cs</param-value>
   1.183 +	</context-param>
   1.184 +	<context-param>
   1.185 +		<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
   1.186 +		<param-value>cz.frantovo.nekurak.preklady</param-value>
   1.187 +	</context-param>
   1.188      <!--  <zabezpečení> -->
   1.189 -    <security-role>
   1.190 -        <role-name>opravneny</role-name>
   1.191 -    </security-role>
   1.192 -    <security-constraint>
   1.193 -        <web-resource-collection>
   1.194 -            <web-resource-name>Správa Nekuřák.net</web-resource-name>
   1.195 -            <url-pattern>/sprava/*</url-pattern>
   1.196 -        </web-resource-collection>
   1.197 -        <auth-constraint>
   1.198 -            <role-name>opravneny</role-name>
   1.199 -        </auth-constraint>
   1.200 -    </security-constraint>
   1.201 -    <login-config>
   1.202 -        <auth-method>FORM</auth-method>
   1.203 -        <realm-name>nekurakNET</realm-name>
   1.204 -        <form-login-config>
   1.205 -            <form-login-page>/?akce=prihlaseni</form-login-page>
   1.206 -            <form-error-page>/?akce=prihlaseni&amp;chyba=ano</form-error-page>
   1.207 -        </form-login-config>
   1.208 -    </login-config>
   1.209 +	<security-role>
   1.210 +		<role-name>opravneny</role-name>
   1.211 +	</security-role>
   1.212 +	<security-constraint>
   1.213 +		<web-resource-collection>
   1.214 +			<web-resource-name>Správa Nekuřák.net</web-resource-name>
   1.215 +			<url-pattern>/sprava/*</url-pattern>
   1.216 +		</web-resource-collection>
   1.217 +		<auth-constraint>
   1.218 +			<role-name>opravneny</role-name>
   1.219 +		</auth-constraint>
   1.220 +	</security-constraint>
   1.221 +	<login-config>
   1.222 +		<auth-method>FORM</auth-method>
   1.223 +		<realm-name>nekurakNET</realm-name>
   1.224 +		<form-login-config>
   1.225 +			<form-login-page>/?akce=prihlaseni</form-login-page>
   1.226 +			<form-error-page>/?akce=prihlaseni&amp;chyba=ano</form-error-page>
   1.227 +		</form-login-config>
   1.228 +	</login-config>
   1.229      <!--  </zabezpečení> -->
   1.230  </web-app>