context « Request « JSP-Servlet Q&A





1. Why do my anchor tags contain my request context path before the path I specify?    stackoverflow.com

I'm using Apache Tomcat 6.0.26 with java servlets and JSPs. Whenever I'm trying to link to an external website, my anchor tags always contain my request context path before the external link. ...

2. request.getRequestDispatcher() and context.getRequestDispatcher()    stackoverflow.com

What is the main difference in using request.getRequestDispatcher() and context.getRequestDispatcher()?

3. Is it possible to programmatically set a request context path from inside the servlet?    stackoverflow.com

This is a special case where I am stuck dealing with an "enterprise" webapp. The enterprise app is calling request.getContext() and comparing it to another string. I see I can get ...

4. In Java servlets, why are attributes defined only for context, request and session scopes?    stackoverflow.com

In servlets, getAttribute() and setAttribute() are only associated with HttpSession, ServletRequest and ServletContext, i.e attributes are defined only for context, request and session scopes. Why not for, say, ServletResponse or ServletConfig? ...