<Error> <Management> <Error deploying application .\config\mydomain\applications\filtertest.war:
java.lang.reflect.UndeclaredThrowableException>
which may have the same underlying cause, I don't know. The same app works fine
under Tomcat 4.0.1, filter
and all.
One thing I noticed that seemed funny was that, even though I'm using the WLS
version that's supposed to have
servlet 2.3, ServletContext.getMinorVersion() returns 2 instead of 3.
Has anyone had any luck using filters with this version of WLS? My app is absolutely
trivial, just something to
try a filter, and as I said, it works as expected on Tomcat. Here is the web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<filter>
<filter-name>myfilter</filter-name>
<filter-class>filtertest.MyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>myfilter</filter-name>
<servlet-name>myservlet</servlet-name>
</filter-mapping>
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>filtertest.MyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/myservlet</url-pattern>
</servlet-mapping>
</web-app>
Thanks,
Barry
Barry,
WL 6.1 does not fully support J2EE 1.3 features, which could be the reason that
you could not deploy your filter. I've found out that interface HttpSession is
not compliant with the latest Servlet spec, which is also confirmed (see post
#7434 Re: HttpSession Interface not up-to-date? - Patrick Bumpus ). To make sure
that you can actually deploy your filter, you'd better re-compile your code with
weblogic.jar. I suspect that you will get compilation errors on your filter classes.
Eugene
Thanks for the reply, your suggestion was right on the mark.
WLS 6.1 apparently uses an outdated version of the Filter
interface -- it includes two methods (getFilterConfig and
setFilterConfig) that aren't in the final servlet 2.3 spec.
This must have caused the AbstractMethodError at startup.
I wasn't getting a compile-time error because I wasn't
compiling with weblogic.jar. I added the two gratuitous
methods, and everything works fine now.
Thanks again for the great advice!
Barry