struts 2 问题~~~~~~~~~~急急急急急急急急急急!!!!!!!!!!!!!!

a286133335 2009-08-06 05:48:32
高手帮我看看问题出现在那 我是新手~~~~~~~~~~~~~~~谢谢~~~~~~~~~~~~~~~~~~~~~~~

web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="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/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
struts_helloworld</display-name>


<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>
<welcome-file-list>

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

</welcome-file-list>
</web-app>


在WEB-INF下建立一个index.jsp文件
在lib下添加了commons-logging-1.0.2.jar,freemarker-2.3.13.jar,ognl-2.6.11.jar,struts2-core-2.1.6.jar,xwork-2.1.2.jar 文件
没有配置strus.xml文件

在没有配置WEB.XML文件的时候不会出错 配置后出错



错误信息::
2009-8-6 17:33:47 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:struts_helloworld' did not find a matching property.
2009-8-6 17:33:47 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:/Java/jre6/bin/client;D:/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Program Files\TortoiseSVN\bin;%java_home%\\bin
2009-8-6 17:33:47 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2009-8-6 17:33:47 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 515 ms
2009-8-6 17:33:47 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2009-8-6 17:33:47 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.18
2009-8-6 17:33:48 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
2009-8-6 17:33:48 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/E:/0806/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/struts_helloworld/WEB-INF/lib/struts2-core-2.1.6.jar!/struts-default.xml:46:178
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: Unable to load bean: type:org.apache.struts2.dispatcher.multipart.MultiPartRequest class:org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest - bean - jar:file:/E:/0806/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/struts_helloworld/WEB-INF/lib/struts2-core-2.1.6.jar!/struts-default.xml:46:178
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:222)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:165)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 21 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getDeclaredConstructors(Unknown Source)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:212)
... 24 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 28 more
2009-8-6 17:33:48 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2009-8-6 17:33:48 org.apache.catalina.core.StandardContext start
严重: Context [/struts_helloworld] startup failed due to previous errors
2009-8-6 17:33:48 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2009-8-6 17:33:48 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2009-8-6 17:33:48 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/31 config=null
2009-8-6 17:33:48 org.apache.catalina.startup.Catalina start
信息: Server startup in 739 ms
...全文
93 点赞 收藏 8
写回复
8 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
wu_23 2009-08-07
确实包
回复
xuexijava 2009-08-07
。。
回复
jumpheightway 2009-08-07
这个恐怕不是少包的问题吧
回复
sangshusen_1988 2009-08-06
所有错误信息?》
回复
sahala3293 2009-08-06
配置struts.xml文件
回复
a286133335 2009-08-06
加了 commons-fileupload-x.x.x.jar
commons-io-x.x.x.jar


HTTP ERROR: 200
OK
RequestURI=/struts_helloworld/是什么原因 怎么解决~~~~~~~~~~~~~~~~~~~~~~~·
回复
qiaozirue 2009-08-06
少包.
回复
sahala3293 2009-08-06
lz用的struts2应该2.1以上版本的。在2.1以上版本中jar包得加入文件上传的那两个jar包
commons-fileupload-x.x.x.jar
commons-io-x.x.x.jar
其中x为版本号
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2009-08-06 05:48
社区公告
暂无公告