O'Reilly logo

Servlets und JSPs™ von Kopf bis Fuß by Bert Bates, Kathy Sierra, Bryan Basham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.11. Die Attribut-API

Die drei Attribut-Gültigkeitsbereiche – Kontext, Anfrage und Sitzung – werden von den Interfaces ServletContext, ServletRequest und HttpSession verwaltet. Die API-Methoden für die Attribute sind in allen Interfaces völlig identisch.

Object getAttribute(String name)

void setAttribute(String name, Object wert)

void removeAttribute(String name)

Enumeration getAttributeNames()

kontext

<<interface>>ServletContext

getInitParameter(String)

getInitParameterNames()

getAttribute(String)

setAttribute(String, Object)

removeAttribute(String)

getAttributeNames()

getMajorVersion()

getServerInfo()

getRealPath(String)

getResourceAsStream(String)

getRequestDispatcher(String)

log(String)

// ... und VIELE weitere Methoden ...

Anfrage

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required