Commit f559466dadd4fb4646d74c403c55115a903534ac

Authored by Cleverson Sacramento
2 parents 28d7743f 211cb260
Exists in master

Merge branch '2.4.0' of git@github.com:demoiselle/framework.git into 2.4.0

impl/extension/jsf/pom.xml
... ... @@ -76,6 +76,12 @@
76 76 <artifactId>jsf-api</artifactId>
77 77 </dependency>
78 78 <dependency>
  79 + <groupId>org.glassfish.web</groupId>
  80 + <artifactId>el-impl</artifactId>
  81 + <scope>provided</scope>
  82 + </dependency>
  83 + <!-- For Tests -->
  84 + <dependency>
79 85 <groupId>com.sun.faces</groupId>
80 86 <artifactId>jsf-impl</artifactId>
81 87 <scope>test</scope>
... ... @@ -87,9 +93,10 @@
87 93 <scope>test</scope>
88 94 </dependency>
89 95 <dependency>
90   - <groupId>org.glassfish.web</groupId>
91   - <artifactId>el-impl</artifactId>
92   - <scope>provided</scope>
  96 + <groupId>com.ocpsoft</groupId>
  97 + <artifactId>prettyfaces-jsf2</artifactId>
  98 + <version>3.3.0</version>
  99 + <scope>test</scope>
93 100 </dependency>
94 101 </dependencies>
95 102  
... ...
impl/extension/jsf/src/test/java/exception/handler/authorization/AuthorizationBean.java 0 → 100644
... ... @@ -0,0 +1,61 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package exception.handler.authorization;
  38 +
  39 +import br.gov.frameworkdemoiselle.security.AuthorizationException;
  40 +import br.gov.frameworkdemoiselle.stereotype.ViewController;
  41 +
  42 +@ViewController
  43 +public class AuthorizationBean {
  44 +
  45 + private String correctMessage = "Authorization Message.";
  46 +
  47 + private String exceptionMessage = "Authorization Exception!";
  48 +
  49 + public String getCorrectMessage() {
  50 + return correctMessage;
  51 + }
  52 +
  53 + public String getExceptionMessage() {
  54 + throw new AuthorizationException(exceptionMessage);
  55 + }
  56 +
  57 + public void loadExceptionMessage() {
  58 + throw new AuthorizationException(exceptionMessage);
  59 + }
  60 +
  61 +}
... ...
impl/extension/jsf/src/test/java/exception/handler/authorization/AuthorizationHandledExceptionTest.java 0 → 100644
... ... @@ -0,0 +1,95 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package exception.handler.authorization;
  38 +
  39 +import static org.junit.Assert.assertNotSame;
  40 +import static org.junit.Assert.assertTrue;
  41 +
  42 +import java.io.IOException;
  43 +import java.net.URL;
  44 +
  45 +import org.apache.commons.httpclient.HttpClient;
  46 +import org.apache.commons.httpclient.HttpException;
  47 +import org.apache.commons.httpclient.HttpStatus;
  48 +import org.apache.commons.httpclient.methods.GetMethod;
  49 +import org.jboss.arquillian.container.test.api.Deployment;
  50 +import org.jboss.arquillian.junit.Arquillian;
  51 +import org.jboss.arquillian.test.api.ArquillianResource;
  52 +import org.jboss.shrinkwrap.api.spec.WebArchive;
  53 +import org.junit.Test;
  54 +import org.junit.runner.RunWith;
  55 +
  56 +import test.Tests;
  57 +
  58 +@RunWith(Arquillian.class)
  59 +public class AuthorizationHandledExceptionTest {
  60 +
  61 + @ArquillianResource
  62 + private URL deploymentUrl;
  63 +
  64 + private static final String PATH = "src/test/resources/exception-handler-authorization";
  65 +
  66 + @Deployment(testable = false)
  67 + public static WebArchive createDeployment() {
  68 + return Tests.createDeployment().addClass(AuthorizationHandledExceptionTest.class).addClass(AuthorizationBean.class)
  69 + .addAsWebResource(Tests.createFileAsset(PATH + "/index.xhtml"), "index.xhtml")
  70 + .addAsWebInfResource(Tests.createFileAsset(PATH + "/web.xml"), "web.xml")
  71 + .addAsWebInfResource(Tests.createFileAsset(PATH + "/pretty-config.xml"), "pretty-config.xml");
  72 +
  73 + }
  74 +
  75 + @Test
  76 + public void authorizationHandledException() {
  77 + HttpClient client = new HttpClient();
  78 + GetMethod method = new GetMethod(deploymentUrl + "/index");
  79 +
  80 + try {
  81 + int status = client.executeMethod(method);
  82 + String message = method.getResponseBodyAsString();
  83 + System.out.println("MESAGE: " + message);
  84 +
  85 + assertNotSame(HttpStatus.SC_INTERNAL_SERVER_ERROR, status);
  86 + assertTrue(message.contains("Authorization Message."));
  87 + assertTrue(message.contains("Authorization Exception!"));
  88 +
  89 + } catch (HttpException e) {
  90 + e.printStackTrace();
  91 + } catch (IOException e) {
  92 + e.printStackTrace();
  93 + }
  94 + }
  95 +}
