在MyEclipse10中建立struts2的配置文件struts.xml

来源:互联网 发布:samba访问windows共享 编辑:程序博客网 时间:2024/05/16 19:02

如何在MyEclipse10中建立struts2的配置文件struts.xml,即构建struts2样式的配置文件xml文件?

1、解压最新的struts2包文件,我的是:struts-2.3.8-all.zip,然后找到struts-2.3.dtd所在路径并复制。

2、在MyEclipse中,选择windows-->Preferences-->在"type filter text"输入框中输入XML Catalog,点击Add.

Location:D:\DOWNLOAD\java\struts\lib\struts-2.3.8\dtd\struts-2.3.dtd--------------->dtd文件所在位置

Key type:public ID

Key:-//Apache Software Foundation//DTD Struts Configuration 2.3//EN-------------->可以从struts-2.3.dtd文件中查找

Alternative web address:http://struts.apache.org/dtds/struts-2.3.dtd-------------->可以从struts-2.3.dtd文件中查找

点击OK!

使用时:

1、new-->XML(Basic Templates)

2、输入文件名:struts.xml,next.

3、选择:Create XML file from DTD file,next.

4、选择:Select XML Catelog entry,会列出所有的XML Catelog entry。

      选中刚才输入的:-//Apache Software Foundation//DTD Struts Configuration 2.3//EN,next。

5、一直next,直到ok!




原创粉丝点击