Hi,
There should either be a way to iterate over the parameters(and thus know if
there are any by testing the iterator) or a method to return the number of
querystrings.
Or at least that's standard Java.
Regards,
Adam.
----
Adam Fowler
Second year Computer Science undergraduate
University of Wales, Aberystwyth
Carroll College, WI, USA(2000-2001)
web: http://gucciboy.dyndns.org/aff9
e-mail: [EMAIL PROTECTED]
"Every new beginning comes from some other beginning's end"
----
-----Original Message-----
From: Venkat [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 24, 2001 7:41 PM
To: [EMAIL PROTECTED]
Subject: Handling query strings
Hi All
When we more than one querystring in JSP, how do we
read then in the next page, because if we use
request.getQueryString(), it returns the whole string
after '?'
and if we use request.getParameter("parameterName"),
it works fine, but when requests come from different
pages and they do not contain this parameter, it
throws nullpointer exception.
In detail:
abc.jsp?id=123, in abc.jsp we can read id by using
request.getParameter("id"), but if a request comes
from another page, say, xyz.jsp to abc.jsp without any
parameter, abc.jsp throws expection
Is there any better way of dealing with these
querystrings/parameters. any examples/links are
highly appreciated
Regards
Venkat
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]