MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
douglasmhurst
Post subject: DWRSpringJPAExample (moving applicationContext.xml)  PostPosted: Jan 07, 2009 - 05:43 PM
Registered Member
Registered Member


Joined: Sep 30, 2006
Posts: 274

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?
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject: RE: DWRSpringJPAExample (moving applicationContext.xml)  PostPosted: Jan 08, 2009 - 07:33 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits