如何在 Eclipse 中为 Servlet API 添加 Javadoc [英] How to add Javadoc for Servlet API in Eclipse

查看:27
本文介绍了如何在 Eclipse 中为 Servlet API 添加 Javadoc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Eclipse 中有一个动态 Web 应用程序,它使用 Tomcat 作为运行时环境.

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

我无法添加 Javadoc 路径 Tomcat Servlet API:如图所示,编辑按钮始终处于禁用状态!

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

替代文字 http://filaty.com/i/1005/80306/tom.JPG

推荐答案

在项目的包资源管理器中,转到 Java 资源 > 库.右键单击 servlet-api.jar,选择 Properties 并在那里指定源位置(apache-tomcat-xxx-src.zip 文件).

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).

另一种方法是使用 Ctrl+Shift+TCtrl 打开任何 Servlet API 类+单击现有代码中的任何导入/声明,然后单击附加源... 按钮并在此处指定.

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.

这篇关于如何在 Eclipse 中为 Servlet API 添加 Javadoc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