How to get current run mode of an AEM instance (author or publisher) | Community
Skip to main content
Level 2
October 16, 2015
Solved

How to get current run mode of an AEM instance (author or publisher)

  • October 16, 2015
  • 2 replies
  • 8603 views

Hi,

How we can know current run mode of AEM instace i.e. Author or Publisher

Similar to getting WCMMode using  WCMMode.fromRequest(request)

Thanks

LM

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by edubey
Please use below code:- <% pageContext.setAttribute("runModes", sling.getService(SlingSettingsService.class).getRunModes().toString()); %>

2 replies

smacdonald2008
Level 10
October 16, 2015

Here is a community code example:

http://wemcode.wemblog.com/check-run-mode

edubey
edubeyAccepted solution
Level 10
October 16, 2015
Please use below code:- <% pageContext.setAttribute("runModes", sling.getService(SlingSettingsService.class).getRunModes().toString()); %>