pageContext « Request « JSP-Servlet Q&A

1. pageContext.request.contextPath not working

I'm using Tomcat 6.0.32 and I'm trying to include a JSP file into another, but somehow the file cannot be found (yes, the file exists). Here is the file structure and ...

2. A puzzle on pageContext.include & request. getRequestDispatcher. include

Hi, I have three JSPs, they are a.jsp, b.jsp and test.jsp. Can you tell me why the following codes run to a different result? Please pay attention to the line "AAAAAAAAAAAAAAAA" and the line "this is bbbbbbbbbbbbbb.jsp" in the results. /////////////////////////////////////////a.jsp:
this is aaaaaaaaaaaa.jsp /////////////////////////////////////////b.jsp:
this is bbbbbbbbbbbbbb.jsp /////////////////////////////////////////test.jsp:
AAAAAAAAAAAAAAAA <%pageContext.include("a.jsp");%> <%//pageContext line%>
BBBBBBBBBBBBBBBB <%request.getRequestDispatcher("b.jsp").include(request, response);%> the output in ...

4. pageContext.request.

5. request vs. pageContext

7. can pageContext.request be used to authenticate users?

Hello all, I have the feeling that the answer to my question is pretty simple, but I've been scouring JR for quite a while now, not to mention googling till my fingers have bled, and I can't find the answer to this question. I have a jsp page with a form that has a dropdown menu. I want some options in ...