I am writing a subclass of HttpServlet. And I want to have a method in that subclass to get the HttpServletRequest. However, it seems HttpServlet does not provide that method.
Is there any way to get round to it?
public class CustomServlet extends HttpServlet {
public HttpServletRequest getRequest() {
...
}
}
HttpServletRequestobject'? There is one per request. Not one per Servlet. Your question doesn't make sense.