Enable full documentation for Java EE in eclipse

I am new to Eclipse and am currently using it to work with Java EE.

When using Ctrl + Space for types / functions from regular Java libraries, I get a full description (i.e. a general description of the type, what method arguments, etc.). However, I do not get the same for Java EE types.

For example, when using Ctrl + Space in the methods of the HttpSession class, I get only names like "arg0" or "obj" and are not described.

How can i fix this?

+4
source share
3 answers

I suggest downloading javadocs and adding them to eclipse. ( right click project > properties > java build path > libraries > expand the library > set Javadoc location )

+4
source

I think that why Java EE defines only the specification, then the implementation should be done by your application server provider. javax.servlet.http.HttpSession e.g. contained in servlet.jar file.

You are using Tomcat as your application server, you can attach java sources to your servlet.jar, and then you can view the source and read its javadoc.

The source for the last cat is here → http://www.apache.org/dist/tomcat/tomcat-6/v6.0.26/src/apache-tomcat-6.0.26-src.zip

+3
source

I wanted to add what might be very relevant information for projects using maven and eclipse / wtp. What I did to attach the Javadocs was the next two steps.

1) I use glass fish, so using the glass fish plugin site I installed the java ee 6 (or 7) documentation. You can easily browse this documentation with help → Java EE 6 docs. I copied the URL here.

2) He opened the path to creating my projects and switched to the libraries tab. Opened Maven Dependencies and found the java ee 6 api entry (this should be part of the maven project). Opened this and was able to add space for javadocs for api. I pasted the file: /// url which I copied.

Then I checked that this worked with the ctrl + shift + mouse mouse cursor on some java ee 6 classes and methods.

I hope that this information will be useful to others who searched and got here, but did not find the solution they were looking for (or for those who are now using Maven!).

+1
source

Source: https://habr.com/ru/post/1305732/


All Articles