Hey:
There's an excellent chance that "page" is a reserved session variable. Use a
different variable name.
James Stoertz
President
Triad Java User Group, NC
[EMAIL PROTECTED]
Hans Bergsten <[EMAIL PROTECTED]> on 01/17/2001 02:51:23 AM
Please respond to A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: James Stoertz/EB/Aon Consulting)
Subject: Re: getParameter() help
Matt Becker wrote:
>
> Hi, I have a servlet which dispatches out various jsp's. Some of the jsp's
> resulting html contain links back to the servlet to fire off another page
> like this:
>
> <A HREF="mainservlet?cmd=load&page=home">HOME</A>
>
> When I do a request.getParameter("cmd") the string I get is "cmd" which is
> right.
>
> When I do request.getParameter("page") the string I get is
> "mainservlet?cmd=load" which is not right.
>
> Does anyone know if I'm doing something wrong with how I'm writing the link
> back to the servlet?
You're not doing anything wrong, so it's most likely a bug in
the container you use (assuming the URL really looks like in
your example). Report it to the vendor.
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.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://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
===========================================================================
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://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