问题描述
刚学structs2,不知道如何配置,还有eclipse和tomcat怎么用?以前我用的是tomecat5.0和MyEclipse,跟这个不一样,望高手赐教!!!!~
解决方案
解决方案二:
和tomecat5.0MyEclipse,没关系,struts2是手动配置,和1不一样,找本书,或者网上看看就会了
解决方案三:
---------------web.xml-----------<?xmlversion="1.0"encoding="UTF-8"?><web-appversion="2.4"xmlns="http://java.sun.com/xml/ns/j2ee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"><display-name>welcome</display-name><!--struts2的配置文件--><filter><filter-name>struts2</filter-name><filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class></filter><filter-mapping><filter-name>struts2</filter-name><url-pattern>*.action</url-pattern></filter-mapping></web-app>
-----------------struts.xml----------------<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEstrutsPUBLIC"-//ApacheSoftwareFoundation//DTDStrutsConfiguration2.0//EN""http://struts.apache.org/dtds/struts-2.0.dtd"><struts><packagename="user"extends="struts-default"namespace="">----------------------------------</package></struts>
可能你只需要这一小段。jar包会拷贝吧
解决方案四:
eclipse比Myeclipse更简单,而且如果你熟Myeclipse的话,eclipse就简单了。tomcat我只知道要和myeclipse一起用!
解决方案五:
去langsin.com网上下struts2.0的视频上面讲的很详细