filter doesn't work at Tomcat4.1.12!?

2002-11-12 Thread Johnny Cui

Hi all,

I have check every possible error according to some friends suggestion,
however, my own filter still doesn't work.It is just a authenticater filter.

the weird things is, I can see the print out lines in the filter.init()
methods, this means the container has create a instance for my filters, but
the doFilter() seem not to be called, because I add a print line in the very
beginning of the code for doFilter().

I think the server.xml and web.xml is fine because the sample filter can
work now, I just put the filter element for authenticater filter behind
the sample working filter, and the filter-mapping is all the same for the
two fitler, so I assume in the filterchain should be like this:  sample
filter -- authenticater filter.

could anybody help me to solve this problem.

Johnny



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




RE: filter doesn't work at Tomcat4.1.12!?

2002-11-12 Thread Cox, Charlie
if your filter is not being called, then the mapping is probably not
correct. Please provide the relevant portions of your web.xml.  Also provide
the url that your are using for testing. You can change names to protect the
innocent.

did you look in the logs to see if there are any messages?

Charlie

 -Original Message-
 From: Johnny Cui [mailto:johnny_lucky2000;yahoo.com]
 Sent: Tuesday, November 12, 2002 4:09 AM
 To: Tomcat Users List
 Subject: filter doesn't work at Tomcat4.1.12!?
 
 
 
 Hi all,
 
 I have check every possible error according to some friends 
 suggestion,
 however, my own filter still doesn't work.It is just a 
 authenticater filter.
 
 the weird things is, I can see the print out lines in the 
 filter.init()
 methods, this means the container has create a instance for 
 my filters, but
 the doFilter() seem not to be called, because I add a print 
 line in the very
 beginning of the code for doFilter().
 
 I think the server.xml and web.xml is fine because the sample 
 filter can
 work now, I just put the filter element for authenticater 
 filter behind
 the sample working filter, and the filter-mapping is all 
 the same for the
 two fitler, so I assume in the filterchain should be like 
 this:  sample
 filter -- authenticater filter.
 
 could anybody help me to solve this problem.
 
 Johnny
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org

--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




filter doesn't work at Tomcat4.1.12!?

2002-11-11 Thread Johnny Cui



Hi all,

I am trying to deploy a filter to my application in Tomcat 4.1.12, since the
code for filter is a sample code from reference book and I do exactly to the
web.xml for my application, however , the filter did not work.

Does anyone had experience in deploy filters on Tomcat4.1.12?
Does Tomcat 4.1.12 support filters?or it need some special configuration?

thanks for your attention.

Johnny


--
To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Re: filter doesn't work at Tomcat4.1.12!?

2002-11-11 Thread Jacob Kjome

Hi Johnny,

Based on the limited info you provided, I can't point to your exact 
problem, but there are a few general things to check to make sure you have 
configured properly.

Make sure that you have your filter defined and provide a mapping for it 
such as this:

filter
filter-nameMy Filter/filter-name
filter-classorg.mypackage.MyFilter/filter-class
/filter

filter-mapping
filter-nameMy Filter/filter-name
url-pattern/*/url-pattern
/filter-mapping

Also, remember that the web.xml is order specific.  For instance, your 
filter and filter-mapping elements must come before your servlet and 
servlet-mapping elements and so on

If you have this done properly, the next thing to do is to set up a logger 
in your filter (or use a remote debugger) to make sure your filter is 
actually running.

Other than that, is your application getting deployed and running properly 
otherwise?  If so, that would limit your search to the above 
recommendations.  Otherwise, you should try to get your app running 
properly and then try the above recommendations.

Jake

At 01:30 AM 11/12/2002 -0500, you wrote:



Hi all,

I am trying to deploy a filter to my application in Tomcat 4.1.12, since the
code for filter is a sample code from reference book and I do exactly to the
web.xml for my application, however , the filter did not work.

Does anyone had experience in deploy filters on Tomcat4.1.12?
Does Tomcat 4.1.12 support filters?or it need some special configuration?

thanks for your attention.

Johnny


--
To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org



Re: filter doesn't work at Tomcat4.1.12!?

2002-11-11 Thread Kristian A. Leth

Does your web.xml read like this ?

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.3//EN  http://java.sun.com/dtd/web-app_2_3.dtd;

Or like ?

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN  http://java.sun.com/dtd/web-app_2_2.dtd;

Must read like the top line or Tomcat won't understand that filter tags are
a part of the web.xml


Med venlig hilsen

Kleth

--

Kristian A. Leth.
Systemsdeveloper, Maersk Data A/S.
--
Professionals are predictable;
the world is full of dangerous amateurs.
--




|-+
| ||
| | Johnny Cui   |
| | johnny_lucky20|
| | [EMAIL PROTECTED]  |
| ||
| | 12-11-2002 |
| | 07:30  |
| | Please respond |
| | to Tomcat |
| | Users List|
| ||
| ||
|-+
  
--|
  |
  |
  |   To: Tomcat Users List [EMAIL PROTECTED] 
  |
  |   cc:  
  |
  |   Subject:  filter doesn't work at Tomcat4.1.12!?  
  |
  
--|






Hi all,

I am trying to deploy a filter to my application in Tomcat 4.1.12, since
the
code for filter is a sample code from reference book and I do exactly to
the
web.xml for my application, however , the filter did not work.

Does anyone had experience in deploy filters on Tomcat4.1.12?
Does Tomcat 4.1.12 support filters?or it need some special configuration?

thanks for your attention.

Johnny


--
To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:tomcat-user-help;jakarta.apache.org







--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org