views:

69

answers:

2

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

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 J2EE types.

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

Is there some kind of a package I can install to remedy this?

+2  A: 

I think that's why JEE 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

Oliver Michels
Can I attach the source to the servlet.jar for all the projects/workspace and not just one project? (i.e. somewhere in the eclipse settings)
maayank
if you used a library variable you could do it. Create a library with source added and add that to your projects.
Michael Wiles
+3  A: 

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)

Bozho
Cute unicorn! BWUHAHAH! >:)
Pascal Thivent
@Pascal Thivent - yours is better, it has green :)
Bozho
I've done this with the sources mentioned by Oliver and it works (tnx!).Is there a way to do it in the general eclipse properties so the documentation/sources will be available for all projects, without me needing to fix each project by hand?
maayank
@maayank Use Maven
Pascal Thivent
@Bozho Mine is a punk unicorn!
Pascal Thivent