0
votes

i had this code in my .jsp file:

<li><a href="${pageContext.request.contextPath}/pages/client_home.jsp" id="home">Home</a></li>
  <li><a href="${pageContext.request.contextPath}/pages/client_about.jsp" id="about">About</a></li>

and when i click the link, i got this error:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: File "/1920.14042009/pages/client_navbar.jsp" not found org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) ...

i also tried replacing ${pageContext.request.contextPath}... with

http://localhost:8080/1920.14042009/pages/client_about.jsp.

error still persists.

help pls...

2

2 Answers

0
votes

The problem is not with the two lines of code or using ${pageContext.request.contextPath}

The file client_navbar.jsp is not available in the context, but is referred by the jsp file that the link points to. Please check...

0
votes

How this File "/1920.14042009/pages/client_navbar.jsp" came into Picture, How it is redirected to this file, can you please post redirection code if any along with package structure.