Is there a way to specify a package for a particular JSP pag?

Discussions

Web tier: servlets, JSP, Web frameworks: Is there a way to specify a package for a particular JSP pag?

  1. Hi all,

    Please answer the following two questions for me.

    1)Is there a way to specify a package for a particular JSP page?
    2)If I use a RequestDispatcher to forward to another servlet/JSP, is there a way to determine who (what page) forwarded to me?

    Thanks,
    Anuj
  2. You can specify a package name (and class name) if you precompile to servlets. BTW, since ostensibly the *transparency* of JSP is a virtue, what is your interest in identifying a package?

    As to identifying the *sender* of a servlet dispatch, one way is to record such state in an appropriately scoped location. It appears that the RequestDispatcher *updates* the ServletRequest in the dispatch process.

    Paul Jones