in
servlet i am taking value from URL
String callback = request.getParameter("_callback"); problem is &_callback can be there or not, i am getting nullPointerException if &_callback is not there in URL. I tried to catch the exception but didn't work. is there any way to check whether request.getParameter() is null or not? if it is null, i want to execute a part of code and if not, other part.