wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes filters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "filters" Watch "filters" New topic
Author

filters

sandeep kumar thommandru
Greenhorn

Joined: Dec 30, 2011
Posts: 21
hai friends,
my tomcat application status is showing false..
the mistake is in web.xml i think so..

my web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Filters</display-name>
<servlet>
<servlet-name>targ</servlet-name>
<servlet-class>Filt3</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>targ</servlet-name>
<url-pattern>/Filt3</url-pattern>
</servlet-mapping>
<filter>
<filter-name>targ</filter-name>
<filter-class>Filt3</filter-class>
</filter>
<filter>
<filter-name>targ</filter-name>
<filter-class>Filt3</filter-class>
</filter>
<filter-mapping>
<filter-name>targ</filter-name>
<url-pattern>/Filt3</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>targ</filter-name>
<url-pattern>/Filt3</url-pattern>
</filter-mapping>
</web-app>

when i remove the filter tags,it is working..
can any anyone help me why it was showing false while using filters here?
or any mistake in the file?
please help me..
Ankur Gargg
Ranch Hand

Joined: Sep 11, 2011
Posts: 55

Hi

<filter-name>targ</filter-name>
<filter-class>Filt3</filter-class>
</filter>
<filter>
<filter-name>targ</filter-name>
<filter-class>Filt3</filter-class>
</filter>

This snipped seems wrong as you can't have two filters with the same name.
If you change the name then container will create two instances of that filter.

Regards
Ankur Garg



sandeep kumar thommandru
Greenhorn

Joined: Dec 30, 2011
Posts: 21
ha ha very silly mistake :P

thank you ankur..
sandeep kumar thommandru
Greenhorn

Joined: Dec 30, 2011
Posts: 21
hello ankur.. its again not working..

web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Filters</display-name>
<servlet>
<servlet-name>targ</servlet-name>
<servlet-class>Filt3</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>targ</servlet-name>
<url-pattern>/Filt3</url-pattern>
</servlet-mapping>
<filter>
<filter-name>filt1</filter-name>
<filter-class>Filt1</filter-class>
</filter>
<filter>
<filter-name>filt2</filter-name>
<filter-class>Filt2</filter-class>
</filter>
<filter-mapping>
<filter-name>targ</filter-name>
<url-pattern>/Filt3</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>targ</filter-name>
<url-pattern>/Filt3</url-pattern>
</filter-mapping>
</web-app>
sandeep kumar thommandru
Greenhorn

Joined: Dec 30, 2011
Posts: 21
ya ya filter-names in mapping section. k k got it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: filters
 
Similar Threads
The requested resource () is not available.
Facing Issue in implementing Listeners and Filters
Displaytag Data Export Problem with Struts2
Invalid content taglib
fiter help needed