Results 1 to 5 of 5

Thread: Filters, ContextListeners and JRun

  1. #1

    Default Filters, ContextListeners and JRun

    I have simple test app that deploys flawlessly on Tomcat 4.0, but tanks on JRun. For each Acegi filter I get an IllegalStateException with the message that a WebApplicationContext wasn't found. Only after that does it show the WebApplicationContext being loaded successfully. So it appears that, for whatever reason, JRun is loading filters before context listeners. Any ideas on why this would be and what the workaround is? Is anyone out there using Acegi with JRun? Thx.

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    With JRun you need to specify

    Code:
    <init-param>
    <param-name>init</param-name>
    <param-value>lazy</param-value>
    </init-param>
    for each of your Acegi Security related filters. This will delay trying to load the proxied bean from the Spring application context until the first filter invocation.

  3. #3

    Default

    Worked. Thanks!

  4. #4

    Default

    Hmm...seem to be having the same problem re JRun with dispatcher-servlet.xml loading before applicationContext.xml. Reverting to the ContextLoaderServlet and setting load-on-startup seems to solve the problems. Is that the recommended approach? Thx.

  5. #5
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    There is no problem with using the ContextLoaderServlet and lazy loading of the filters if you need to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •