The included page processes the same request object. So you are going to
get the previous request properties. The only other option is to do a
"sendRedirect" but that is not going to include the output of the
original jsp.

This is a dirty solution ( assuming that you control the servlet code ):
Override service method in ur servlet, set a pathinfo variable as a
request param value if it is not null, else set it to
request.getPathInfo. Then in ur doXXX methods, call this pathinfo
variable or have a wrapper getPathInfo method that returns this  variable.

-- padhu



Tony LaPaso wrote:

Hello all,

May I ask a question?

I have a servlet named "FormDispatcher" which I include from a JSP like
this:

<jsp:include page="servlet/FormDispatcher/abc/def"/>

What I *want* is for the FormDispatcher servlet to be able to access the
"/abc/def" path info by calling "request.getPathInfo()".

When the servlet calls "request.getPathInfo()", however, the method returns
the path info for the JSP which contains the <jsp:include> element shown
above, not "/abc/def". I understand why this is and it makes perfect sense
to me. *BUT*, I'm hoping there is a way, somehow, for me to gain access to
the "/abc/def" path info.

As a workaround I'm passing "/abc/def" as a request param as shown below but
I'd rather the included servlet be able to access the path info that was
specified in the <jsp:include> tag. Is it possible? Thanks very much.


The workaround....

<jsp:include page'"/servlet/FormDispatcher">
  <jsp:param name="caller-param" value="/abs/def"/>
</jsp:include>

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

http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com



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

http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com

Reply via email to