Why are there magic attributes exposed in the Servlet spec?
Posted
by Brabster
on Stack Overflow
See other posts from Stack Overflow
or by Brabster
Published on 2010-03-15T18:48:32Z
Indexed on
2010/03/15
18:49 UTC
Read the original article
Hit count: 232
It's always seemed a little at odds with the principles of Java that the Java Servlet Spec (2.5 version here) includes a set of magic attributes containing info about included resources, namely:
javax.servlet.include.request_uri
javax.servlet.include.context_path
javax.servlet.include.servlet_path
javax.servlet.include.path_info
javax.servlet.include.query_string
It's not even specifically pointed out in the API documentation, only in the spec where it is a must for correct implementation.
This approach feels very wrong, an exposed implementation detail that clients will use and depend on. Why is this information exposed in this way?
© Stack Overflow or respective owner