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
|
||||
<classname>ContentNegotiatingViewResolver</classname></para>
|
||||
|
||||
<programlisting language="xml"> <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
||||
<property name="mediaTypes">
|
||||
<map>
|
||||
<entry key="atom" value="application/atom+xml"/>
|
||||
<entry key="html" value="text/html"/>
|
||||
</map>
|
||||
</property>
|
||||
<property name="viewResolvers">
|
||||
<list>
|
||||
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
|
||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="prefix" value="/WEB-INF/jsp/"/>
|
||||
<property name="suffix" value=".jsp"/>
|
||||
</bean>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="content" class="com.springsource.samples.rest.SampleContentAtomView"/></programlisting>
|
||||
<programlisting language="xml"> <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
||||
<property name="mediaTypes">
|
||||
<map>
|
||||
<entry key="atom" value="application/atom+xml"/>
|
||||
<entry key="html" value="text/html"/>
|
||||
</map>
|
||||
</property>
|
||||
<property name="viewResolvers">
|
||||
<list>
|
||||
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
|
||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="prefix" value="/WEB-INF/jsp/"/>
|
||||
<property name="suffix" value=".jsp"/>
|
||||
</bean>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="content" class="com.springsource.samples.rest.SampleContentAtomView"/></programlisting>
|
||||
|
||||
<para>The <classname>InternalResourceViewResolver</classname> handles
|
||||
the translation of view names and JSP pages while the
|
||||
|
|
@ -290,16 +290,16 @@ public class RelativePathUriTemplateController {
|
|||
|
||||
<programlisting language="java">@Controller
|
||||
public class ContentController {
|
||||
|
||||
private List<SampleContent> contentList = new ArrayList<SampleContent>();
|
||||
|
||||
@RequestMapping(value="/content", method=RequestMethod.GET)
|
||||
public ModelAndView getContent() {
|
||||
ModelAndView mav = new ModelAndView();
|
||||
mav.setViewName("content");
|
||||
mav.addObject("sampleContentList", contentList);
|
||||
return mav;
|
||||
}
|
||||
|
||||
private List<SampleContent> contentList = new ArrayList<SampleContent>();
|
||||
|
||||
@RequestMapping(value="/content", method=RequestMethod.GET)
|
||||
public ModelAndView getContent() {
|
||||
ModelAndView mav = new ModelAndView();
|
||||
mav.setViewName("content");
|
||||
mav.addObject("sampleContentList", contentList);
|
||||
return mav;
|
||||
}
|
||||
|
||||
}</programlisting>
|
||||
|
||||
|
|
@ -340,7 +340,7 @@ public class ContentController {
|
|||
updated to support setting the HTTP method. For example, the following
|
||||
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>
|
||||
</form:form></programlisting>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<!ENTITY mvc SYSTEM "mvc.xml">
|
||||
<!ENTITY view SYSTEM "view.xml">
|
||||
<!ENTITY web-integration SYSTEM "web-integration.xml">
|
||||
<!ENTITY rest SYSTEM "rest.xml">
|
||||
<!ENTITY portlet SYSTEM "portlet.xml">
|
||||
<!ENTITY remoting SYSTEM "remoting.xml">
|
||||
<!ENTITY ejb SYSTEM "ejb.xml">
|
||||
|
|
@ -299,6 +300,7 @@
|
|||
&mvc;
|
||||
&view;
|
||||
&web-integration;
|
||||
&rest;
|
||||
&portlet;
|
||||
</part>
|
||||
<part id="spring-integration">
|
||||
|
|
|
|||
Loading…
Reference in New Issue