Struts2学习总结01

来源:互联网 发布:网络安全工程师学习 编辑:程序博客网 时间:2024/06/05 23:59

1.struts.xml中的常量设置:

<constant name="struts.enable.DynamicMethodInvocation" value="true" />

动态方法调用模式

<constant name="struts.devMode" value="true" />

开发者模式:value设置成true之后,当改变struts.xml的时候,就不用重新启动服务器或者重新部署了,可以直接访问。

2.在struts.xml中设置自动提示功能:

<!DOCTYPE struts PUBLIC"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN""http://struts.apache.org/dtds/struts-2.3.dtd">

在Windows-->Preferences→.....→xml catalog→Add(Location:设置dtd的位置,Key type:设置为URI ,

Key设置为:http://struts.apache.org/dtds/struts-2.3.dtd ).

3.设置查看源码和doc的路径:

struts2-core-2.3.28.jar右键→Properties→Java Source Attachment(External Folder)和Javadoc Location(Browse)


4.设置xml文件的打开方式:


5.拷贝自己的项目:

当你拷贝一个项目的时候,需要改变Web Context-root 路径,项目右键→Properties→MyEclipse→Web.

6.导入别人的项目:JRE System Library如果和别人的不一样,则需要改成自己的lib


0 0
原创粉丝点击