added the rest chapter to the build
This commit is contained in:
parent
38e5deefda
commit
19ec3654df
|
|
@ -230,26 +230,26 @@ public class RelativePathUriTemplateController {
|
||||||
<para>Here is an example configuration of a
|
<para>Here is an example configuration of a
|
||||||
<classname>ContentNegotiatingViewResolver</classname></para>
|
<classname>ContentNegotiatingViewResolver</classname></para>
|
||||||
|
|
||||||
<programlisting language="xml"> <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
<programlisting language="xml"> <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
||||||
<property name="mediaTypes">
|
<property name="mediaTypes">
|
||||||
<map>
|
<map>
|
||||||
<entry key="atom" value="application/atom+xml"/>
|
<entry key="atom" value="application/atom+xml"/>
|
||||||
<entry key="html" value="text/html"/>
|
<entry key="html" value="text/html"/>
|
||||||
</map>
|
</map>
|
||||||
</property>
|
</property>
|
||||||
<property name="viewResolvers">
|
<property name="viewResolvers">
|
||||||
<list>
|
<list>
|
||||||
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
|
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
|
||||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||||
<property name="prefix" value="/WEB-INF/jsp/"/>
|
<property name="prefix" value="/WEB-INF/jsp/"/>
|
||||||
<property name="suffix" value=".jsp"/>
|
<property name="suffix" value=".jsp"/>
|
||||||
</bean>
|
</bean>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
<bean id="content" class="com.springsource.samples.rest.SampleContentAtomView"/></programlisting>
|
<bean id="content" class="com.springsource.samples.rest.SampleContentAtomView"/></programlisting>
|
||||||
|
|
||||||
<para>The <classname>InternalResourceViewResolver</classname> handles
|
<para>The <classname>InternalResourceViewResolver</classname> handles
|
||||||
the translation of view names and JSP pages while the
|
the translation of view names and JSP pages while the
|
||||||
|
|
@ -290,16 +290,16 @@ public class RelativePathUriTemplateController {
|
||||||
|
|
||||||
<programlisting language="java">@Controller
|
<programlisting language="java">@Controller
|
||||||
public class ContentController {
|
public class ContentController {
|
||||||
|
|
||||||
private List<SampleContent> contentList = new ArrayList<SampleContent>();
|
private List<SampleContent> contentList = new ArrayList<SampleContent>();
|
||||||
|
|
||||||
@RequestMapping(value="/content", method=RequestMethod.GET)
|
@RequestMapping(value="/content", method=RequestMethod.GET)
|
||||||
public ModelAndView getContent() {
|
public ModelAndView getContent() {
|
||||||
ModelAndView mav = new ModelAndView();
|
ModelAndView mav = new ModelAndView();
|
||||||
mav.setViewName("content");
|
mav.setViewName("content");
|
||||||
mav.addObject("sampleContentList", contentList);
|
mav.addObject("sampleContentList", contentList);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
|
|
@ -340,7 +340,7 @@ public class ContentController {
|
||||||
updated to support setting the HTTP method. For example, the following
|
updated to support setting the HTTP method. For example, the following
|
||||||
snippet taken from the updated Petclinic sample</para>
|
snippet taken from the updated Petclinic sample</para>
|
||||||
|
|
||||||
<programlisting language="html"><form:form method="delete">
|
<programlisting language="xml"><form:form method="delete">
|
||||||
<p class="submit"><input type="submit" value="Delete Pet"/></p>
|
<p class="submit"><input type="submit" value="Delete Pet"/></p>
|
||||||
</form:form></programlisting>
|
</form:form></programlisting>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
<!ENTITY mvc SYSTEM "mvc.xml">
|
<!ENTITY mvc SYSTEM "mvc.xml">
|
||||||
<!ENTITY view SYSTEM "view.xml">
|
<!ENTITY view SYSTEM "view.xml">
|
||||||
<!ENTITY web-integration SYSTEM "web-integration.xml">
|
<!ENTITY web-integration SYSTEM "web-integration.xml">
|
||||||
|
<!ENTITY rest SYSTEM "rest.xml">
|
||||||
<!ENTITY portlet SYSTEM "portlet.xml">
|
<!ENTITY portlet SYSTEM "portlet.xml">
|
||||||
<!ENTITY remoting SYSTEM "remoting.xml">
|
<!ENTITY remoting SYSTEM "remoting.xml">
|
||||||
<!ENTITY ejb SYSTEM "ejb.xml">
|
<!ENTITY ejb SYSTEM "ejb.xml">
|
||||||
|
|
@ -299,6 +300,7 @@
|
||||||
&mvc;
|
&mvc;
|
||||||
&view;
|
&view;
|
||||||
&web-integration;
|
&web-integration;
|
||||||
|
&rest;
|
||||||
&portlet;
|
&portlet;
|
||||||
</part>
|
</part>
|
||||||
<part id="spring-integration">
|
<part id="spring-integration">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue