javax.servlet.ServletException: File "/xml/hyperLinkList.jsp" not found

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 (&quot;), Which led to File&quot;/xml/hyperLinkList.jsp&quot; 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 (&quot;), So eventuallyTranslationBecame the&quot;/xml/hyperLinkList.jsp&quot;This path, andAnd we projectShe did not call&quot;/xml/hyperLinkList.jsp&quot;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 -
<jsp:include page="${pageContext.request.contextPath}/hyperLinkList.jsp"></jsp:include> This
Kinds of writingYou will get an error HTTP Status 500 - javax.servlet.ServletException:
File &quot;/xml/hyperLinkList.jsp&quot; not found


include action (jsp: include) to support the wording of EL expressions, but
Yesimage<jsp:include page="${pageContext.request.contextPath}/SaveData2"></jsp:include>This write Servlet path wordingAfter parsing will be more
A path out of the project name, java.io.FileNotFoundException:
The requested resource (/ xml / xml / SaveData2) is not available File Not Found ultimately lead

include action (jsp: include) the page property support jsp, html, and writing path Servlet
The include directive (@include) the file attribute only supports jsp, html page that does not support Servlet path, the wording does not support EL expressions

include (included) use EL expressions, we must pay more attention and careful

type Exception report

message javax.servlet.ServletException: File &quot;/xml/hyperLinkList.jsp&quot; 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 &quot;/xml/hyperLinkList.jsp&quot; 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 &quot;/xml/hyperLinkList.jsp&quot; 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.


Apache Tomcat/7.0.53


Intelligent Recommendation

Identifier &amp; this keyword &amp; static &amp; super &amp; instanceof &amp; final &amp; abstract &amp; abstract class &amp; configuration file class...

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 ...

Structures and files (delete &amp;&amp; insert &amp;&amp; find &amp;&amp;modify from file)

[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 &amp;&amp; Cannot find symbol DataBindingComponents

Duplicate class found in the file ActivityLoginBinding && No symbol found DataBindingComponents Article directory Problem Description Troubleshoot Problem Description Recently in the project d...

How to revert your file&amp;folder by "FOUND.000"

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...

A complete log of this run can be found in &amp; no such file or directory

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...

More Recommendation

node.js &amp; fs &amp; file read &amp; file write

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:/...

【DVWA】File Inclusion&amp;&amp;File Upload

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...

Load the configuration file @configration&amp;@Bean&amp;@ImportResource&amp;@PropertySource

*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&amp;&amp;uwsgi configuration file

nginx configure file mysite_uwsgi.ini...

Node file operation (path&amp;&amp;fs)

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...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top