----- Original Message -----
From: "David Wall" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Wednesday, August 06, 2008 1:17 AM
Subject: Parsing a URL to see if a param exists
Is there an API call to parse an URL I have as a String so that I can
determine if a given param exists?
I know that when processing from Tomcat, I can do
request.getParameterValues() for the URL of my servlet, but I'd like to
know if the URL used to arrive at my page includes a given parameter on
the URL itself (and not from a POST hidden param that will also be
returned by getParameterValues).
Thanks,
David
Dave this is how I do it...
Enumeration paramNames = request.getParameterNames();
while(paramNames.hasMoreElements()) {
paramName = (String)paramNames.nextElement();
if(paramName.compareToIgnoreCase("save") == 0){
//Do something useful
paramValue = request.getParameter(paramName);
}
}
Maybe?
Its probably all pre parsed by TC already...
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]