HttpServletRequest request;
Enumeration params = request.getParameterNames();
How should I declare the return type for the above method?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check out the ServletRequest API (since
HttpServletRequestinherits this method from its super interface,ServletRequest) and it will tell you what this method returns:java.util.Enumeration<java.lang.String>, meaning you might wish to try:Edit 1:
I’m not sure why you’re getting the first error. Perhaps you must cast the value returned from the method?
But to be honest, while I”m pretty good at going through most API’s, I don’t do servlets and would appreciate any help from the experts here.