Class PrintAttributeServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.jboss.as.test.integration.security.common.servlets.PrintAttributeServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
@WebServlet("/PrintAttrServlet")
public class PrintAttributeServlet
extends jakarta.servlet.http.HttpServlet
This servlet prints value of an request/session attribute. It supports also nested values for
Map and List
instances - names in such case are delimited by "/".
The servlet supports 2 parameters:
- "attr" - name of attribute to retrieve. Default value is "SESSION_ATTRIBUTE_MAP/cn/0"
- "scope" - scope from which the value should be retrieved. Supported vaules are "session" and "request". Default is "session"
For instance the Picketlink's handler SAML2AttributeHandler stores a map with attributes received in SAML assertion to an
HttpSession as attribute named "SESSION_ATTRIBUTE_MAP". Each entry in this map is represented by a list of values. So
if you want to read the first value of SAML assertion attribute named "cn" from the session, use the parameter
"attrib=SESSION_ATTRIBUTE_MAP/cn/0"
- Author:
- Josef Cacek
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
SERVLET_PATH
- See Also:
-
PARAM_ATTR_NAME
- See Also:
-
PARAM_SCOPE_NAME
- See Also:
-
DELIMITER
- See Also:
-
DEFAULT_PROPERTY_NAME
- See Also:
-
SCOPE_REQUEST
- See Also:
-
SCOPE_SESSION
- See Also:
-
DEFAULT_SCOPE_NAME
- See Also:
-
-
Constructor Details
-
PrintAttributeServlet
public PrintAttributeServlet()
-
-
Method Details
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException - Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-