I have a statement
String pass = com.liferay.portal.util.PortalUtil.getUserPassword(
renderRequest)
that causes the following error in eclipse IDE:
The type javax.servlet.http.HttpSession cannot be resolved. It is indirectly referenced from required .class files
Why is this error occuring? I have added an import statement for the type but yet the error remains. How can I remove this error?
Thanks for your help.
-
It sounds like you haven't referenced the right libraries. Add a reference to servlet.jar.
-
You need to put the definition of that class (usually contained in a servlet.jar file) into the build path of your project (right-click on the project, select "Properties" and then "Build Path").
-
Check your project setup. If I recall correctly, this has to do with com.liferay.portal.util.PortalUtil.getUserPassword(renderRequest) using javax.servlet.http.HttpSession under the hood, but eclipse isn't able to find that class. Try adding the servlet api jar to the project class path
0 comments:
Post a Comment