Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling full documentation for Java EE in eclipse

I'm new to Eclipse and am using it currently to play with Java EE.

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

For example, when using Ctrl+Space on methods of the HttpSession class I get only names like "arg0" or "obj" and no description.

How can I remedy this?

like image 495
maayank Avatar asked Feb 27 '23 06:02

maayank


2 Answers

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

like image 139
Bozho Avatar answered Mar 05 '23 18:03

Bozho


I think that's why Java EE defines a specification only, the implementation must then be done by the provider of your application server. javax.servlet.http.HttpSession e.g. is bundled in servlet.jar.

It you are using Tomcat as your application server, you could attach the java sources to your servlet.jar and then you can browse the source and read it's javadoc.

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

like image 27
Oliver Michels Avatar answered Mar 05 '23 16:03

Oliver Michels