can check null parameter(urgent)

How can i check whether there is a particular parameter in a request? My requirement is that I want to set a session attribute if there is a particular parameter in the request.

I tried the following code but it doesn't work

if (request.getAttribute("cmbSelectDist") != null) {

session.setAttribute("Dist",request.getParameter("cmbSelectDist"));

}

Message was edited by:

Johnykutty

[426 byte] By [Johnykuttya] at [2007-11-26 20:02:44]
# 1
you can use this method insteadString cmbSelect = request.getAttribute("cmbSelectDist") ;if ( ! cmbselect.equals("null")){session.setAttribute("Dist",request.getParameter("cmbSelectDist"));}Cheers Varun Rathore
Varun_Rathorea at 2007-7-9 23:02:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...