jdk1.5,struts2.3.4,tomcat6.0 配置struts2 报错500:
web.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<include file="struts-default.xml"/>
</struts>
没有写其他任何java类,直接启动报错:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:69)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:501)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:432)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.
我报错的原因是:由于tomcat 的路径有空格造成的,查询了下是struts2 的一个bug.当然其他原因也会引起,但是这个原因让我解决的半天。。。
1.我将Apache tomcat v6.0 改成tomcat6.0 去掉空格就行了。
2. 我在给我server name 取名的时候也是将默认的空格去掉。两个都去掉才行。
有这错误的同学可以参考下
分享到:
相关推荐
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.params.CoreConnectionPNames; import org.apache....
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.params.CoreConnectionPNames; import org.apache.http.protocol.HttpContext...
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpConnectionParams; import org.apache....
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.params.CoreConnectionPNames; import org.apache....
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.protocol.HTTP; import org.apache.http.util.EntityUtils;
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.params.CoreConnectionPNames; import org.apache....
在Java开发中操作Excel时,XMLBeans提供了一个名为`org.apache.xmlbeans.impl.spreadsheet`的包,其中包含了一系列类,如`Sheet`, `Workbook`, 和 `Cell`等,它们对应于Excel文件中的工作表、工作簿和单元格。...
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.params.CoreConnectionPNames; import org.apache....
2. `org.apache.http.impl.client.CloseableHttpClient`: 它是HttpClient的一个具体实现,添加了关闭连接的逻辑,遵循Java的try-with-resources语句。 3. `org.apache.http.HttpResponse`: 表示HTTP响应,包含了状态...
整个系统都没有错误,但是在发布运行后,控制台上却抛出了这样的异常: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
org.apache.struts2.dispatcher.ng, org.apache.struts2.dispatcher.ng.filter, org.apache.struts2.dispatcher.ng.listener, org.apache.struts2.dispatcher.ng.servlet, org.apache.struts2.impl, org.apache....
import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; import org.apache.http.params.HttpConnectionParams; import org.apache....
找了好久,终于找到了,java刷新同步获取网络资源
import org.apache.http.impl.client.*; import org.apache.http.Consts; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache....
Apache HttpClient是一个广泛使用的Java库,主要用于执行HTTP请求。在标题提到的`httpcomponents-client-4.2.5-bin.tar`中,我们找到了Apache HttpClient的特定版本4.2.5的二进制分发包,它通常包含了一系列的JAR...
org.apache.http.ConnectionClosedException.class org.apache.http.ConnectionReuseStrategy.class org.apache.http.Consts.class org.apache....org.apache.http.impl.bootstrap.ThreadFactoryImpl.class
org.apache.struts2.views.xslt The new xslt view supports an extensible Java XML adapter framework that makes it easy to customize the XML rendering of objects and to incorporate structured XML text ...
import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicHeader; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils;
2. **手动添加依赖**:在Java 9及以上版本中,你需要单独引入JAXB API及相关库的JAR包。这包括`javax.activation-1.2.0.jar`,`jaxb-api-2.3.0.jar`,`jaxb-core-2.3.0.jar`和`jaxb-impl-2.3.0.jar`。你可以在Maven...