DWRSpringJPAExample (moving applicationContext.xml)

  1. MyEclipse Archived
  2.  > 
  3. Examples On-Demand
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #293188 Reply

    Douglas M Hurst

    This example uses only index.jsp with no backing bean. It also places applicationContext.xml in the WEB-INF directory… which seems to be the only way it will work with DWR for some reason.

    I placed my applicationContext.xml in my src directory (I think it does this by default? Where should it go?)

    I need to move applicationContext.xml to WEB-INF from src to make DWR work, but when I do, my application doesn’t work because…

    beanFactory = new XmlBeanFactory(new ClassPathResource(“applicationContext.xml”));

    … no longer finds applicationContext.xml in src where it expected it.

    Is there a way to move applicationContext.xml to WEB-INF from src and get things pointed the correct direction?

    #293266 Reply

    Riyad Kalla

    Douglas, in my limited experience with Spring, I noticed that depending on where you are loading your bean config file from, you use a different Resource implementation to do it. I guess there has to be one for Web Projects or direct File/Directory references and you just point it at WEB-INF/applicationContext.xml instead of the src dir — but yes, the ClassPath loader won’t work in that case.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: DWRSpringJPAExample (moving applicationContext.xml)

You must be logged in to post in the forum log in