Results 1 to 3 of 3

Thread: Problem accessing config file outside WEBINF directory

Hybrid View

  1. #1
    Join Date
    May 2005
    Posts
    3

    Default Problem accessing config file outside WEBINF directory

    I have a services layer in which I have the spring configuration file to wire business delegate,service and dao layer. I have struts/tiles based web layer where I have the action-servlet.xml file to wire action with business delegate. I am using DelegatingTilesRequestProcessor and loading action-servlet.xml using ContextLoaderPlugin configuration in Struts-config.xml.
    The problem is ContextLoaderPlugin does not have visibility outside WEB INF directory. And this results in WebApplicationContext unable to load the second config file which is present in services layer.
    I do not want to keep the services layer configuration file in web layer(WEB INF), as i also have a JMS channel. And i also want the feature of action classes managed by Spring layer.
    Can anyone suggest a solution to this problem?

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    What about loading the other file from the class path, using the classpath: prefix in the resource location?
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    May 2005
    Posts
    3

    Default

    Thanks Rod, I used file: to solve it, but yes Classpath: is a better solution.

Similar Threads

  1. Replies: 2
    Last Post: Apr 12th, 2012, 09:34 AM
  2. Replies: 19
    Last Post: Sep 10th, 2007, 12:46 PM
  3. Saving large files to a db using hibernate?
    By Dan Washusen in forum Data
    Replies: 10
    Last Post: Sep 20th, 2006, 12:18 PM
  4. Replies: 2
    Last Post: Aug 27th, 2005, 08:51 AM
  5. Replies: 8
    Last Post: Mar 3rd, 2005, 06:25 PM

Posting Permissions

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