<?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: Spring Annotations and Forms</title>
	<atom:link href="http://eggsylife.co.uk/2009/11/06/spring-annotations-and-forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://eggsylife.co.uk/2009/11/06/spring-annotations-and-forms/</link>
	<description>Eggsylife</description>
	<lastBuildDate>Tue, 07 Sep 2010 16:27:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: admin</title>
		<link>http://eggsylife.co.uk/2009/11/06/spring-annotations-and-forms/comment-page-1/#comment-88</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 21 Feb 2010 15:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=98#comment-88</guid>
		<description>Hi there,

The class that the method belongs to should have two annotations above it. Firstly the @Controller annotation which identifies it to Spring as controller then below that there should be the @RequestMapping annotation which should define the path. Any time a GET request is made to that path the method will be hit.

See the line:

&lt;pre lang=&quot;Java&quot;&gt;
@Controller
@RequestMapping(&quot;/processName.page&quot;)
public class NameFormController
&lt;/pre&gt;

Sp the path is the processName.page path.

Hope this helps</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>The class that the method belongs to should have two annotations above it. Firstly the @Controller annotation which identifies it to Spring as controller then below that there should be the @RequestMapping annotation which should define the path. Any time a GET request is made to that path the method will be hit.</p>
<p>See the line:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Controller
@RequestMapping<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/processName.page&quot;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NameFormController</pre></div></div>

<p>Sp the path is the processName.page path.</p>
<p>Hope this helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hendra</title>
		<link>http://eggsylife.co.uk/2009/11/06/spring-annotations-and-forms/comment-page-1/#comment-87</link>
		<dc:creator>hendra</dc:creator>
		<pubDate>Sun, 21 Feb 2010 04:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=98#comment-87</guid>
		<description>&lt;pre lang=&quot;Java&quot;&gt;
@SuppressWarnings(&quot;unchecked&quot;)
@RequestMapping(method = RequestMethod.GET)
protected String showNameForm(ModelMap model) throws Exception
{	
    return &quot;form.view&quot;;
}
&lt;/pre&gt;

when the code will be executed ?, i mean there is no request mapping &quot;path&quot; on it. and who will be invoce it.</description>
		<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@SuppressWarnings<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;unchecked&quot;</span><span style="color: #009900;">&#41;</span>
@RequestMapping<span style="color: #009900;">&#40;</span>method <span style="color: #339933;">=</span> RequestMethod.<span style="color: #006633;">GET</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #003399;">String</span> showNameForm<span style="color: #009900;">&#40;</span>ModelMap model<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span>
<span style="color: #009900;">&#123;</span>	
    <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #0000ff;">&quot;form.view&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>when the code will be executed ?, i mean there is no request mapping &#8220;path&#8221; on it. and who will be invoce it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://eggsylife.co.uk/2009/11/06/spring-annotations-and-forms/comment-page-1/#comment-55</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 11 Jan 2010 13:10:06 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=98#comment-55</guid>
		<description>Hi Adrian,

Are you able to show me the controller? And then your templates.xml file?

If those two tie up check that you have the following in your servlet.xml file:

&lt;pre lang=&quot;XML&quot;&gt;
&lt;bean id=&quot;tilesConfigurer&quot; class=&quot;org.springframework.web.servlet.view.tiles2.TilesConfigurer&quot;&gt;
    &lt;property name=&quot;definitions&quot;&gt;
        &lt;list&gt;
             &lt;value&gt;/WEB-INF/tiles-defs/templates.xml&lt;/value&gt;
        &lt;/list&gt;
    &lt;/property&gt;
&lt;/bean&gt;
 
&lt;bean id=&quot;viewResolver&quot; class=&quot;org.springframework.web.servlet.view.UrlBasedViewResolver&quot;&gt;
    &lt;property name=&quot;viewClass&quot; value=&quot;org.springframework.web.servlet.view.tiles2.TilesView&quot;/&gt;
&lt;/bean&gt;
&lt;/pre&gt;

The templates.xml file location will of course be specific to your project.

If you would rather email me to sample code please feel free to drop me a message at:

eggsy _at_ eggsylife.co.uk</description>
		<content:encoded><![CDATA[<p>Hi Adrian,</p>
<p>Are you able to show me the controller? And then your templates.xml file?</p>
<p>If those two tie up check that you have the following in your servlet.xml file:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;tilesConfigurer&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.springframework.web.servlet.view.tiles2.TilesConfigurer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;definitions&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;list<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
             <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>/WEB-INF/tiles-defs/templates.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/list<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/property<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;viewResolver&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.springframework.web.servlet.view.UrlBasedViewResolver&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;viewClass&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;org.springframework.web.servlet.view.tiles2.TilesView&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/bean<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The templates.xml file location will of course be specific to your project.</p>
<p>If you would rather email me to sample code please feel free to drop me a message at:</p>
<p>eggsy _at_ eggsylife.co.uk</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian</title>
		<link>http://eggsylife.co.uk/2009/11/06/spring-annotations-and-forms/comment-page-1/#comment-54</link>
		<dc:creator>Adrian</dc:creator>
		<pubDate>Mon, 11 Jan 2010 13:02:32 +0000</pubDate>
		<guid isPermaLink="false">http://eggsylife.co.uk/?p=98#comment-54</guid>
		<description>Hi, thanks for the article.
I&#039;m setting up an application that has all the same components: tiles, spring annotations.  I&#039;m using spring 3.0 with Tiles 2.1.4.  
However, I&#039;m having a problem with the view resolver.  The request URLs are mapped to the Controller methods correctly, which I can see from my logging, but the tile view name returned by the Controller doesn&#039;t render the view.  It seems to load the corresponding tile definition and interprets the first tile template path as a URL resource:

&lt;code&gt;No mapping found for HTTP request with URI [/Inventory/WEB-INF/jsps/common/main.jsp] in DispatcherServlet&lt;/code&gt;

Do you have any thoughts on what could cause this?  Maybe its a version conflict between Spring and Tiles?

thanks</description>
		<content:encoded><![CDATA[<p>Hi, thanks for the article.<br />
I&#8217;m setting up an application that has all the same components: tiles, spring annotations.  I&#8217;m using spring 3.0 with Tiles 2.1.4.<br />
However, I&#8217;m having a problem with the view resolver.  The request URLs are mapped to the Controller methods correctly, which I can see from my logging, but the tile view name returned by the Controller doesn&#8217;t render the view.  It seems to load the corresponding tile definition and interprets the first tile template path as a URL resource:</p>
<p><code>No mapping found for HTTP request with URI [/Inventory/WEB-INF/jsps/common/main.jsp] in DispatcherServlet</code></p>
<p>Do you have any thoughts on what could cause this?  Maybe its a version conflict between Spring and Tiles?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
