The method getDispatcherType() is undefined for the type HttpServletRequest 50
严重:Servlet.service()forservlet[jsp]incontextwithpath[/mail]threwexception[Unabletocom...
严重: Servlet.service() for servlet [jsp] in context with path [/mail] threw exception [Unable to compile class for JSP:
An error occurred at line: [42] in the generated java file: [E:\apache-tomcat-8.0.15\work\Catalina\localhost\mail\org\apache\jsp\NewFile_jsp.java]
The method getDispatcherType() is undefined for the type HttpServletRequest
An error occurred at line: 10 in the jsp file: /NewFile.jsp
The method getDispatcherType() is undefined for the type HttpServletRequest
7: <title>Insert title here</title>
8: </head>
9: <body>
10: <%request.getDispatcherType();
11: request.getDispatcherType();%>
12: </body>
13: </html>
An error occurred at line: 11 in the jsp file: /NewFile.jsp
The method getDispatcherType() is undefined for the type HttpServletRequest
8: </head>
9: <body>
10: <%request.getDispatcherType();
11: request.getDispatcherType();%>
12: </body>
13: </html>Stacktrace:] with root cause
org.apache.jasper.JasperException: Unable to compile class for JSP:
启动tomcat没问题 但是一访问jsp就出现错误 展开
An error occurred at line: [42] in the generated java file: [E:\apache-tomcat-8.0.15\work\Catalina\localhost\mail\org\apache\jsp\NewFile_jsp.java]
The method getDispatcherType() is undefined for the type HttpServletRequest
An error occurred at line: 10 in the jsp file: /NewFile.jsp
The method getDispatcherType() is undefined for the type HttpServletRequest
7: <title>Insert title here</title>
8: </head>
9: <body>
10: <%request.getDispatcherType();
11: request.getDispatcherType();%>
12: </body>
13: </html>
An error occurred at line: 11 in the jsp file: /NewFile.jsp
The method getDispatcherType() is undefined for the type HttpServletRequest
8: </head>
9: <body>
10: <%request.getDispatcherType();
11: request.getDispatcherType();%>
12: </body>
13: </html>Stacktrace:] with root cause
org.apache.jasper.JasperException: Unable to compile class for JSP:
启动tomcat没问题 但是一访问jsp就出现错误 展开
2014-12-16
展开全部
jsp页面编译不通过,直接看jsp页面吧,jsp中的request没有getDispatcherType这个方法,直接把jsp中<%request.getDispatcherType();
request.getDispatcherType();%>类似这段代码删除掉就行了。
request.getDispatcherType();%>类似这段代码删除掉就行了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
聚保华泰
2024-10-21 广告
2024-10-21 广告
商业综合责任险(Commercial General Liability, CGL)是我们聚保华泰保险为众多企业客户提供的核心保障之一。它旨在覆盖企业在日常运营中可能因意外事故、疏忽或过失导致的第三方人身伤害、财产损失而面临的法律责任及赔偿...
点击进入详情页
本回答由聚保华泰提供
展开全部
亲,就是说你的代码出问题了,编译你的jsp为servlet的时候出错了,错误原因是:
getDispatcherType() is undefined for the type HttpServletRequest
这句话就是说 HttpServletRequest中是没有getDispatcherType() 这个方法的,也就是说request.getDispatcherType();这句java代码有问题!
你可以给我讲讲你想要实现的功能,可以帮您看看!
有什么问题你都可以追问我,没问题,望采纳,谢谢
更多追问追答
追问
maven tomcat8中建了一个jsp 然后打包运行 访问一个随便的jsp就出错了
追答
从表面报错的来看就是HttpServletRequest没有你的这个方法,我查了下,你的这个方法在这个类中javax.servlet.ServletRequestWrapper。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询