Expand my Community achievements bar.

Introducing Adobe LLM Optimizer: Own your brand’s presence in AI-Powered search and discovery

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Eclipse Code Completion not working in JSP

Avatar

Former Community Member

Hi everyone,

I have successfully configured my CQ project using maven and eclipse and can import,  I have followed the steps here : http://dev.day.com/docs/en/cq/5-3/developing/developmenttools/developing_with_eclipse.html

As the document suggests I add all the jar files to my build path but the code completion id not working in my JSP.

For example in my JSP I have

resourceResolver.getResource("/content...");

however when I hit control space I do not see any methods on the resourceResolver object.

Does anyone work this way and be able to give me some tips?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Getting code completion working in Eclipse was a major hurdle for our existing codebase - took quite a bit of fiddling with maven artifacts and their versions, but we ended up getting it working for both Juno and Kepler. Two things that are important:

  1. you need to add the right artifacts not only to your core pom.xml, but also the ui/app pom.xml.
  2. even after getting the dependencies right, eclipse was pretty buggy for us - sometimes JSP code completion stops working and requires a restart, and when we initiate code completion, we have to wait for the popup box to get populated before typing a partial match, otherwise JSTL tags don't show up.
  3. when editing a JSP, make sure you're opening it through the ui/app project and not the parent project.
  4. consider switching to IntelliJ, it handles multi-module maven projects a lot better than eclipse, it can auto-complete EL statements - and has a bunch of other advantages as well :)

View solution in original post

1 Reply

Avatar

Correct answer by
Former Community Member

Getting code completion working in Eclipse was a major hurdle for our existing codebase - took quite a bit of fiddling with maven artifacts and their versions, but we ended up getting it working for both Juno and Kepler. Two things that are important:

  1. you need to add the right artifacts not only to your core pom.xml, but also the ui/app pom.xml.
  2. even after getting the dependencies right, eclipse was pretty buggy for us - sometimes JSP code completion stops working and requires a restart, and when we initiate code completion, we have to wait for the popup box to get populated before typing a partial match, otherwise JSTL tags don't show up.
  3. when editing a JSP, make sure you're opening it through the ui/app project and not the parent project.
  4. consider switching to IntelliJ, it handles multi-module maven projects a lot better than eclipse, it can auto-complete EL statements - and has a bunch of other advantages as well :)