现在的位置: 首页 > 综合 > 正文

myeclipse中导入 struts2.1.6的源文件

2013年02月13日 ⁄ 综合 ⁄ 共 1350字 ⁄ 字号 评论关闭

在使用struts2开发和学习的过程中,我们都应该知道实时查看源码的重要性,以下笔记是使用myeclipse6.5导入struts2.1.6源文
件的过程
首先到http://struts.apache.org/download.cgi#struts216
下载struts-2.1.6-src.zip
显示有20MB其实就4MB
在使用使用
struts2中需要使用xwork,xwork的源文件需要单独下载,http://www.opensymphony.com/xwork/download.action

点击All: Contains all jars, libs, sources
and docs

Myeclipse导入这些源码了。
选择你的项目右键Properties--》java build path
--》选择struts-core-2.1.6.jar
点击jar文件前面的小三角符号--》Source
Attacment--》Edit--》External File --》选择刚才下载的struts-2.1.6-src.zip


xwork-2.1.2.jar
源文件的导入一样,在此不多废话,已经
很详细了。

=====================

在MyEclipse显示struts2源码和doc文档及自动完成功能

在MyEclipse中显示struts的源码
-------
右键点击/webAppName/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar
-------propertes

-------Java Source Attachment
-------External Folder
选择目
录:D:/struts-2.1.8.1/src/core/src/main/java

在MyEclipse中显示
struts的doc文档
-------右键点击/Struts2_01/WebRoot/WEB-INF/lib/struts2-
core-2.1.8.1.jar
-------propertes
-------Javadoc Location
-------Javadoc
URL
-------Browser
选择目录:file:/D:/struts-2.1.8.1/docs/struts2-
core/apidocs/

Struts.xml文件添加自动完成功能(不过MyEclipse8.0中已经不用再配置这个
了,里面自带了struts下的xml标准)

-------先在struts文件夹中的lib包中的
struts2-core-2.1.8.1.jar  解压开,里面有struts-2.0.dtd  文件
-------struts.xml
文件中头部有:http://struts.apache.org/dtds/struts-2.0.dtd
-------window
-------preferences

-------搜索catalog
-------add
-------在Location中加入struts-
2.0.dtd所在的地址,Key Type 中选择URL,Key中加入http://struts.apache.org/dtds/struts-2.0.dtd

===================

抱歉!评论已关闭.