Commit b12feaab0a11db48a38e6a1dd453d3a2cd2c0399
Exists in
master
Merge branch '2.4.0' of https://github.com/demoiselle/framework.git into 2.4.0
Showing
31 changed files
with
1377 additions
and
2 deletions
Show diff stats
impl/core/src/test/resources/message/messages.properties
1 | +# Demoiselle Framework | |
2 | +# Copyright (C) 2010 SERPRO | |
3 | +# ---------------------------------------------------------------------------- | |
4 | +# This file is part of Demoiselle Framework. | |
5 | +# | |
6 | +# Demoiselle Framework is free software; you can redistribute it and/or | |
7 | +# modify it under the terms of the GNU Lesser General Public License version 3 | |
8 | +# as published by the Free Software Foundation. | |
9 | +# | |
10 | +# This program is distributed in the hope that it will be useful, | |
11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | +# GNU General Public License for more details. | |
14 | +# | |
15 | +# You should have received a copy of the GNU Lesser General Public License version 3 | |
16 | +# along with this program; if not, see <http://www.gnu.org/licenses/> | |
17 | +# or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
18 | +# Fifth Floor, Boston, MA 02110-1301, USA. | |
19 | +# ---------------------------------------------------------------------------- | |
20 | +# Este arquivo é parte do Framework Demoiselle. | |
21 | +# | |
22 | +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
23 | +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
24 | +# do Software Livre (FSF). | |
25 | +# | |
26 | +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
27 | +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
28 | +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
29 | +# para maiores detalhes. | |
30 | +# | |
31 | +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
32 | +# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | |
33 | +# ou escreva para a Fundação do Software Livre (FSF) Inc., | |
34 | +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
35 | + | |
1 | 36 | MESSAGE_WITHOUT_PARAMETER=Mensagem sem parâmetro |
2 | 37 | MESSAGE_PARSED=Message parsed |
3 | 38 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/java/exception/handler/common/DummyException.java
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 | +package exception.handler.common; | |
38 | + | |
39 | +import br.gov.frameworkdemoiselle.exception.ApplicationException; | |
40 | + | |
41 | +@ApplicationException | |
42 | +public class DummyException extends RuntimeException{ | |
43 | + | |
44 | + private static final long serialVersionUID = 1L; | |
45 | + | |
46 | + public DummyException(String string) { | |
47 | + super(string); | |
48 | + } | |
49 | +} | ... | ... |
impl/extension/jsf/src/test/java/exception/handler/common/ExceptionHandlerConfigBean.java
0 → 100644
... | ... | @@ -0,0 +1,50 @@ |
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.common; | |
38 | + | |
39 | +import br.gov.frameworkdemoiselle.stereotype.ViewController; | |
40 | + | |
41 | +@ViewController | |
42 | +public class ExceptionHandlerConfigBean{ | |
43 | + | |
44 | + @SuppressWarnings("unused") | |
45 | + private String exp; | |
46 | + | |
47 | + public String getExp() throws DummyException { | |
48 | + throw new DummyException("DummyException!"); | |
49 | + } | |
50 | +} | ... | ... |
impl/extension/jsf/src/test/java/exception/handler/configuration/ExceptionHandlerConfigFilter.java
0 → 100644
... | ... | @@ -0,0 +1,99 @@ |
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/java/exception/handler/configuration/ExceptionHandlerDefaultConfigTest.java
0 → 100644
... | ... | @@ -0,0 +1,98 @@ |
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 static org.junit.Assert.assertTrue; | |
40 | + | |
41 | +import java.io.IOException; | |
42 | +import java.net.URL; | |
43 | + | |
44 | +import org.apache.commons.httpclient.HttpClient; | |
45 | +import org.apache.commons.httpclient.HttpException; | |
46 | +import org.apache.commons.httpclient.methods.GetMethod; | |
47 | +import org.jboss.arquillian.container.test.api.Deployment; | |
48 | +import org.jboss.arquillian.junit.Arquillian; | |
49 | +import org.jboss.arquillian.test.api.ArquillianResource; | |
50 | +import org.jboss.shrinkwrap.api.spec.WebArchive; | |
51 | +import org.junit.Test; | |
52 | +import org.junit.runner.RunWith; | |
53 | + | |
54 | +import exception.handler.common.DummyException; | |
55 | +import exception.handler.common.ExceptionHandlerConfigBean; | |
56 | +import test.Tests; | |
57 | + | |
58 | +@RunWith(Arquillian.class) | |
59 | +public class ExceptionHandlerDefaultConfigTest{ | |
60 | + | |
61 | + @ArquillianResource | |
62 | + private URL deploymentUrl; | |
63 | + | |
64 | + private static final String PATH = "src/test/resources/exception-handler-config"; | |
65 | + | |
66 | + @Deployment(testable = false) | |
67 | + public static WebArchive createDeployment() { | |
68 | + return Tests.createDeployment().addClass(ExceptionHandlerDefaultConfigTest.class) | |
69 | + .addClass(DummyException.class) | |
70 | + .addClass(ExceptionHandlerConfigBean.class) | |
71 | + .addAsWebResource(Tests.createFileAsset(PATH + "/index.xhtml"), "index.xhtml") | |
72 | + .addAsWebResource(Tests.createFileAsset(PATH + "/application_error.xhtml"), "application_error.xhtml") | |
73 | + .addAsWebInfResource(Tests.createFileAsset(PATH + "/web.xml"), "web.xml"); | |
74 | + } | |
75 | + | |
76 | + @Test | |
77 | + public void defaultConfiguration() { | |
78 | + HttpClient client = new HttpClient(); | |
79 | + GetMethod method = new GetMethod(deploymentUrl + "/index.jsf"); | |
80 | + | |
81 | + try { | |
82 | + client.executeMethod(method); | |
83 | + String message = method.getResponseBodyAsString(); | |
84 | + assertTrue(message.contains("Called the page /application_error")); | |
85 | + | |
86 | + } catch (HttpException e) { | |
87 | + e.printStackTrace(); | |
88 | + } catch (IOException e) { | |
89 | + e.printStackTrace(); | |
90 | + } | |
91 | + } | |
92 | +} | |
93 | + | |
94 | + | |
95 | + | |
96 | + | |
97 | + | |
98 | + | ... | ... |
impl/extension/jsf/src/test/java/exception/handler/configuration/ExceptionHandlerRedirectConfigTest.java
0 → 100644
... | ... | @@ -0,0 +1,92 @@ |
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 static org.junit.Assert.assertTrue; | |
40 | + | |
41 | +import java.io.IOException; | |
42 | +import java.net.URL; | |
43 | + | |
44 | +import org.apache.commons.httpclient.HttpClient; | |
45 | +import org.apache.commons.httpclient.HttpException; | |
46 | +import org.apache.commons.httpclient.methods.GetMethod; | |
47 | +import org.jboss.arquillian.container.test.api.Deployment; | |
48 | +import org.jboss.arquillian.junit.Arquillian; | |
49 | +import org.jboss.arquillian.test.api.ArquillianResource; | |
50 | +import org.jboss.shrinkwrap.api.spec.WebArchive; | |
51 | +import org.junit.Test; | |
52 | +import org.junit.runner.RunWith; | |
53 | + | |
54 | +import test.Tests; | |
55 | +import exception.handler.common.DummyException; | |
56 | +import exception.handler.common.ExceptionHandlerConfigBean; | |
57 | + | |
58 | +@RunWith(Arquillian.class) | |
59 | +public class ExceptionHandlerRedirectConfigTest { | |
60 | + | |
61 | + @ArquillianResource | |
62 | + private URL deploymentUrl; | |
63 | + | |
64 | + private static final String PATH = "src/test/resources/exception-handler-redirect-config"; | |
65 | + | |
66 | + @Deployment(testable = false) | |
67 | + public static WebArchive createDeployment() { | |
68 | + return Tests.createDeployment().addClass(ExceptionHandlerRedirectConfigTest.class) | |
69 | + .addClass(DummyException.class).addClass(ExceptionHandlerConfigBean.class) | |
70 | + .addAsWebResource(Tests.createFileAsset(PATH + "/index.xhtml"), "index.xhtml") | |
71 | + .addAsWebResource(Tests.createFileAsset(PATH + "/error_page.xhtml"), "error_page.xhtml") | |
72 | + .addAsWebInfResource(Tests.createFileAsset(PATH + "/web.xml"), "web.xml") | |
73 | + .addAsResource(Tests.createFileAsset(PATH + "/demoiselle.properties"), "demoiselle.properties"); | |
74 | + } | |
75 | + | |
76 | + @Test | |
77 | + public void notHandlerConfiguration() { | |
78 | + HttpClient client = new HttpClient(); | |
79 | + GetMethod method = new GetMethod(deploymentUrl + "/index.jsf"); | |
80 | + | |
81 | + try { | |
82 | + client.executeMethod(method); | |
83 | + String message = method.getResponseBodyAsString(); | |
84 | + assertTrue(message.contains("Called the page /error_page")); | |
85 | + | |
86 | + } catch (HttpException e) { | |
87 | + e.printStackTrace(); | |
88 | + } catch (IOException e) { | |
89 | + e.printStackTrace(); | |
90 | + } | |
91 | + } | |
92 | +} | ... | ... |
impl/extension/jsf/src/test/java/exception/handler/configuration/ExceptionNotHandlerConfigTest.java
0 → 100644
... | ... | @@ -0,0 +1,91 @@ |
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 static org.junit.Assert.assertEquals; | |
40 | + | |
41 | +import java.io.IOException; | |
42 | +import java.net.URL; | |
43 | + | |
44 | +import org.apache.commons.httpclient.HttpClient; | |
45 | +import org.apache.commons.httpclient.HttpException; | |
46 | +import org.apache.commons.httpclient.HttpStatus; | |
47 | +import org.apache.commons.httpclient.methods.GetMethod; | |
48 | +import org.jboss.arquillian.container.test.api.Deployment; | |
49 | +import org.jboss.arquillian.junit.Arquillian; | |
50 | +import org.jboss.arquillian.test.api.ArquillianResource; | |
51 | +import org.jboss.shrinkwrap.api.spec.WebArchive; | |
52 | +import org.junit.Test; | |
53 | +import org.junit.runner.RunWith; | |
54 | + | |
55 | +import test.Tests; | |
56 | +import exception.handler.common.DummyException; | |
57 | +import exception.handler.common.ExceptionHandlerConfigBean; | |
58 | + | |
59 | +@RunWith(Arquillian.class) | |
60 | +public class ExceptionNotHandlerConfigTest { | |
61 | + | |
62 | + @ArquillianResource | |
63 | + private URL deploymentUrl; | |
64 | + | |
65 | + private static final String PATH = "src/test/resources/exception-handler-config"; | |
66 | + | |
67 | + @Deployment(testable = false) | |
68 | + public static WebArchive createDeployment() { | |
69 | + return Tests.createDeployment().addClass(ExceptionNotHandlerConfigTest.class).addClass(DummyException.class) | |
70 | + .addClass(ExceptionHandlerConfigBean.class) | |
71 | + .addAsWebResource(Tests.createFileAsset(PATH + "/index.xhtml"), "index.xhtml") | |
72 | + .addAsWebResource(Tests.createFileAsset(PATH + "/application_error.xhtml"), "application_error.xhtml") | |
73 | + .addAsWebInfResource(Tests.createFileAsset(PATH + "/web.xml"), "web.xml") | |
74 | + .addAsResource(Tests.createFileAsset(PATH + "/demoiselle.properties"), "demoiselle.properties"); | |
75 | + } | |
76 | + | |
77 | + @Test | |
78 | + public void notHandlerConfiguration() { | |
79 | + HttpClient client = new HttpClient(); | |
80 | + GetMethod method = new GetMethod(deploymentUrl + "/index.jsf"); | |
81 | + | |
82 | + try { | |
83 | + assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, client.executeMethod(method)); | |
84 | + | |
85 | + } catch (HttpException e) { | |
86 | + e.printStackTrace(); | |
87 | + } catch (IOException e) { | |
88 | + e.printStackTrace(); | |
89 | + } | |
90 | + } | |
91 | +} | ... | ... |
impl/extension/jsf/src/test/java/exception/handler/configuration/compatibility/ExceptionHandlerRedirectConfigTest.java
0 → 100644
... | ... | @@ -0,0 +1,92 @@ |
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.compatibility; | |
38 | + | |
39 | +import static org.junit.Assert.assertTrue; | |
40 | + | |
41 | +import java.io.IOException; | |
42 | +import java.net.URL; | |
43 | + | |
44 | +import org.apache.commons.httpclient.HttpClient; | |
45 | +import org.apache.commons.httpclient.HttpException; | |
46 | +import org.apache.commons.httpclient.methods.GetMethod; | |
47 | +import org.jboss.arquillian.container.test.api.Deployment; | |
48 | +import org.jboss.arquillian.junit.Arquillian; | |
49 | +import org.jboss.arquillian.test.api.ArquillianResource; | |
50 | +import org.jboss.shrinkwrap.api.spec.WebArchive; | |
51 | +import org.junit.Test; | |
52 | +import org.junit.runner.RunWith; | |
53 | + | |
54 | +import test.Tests; | |
55 | +import exception.handler.common.DummyException; | |
56 | +import exception.handler.common.ExceptionHandlerConfigBean; | |
57 | + | |
58 | +@RunWith(Arquillian.class) | |
59 | +public class ExceptionHandlerRedirectConfigTest { | |
60 | + | |
61 | + @ArquillianResource | |
62 | + private URL deploymentUrl; | |
63 | + | |
64 | + private static final String PATH = "src/test/resources/exception-handler-redirect-config-compatibility"; | |
65 | + | |
66 | + @Deployment(testable = false) | |
67 | + public static WebArchive createDeployment() { | |
68 | + return Tests.createDeployment().addClass(ExceptionHandlerRedirectConfigTest.class) | |
69 | + .addClass(DummyException.class).addClass(ExceptionHandlerConfigBean.class) | |
70 | + .addAsWebResource(Tests.createFileAsset(PATH + "/index.xhtml"), "index.xhtml") | |
71 | + .addAsWebResource(Tests.createFileAsset(PATH + "/error_page.xhtml"), "error_page.xhtml") | |
72 | + .addAsWebInfResource(Tests.createFileAsset(PATH + "/web.xml"), "web.xml") | |
73 | + .addAsResource(Tests.createFileAsset(PATH + "/demoiselle.properties"), "demoiselle.properties"); | |
74 | + } | |
75 | + | |
76 | + @Test | |
77 | + public void notHandlerConfiguration() { | |
78 | + HttpClient client = new HttpClient(); | |
79 | + GetMethod method = new GetMethod(deploymentUrl + "/index.jsf"); | |
80 | + | |
81 | + try { | |
82 | + client.executeMethod(method); | |
83 | + String message = method.getResponseBodyAsString(); | |
84 | + assertTrue(message.contains("Called the page /error_page")); | |
85 | + | |
86 | + } catch (HttpException e) { | |
87 | + e.printStackTrace(); | |
88 | + } catch (IOException e) { | |
89 | + e.printStackTrace(); | |
90 | + } | |
91 | + } | |
92 | +} | ... | ... |
impl/extension/jsf/src/test/java/exception/handler/configuration/compatibility/ExceptionNotHandlerConfigTest.java
0 → 100644
... | ... | @@ -0,0 +1,92 @@ |
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.compatibility; | |
38 | + | |
39 | +import static org.junit.Assert.assertEquals; | |
40 | + | |
41 | +import java.io.IOException; | |
42 | +import java.net.URL; | |
43 | + | |
44 | +import org.apache.commons.httpclient.HttpClient; | |
45 | +import org.apache.commons.httpclient.HttpException; | |
46 | +import org.apache.commons.httpclient.HttpStatus; | |
47 | +import org.apache.commons.httpclient.methods.GetMethod; | |
48 | +import org.jboss.arquillian.container.test.api.Deployment; | |
49 | +import org.jboss.arquillian.junit.Arquillian; | |
50 | +import org.jboss.arquillian.test.api.ArquillianResource; | |
51 | +import org.jboss.shrinkwrap.api.spec.WebArchive; | |
52 | +import org.junit.Test; | |
53 | +import org.junit.runner.RunWith; | |
54 | + | |
55 | +import test.Tests; | |
56 | +import exception.handler.common.DummyException; | |
57 | +import exception.handler.common.ExceptionHandlerConfigBean; | |
58 | + | |
59 | +@RunWith(Arquillian.class) | |
60 | +public class ExceptionNotHandlerConfigTest { | |
61 | + | |
62 | + @ArquillianResource | |
63 | + private URL deploymentUrl; | |
64 | + | |
65 | + private static final String PATH = "src/test/resources/exception-handler-config-compatibility"; | |
66 | + | |
67 | + @Deployment(testable = false) | |
68 | + public static WebArchive createDeployment() { | |
69 | + return Tests.createDeployment().addClass(ExceptionNotHandlerConfigTest.class).addClass(DummyException.class) | |
70 | + .addClass(ExceptionHandlerConfigBean.class) | |
71 | + .addAsWebResource(Tests.createFileAsset(PATH + "/index.xhtml"), "index.xhtml") | |
72 | + .addAsWebResource(Tests.createFileAsset(PATH + "/application_error.xhtml"), "application_error.xhtml") | |
73 | + .addAsWebInfResource(Tests.createFileAsset(PATH + "/web.xml"), "web.xml") | |
74 | + .addAsResource(Tests.createFileAsset(PATH + "/demoiselle.properties"), "demoiselle.properties"); | |
75 | + } | |
76 | + | |
77 | + @Test | |
78 | + public void notHandlerConfiguration() { | |
79 | + HttpClient client = new HttpClient(); | |
80 | + GetMethod method = new GetMethod(deploymentUrl + "/index.jsf"); | |
81 | + | |
82 | + try { | |
83 | + int status = client.executeMethod(method); | |
84 | + assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, status); | |
85 | + | |
86 | + } catch (HttpException e) { | |
87 | + e.printStackTrace(); | |
88 | + } catch (IOException e) { | |
89 | + e.printStackTrace(); | |
90 | + } | |
91 | + } | |
92 | +} | ... | ... |
impl/extension/jsf/src/test/java/message/MessageBean.java
0 → 100644
... | ... | @@ -0,0 +1,56 @@ |
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 message; | |
38 | + | |
39 | +import javax.inject.Inject; | |
40 | + | |
41 | +import br.gov.frameworkdemoiselle.message.MessageContext; | |
42 | +import br.gov.frameworkdemoiselle.stereotype.ViewController; | |
43 | + | |
44 | +@ViewController | |
45 | +public class MessageBean { | |
46 | + | |
47 | + private String msg = "Message shown."; | |
48 | + | |
49 | + @Inject | |
50 | + private MessageContext messageContext; | |
51 | + | |
52 | + public String getMsg() { | |
53 | + messageContext.add(msg); | |
54 | + return ""; | |
55 | + } | |
56 | +} | ... | ... |
impl/extension/jsf/src/test/java/message/MessageTest.java
0 → 100644
... | ... | @@ -0,0 +1,88 @@ |
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 message; | |
38 | + | |
39 | +import static org.junit.Assert.assertTrue; | |
40 | + | |
41 | +import java.io.IOException; | |
42 | +import java.net.URL; | |
43 | + | |
44 | +import org.apache.commons.httpclient.HttpClient; | |
45 | +import org.apache.commons.httpclient.HttpException; | |
46 | +import org.apache.commons.httpclient.methods.GetMethod; | |
47 | +import org.jboss.arquillian.container.test.api.Deployment; | |
48 | +import org.jboss.arquillian.junit.Arquillian; | |
49 | +import org.jboss.arquillian.test.api.ArquillianResource; | |
50 | +import org.jboss.shrinkwrap.api.spec.WebArchive; | |
51 | +import org.junit.Test; | |
52 | +import org.junit.runner.RunWith; | |
53 | + | |
54 | +import test.Tests; | |
55 | + | |
56 | +@RunWith(Arquillian.class) | |
57 | +public class MessageTest { | |
58 | + | |
59 | + @ArquillianResource | |
60 | + private URL deploymentUrl; | |
61 | + | |
62 | + private static final String PATH = "src/test/resources/message"; | |
63 | + | |
64 | + @Deployment(testable = false) | |
65 | + public static WebArchive createDeployment() { | |
66 | + return Tests.createDeployment().addClass(MessageTest.class) | |
67 | + .addClass(MessageBean.class) | |
68 | + .addAsWebResource(Tests.createFileAsset(PATH + "/index.xhtml"), "index.xhtml") | |
69 | + .addAsWebInfResource(Tests.createFileAsset(PATH + "/web.xml"), "web.xml"); | |
70 | + } | |
71 | + | |
72 | + @Test | |
73 | + public void showMessage() { | |
74 | + HttpClient client = new HttpClient(); | |
75 | + GetMethod method = new GetMethod(deploymentUrl + "/index.jsf"); | |
76 | + | |
77 | + try { | |
78 | + client.executeMethod(method); | |
79 | + String message = method.getResponseBodyAsString(); | |
80 | + assertTrue(message.contains("Message shown.")); | |
81 | + | |
82 | + } catch (HttpException e) { | |
83 | + e.printStackTrace(); | |
84 | + } catch (IOException e) { | |
85 | + e.printStackTrace(); | |
86 | + } | |
87 | + } | |
88 | +} | ... | ... |
impl/extension/jsf/src/test/java/test/Tests.java
... | ... | @@ -134,6 +134,9 @@ public final class Tests { |
134 | 134 | .addAsResource(createFileAsset("src/main/resources/demoiselle-jsf-bundle.properties"), |
135 | 135 | "demoiselle-jsf-bundle.properties") |
136 | 136 | .addAsWebInfResource(createFileAsset("src/test/resources/test/beans.xml"), "beans.xml") |
137 | + .addAsManifestResource(createFileAsset("src/main/resources/META-INF/faces-config.xml"), "faces-config.xml") | |
138 | + .addAsManifestResource(createFileAsset("src/main/resources/META-INF/demoiselle-d.taglib.xml"), "demoiselle-d.taglib.xml") | |
139 | + .addAsManifestResource(createFileAsset("src/main/resources/META-INF/tags/br/gov/frameworkdemoiselle/checkLoggedIn.xhtml"), "checkedLoggedIn.xhtml") | |
137 | 140 | .addAsLibraries(libs); |
138 | 141 | } |
139 | 142 | ... | ... |
impl/extension/jsf/src/test/resources/exception-handler-config-compatibility/application_error.xhtml
0 → 100644
impl/extension/jsf/src/test/resources/exception-handler-config-compatibility/demoiselle.properties
0 → 100644
... | ... | @@ -0,0 +1,36 @@ |
1 | +# Demoiselle Framework | |
2 | +# Copyright (C) 2010 SERPRO | |
3 | +# ---------------------------------------------------------------------------- | |
4 | +# This file is part of Demoiselle Framework. | |
5 | +# | |
6 | +# Demoiselle Framework is free software; you can redistribute it and/or | |
7 | +# modify it under the terms of the GNU Lesser General Public License version 3 | |
8 | +# as published by the Free Software Foundation. | |
9 | +# | |
10 | +# This program is distributed in the hope that it will be useful, | |
11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | +# GNU General Public License for more details. | |
14 | +# | |
15 | +# You should have received a copy of the GNU Lesser General Public License version 3 | |
16 | +# along with this program; if not, see <http://www.gnu.org/licenses/> | |
17 | +# or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
18 | +# Fifth Floor, Boston, MA 02110-1301, USA. | |
19 | +# ---------------------------------------------------------------------------- | |
20 | +# Este arquivo é parte do Framework Demoiselle. | |
21 | +# | |
22 | +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
23 | +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
24 | +# do Software Livre (FSF). | |
25 | +# | |
26 | +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
27 | +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
28 | +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
29 | +# para maiores detalhes. | |
30 | +# | |
31 | +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
32 | +# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | |
33 | +# ou escreva para a Fundação do Software Livre (FSF) Inc., | |
34 | +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
35 | + | |
36 | +frameworkdemoiselle.handle.application.exception=false | |
0 | 37 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/resources/exception-handler-config-compatibility/index.xhtml
0 → 100644
impl/extension/jsf/src/test/resources/exception-handler-config-compatibility/web.xml
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 | +<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 | + <servlet> | |
53 | + <servlet-name>Faces Servlet</servlet-name> | |
54 | + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> | |
55 | + <load-on-startup>1</load-on-startup> | |
56 | + </servlet> | |
57 | + <servlet-mapping> | |
58 | + <servlet-name>Faces Servlet</servlet-name> | |
59 | + <url-pattern>*.jsf</url-pattern> | |
60 | + </servlet-mapping> | |
61 | +</web-app> | |
0 | 62 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/resources/exception-handler-config/application_error.xhtml
0 → 100644
impl/extension/jsf/src/test/resources/exception-handler-config/demoiselle.properties
0 → 100644
... | ... | @@ -0,0 +1,36 @@ |
1 | +# Demoiselle Framework | |
2 | +# Copyright (C) 2010 SERPRO | |
3 | +# ---------------------------------------------------------------------------- | |
4 | +# This file is part of Demoiselle Framework. | |
5 | +# | |
6 | +# Demoiselle Framework is free software; you can redistribute it and/or | |
7 | +# modify it under the terms of the GNU Lesser General Public License version 3 | |
8 | +# as published by the Free Software Foundation. | |
9 | +# | |
10 | +# This program is distributed in the hope that it will be useful, | |
11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | +# GNU General Public License for more details. | |
14 | +# | |
15 | +# You should have received a copy of the GNU Lesser General Public License version 3 | |
16 | +# along with this program; if not, see <http://www.gnu.org/licenses/> | |
17 | +# or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
18 | +# Fifth Floor, Boston, MA 02110-1301, USA. | |
19 | +# ---------------------------------------------------------------------------- | |
20 | +# Este arquivo é parte do Framework Demoiselle. | |
21 | +# | |
22 | +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
23 | +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
24 | +# do Software Livre (FSF). | |
25 | +# | |
26 | +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
27 | +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
28 | +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
29 | +# para maiores detalhes. | |
30 | +# | |
31 | +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
32 | +# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | |
33 | +# ou escreva para a Fundação do Software Livre (FSF) Inc., | |
34 | +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
35 | + | |
36 | +frameworkdemoiselle.exception.application.handle=false | |
0 | 37 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/resources/exception-handler-config/index.xhtml
0 → 100644
impl/extension/jsf/src/test/resources/exception-handler-config/web.xml
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 | +<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 | + <servlet> | |
53 | + <servlet-name>Faces Servlet</servlet-name> | |
54 | + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> | |
55 | + <load-on-startup>1</load-on-startup> | |
56 | + </servlet> | |
57 | + <servlet-mapping> | |
58 | + <servlet-name>Faces Servlet</servlet-name> | |
59 | + <url-pattern>*.jsf</url-pattern> | |
60 | + </servlet-mapping> | |
61 | +</web-app> | |
0 | 62 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/resources/exception-handler-redirect-config-compatibility/demoiselle.properties
0 → 100644
... | ... | @@ -0,0 +1,36 @@ |
1 | +# Demoiselle Framework | |
2 | +# Copyright (C) 2010 SERPRO | |
3 | +# ---------------------------------------------------------------------------- | |
4 | +# This file is part of Demoiselle Framework. | |
5 | +# | |
6 | +# Demoiselle Framework is free software; you can redistribute it and/or | |
7 | +# modify it under the terms of the GNU Lesser General Public License version 3 | |
8 | +# as published by the Free Software Foundation. | |
9 | +# | |
10 | +# This program is distributed in the hope that it will be useful, | |
11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | +# GNU General Public License for more details. | |
14 | +# | |
15 | +# You should have received a copy of the GNU Lesser General Public License version 3 | |
16 | +# along with this program; if not, see <http://www.gnu.org/licenses/> | |
17 | +# or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
18 | +# Fifth Floor, Boston, MA 02110-1301, USA. | |
19 | +# ---------------------------------------------------------------------------- | |
20 | +# Este arquivo é parte do Framework Demoiselle. | |
21 | +# | |
22 | +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
23 | +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
24 | +# do Software Livre (FSF). | |
25 | +# | |
26 | +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
27 | +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
28 | +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
29 | +# para maiores detalhes. | |
30 | +# | |
31 | +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
32 | +# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | |
33 | +# ou escreva para a Fundação do Software Livre (FSF) Inc., | |
34 | +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
35 | + | |
36 | +frameworkdemoiselle.handle.application.exception.page=/error_page | |
0 | 37 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/resources/exception-handler-redirect-config-compatibility/error_page.xhtml
0 → 100644
impl/extension/jsf/src/test/resources/exception-handler-redirect-config-compatibility/index.xhtml
0 → 100644
impl/extension/jsf/src/test/resources/exception-handler-redirect-config-compatibility/web.xml
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 | +<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 | + <servlet> | |
53 | + <servlet-name>Faces Servlet</servlet-name> | |
54 | + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> | |
55 | + <load-on-startup>1</load-on-startup> | |
56 | + </servlet> | |
57 | + <servlet-mapping> | |
58 | + <servlet-name>Faces Servlet</servlet-name> | |
59 | + <url-pattern>*.jsf</url-pattern> | |
60 | + </servlet-mapping> | |
61 | +</web-app> | |
0 | 62 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/resources/exception-handler-redirect-config/demoiselle.properties
0 → 100644
... | ... | @@ -0,0 +1,36 @@ |
1 | +# Demoiselle Framework | |
2 | +# Copyright (C) 2010 SERPRO | |
3 | +# ---------------------------------------------------------------------------- | |
4 | +# This file is part of Demoiselle Framework. | |
5 | +# | |
6 | +# Demoiselle Framework is free software; you can redistribute it and/or | |
7 | +# modify it under the terms of the GNU Lesser General Public License version 3 | |
8 | +# as published by the Free Software Foundation. | |
9 | +# | |
10 | +# This program is distributed in the hope that it will be useful, | |
11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | +# GNU General Public License for more details. | |
14 | +# | |
15 | +# You should have received a copy of the GNU Lesser General Public License version 3 | |
16 | +# along with this program; if not, see <http://www.gnu.org/licenses/> | |
17 | +# or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
18 | +# Fifth Floor, Boston, MA 02110-1301, USA. | |
19 | +# ---------------------------------------------------------------------------- | |
20 | +# Este arquivo é parte do Framework Demoiselle. | |
21 | +# | |
22 | +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
23 | +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
24 | +# do Software Livre (FSF). | |
25 | +# | |
26 | +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
27 | +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
28 | +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
29 | +# para maiores detalhes. | |
30 | +# | |
31 | +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
32 | +# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | |
33 | +# ou escreva para a Fundação do Software Livre (FSF) Inc., | |
34 | +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
35 | + | |
36 | +frameworkdemoiselle.exception.default.redirect.page=/error_page | |
0 | 37 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/resources/exception-handler-redirect-config/error_page.xhtml
0 → 100644
impl/extension/jsf/src/test/resources/exception-handler-redirect-config/index.xhtml
0 → 100644
impl/extension/jsf/src/test/resources/exception-handler-redirect-config/web.xml
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 | +<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 | + <servlet> | |
53 | + <servlet-name>Faces Servlet</servlet-name> | |
54 | + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> | |
55 | + <load-on-startup>1</load-on-startup> | |
56 | + </servlet> | |
57 | + <servlet-mapping> | |
58 | + <servlet-name>Faces Servlet</servlet-name> | |
59 | + <url-pattern>*.jsf</url-pattern> | |
60 | + </servlet-mapping> | |
61 | +</web-app> | |
0 | 62 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/resources/message/index.xhtml
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 | +<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 | + <servlet> | |
53 | + <servlet-name>Faces Servlet</servlet-name> | |
54 | + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> | |
55 | + <load-on-startup>1</load-on-startup> | |
56 | + </servlet> | |
57 | + <servlet-mapping> | |
58 | + <servlet-name>Faces Servlet</servlet-name> | |
59 | + <url-pattern>*.jsf</url-pattern> | |
60 | + </servlet-mapping> | |
61 | +</web-app> | |
0 | 62 | \ No newline at end of file | ... | ... |
impl/extension/jsf/src/test/resources/proxy/web.xml
... | ... | @@ -52,9 +52,7 @@ |
52 | 52 | <servlet> |
53 | 53 | <servlet-name>Servlet Class</servlet-name> |
54 | 54 | <servlet-class>proxy.FacesContextProxyServlet</servlet-class> |
55 | - <!-- <load-on-startup>1</load-on-startup> --> | |
56 | 55 | </servlet> |
57 | - | |
58 | 56 | <servlet-mapping> |
59 | 57 | <servlet-name>Servlet Class</servlet-name> |
60 | 58 | <url-pattern>/index</url-pattern> | ... | ... |