I am attempting to use the Jsoup library in my JSPs for one of my custom bundles. I've added the dependency to my pom.xml, however, I cannot seem to get the library to properly import it into my JSP file. When loading the page I receive the following error in the logs: Only a type can be imported. org.jsoup.Jsoup resolves to a package.
My JSP import looks like this:
<%@ page import="org.jsoup.Jsoup" %>
I know that I am importing the library properly in my JSP, however, AEM seems to think this is a package. I've also added the org.jsoup.* dependency to the bundle pom.xml like so:
<Export-Package> org.apache.commons.validator.*, org.jsoup.* </Export-Package>
however, this doesn't seem to work either. Any direction or resources for using libraries in JSPs would be greatly appreciated.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
See this community article which is based on your topic jsoup.
http://helpx.adobe.com/experience-manager/using/html-parser-service.html.
Thanks,
Ratna Kumar.
Views
Replies
Total Likes
Hi,
See this community article which is based on your topic jsoup.
http://helpx.adobe.com/experience-manager/using/html-parser-service.html.
Thanks,
Ratna Kumar.
Views
Replies
Total Likes
Hello,
If you are adding a new library then make sure the bundle is available in system at runtime it means you have to deploy that bundle in osgi (system/console/bundles). adding dependency to pom.xml helps compilation not at runtime so you have to deploy this bundle explicitly.
Thanks
Pawan
Views
Replies
Total Likes