<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Access the Spring-ApplicationContext from everywhere in your Application</title>
	<atom:link href="http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/</link>
	<description>Under development by Siegfried Bolz</description>
	<pubDate>Thu, 11 Mar 2010 22:06:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Eric M</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-256</link>
		<dc:creator>Eric M</dc:creator>
		<pubDate>Tue, 09 Mar 2010 22:13:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-256</guid>
		<description>Tor,

Your solution doesn't apply in this situation. The whole point is to be able to access the application context from a class that isn't managed by Spring. You can't ask Spring to inject dependencies into objects it doesn't know anything about. ;)

Eric M.</description>
		<content:encoded><![CDATA[<p>Tor,</p>
<p>Your solution doesn&#8217;t apply in this situation. The whole point is to be able to access the application context from a class that isn&#8217;t managed by Spring. You can&#8217;t ask Spring to inject dependencies into objects it doesn&#8217;t know anything about. ;)</p>
<p>Eric M.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nicknish</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-255</link>
		<dc:creator>nicknish</dc:creator>
		<pubDate>Tue, 09 Mar 2010 19:14:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-255</guid>
		<description>I think I figured it out, I hadn't added 

        contextConfigLocation
         /WEB-INF/applicationContext.xml
    

to my web.xml</description>
		<content:encoded><![CDATA[<p>I think I figured it out, I hadn&#8217;t added </p>
<p>        contextConfigLocation<br />
         /WEB-INF/applicationContext.xml</p>
<p>to my web.xml</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nicknish</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-254</link>
		<dc:creator>nicknish</dc:creator>
		<pubDate>Tue, 09 Mar 2010 18:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-254</guid>
		<description>In the code when I do 
ApplicationContext ctx = AppContext.getApplicationContext();   
ctx is null, 

I have set lazy-init=false in applicationContext.xml</description>
		<content:encoded><![CDATA[<p>In the code when I do<br />
ApplicationContext ctx = AppContext.getApplicationContext();<br />
ctx is null, </p>
<p>I have set lazy-init=false in applicationContext.xml</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tor Arne Kvaløy</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-252</link>
		<dc:creator>Tor Arne Kvaløy</dc:creator>
		<pubDate>Wed, 03 Mar 2010 09:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-252</guid>
		<description>Hey guys,

I much easier way to get the spring application context from anywhere is to just have it autoinjected like this:

@Autowired
private ApplicationContext applicationContext;


Tor :)</description>
		<content:encoded><![CDATA[<p>Hey guys,</p>
<p>I much easier way to get the spring application context from anywhere is to just have it autoinjected like this:</p>
<p>@Autowired<br />
private ApplicationContext applicationContext;</p>
<p>Tor :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: acaciobernardo</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-247</link>
		<dc:creator>acaciobernardo</dc:creator>
		<pubDate>Tue, 09 Feb 2010 13:33:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-247</guid>
		<description>I used this in the validate method in my DTO bean associated with the form.
Unfortunely I coud not understand the standard way of getting the context:

ServletContext servletContext =this.getServletContext();
	    	WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);	    	
The problem is thar I can't get the this.getServletContext(); to compile...

In my method all I have is a ValidationContext:
public void validateEdicao(ValidationContext context).


So, using the solution posted in this article did work. Thank you.</description>
		<content:encoded><![CDATA[<p>I used this in the validate method in my DTO bean associated with the form.<br />
Unfortunely I coud not understand the standard way of getting the context:</p>
<p>ServletContext servletContext =this.getServletContext();<br />
	    	WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);<br />
The problem is thar I can&#8217;t get the this.getServletContext(); to compile&#8230;</p>
<p>In my method all I have is a ValidationContext:<br />
public void validateEdicao(ValidationContext context).</p>
<p>So, using the solution posted in this article did work. Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Catatan &#8211; Catatan &#187; Mendapatkan Spring Application Context dari Klas Apapun</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-218</link>
		<dc:creator>Catatan &#8211; Catatan &#187; Mendapatkan Spring Application Context dari Klas Apapun</dc:creator>
		<pubDate>Wed, 16 Dec 2009 11:09:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-218</guid>
		<description>[...] http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-appl... [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-appl.." rel="nofollow">http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-appl..</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-217</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Tue, 15 Dec 2009 01:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-217</guid>
		<description>One of the great helpful tips!  Clean, concise, and complete.  Thank you.</description>
		<content:encoded><![CDATA[<p>One of the great helpful tips!  Clean, concise, and complete.  Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anh Ha</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-205</link>
		<dc:creator>Anh Ha</dc:creator>
		<pubDate>Thu, 03 Dec 2009 18:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-205</guid>
		<description>You can use the WebApplicationContextUtils to get the loaded Spring context in every where you want in the ServletContext, follow this example:

ServletContext servletContext =this.getServletContext();

WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);

User user = (User)wac.getBean("user");</description>
		<content:encoded><![CDATA[<p>You can use the WebApplicationContextUtils to get the loaded Spring context in every where you want in the ServletContext, follow this example:</p>
<p>ServletContext servletContext =this.getServletContext();</p>
<p>WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);</p>
<p>User user = (User)wac.getBean(&#8221;user&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rene</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-203</link>
		<dc:creator>Rene</dc:creator>
		<pubDate>Fri, 27 Nov 2009 13:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-203</guid>
		<description>Thanks for that, Sigi - YMMD! 

I was really lost getting out the spring application context. That helped me out.

See you,
Rene</description>
		<content:encoded><![CDATA[<p>Thanks for that, Sigi - YMMD! </p>
<p>I was really lost getting out the spring application context. That helped me out.</p>
<p>See you,<br />
Rene</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bhushan</title>
		<link>http://blog.jdevelop.eu/2008/07/06/access-the-spring-applicationcontext-from-everywhere-in-your-application/comment-page-1/#comment-202</link>
		<dc:creator>Bhushan</dc:creator>
		<pubDate>Wed, 18 Nov 2009 07:37:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jdevelop.eu/?p=154#comment-202</guid>
		<description>nice thorough explanation, thanks</description>
		<content:encoded><![CDATA[<p>nice thorough explanation, thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
