最初的问题是:准备把tomcat的项目用resin发布,但是resin脾气很怪,我废了几天时间得到总结如下:
问题很多,抽空我遇到在写出来。
今天,发布怎么也发布不出来,最后,把编译好的项目中web.xml文件改成如下:
<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">
把上面的改成
<web-app>
就可以发布了,但是接下来的问题还是没解决:
页面出现乱码:如下:
Messages: | |
File: | com/opensymphony/xwork2/ognl/OgnlValueStack.java |
Line number: | 298 |
Stacktraces
java.lang.NullPointerException
com.opensymphony.xwork2.ognl.OgnlValueStack.checkForInvalidProperties(OgnlValueStack.java:298) com.opensymphony.xwork2.ognl.OgnlValueStack.findValue(OgnlValueStack.java:237) org.apache.struts2.dispatcher.StrutsRequestWrapper.getAttribute(StrutsRequestWrapper.java:82) com.caucho.jsp.PageContextImpl.findAttribute(PageContextImpl.java:550) com.caucho.jsp.el.PageContextELResolver.getValue(PageContextELResolver.java:180) com.caucho.el.PathExpr.getValue(PathExpr.java:148) com.caucho.el.Expr.print(Expr.java:416) _jsp._front._common_0first__jsp._jspService(_common_0first__jsp.java:249) com.caucho.jsp.JavaPage.service(JavaPage.java:61) com.caucho.jsp.Page.pageservice(Page.java:578) com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:195) com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:97) com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:265) com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:293) com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:111) org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154) org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468) org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76) com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) org.whhn.utils.EncodingFilter.doFilter(EncodingFilter.java:18) com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187) com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:265) com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:273) com.caucho.server.port.TcpConnection.run(TcpConnection.java:682) com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:743) com.caucho.util.ThreadPool$Item.run(ThreadPool.java:662) java.lang.Thread.run(Thread.java:619)
让我很无奈,最近还是没解决。
有哪位大侠知道,希望多多指点,小弟在此谢过!!!!