Eccouncil 312-96 Exam - Topic 1 Question 6 Discussion
Suppose there is a productList.jsp page, which displays the list of products from the database for the requested product category. The product category comes as a request parameter value. Which of the following line of code will you use to strictly validate request parameter value before processing it for execution?
B) public boolean validateUserName() { Pattern p = Pattern.compile('[a-zA-Z0-9]*$'); Matcher m = p.matcher(request.getParameter(CatId')); boolean result = m.matches(); return result;}
A) public boolean validateUserName() {String CategoryId= request.getParameter('CatId');}
C) public boolean validateUserName() { if(request.getParameter('CatId')!=null ) String CategoryId=request.getParameter('CatId');}
D) public.boolean validateUserName() { if(!request.getParamcter('CatId').equals('null'))}
Crista
8 months agoShenika
8 months agoNguyet
8 months agoDavida
8 months agoSherell
9 months agoPaola
9 months agoYuonne
9 months agoGianna
9 months agoMariann
9 months agoCarli
9 months agoLacey
10 months agoBuck
10 months ago