Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

filters  RSS feed

 
sandeep kumar thommandru
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55
Java jQuery Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ha ha very silly mistake :P

thank you ankur..
 
sandeep kumar thommandru
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya ya filter-names in mapping section. k k got it
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!