使用struts2 报如下错误信息,请大侠们指教;
1、错误信息如下:
2013-6-7 15:16:41 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2013-6-7 15:16:41 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2013-6-7 15:22:42 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/D:/TOMCAT/tomcat6.0/webapps/dmscs/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:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1282)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1380)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1385)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1649)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1638)
at java.lang.Thread.run(Thread.java:619)
Caused by: Unable to load bean: type:org.apache.struts2.dispatcher.multipart.MultiPartRequest class:org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest - bean - jar:file:/D:/TOMCAT/tomcat6.0/webapps/dmscs/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)
... 17 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/RequestContext
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getDeclaredConstructors(Class.java:1836)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:212)
... 20 more
2、web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<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>
3、struts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.action.extension" value="action,do,webwork" />
<package name="default" namespace="/" extends = "struts-default">
<action
name = "hello"
class="com.dms.base.strust.VerySimpleAction"
method="hello" >
<result name="success">/bLogin.jsp</result>
</action>
</package>
</struts>
4、VerySimpleAction
package com.dms.base.strust;
public class VerySimpleAction {
public String hello(){
return "success";
}
}
5、页面
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'bLogin.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
来了
</body>
</html>
6、使用包如下,包下载就附件
7、引起的原因太多了,通过在网上搜索得到如下几个解决方式
我的是通过 下面这个解决的
相关推荐
严重: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 通过控制台的...
Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
严重: Exception starting filter struts2 Class: oracle.xml.jaxp.JXTransformerHandler File: JXTransformerHandler.java Method: endDocument Line: 145 - oracle/xml/jaxp/JXTransformerHandler.java:145:-1
Unalbe to load DLL:由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。(Exception from HRESULT:0x800736B1). 解决思路。
StrutsConstants This class provides a central location for framework configuration keys used to retrieve and store Struts configuration settings. 异常错误概要 异常错误 说明 StrutsException A ...
java-struts2.2的驱动包 2009-8-29 14:02:04 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production ...
cannot be cast to javax.servlet.Filter 报错, 原因servlet-api.jar冲突 使用maven开发web应用程序, ...严重: Exception starting filter encodingFilter java.lang.ClassCastException: org.springframework.web.f
有关struts2下载组件的具体介绍我就在此略过了,看此文的同志想必大多是碰到这样让人很是不爽的问题。 下面就将该问题的最终解决办法介绍如下。 问题概要: 在struts2中使用result里type="stream"的结果类型时,...
解决Got an exception - java.lang.RuntimeException: Unable to get class information for ***Exception. 找这个解决方法找了一个晚上,希望能对你有帮助!
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider] at org.hibernate.service.internal....
严重: Exception starting filter SolrRequestFilter org.apache.solr.common.SolrException: Could not find necessary SLF4j logging jars. If using Jetty, the SLF4j logging jars need to go in the jetty lib/...
表格模板-京东苏宁决战商品表.ett
struts1.x的例子,struts2.x可以参考自己修改 1.action的写法 import java.io.*; import java.sql.*; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import javax.servlet....
屏幕上显示: Fatal exception:panic in 5 seconds kernel panic - not ...这类问题的解决办法就是先查看错误代码中的信息,找到错误所指向的硬件,将其禁用。系统启动后,安装好相应的驱动,再启用该硬件即可。
Caused by: java.net.UnknownHostException: openapi.alipay.com
在oracle里面运行一下,解决Exception java.sql.SQLException ORA-00600 内部错误代码
org.apache.struts2.ServletActionContext (implements org.apache.struts2.StrutsStatics) org.apache.struts2.RequestUtils org.apache.struts2.StrutsConstants java.lang.Throwable (implements java.io....
48. struts2-spring-plugin-2.0.11.2.jar 49. //struts2必须 50. xwork-2.0.5.jar 数据库设计(使用MySql数据库): Java代码 1. create table user 2. ( 3. id varchar(32) not null, 4. userName ...