Link to home
Start Free TrialLog in
Avatar of javaCaravan0
javaCaravan0

asked on

getParameterMap()

I am not sure why I'm getting the following errors:

"The method getParameterMap() is undefined for the type HttpServletRequest"
"The method getRequestURL() is undefined for the type HttpServletRequest"

I have included servlet-api.jar in my java build path. (I'm using Eclipse).
When I look at the API, I see both methods are available.
Any idea why these errors are there?
Avatar of anilallewar
anilallewar
Flag of India image

It has to be an classpath issue; there is another jar in your classpath that is loading an HttpServletRequest class NOT containing these methods.
Those two methods are instance methods, so I'm presuming you have an instance.
When using Eclipse, what happens when you hover the mouse pointer over the instance identifier?

It should indicate the type and may also provide you with a Javadoc link so that you can verify which type Eclipse thinks it is.

Have you tried compiling at the command line?
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
what is location of jar files?
May be you can try putting it in WEB-INF/lib folder.