... ...
impl/extension/jsf/src/test/java/exception/handler/authorization/AuthorizationNotHandledExceptionTest.java 0 → 100644
... ... @@ -0,0 +1,94 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package exception.handler.authorization;
  38 +
  39 +import static org.junit.Assert.assertEquals;
  40 +import static org.junit.Assert.assertFalse;
  41 +import static org.junit.Assert.assertTrue;
  42 +
  43 +import java.io.IOException;
  44 +import java.net.URL;
  45 +
  46 +import org.apache.commons.httpclient.HttpClient;
  47 +import org.apache.commons.httpclient.HttpException;
  48 +import org.apache.commons.httpclient.HttpStatus;
  49 +import org.apache.commons.httpclient.methods.GetMethod;
  50 +import org.jboss.arquillian.container.test.api.Deployment;
  51 +import org.jboss.arquillian.junit.Arquillian;
  52 +import org.jboss.arquillian.test.api.ArquillianResource;
  53 +import org.jboss.shrinkwrap.api.spec.WebArchive;
  54 +import org.junit.Test;
  55 +import org.junit.runner.RunWith;
  56 +
  57 +import test.Tests;
  58 +
  59 +@RunWith(Arquillian.class)
  60 +public class AuthorizationNotHandledExceptionTest {
  61 +
  62 + @ArquillianResource
  63 + private URL deploymentUrl;
  64 +
  65 + private static final String PATH = "src/test/resources/exception-handler-authorization";
  66 +
  67 + @Deployment(testable = false)
  68 + public static WebArchive createDeployment() {
  69 + return Tests.createDeployment().addClass(AuthorizationNotHandledExceptionTest.class).addClass(AuthorizationBean.class)
  70 + .addAsWebResource(Tests.createFileAsset(PATH + "/page.xhtml"), "page.xhtml")
  71 + .addAsWebInfResource(Tests.createFileAsset(PATH + "/web.xml"), "web.xml");
  72 + }
  73 +
  74 + @Test
  75 + public void authorizationNotHandledException() {
  76 + HttpClient client = new HttpClient();
  77 + GetMethod method = new GetMethod(deploymentUrl + "/page.jsf");
  78 +
  79 + try {
  80 + int status = client.executeMethod(method);
  81 + String message = method.getResponseBodyAsString();
  82 + System.out.println("MESAGE: " + message);
  83 +
  84 + assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, status);
  85 + assertTrue(message.contains("Authorization Exception!"));
  86 + assertFalse(message.contains("Authorization Message."));
  87 +
  88 + } catch (HttpException e) {
  89 + e.printStackTrace();
  90 + } catch (IOException e) {
  91 + e.printStackTrace();
  92 + }
  93 + }
  94 +}
