Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » What is the correct location for defining "filterChainProxy"?
What is the correct location for defining "filterChainProxy"? [message #1064332] Tue, 18 June 2013 14:50 Go to next message
Raghuram Devarakonda is currently offline Raghuram Devarakonda
Messages: 11
Registered: November 2012
Junior Member
Hi,

I have defined FilterChainProxy in my web.xml like so:

    <filter>
      <filter-name>filterChainProxy</filter-name>
      <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    
    <filter-mapping>
      <filter-name>filterChainProxy</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>


Now if I define the bean "filterChainProxy" in META-INF/spring/app-context.xml, it works fine. How ever, Virgo user guide mentions the following note:

----------
"Spring (and Spring DM) application context XML files should generally be placed in a bundle's META-INF/spring directory, but for a web application, these files must be placed in the WEB-INF directory.

Placing a web application's Spring application context XML files in the META-INF/spring directory produces unpredictable results since Spring DM will attempt to build an application context independently of, and asynchronously from, the web application."
----------

So I am trying to find a way to move the filterChainProxy definition to some place under WEB-INF. I first tried to put it in "api-servlet.xml" ("api" being name of the servlet) but that didn't work.

Can some one please explain the recommended way of defining filterChainProxy and any other beans in a web application? We also have META-INF/spring/osgi-context.xml to define OSGi services. Where would that file go if we can't put it in META-INF/spring based on above warning from Virgo docs?

Thanks,
Raghu
Re: What is the correct location for defining "filterChainProxy"? [message #1064460 is a reply to message #1064332] Wed, 19 June 2013 07:49 Go to previous messageGo to next message
Violeta Georgieva is currently offline Violeta Georgieva
Messages: 234
Registered: October 2010
Senior Member
May be you can check the greenpages sample http://git.eclipse.org/c/virgo/org.eclipse.virgo.sample-greenpages.git/
Re: What is the correct location for defining "filterChainProxy"? [message #1064535 is a reply to message #1064460] Wed, 19 June 2013 14:18 Go to previous message
Raghuram Devarakonda is currently offline Raghuram Devarakonda
Messages: 11
Registered: November 2012
Junior Member

I will check it out. Thanks.
Previous Topic:Missing part in understanding OSGI
Next Topic:Life after greenpages sample
Goto Forum:
  


Current Time: Thu Aug 28 11:29:07 EDT 2014

Powered by FUDForum. Page generated in 0.02091 seconds