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
9 months agoShenika
10 months agoNguyet
10 months agoDavida
10 months agoSherell
10 months agoPaola
11 months agoYuonne
11 months agoGianna
11 months agoMariann
11 months agoCarli
11 months agoLacey
11 months agoBuck
11 months ago