How to add Javadoc for Servlet API in Eclipse

前端 未结 5 1911
太阳男子
太阳男子 2020-12-05 08:46

I\'ve a dynamic web app in Eclipse that is using Tomcat as runtime environment.

I cannot add Javadoc path Tomcat Servlet API: as appears, the edit button is always d

5条回答
  •  孤城傲影
    2020-12-05 09:24

    In Package Explorer of your project go to Java Resources > Libraries. Rightclick servlet-api.jar, choose Properties and specify the source location there (the apache-tomcat-x.x.x-src.zip file).

    Another way is to just open any Servlet API class using Ctrl+Shift+T or by Ctrl+Click on any import/declaration in existing code and then click the Attach Source... button and specify it there.

提交回复
热议问题