Skip to main content

Mini Project: Using the Servlet API Inside Spring MVC

Learn Mini Project: Using the Servlet API Inside Spring MVC (Servlet Integration, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Mini Real-Time Project: Using the Servlet API Inside Spring MVC Problem Sometimes a controller needs the raw servlet objects: read the client address and headers, write a custom response, store an attribute for the whole application, or forward to another URL. Show how Spring MVC lets you use them without giving up its conveniences. Requirements Inject HttpServletRequest, HttpServletResponse and HttpSession into handler methods, and get the ServletContext from the request. Read the request line, headers and parameters. Write the response directly (status, header, body). Share data through the...

More lessons in Servlet Integration