Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.tamnd.app.controller; import javax.servlet.http.HttpServlet; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; /** * * @author tamnd2 */ @Controller public class TestController extends HttpServlet { @RequestMapping(value = "/test", method = RequestMethod.GET) @ResponseBody public String isItWorking() { return "App without web.xml works"; } }