【第22期】观点:IT 行业加班,到底有没有价值?

[javax.servlet.ServletException: java.lang.NullPointerException]

原创 2013年12月05日 13:12:38
2013-12-5 11:15:46 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [jsp] in context with path [/module-linkman] threw exception [javax.servlet.ServletException: java.lang.NullPointerException] with root cause
java.lang.NullPointerException
    at org.apache.tomcat.util.http.parser.HttpParser.parseMediaType(HttpParser.java:217)
    at org.apache.tomcat.util.http.parser.MediaTypeCache.parse(MediaTypeCache.java:54)
    at org.apache.catalina.connector.Response.setContentType(Response.java:805)
    at org.apache.catalina.connector.ResponseFacade.setContentType(ResponseFacade.java:245)
    at org.apache.jsp.pages.sgllinkman.addSglGroup_jsp._jspService(addSglGroup_jsp.java:61)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.chinaboxun.module.linkman.filter.SessionFilter.doFilter(SessionFilter.java:101)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:314)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)


情况是这样的,一个父页面index.jsp其中的page指令为:

XML/HTML code
?
1
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
子页面addSglGroup.jsp的page指令:
XML/HTML code
?
1
<%@ page language="java" contentType="text/html;" pageEncoding="UTF-8"%>

当点击打开这个子页面addSglGroup.jsp的时候提示上面贴出的错误。可把我找死了,利用删除代码各个排除的方法,发现了这个page指令有问题,果然去掉子页面的contentType="text/html;"过后页面正常打开了。原来以为是不能加contentType指令,到后来才知道原来这个指令里面不能加分号";"。



去掉contentType="text/html;"或者去掉分号contentType="text/html"就解决了




版权声明:本文为博主原创文章,未经博主允许不得转载。 举报

相关文章推荐

Request processing failed; nested exception is java.lang.NullPointerException] with root cause

出现错误: SEVERE: Servlet.service() for servlet [dispatcher] in context with path [] threw exception ...

java 常见java.lang.NullPointerException(慢慢补充)

以例子为主 1. 变量为空, toString() Object s =null; System.out.println(s.toString()); 2. 函数.equal 前的变量为null...

javax.servlet.ServletException: java.lang.NoSuchMethodErro: 异常处理方法

javax.servlet.ServletException: java.lang.NoSuchMethodErro: 发生此异常代表jvm 虚拟机找不到类中的方法了。这是因为 你的程序中有...

javax.servlet.ServletException: java.lang.NoSuchMethodErro:

包冲突了,去掉lib下和tomcat重复的包:javax.servlet.jar和javax.servlet.jsp.jar 然后重启tomcat就ok了。。

Eclipse运行报错:HTTP Status 500 - javax.servlet.ServletException: java.lang.UnsupportedClassVersionError

本文转载自:HTTP Status 500 - javax.servlet.ServletException: java.lang.UnsupportedClassVersionError 【问...

Tomcat- javax.servlet.ServletException: java.lang.AbstractMethodError处理记录

异常详细:HTTP Status 500 - javax.servlet.ServletException: java.lang.AbstractMethodError: javax.servlet....

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver

这个项目还有另一种情况 我编译的时候是把 jsp-api.jar  C:\jdk6.0\jre\lib\ext  删除后重新启动tomcat 但是java 类在生成classes的时候需要这个类  这...
  • tanyit
  • tanyit
  • 2011-11-07 23:48
  • 15046

javax.servlet.ServletException: java.lang.IllegalStateException: No WebApplicationContext found: no

方法一: 第一:发现原来是他的配置文件不是放在WEB-INF下,而是放在src目录下,解决的方法可将其spring的配置文件applicationContext转移阵地,转到WEB-INF下,或在w...

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver 如何解决?

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver??? 我想骂人!!!!!!...

Java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet解决办法

今天用eclipse跑一个web统计图的jsp文件,遇到了 javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax...
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)