How to access sling servlet on page load | Community
Skip to main content
jamesm77050123
Level 2
March 14, 2018
Solved

How to access sling servlet on page load

  • March 14, 2018
  • 2 replies
  • 2538 views

Sorry for what is a simple question, I'm a total AEM newbie and not very good at Java either.

I'm doing an IP redirection script, it redirects the user to a different website based on his location. I'm using the Maxmind database to get the location using the IP. I'm stuck at a simple thing, where do I place the servlet so that the script runs before the page loads? Any pointers on how I should go around this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

BrijeshYadav
BrijeshYadavAccepted solution
Level 5
March 14, 2018
jamesm77050123
Level 2
March 14, 2018

Thanks, just what I needed. The sample code pointed me in the right direction :-)