Package javax.servlet

Class ServletRequestEvent

  • Direct Known Subclasses:
    ServletRequestAttributeEvent


    public class ServletRequestEvent
    extends java.util.EventObject
    Events of this kind indicate lifecycle events for a ServletRequest. The source of the event is the ServletContext of this web application.
    Since:
    Servlet 2.4
    See Also:
    ServletRequestListener, Serialized Form
    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Constructor Detail

      • ServletRequestEvent

        public ServletRequestEvent​(ServletContext sc,
                                   ServletRequest request)
        Construct a ServletRequestEvent for the given ServletContext and ServletRequest.
        Parameters:
        sc - the ServletContext of the web application.
        request - the ServletRequest that is sending the event.
    • Method Detail

      • getServletRequest

        public ServletRequest getServletRequest​()
        Returns the ServletRequest that is changing.
        Returns:
        the ServletRequest corresponding to this event.
      • getServletContext

        public ServletContext getServletContext​()
        Returns the ServletContext of this web application.
        Returns:
        the ServletContext for this web application.