File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes error in filters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "error in filters" Watch "error in filters" New topic
Author

error in filters

tushar panda
Ranch Hand

Joined: Feb 16, 2009
Posts: 133
i was trying out an example on filter but got a few errors that said:


i checked the log files and got this :



as the error says i do not have "LogFilter" class in "net.tushar" directory , but i have it.


my "web.xml" code is:


"LogFilter" code



i am not sure but i think the culprit is "filter-class" declaration.

waiting for an answer
--TUSHAR



Do Right , Fear No Man
xsunil kumar
Ranch Hand

Joined: Dec 14, 2009
Posts: 133
You folder location screen shot is showing path as \Root\WEB-INF\classes\net.tushar

Here net.tushar is wrong. It should be \net\tushar\LogFilter.class And why you are providing this class in Root. Provide this class in your application WEB-INF classes directory.

May it will resolve your issue.
tushar panda
Ranch Hand

Joined: Feb 16, 2009
Posts: 133
xsunil kumar wrote:Here net.tushar is wrong. It should be \net\tushar\LogFilter.class

not working ,getting same error again
xsunil kumar wrote:why you are providing this class in Root.

i am testing so i have put it there.


in logfiles @line 14 ,it says "exception starting filter logfilter". i think something is here..(not sure)

xsunil kumar
Ranch Hand

Joined: Dec 14, 2009
Posts: 133
I have copied your web.xml and filter class in My local tomcat server and i am not getting any exception in server log file. When i am using wrong folder name like net.tushar then i am getting same issue but using It should be \net\tushar\LogFilter.class its running without any exception. Check last line of your log file becauser server log will be appended in same log file. Verify with the time stamp given in your log file and your system time when you have started your tomcat server.
tushar panda
Ranch Hand

Joined: Feb 16, 2009
Posts: 133
xsunil kumar wrote:Check last line of your log file becauser server log will be appended in same log file. Verify with the time stamp given in your log file and your system time when you have started your tomcat server.


everything done ,still error
Charles 'King
Ranch Hand

Joined: Jul 05, 2009
Posts: 56

Is your filter class in the correct directory? Please list the directory structure of your package starting at webapps. Please read this Deploying web applications...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in filters
 
Similar Threads
Error in FilterStart Struts 2 web app
Getting error----NoContextLoaderListener registered
Problem with Listeners in Tomcat. (Two Issues, not sure if related)
Getting exception of org.dom4j.DocumentException : feature read only while deploying war file in tom
Problem starting up servlet-examples & jsp-examples