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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With