struts-2.0.11 是不是把所有的struts2的包都导入了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 少包了,大而全的话就去把struts2下lib里的jar文件都导入进来 很久没有用过struts了,不过觉得你的.jar好像不太够。在eclipse中我们可以用一个struts插件的,可以直接导入所需要的.jar包。好像lomboz插件中也有struts的.jar包导入。建议你下载一个struts插件,里面直接有web.xml,struts-config.xml的配置等。很方便。 我也遇到过这个问题,查了很多资料也没找到原因,后来我在apache上下载了个struts2的例子,你在新建一个项目,把他的包和web.xml导入你的项目里就没这个错误了,有个警告,但是项目还是可以运行的。http://struts.apache.org/download.cgi#struts206下载struts2-blank-2.0.11.war你试试吧 觉得你应该下载一个struts插件来进行jar包的自动导入。我就是那样的。很方便,还不用写web.xml和struts-config.xml,都是和人性化的界面编程。可以下载一个struts的插件啊? 具体的网站是: https://sourceforge.jp/projects/amateras/files/ 我帮你看了,可以找到的。去下载tk.eclipse.plugin.Struts_1.1.4.zip 和tk.eclipse.plugin.htmleditor_1.6.4.zip这两个zip包。 解压后放到Eclipse/plugins目录下就可以了。 然后重新启动eclipse就可以了。 又什么不懂的话,再问 人家说的是struts2,跟struts1没什么关系,根本是2个不同的东西5个包对于普通开发够了,用到spring就要另外加 你的struts.xml struts.properties呢 说你"xwork-2.0.4.jar"包里边少东西 The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.6.0_03看看环境设置的对不对 用struts2.0 的时候首先得把 struts2.0 的包导进来,之后在做其它的调试 我也是用的这个版本和你用的包页一样。。不过我的成功了。我的web.xml头和你的不太一样。。我的是这样的<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"><web-app> <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>/*</url-pattern> </filter-mapping></web-app> 你在这个项目里面用了spring吗 如果用了还要加一个struts2-spring-plugin-2.1.6.jar后面的2.1.6是版本也许你不是这个版本还有你用了spring 那个commons-logging-1.0.4.jar 就没有必要再加 spring已经帮你加进去了 你不信去看看 新手零起步,求个spring3.0的配置教程 如何动态地实现只在前台刷新列表数据的显示? Error creating bean with name 'sessionfactory' defined in file 使用j_security_check web容器登录验证,图片 js 受限问题 向服务器提交后,如何使下拉列表<select>中的内容不变? 在DW中的jsp代码问题 jdbc连接池中,naming-factory.jar用来做什么的? ajax 取得服务器返回数据后,再让表单提交出问题 关于连接数据库的一个问题 帮忙看一下为什么会出错! ssh中怎么实现假分页 新手菜鸟求助
在eclipse中我们可以用一个struts插件的,可以直接导入所需要的.jar包。
好像lomboz插件中也有struts的.jar包导入。
建议你下载一个struts插件,里面直接有web.xml,struts-config.xml的配置等。
很方便。
后来我在apache上下载了个struts2的例子,
你在新建一个项目,把他的包和web.xml导入你的项目里就没这个错误了,有个警告,
但是项目还是可以运行的。
http://struts.apache.org/download.cgi#struts206
下载struts2-blank-2.0.11.war
你试试吧
我就是那样的。很方便,还不用写web.xml和struts-config.xml,都是
和人性化的界面编程。
可以下载一个struts的插件啊?
具体的网站是:
https://sourceforge.jp/projects/amateras/files/
我帮你看了,可以找到的。去下载tk.eclipse.plugin.Struts_1.1.4.zip
和tk.eclipse.plugin.htmleditor_1.6.4.zip这两个zip包。
解压后放到Eclipse/plugins目录下就可以了。
然后重新启动eclipse就可以了。
又什么不懂的话,再问
5个包对于普通开发够了,用到spring就要另外加
struts.properties呢
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<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>/*</url-pattern>
</filter-mapping>
</web-app>
还有你用了spring 那个commons-logging-1.0.4.jar 就没有必要再加 spring已经帮你加进去了 你不信去看看