title: RESTful web service's response
body: <p>Let's say I have the following model</p>
  
  <pre><code>Course
  Student
  </code></pre>
  
  <p>The URI:</p>
  
  <pre><code>/courses/1
  </code></pre>
  
  <p>should return the following information about a particular course:</p>
  
  <pre><code>Name
  Number
  Date
  Instructor
  </code></pre>
  
  <p>and:
      /courses</p>
  
  <p>should return a list of above mentioned information.</p>
  
  <p>I'm not sure about the 'return' part. If this was a JAX-WS service we would get the information about the course in question, create XML, stick that XML into a SOAP envelope and XML over HTTP to the client.</p>
  
  <p>Also in a 'normal' web application, in response to:</p>
  
  <pre><code>/courses
  </code></pre>
  
  <p>A <code>List&lt;Course&gt;</code> would be <code>request.addAttribute(-)</code>'d to the JSP to render an HTML table. What is supposed to happen for a RESTful web service? Should the contents of the <code>List</code> be directly written to the output stream?</p>