EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB30976: How to get the HTTPServletRequest object from ContainerServices interface using the MicroStrategy Web SDK.


Community Admin

• Strategy


This article discusses how to get the HTTPServletRequest object from ContainerServices interface using the MicroStrategy Web SDK.

In scenarios where users would like to verify the incoming URL in the handlesAuthenticationRequestMethod() for the ESM, they should first get the HTTPServletRequest object that contans the required information.
The code snippet below shows how to get the HttpServletRequest object from ContainerServices interface:


public int handlesAuthenticationRequest(RequestKeys reqKeys, ContainerServices cntSvcs, int reason) {
    HttpServletRequest request = ((ServletContainerServices)cntSvcs).getRequest();
    String requestURL = request.getRequestURI();
    if(requestURL.equalsIgnoreCase("/812/servlet/mstrWebAdmin")){
        return ExternalSecurity.USE_CUSTOM_LOGIN_PAGE;
        else {
            return ExternalSecurity.COLLECT_SESSION_NOW;
        }
	}
}

 
NOTE: This approach would only work for Web Universal.
 
CUSTOMIZATION WARNING:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.
 


Comment

0 comments

Details

Knowledge Article

Published:

June 22, 2017

Last Updated:

June 22, 2017