This posting is more of an FYI....

Earlier I asked the question below.

Hans kindly pointed out that the servlet spec (SRV.8.3.1) indicates the
servlet included by the <jsp:include> should have access to several request
attributes with these names:

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

With TC v4.1.12, however, this is not working from within a JSP. The above
attributes are *not* available in the servlet's request object.



Original 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

Reply via email to