@mewan86 , Register your servlet by resource type of page component. Use the current page path to call your servlet, this would give you the current page path. And, using this way request.getResource() will also not return null. From what I understand, you may have registered your servlet by path. @...