Question :Request parameter How to find whether a parameter exists in the request
object? (Servlets)
Answer :1.boolean hasFoo = !(request.getParameter("foo") == null ||
request.getParameter("foo").equals(""));
2. boolean hasParameter =
request.getParameterMap().contains(theParameter);
(which works in Servlet 2.3+)
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Saturday, March 14, 2009
Request parameter How to find whether a parameter exists in the request object (Servlets)
Labels:
JAVA
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment