aspose file tools*
The moose likes Servlets and the fly likes checking for parameters in URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "checking for parameters in URL" Watch "checking for parameters in URL" New topic
Author

checking for parameters in URL

Anthony Leroy
Greenhorn

Joined: Aug 02, 2001
Posts: 20
is it possible to check to see if there are any parameters in the URL? For example, if "myJsp.jsp" is called, (no parameters) I want one thing to happen and if "myJsp.jsp?param=blah" is called I want another thing to happen.
thanks,
Ant
Praveen
Greenhorn

Joined: Apr 21, 2001
Posts: 11
Hi,
HttpServletRequest.getParameterNames() returns the enumerated names of all prameters obtained thru the user requests. You can use this method and if it returns null then you can perform some other function. Does it help you??
thanks

Software Engineer,<BR>Cybage Software Pvt. Ltd,<BR>Pune
 
jQuery in Action, 2nd edition
 
subject: checking for parameters in URL