struts集成到eclipse学习

来源:互联网 发布:云计算对生活的影响 编辑:程序博客网 时间:2024/05/22 14:08


1.集成tomcat到eclipse

http://www.eclipsetotale.com/tomcatPlugin.html

下载最新的plug后,解压。解压后的文件放到eclipse的plug目录中

 

2.使用struts配置文件web.xml/struts-config.xml中的元素必须按照dtd文档定义顺序书写,即遵从了dtd定义顺序。

  常见的错误是顺序错误导致不能识别。例如web.xml文件中

  <welcome-file-list>    <welcome-file>index.jsp</welcome-file>  </welcome-file-list>

放到servlet或者servlet-mapping前会报错,找不到相应的资源。

3.继承struts 的Action必须实现的是execute方法而非perform方法,perform用在struts1.0,Perform()is Depricated in Struts 1.1.而是用execute方法

4.调试web工程需要开启debug server进行断点调试。

0 0
原创粉丝点击