If a servlet filter throws an exception inside its init() method, Tomcat outputs: SEVERE: Error filterStart which isn't very useful for tracking down the problem (in fact, it isn't even clear which class/method had the problem). I am expecting Tomcat to display a stack-trace of the exception being thrown. As a workaround, I have to manually surround code in all my filters with try-catch blocks and manually print out the stack-trace in case of errors.
This is already done: see the filterStart method in org.apache.catalina.core.StandardContext. It will log the filter name and complete stack trace, at ERROR level, for every filter that fails. You can also enable DEBUG-level logging to see the filters getting started every time the server starts. If you don't want to have DEBUG-level logging on the whole server, enable it only for the above StandardContext class.
(In reply to comment #0) > If a servlet filter throws an exception inside its init() method, Tomcat outputs: > > SEVERE: Error filterStart > > which isn't very useful for tracking down the problem (in fact, it isn't even > clear which class/method had the problem). > > I am expecting Tomcat to display a stack-trace of the exception being thrown. As > a workaround, I have to manually surround code in all my filters with try- catch > blocks and manually print out the stack-trace in case of errors. I've spent some couple of days behind this problem...but no solution as of yet...is there any solution to this bug?...But in the first place i dont understand why did i get this error? what may have went wrong in the tomcat(5.5.23) im using(with struts1.1)?. Also no stack trace for this error which is even more frustrating.
To better analyse your problem setup a InstanceListener at your context. <Context> <InstanceListener>org.example.yourInstanceListener</InstanceListener> </Context> A context InstanceListener are notify INIT, BEFORE, AFTER cycle... Setup your InstanceListener class at common/classes.
(In reply to comment #3) > To better analyse your problem setup a InstanceListener at your context. > > <Context> > <InstanceListener>org.example.yourInstanceListener</InstanceListener> > </Context> > > A context InstanceListener are notify INIT, BEFORE, AFTER cycle... > > Setup your InstanceListener class at common/classes. Its getting worse n worse...now my even my jsp pages have gone to sleep...thanks to this tomcat bug...the error that im getting is Exception creating bean of class publicity.abc : java.lang.ClassNotFoundException: in my <html:form> attribute...why has this stopped working....has some jar file got truncated.....
(In reply to comment #4) > (In reply to comment #3) > > To better analyse your problem setup a InstanceListener at your context. > > > > <Context> > > <InstanceListener>org.example.yourInstanceListener</InstanceListener> > > </Context> > > > > A context InstanceListener are notify INIT, BEFORE, AFTER cycle... > > > > Setup your InstanceListener class at common/classes. > > Its getting worse n worse...now my even my jsp pages have gone to > sleep...thanks to this tomcat bug...the error that im getting is > Exception creating bean of class publicity.abc : > java.lang.ClassNotFoundException: > in my <html:form> attribute...why has this stopped working....has some jar file > got truncated..... > > For some reasons in my java-build path i had duplicate servlet-api.jar and jsp- api.jar in them. removing those did the trick. If you use eclipse then click on the project name--->properties---->java build path--->libraries tab.... I hope it helps someone :)....i have no idea on how duplicate copies came in there in the first place.
For some reasons in my java-build path i had duplicate servlet-api.jar and jsp- api.jar in them. removing those did the trick. If you use eclipse then click on the project name--->properties---->java build path--->libraries tab.... I hope it helps someone :)....i have no idea on how duplicate copies came in there in the first place. Ans;-when we create the we project on eclipse that time eclipse provided the we related file.manly in tomcat project.