This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: checking for parameters in URL
 
Similar Threads
JSP parameters
modifying request parameter values
where to map the domain name in Tomcat?
use Bean tag
Forwarding from a servlet to a jsp.