Hitachi

uCosminexus Application Server Security Management Guide


The check method (syntax 2)

Organization of this page

Description

Checks for a user who has logged into a session. To check for a user who has logged into a particular realm, realmName is used.

Syntax

public static boolean check(HttpServletRequest request,
                                 HttpServletResponse response,
                                 String realmName);

Parameters

request:

Specifies the reference to HttpServletRequest that was passed to JSP/Servlet. If null is specified, NullPointerException occurs.

response:

Specifies the reference to HttpServletResponse that was passed to JSP/Servlet. If null is specified, NullPointerException occurs.

realmName:

Used to check for a user who has logged into a particular realm. If null is specified, NullPointerException occurs.

Exception

java.lang.NullPointerException:

One of the parameters for this method has been specified as null.

Return values

true:

A currently logged-in user has been found.

false:

A currently logged-in user has not been found.