I have written a class to handle a Rest call. From the method i want to call a Servlet. Now my question is how to create a HttpServletRequest and HttpServletResponse object within a class. In jsp we don't create any request object. We can directly use it. But within a class we either have to extend HttpServlet Or pass request and response object from calling method. SO what is the difference between jsp and a clas here? Both are ultimately compiled to a class right.
Regards,
Maclean Maurice Pinto