Top Description Fields Constructors Methods
javax.servlet

public Class ServletRequestAttributeEvent

extends ServletRequestEvent
Class Inheritance

This is the event class for notifications of changes to the attributes of the servlet request in an application.
Since
Servlet 2.4
See Also
ServletRequestAttributeListener

Field Summary

Modifier and TypeField and Description
private String
private static final long
private Object

Constructor Summary

AccessConstructor and Description
public
ServletRequestAttributeEvent(ServletContext
the ServletContext that is sending the event.
sc
,
ServletRequest
the ServletRequest that is sending the event.
request
,
String
the name of the request attribute.
name
,
Object
the value of the request attribute.
value
)

Construct a ServletRequestAttributeEvent giving the servlet context of this web application, the ServletRequest whose attributes are changing and the name and value of the attribute.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the name of the changed request attribute
getName
()

Return the name of the attribute that changed on the ServletRequest.

public Object

Returns:

the value of the changed request attribute
getValue
()

Returns the value of the attribute that has been added, removed or replaced.

Inherited from javax.servlet.ServletRequestEvent:
getServletContextgetServletRequest

Field Detail

nameback to summary
private String name
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.servlet.ServletRequestEvent.serialVersionUID.

valueback to summary
private Object value

Constructor Detail

ServletRequestAttributeEventback to summary
public ServletRequestAttributeEvent(ServletContext sc, ServletRequest request, String name, Object value)

Construct a ServletRequestAttributeEvent giving the servlet context of this web application, the ServletRequest whose attributes are changing and the name and value of the attribute.

Parameters
sc:ServletContext

the ServletContext that is sending the event.

request:ServletRequest

the ServletRequest that is sending the event.

name:String

the name of the request attribute.

value:Object

the value of the request attribute.

Method Detail

getNameback to summary
public String getName()

Return the name of the attribute that changed on the ServletRequest.

Returns:String

the name of the changed request attribute

getValueback to summary
public Object getValue()

Returns the value of the attribute that has been added, removed or replaced. If the attribute was added, this is the value of the attribute. If the attribute was removed, this is the value of the removed attribute. If the attribute was replaced, this is the old value of the attribute.

Returns:Object

the value of the changed request attribute