JspException and PageContext cannot be resolved

后端 未结 7 1864
眼角桃花
眼角桃花 2020-12-29 09:09

This is a follow up to a question on accessing resources in jsp page of spring mvc app Thanks to @kmb385 I was able to resolve that problem but now I get the following eclip

7条回答
  •  囚心锁ツ
    2020-12-29 09:50

    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
            javax.servlet.jsp-api
            2.3.3
            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.

提交回复
热议问题