"Joseph B. Ottinger" wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sorry, I forgot the term for it.
>
> Getting the query parameters is easy; file.jsp?a=b&c=d, the a and c
> parameters are nothing to extract.
>
> However, what if the URL is of the form file.jsp/a? Is the "a" accessible
> at all?
>

Because JSPs are mapped by filename extension, I would bet that this URL
("file.jsp/a") doesn't even get the page correctly, because the extension is
supposed to be at the end of your URL.  A couple of things to think about:

* If you can use "file.jsp?a" instead, then the "a" is available in
  request.getQueryString().

* If you are talking about servlets instead of JSPs, and you map
  a servlet to a specific URL, you can get the stuff after the path
  of the servlet with request.getPathInfo().  For example, if you have
  your servlet mapped to "/myservlet" and you submitted the URL
  "/myservlet/a", your servlet would be called, and getPathInfo()
  would return "/a".

Craig McClanahan


>
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 6.5.1i
>
> iQA/AwUBOEfaAAhcVZKknQwGEQJ66ACgvBaahp3UQOSGWUKzQauN1wtsxXUAni5U
> gbmegO+Lk2r6X2ZrzCPcYMTP
> =dkXM
> -----END PGP SIGNATURE-----
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to