content « MVC « Spring Q&A





1. Spring MVC 3 and handling static content - am I missing something?    stackoverflow.com

I am developing a webapp using Spring MVC 3 and have the DispatcherServlet catching all requests to '/' like so (web.xml):

  <servlet>
    <servlet-name>app</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
 ...

2. Will Spring hold contents in memory or stores in the disk?    stackoverflow.com

When a file say 100 MB size is uploaded from browser will Spring hold whole data in memory or stores in the disk temporarily. After going through Spring doc I know ...

3. Java spring framework - how to set content type?    stackoverflow.com

I have a spring action that I am rendering some json from the controller, at the minute its returning the content type 'text/plain;charset=ISO-8859-1'. How can I change this to be 'application/json'? Thanks Jon

4. Spring MVC Content Negotiation with HttpMessageConverter    stackoverflow.com

For a recent project we wanted to support XML and another format for our resopnses. However, we could not control the Accept header. Hence we configured a ContentNegotiatingViewResolver to use a request ...

5. Handling multiple content types in Spring MVC... which approach is preferred?    stackoverflow.com

So, we are getting to the point in our Spring application where we need to decide how to handle views and content negotiation. Previously, we've only supported one specific content ...

6. Reading httprequest content from spring exception handler    stackoverflow.com

I Am using Spring's @ExceptionHandler annotation to catch exceptions in my controllers. Some requests hold POST data as plain XML string written to the request body, I want to read that data ...

7. SpringMVC: Serving XHTML    stackoverflow.com

I have a annotated spring-mvc controller which gives some data to a jsp-view.

@RequestMapping(method = RequestMethod.GET)
public ModelAndView editor(){

    ModelAndView model = new ModelAndView("editor");
    model.addObject("profile", "default");
  ...

8. Serving static content with Spring 3    stackoverflow.com

I'm trying to use resources mapping feature of Spring 3 and it does not seem to be working. Here is what I have:

<servlet>
    <servlet-name>aaa</servlet-name>
    ...

9. Using to include Spring MVC content    forum.springsource.org

Using to include Spring MVC content I have a JSP page that looks something like this: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> "someController" is a MultiAction Controller and "someMethod" ...





10. Spring MVC content negotiation    forum.springsource.org

Spring MVC content negotiation We have got a Restful application hosting services that can either return xml view or json view or atom view based on the content type requested. Is ...

11. Confusing ModelAttribute and Content Negotiation behavior    forum.springsource.org

Confusing ModelAttribute and Content Negotiation behavior Hi, Im using @ModelAttribute as a param to a handler (rest style). When the client makes a json request, ModelAttribute is appended to the output. ...

12. spring mvc content type    forum.springsource.org

spring mvc content type I would like to write a spring mvc controller method that directly writes to the servletOutputStream. I assume that this can be done by simply having an ...

13. Spring MVC automatically appends charset to Content-Typ    forum.springsource.org

Spring MVC automatically appends charset to Content-Typ Spring MVC (tested with 3.0.4 and 2.5.6) automatically appends charset to Content-Type headers in HTTP responses, including responses with Content-Type application/*, e.g. application/java-archive. This ...