How to access sling servlet on page load | Community
Skip to main content
jamesm77050123
Level 2
Mar 14, 2018 11:05 AM UTC
Solved

How to access sling servlet on page load

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.
BrijeshYadav
BrijeshYadavAccepted solution
Level 5
Mar 14, 2018 12:29 PM UTC

2 replies

jamesm77050123
Level 2
Mar 14, 2018 1:31 PM UTC

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

Translate
BrijeshYadav
BrijeshYadavAccepted solution
Level 5
Mar 14, 2018 12:29 PM UTC