• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Filters and wlserver6.1 Unable to deploy

Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am new to deploying Filter. I have a simple Filter class and am trying to log every request. Below is the part of web.xml:

During wlserver6.1 startup, I get the exception below and none of the webapp works. Please help. Thanks.


at weblogic.servlet.internal.WebAppServletContext.registerFilter(WebAppServletContext.java:1945)
at weblogic.servlet.internal.WebAppServletContext.initFromDescriptors(WebAppServletContext.java:1307)
at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:880)
at weblogic.servlet.internal.WebAppServletContext.<init(WebAppServletContext.java:815)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:163)
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now I know the answer. Even though you can run wlserver6.1 with J2EE1.3 features, the Filter object expected by interal wlserver6.1 classes is according to non final servlet 2.3 spec.
All you have to do is, add couple of methods in the custom Filter class:
setFilterConfig(FilterConfig config);
init() method is never called.
Also you can't substitute an instance of HttpServletRequestWrapper when calling doFilter() on the FilterChain object if you run wlportal4.0 applications.
ApplicationHelper class in com.bea.p13n.management package expects an instance of weblogic.servlet.internal.ServletRequestImpl which is a final class.
Having said that, can anyone tell me if custom Filters can be implemented using HttpRequestWrapper in wl7.0?
    Bookmark Topic Watch Topic
  • New Topic