... ...
impl/extension/jsf/src/test/java/exception/handler/configuration/ExceptionHandlerConfigFilter.java
... ... @@ -1,99 +0,0 @@
1   -/*
2   - * Demoiselle Framework
3   - * Copyright (C) 2010 SERPRO
4   - * ----------------------------------------------------------------------------
5   - * This file is part of Demoiselle Framework.
6   - *
7   - * Demoiselle Framework is free software; you can redistribute it and/or
8   - * modify it under the terms of the GNU Lesser General Public License version 3
9   - * as published by the Free Software Foundation.
10   - *
11   - * This program is distributed in the hope that it will be useful,
12   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   - * GNU General Public License for more details.
15   - *
16   - * You should have received a copy of the GNU Lesser General Public License version 3
17   - * along with this program; if not, see <http://www.gnu.org/licenses/>
18   - * or write to the Free Software Foundation, Inc., 51 Franklin Street,
19   - * Fifth Floor, Boston, MA 02110-1301, USA.
20   - * ----------------------------------------------------------------------------
21   - * Este arquivo é parte do Framework Demoiselle.
22   - *
23   - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
24   - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
25   - * do Software Livre (FSF).
26   - *
27   - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
28   - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
29   - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
30   - * para maiores detalhes.
31   - *
32   - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
33   - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
34   - * ou escreva para a Fundação do Software Livre (FSF) Inc.,
35   - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
36   - */
37   -package exception.handler.configuration;
38   -
39   -import java.io.IOException;
40   -import java.util.Iterator;
41   -import java.util.List;
42   -
43   -import javax.faces.application.FacesMessage;
44   -import javax.faces.context.FacesContext;
45   -import javax.servlet.Filter;
46   -import javax.servlet.FilterChain;
47   -import javax.servlet.FilterConfig;
48   -import javax.servlet.ServletException;
49   -import javax.servlet.ServletRequest;
50   -import javax.servlet.ServletResponse;
51   -import javax.servlet.http.HttpServlet;
52   -import javax.servlet.http.HttpServletResponse;
53   -
54   -import br.gov.frameworkdemoiselle.util.Beans;
55   -
56   -public class ExceptionHandlerConfigFilter implements Filter {
57   -
58   - private static final long serialVersionUID = 1L;
59   -
60   - private List<FacesMessage> facesMessage;
61   -
62   - @Override
63   - public void init(FilterConfig filterConfig) throws ServletException {
64   - }
65   -
66   - @Override
67   - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
68   - ServletException {
69   -
70   -// try {
71   -
72   - chain.doFilter(request, response);
73   -
74   -// String message = response.getContentType();
75   -// System.out.println("MESSAGE FILTER: " + message);
76   -
77   -// facesMessage = FacesContext.getCurrentInstance().getMessageList();
78   -
79   -// for(FacesMessage fm : FacesContext.getCurrentInstance().getMessageList()) {
80   -// System.out.println("Sumary: " + fm.getSummary());
81   -// System.out.println("Detail: " + fm.getDetail());
82   -//
83   -// if(fm.getSummary().equals("DummyException!")) {
84   -// ((HttpServletResponse)response).setStatus(200);
85   -// }else {
86   -// ((HttpServletResponse)response).setStatus(200);
87   -// }
88   -// }
89   -
90   -// }catch(Exception e) {
91   -// ((HttpServletResponse)response).setStatus(200);
92   -// }
93   - }
94   -
95   - @Override
96   - public void destroy() {
97   - }
98   -
99   -}
impl/extension/jsf/src/test/resources/exception-handler-authorization/index.xhtml 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +<html xmlns:h="http://java.sun.com/jsf/html"
  2 + xmlns:ui="http://java.sun.com/jsf/facelets">
  3 +
  4 + <h:body>
  5 + #{authorizationBean.correctMessage}
  6 + <h:messages />
  7 + </h:body>
  8 +
  9 +</html>
... ...
impl/extension/jsf/src/test/resources/exception-handler-authorization/page.xhtml 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +<html xmlns:h="http://java.sun.com/jsf/html"
  2 + xmlns:ui="http://java.sun.com/jsf/facelets">
  3 +
  4 + <h:body>
  5 + #{authorizationBean.correctMessage}
  6 + #{authorizationBean.exceptionMessage}
  7 + <h:messages />
  8 + </h:body>
  9 +
  10 +</html>
