Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Intercepting Filter: Filter Chaining in Action

Intercepting Filter: Filter Chaining in Action

2004-12-17       - By Glenio Alexandre

 Back
Reply:     1     2     3     4     5  


Hi Folks,



I have read Core J2EE Patterns. But I have a question concerning Filter API.

There is a example about Filter Chaining in Action. It uses a class that
implements a Filter and a servlet. The web configuration is



...



<filter-mapping>

   <filter-name>StandardEncodeFilter</filter-name>

  <url-pattern>/EncodeTestServlet</url-pattern>

</filter-mapping>

<filter-mapping>

   <filter-name>MultipartEncodeFilter</filter-name>

  <url-pattern>/EncodeTestServlet</url-pattern>

</filter-mapping>



But, I need to use two classes that implements a Filter. I?m trying to use this
configuration in my web.xml (Tomcat), but it doesn?t work. Could you help me,
please?



<filter-mapping>

 <filter-name>StandardEncodeFilter</filter-name>

 <url-pattern>/*</url-pattern>

</filter-mapping>

<filter-mapping>

 <filter-name>MultipartEncodeFilter</filter-name>

 <url-pattern>/*</url-pattern>

</filter-mapping>





Thank you.



Gl??nio Alexandre

Brasilia/DF, Brazil




Gl??nio Alexandre
Brasilia/DF, Brasil
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
<DIV>
<DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
">Hi Folks,</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
">I have read Core J2EE Patterns. But I have a question concerning Filter API.<
/SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
">There is a&nbsp;example about Filter Chaining in Action.&nbsp;It uses a class
that implements a Filter and a servlet. The web configuration is</SPAN></FONT><
/P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><STRONG><EM>...</EM></STRONG></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"></SPAN></FONT>&nbsp;</P><FONT face=Arial size=2><SPAN lang=EN-US style="FONT
-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US"><FONT face=Arial size
=2><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi
-language: EN-US"><FONT face=CourierNewPSMT color=#7a0029 size=2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000>&lt;filter-mapping&gt;<?xml:namespace prefix = o ns = "urn
:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>
&lt;filter-name&gt;StandardEncodeFilter&lt;/filter-name&gt;<o:p></o:p></FONT><
/SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>&lt
;url-pattern&gt;/EncodeTestServlet&lt;/url-pattern&gt;<o:p></o:p></FONT></SPAN><
/FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000>&lt;/filter-mapping&gt;<o:p></o:p></FONT></SPAN></FONT></P
>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000>&lt;filter-mapping&gt;<o:p></o:p></FONT></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>
&lt;filter-name&gt;MultipartEncodeFilter&lt;/filter-name&gt;<o:p></o:p></FONT><
/SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>&lt
;url-pattern&gt;/EncodeTestServlet&lt;/url-pattern&gt;<o:p></o:p></FONT></SPAN><
/FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000>&lt;/filter-mapping&gt;<o:p></o:p></FONT></SPAN></FONT></P
>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial color=#000000
size=2><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi
-language: EN-US"><o:p>&nbsp;</o:p></SPAN></FONT></FONT></SPAN></FONT></SPAN><
/FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
">But, I need to use two classes that implements a Filter. I?m trying to use
this configuration in my web.xml (Tomcat), but it doesn?t work. Could you help
me, please?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><o:p>&nbsp;</o:p></SPAN></FONT></P><FONT face=Arial size=2><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US">
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000>&lt;filter-mapping&gt;<o:p></o:p></FONT></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;filter
-name&gt;StandardEncodeFilter&lt;/filter-name&gt;<o:p></o:p></FONT></SPAN></FONT
></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><STRONG>&lt
;url-pattern&gt;/*&lt;/url-pattern&gt;<o:p></o:p></STRONG></FONT></SPAN></FONT><
/P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000>&lt;/filter-mapping&gt;<o:p></o:p></FONT></SPAN></FONT></P
>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000>&lt;filter-mapping&gt;<o:p></o:p></FONT></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;filter
-name&gt;MultipartEncodeFilter&lt;/filter-name&gt;<o:p></o:p></FONT></SPAN><
/FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US
"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><STRONG>&lt
;url-pattern&gt;/*&lt;/url-pattern&gt;<o:p></o:p></STRONG></FONT></SPAN></FONT><
/P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><FONT color=#000000>&lt;/filter
-mapping&gt;</FONT></SPAN></FONT></P></SPAN></FONT><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>Thank you.</o:p></SPAN></FONT>
<FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>
&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Gl??nio Alexandre<o:p></o:p></SPAN>
</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Brasilia/DF, Brazil<o:p></o:p><
/SPAN></FONT></P></DIV></DIV><BR><BR>Gl??nio Alexandre<br>Brasilia/DF, Brasil<p>
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ __<br>Do You Yahoo!?<br>Tired of
spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo
.com
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.