Robert Nicholson wrote:
>
> Is there no way to tell if a .jsp has been invoked via a request dispatcher?
> ie. no attributes in the request are set which all .jsp pages could check?

For an included JSP page (or servlet), the container adds a number of
request attributes automatically:

  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

For a forwarded request, you can add whatever request attribute you like
before you do the forward.

This, and so much more, is described in the Servlet specification. If
you're developing a somewhat complex application with JSP, especially
one including both servlets and JSP, I recommend that you read both the
Servlet specification and the JSP specification, or any good books about
these two technologies. JSP is an extension of the Servlet specification,
so you miss out on a lot of stuff unless you learn about servlets as well:

  <http://java.sun.com/products/servlet/>
  <http://java.sun.com/products/jsp/>

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to