Java Authenticator getRequestingPrompt() Method

20 Mar 2025 | 2 min read

The getRequestingPrompt() method of Authenticator Class is used to get the prompt string given by the requester.

Syntax:

Parameter:

No parameter is passed.

Return:

The prompt string is given by the requestor (realm for http requests)

Throw:

Does not throw the exception.

Example 1

Output:

 Host using url.getHost ::www.TpointTech.com Prompt:null //source code of https://www.tpointtech.com is printed 

Example 2

Output:

 Prompt :null //source code of https://www.tpointtech.com is printed.