From within a servlet, how can I tell if the servlet is being called by a RequestDispatcher("").include, or if it was called normally?
From within a servlet, how can I tell if the servlet is being called
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There should be a bunch of request attributes present, listed here:
http://www.caucho.com/resin-3.0/webapp/faq.xtp#forward-path
For example,
request.getAttribute("javax.servlet.include.request_uri")should return a non-null value if an include is in progress.