Search code examples
javaspringrestspring-mvctomcat6

Best way to do Spring MVC without JSP?


I wish to use Spring MVC to provide a REST web service. However, running through some books and tutorials, it looks like ModelAndView always returns a parsed JSP file. I guess I could make the JSP build my XML document, but is this the best way to go about things? I thought that perhaps a more structured XML building approach might be appropriate.

What are my options? Also, does anyone have any relevant tutorials?


Solution

  • This would probably help somewhat. It seems you are looking for a Marshalling View.

    Alternatively, a JAX-RS implementation like Jersey or RESTeasy might suit you as well.