tags: ServletException jsp not found 500 File
Given the information as follows:Brainstorming
Later, I found the cause of the error:
<jsp:include page="${pageContext.request.contextPath}/hyperLinkList.jsp "> </ jsp: include> error, because this sentence is a result of an EL expression used here,${pageContext.request.contextPath}The EL expression results in an error, because the <jsp: include page = "${pageContext.request.contextPath}/hyperLinkList.jsp "> </ jsp: include> This sentence is written in home.jsp page,
And we knowjsp eventually translated into a Servlet, we can go and seehome.jsp pageTranslationAfterServlet. In tomcat directory \ work \ Catalina \ localhost \ Your Project Name \ apache \ under \ org jsp directory, you can findhome.jsp pageTranslationAfter thisServlet, name home_jsp.java.
turn onhome_jsp.java this file, you can see the code below, home.jsp page <jsp: include page = "${pageContext.request.contextPath}/hyperLinkList.jsp "> </ jsp: include> phrase wasTranslationRearWillto makeThe following line of code,Figure:Use thePageContextImpl.proprietaryEvaluate(
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, (java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${pageContext.request.contextPath}/hyperLinkList.jsp", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false), out, false);
So I guess, this should be$ {PageContext.request.contextPath} due to an error,I guess it is in the home.jsp translationAfter Servlet to time, as long as there have been expressions of EL place, the final completion of the analysis will give expression to the emergence of EL
2 side edges are double quotation marks ("), Which led to File"/xml/hyperLinkList.jsp" not foundFile path not found problem.${pageContext.request.contextPath}This sentence is to get the project name, you can also understand the root directory into the project, some people called virtual path.
My project name is called xml, so$ {PageContext.request.contextPath} this sentence was/ Xml, so${pageContext.request.contextPath}/hyperLinkList.jsp sentencefinallyTranslationRearIt is/xml/hyperLinkList.jsp
As I guess above,
In the home.jspTranslationAfter Servlet to time, as long as there have been expressions of EL place, the final completion of the analysis will give expression to the emergence of EL
2 side edges are double quotation marks ("), So eventuallyTranslationBecame the"/xml/hyperLinkList.jsp"This path, andAnd we projectShe did not call"/xml/hyperLinkList.jsp"The name of the page!This is the reason being given,This is my guess! Is not necessarily so, but also experts advise! Thank you!
Next we need to do is remove${pageContext.request.contextPath}The EL expression, OK, we changed
<jsp:include page="/hyperLinkList.jsp"></jsp:include>
TranslationAfter below: Obviously, ah,Remove${pageContext.request.contextPath}After the EL expression,TranslationAfter the use of different classes,
It is used belowJspRuntimeLibrary.include(
Then we open home.jsp page in a browser will not be given up!
note:
EL expressions include instructions not supported - <% @ include file = "$ {pageContext.request.contextPath} /hyperLinkList.jsp"%>This
Kind of writing is not supported,You will get an error HTTP Status 500 - /testInclude.jsp (line: 50, column: 2)
File "${pageContext.request.contextPath}/hyperLinkList.jsp" not found
EL include operation expressions using the error-prone -type Exception report
message javax.servlet.ServletException: File "/xml/hyperLinkList.jsp" not found
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: File "/xml/hyperLinkList.jsp" not found org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
javax.servlet.ServletException: File "/xml/hyperLinkList.jsp" not found org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954) org.apache.jsp.home_jsp._jspService(home_jsp.java:246) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.53 logs.
Identifier What is an identifier? is the name that the programmer customizes when defining the java program. For example, the demo followed by the keyword class in the helloworld program is the class ...
[Modify from file]: [Thoughts]: If I am modifying, I think of the method of overwriting. First, find the subscript that meets the conditions from the file, then open the file by reading and writing, a...
Duplicate class found in the file ActivityLoginBinding && No symbol found DataBindingComponents Article directory Problem Description Troubleshoot Problem Description Recently in the project d...
When you copy a lot of files between hard disk partition, when you use the software to download, when you use Word to write, if a sudden power outage met, Windows freezes or the system automatically r...
Let's record the pit diary today: The last solution is to re -configure the environment variables; the following is a detailed step: 1. Uninstall your nodejs, and then install your nodejs 2. Enter NPM...
node.js & fs & file read & file write https://nodejs.org/api/fs.html readline https://nodejs.org/api/readline.html bug https://stackoverflow.com/a/15554600/5934465 write & read https:/...
0x01 Low File Upload No filtering Direct upload: Then construct the payload: File inclusion See url: Find Guess here should be a file containing Directly use the php pseudo protocol to read the source...
*springboot is not an enhanced version of spring. When using it in spring, pay attention to the configuration of the package. @configration The @configration bottom layer contains @component and has t...
nginx configure file mysite_uwsgi.ini...
fsModule: Basic File Operations API pathModule: Provides APIs related to paths *readline: used to read large text files, read line by line Fs-extra (third party):https://www.npmjs.com/package/fs-extra...