http://stackoverflow.com/questions/13376473/accessing-resources-in-jsp-page-of-spring-mvc-app


If you want to set a base path for all relative links so that you don't need to repeat ${pageContext.request.contextPath} in every relative link, use the tag. Here's an example with help of JSTL functions.

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
...

    ${pageContext.request.requestURL}
    
    
    


    link

http://stackoverflow.com/questions/13377396/jspexception-and-pagecontext-cannot-be-resolved

JspException and PageContext cannot be resolved

Try setting the servlet-api dependency in your pom.xml to provided.  This jar maybe conflicting with the tomcat provided servlet-api.jar.


    javax.servlet
    servlet-api
    2.5
    provided

Also be sure to include the jsp-api dependency, once again set as provided:



    javax.servlet.jsp
    jsp-api
    2.1
    provided

Make sure all of your maven dependencies are being used to build the project by right clicking your project > Properties.  On the deployment assembly tab click the add button, then Java Build Path Entries, then Maven Dependencies and finally Finish.  

You may also need to add your maven dependencies to the build path.  Right click your project > Maven > Update Project Configuration.