0 11 \ No newline at end of file
... ...
impl/extension/jsf/src/test/resources/exception-handler-authorization/pretty-config.xml 0 → 100644
... ... @@ -0,0 +1,49 @@
  1 +<!--
  2 + Demoiselle Framework
  3 + Copyright (C) 2010 SERPRO
  4 + ============================================================================
  5 + This file is part of Demoiselle Framework.
  6 +
  7 + Demoiselle Framework is free software; you can redistribute it and/or
  8 + modify it under the terms of the GNU Lesser General Public License version 3
  9 + as published by the Free Software Foundation.
  10 +
  11 + This program is distributed in the hope that it will be useful,
  12 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + GNU General Public License for more details.
  15 +
  16 + You should have received a copy of the GNU Lesser General Public License version 3
  17 + along with this program; if not, see <http://www.gnu.org/licenses />
  18 + or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + Fifth Floor, Boston, MA 02110-1301, USA.
  20 + ============================================================================
  21 + Este arquivo é parte do Framework Demoiselle.
  22 +
  23 + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + do Software Livre (FSF).
  26 +
  27 + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + para maiores detalhes.
  31 +
  32 + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses />
  34 + ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 +-->
  37 +<pretty-config xmlns="http://ocpsoft.com/prettyfaces/3.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  38 + xsi:schemaLocation="http://ocpsoft.com/prettyfaces/3.3.0
  39 + http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.0.xsd">
  40 +
  41 + <rewrite match="^/*(.*)$" substitute="/$1" redirect="301" />
  42 +
  43 + <url-mapping id="index">
  44 + <pattern value="/index" />
  45 + <view-id value="/index.jsf" />
  46 + <action>#{authorizationBean.loadExceptionMessage}</action>
  47 + </url-mapping>
  48 +
  49 +</pretty-config>
0 50 \ No newline at end of file
... ...
impl/extension/jsf/src/test/resources/exception-handler-authorization/web.xml 0 → 100644
... ... @@ -0,0 +1,74 @@
  1 +<!--
  2 + Demoiselle Framework
  3 + Copyright (C) 2010 SERPRO
  4 + ============================================================================
  5 + This file is part of Demoiselle Framework.
  6 +
  7 + Demoiselle Framework is free software; you can redistribute it and/or
  8 + modify it under the terms of the GNU Lesser General Public License version 3
  9 + as published by the Free Software Foundation.
  10 +
  11 + This program is distributed in the hope that it will be useful,
  12 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + GNU General Public License for more details.
  15 +
  16 + You should have received a copy of the GNU Lesser General Public License version 3
  17 + along with this program; if not, see <http://www.gnu.org/licenses />
  18 + or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + Fifth Floor, Boston, MA 02110-1301, USA.
  20 + ============================================================================
  21 + Este arquivo é parte do Framework Demoiselle.
  22 +
  23 + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + do Software Livre (FSF).
  26 +
  27 + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + para maiores detalhes.
  31 +
  32 + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses />
  34 + ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 +-->
  37 +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  38 + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  39 +
  40 + <listener>
  41 + <listener-class>br.gov.frameworkdemoiselle.util.ServletListener</listener-class>
  42 + </listener>
  43 + <filter>
  44 + <filter-name>Demoiselle Servlet Filter</filter-name>
  45 + <filter-class>br.gov.frameworkdemoiselle.util.ServletFilter</filter-class>
  46 + </filter>
  47 + <filter-mapping>
  48 + <filter-name>Demoiselle Servlet Filter</filter-name>
  49 + <url-pattern>/*</url-pattern>
  50 + </filter-mapping>
  51 +
  52 + <filter>
  53 + <filter-name>Pretty Filter</filter-name>
  54 + <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
  55 + </filter>
  56 +
  57 + <filter-mapping>
  58 + <filter-name>Pretty Filter</filter-name>
  59 + <url-pattern>/*</url-pattern>
  60 + <dispatcher>FORWARD</dispatcher>
  61 + <dispatcher>REQUEST</dispatcher>
  62 + <dispatcher>ERROR</dispatcher>
  63 + </filter-mapping>
  64 +
  65 + <servlet>
  66 + <servlet-name>Faces Servlet</servlet-name>
  67 + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  68 + <load-on-startup>1</load-on-startup>
  69 + </servlet>
  70 + <servlet-mapping>
  71 + <servlet-name>Faces Servlet</servlet-name>
  72 + <url-pattern>*.jsf</url-pattern>
  73 + </servlet-mapping>
  74 +</web-app>
0 75 \ No newline at end of file
... ...