<?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: Flex remoting without configuring the client</title>
	<atom:link href="http://www.gridshore.nl/2009/01/23/flex-remoting-without-configuring-the-client/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gridshore.nl/2009/01/23/flex-remoting-without-configuring-the-client/</link>
	<description>A weblog about software engineering, Architecture, Technology an other things we like.</description>
	<lastBuildDate>Sat, 28 Jan 2012 20:11:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Mario</title>
		<link>http://www.gridshore.nl/2009/01/23/flex-remoting-without-configuring-the-client/comment-page-1/#comment-22885</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Tue, 19 May 2009 06:28:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=633#comment-22885</guid>
		<description>Hi again, 

in some cases the context path might be not available. This causes an exception in the ConfigPropertyController. To prevent this use following code:

---
public class ConfigPropertyController extends PropertyController {

  protected Map createExposedParamsMap(HttpServletRequest request) {
    Map exposedParams = new HashMap();
    exposedParams.put(&quot;host&quot;, request.getServerName());
    exposedParams.put(&quot;port&quot;, String.valueOf(request.getServerPort()));

    // The context root path contains a prefix &#039;/&#039;, we have to take that of.
    String contextRoot = request.getContextPath();
    if (contextRoot == null &#124;&#124; contextRoot.isEmpty()) {
      contextRoot = &quot;&quot;;
    } else {
      contextRoot = contextRoot.substring(1);
    }
    exposedParams.put(&quot;context-root&quot;, contextRoot);

    return exposedParams;
  }
}</description>
		<content:encoded><![CDATA[<p>Hi again, </p>
<p>in some cases the context path might be not available. This causes an exception in the ConfigPropertyController. To prevent this use following code:</p>
<p>&#8212;<br />
public class ConfigPropertyController extends PropertyController {</p>
<p>  protected Map createExposedParamsMap(HttpServletRequest request) {<br />
    Map exposedParams = new HashMap();<br />
    exposedParams.put(&#8220;host&#8221;, request.getServerName());<br />
    exposedParams.put(&#8220;port&#8221;, String.valueOf(request.getServerPort()));</p>
<p>    // The context root path contains a prefix &#8216;/&#8217;, we have to take that of.<br />
    String contextRoot = request.getContextPath();<br />
    if (contextRoot == null || contextRoot.isEmpty()) {<br />
      contextRoot = &#8220;&#8221;;<br />
    } else {<br />
      contextRoot = contextRoot.substring(1);<br />
    }<br />
    exposedParams.put(&#8220;context-root&#8221;, contextRoot);</p>
<p>    return exposedParams;<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://www.gridshore.nl/2009/01/23/flex-remoting-without-configuring-the-client/comment-page-1/#comment-21465</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Tue, 21 Apr 2009 14:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=633#comment-21465</guid>
		<description>I am sorry, this exception (though the missing file name is called config.properties) has NOTHING to do with your example...unfortunately there was another (missing) config.properties file in the project :o</description>
		<content:encoded><![CDATA[<p>I am sorry, this exception (though the missing file name is called config.properties) has NOTHING to do with your example&#8230;unfortunately there was another (missing) config.properties file in the project <img src='http://www.gridshore.nl/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://www.gridshore.nl/2009/01/23/flex-remoting-without-configuring-the-client/comment-page-1/#comment-21455</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Tue, 21 Apr 2009 09:45:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=633#comment-21455</guid>
		<description>Hi jettro, 

I think I did the same like you, but when starting the server following exception occurs:

--
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [config.properties] cannot be opened because it does not exist
	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:78)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:553)
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:527)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.io.FileNotFoundException: class path resource [config.properties] cannot be opened because it does not exist
	at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:143)
	at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:182)
	at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)
	... 30 more


Any idea? Thanks!</description>
		<content:encoded><![CDATA[<p>Hi jettro, </p>
<p>I think I did the same like you, but when starting the server following exception occurs:</p>
<p>&#8211;<br />
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [config.properties] cannot be opened because it does not exist<br />
	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:78)<br />
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:553)<br />
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:527)<br />
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362)<br />
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)<br />
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)<br />
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)<br />
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)<br />
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)<br />
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)<br />
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)<br />
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)<br />
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)<br />
	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)<br />
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)<br />
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)<br />
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)<br />
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)<br />
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)<br />
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)<br />
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)<br />
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)<br />
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)<br />
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)<br />
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br />
	at java.lang.reflect.Method.invoke(Unknown Source)<br />
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)<br />
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)<br />
Caused by: java.io.FileNotFoundException: class path resource [config.properties] cannot be opened because it does not exist<br />
	at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:143)<br />
	at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:182)<br />
	at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)<br />
	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:69)<br />
	&#8230; 30 more</p>
<p>Any idea? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jettro</title>
		<link>http://www.gridshore.nl/2009/01/23/flex-remoting-without-configuring-the-client/comment-page-1/#comment-15673</link>
		<dc:creator>jettro</dc:creator>
		<pubDate>Sun, 01 Feb 2009 21:28:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=633#comment-15673</guid>
		<description>Of course that is a risk, I make sure that I only start my application when I have the properties. Using events this is not really hard.</description>
		<content:encoded><![CDATA[<p>Of course that is a risk, I make sure that I only start my application when I have the properties. Using events this is not really hard.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: guilhem</title>
		<link>http://www.gridshore.nl/2009/01/23/flex-remoting-without-configuring-the-client/comment-page-1/#comment-15664</link>
		<dc:creator>guilhem</dc:creator>
		<pubDate>Sun, 01 Feb 2009 14:44:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=633#comment-15664</guid>
		<description>Thanks for the code. I was looking for a way to load server-side properties from Mate. I have to ask this though : What happens if the remote object is called before the properties file has finished loading ? Actually is there a risk of that happening ? If yes, how would you prevent that ? Thank you.</description>
		<content:encoded><![CDATA[<p>Thanks for the code. I was looking for a way to load server-side properties from Mate. I have to ask this though : What happens if the remote object is called before the properties file has finished loading ? Actually is there a risk of that happening ? If yes, how would you prevent that ? Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

