error: package javax.servlet does not exist

前端 未结 6 602
鱼传尺愫
鱼传尺愫 2020-12-01 01:39

I was trying to implement a login filter in my web app with jsf 2, following this guide:

https://stackoverflow.com/tags/servlet-filters/info

after I compiled

6条回答
  •  一整个雨季
    2020-12-01 02:29

    In my case, migrating a Spring 3.1 app up to 3.2.7, my solution was similar to Matthias's but a bit different -- thus why I'm documenting it here:

    In my POM I found this dependency and changed it from 6.0 to 7.0:

        
            javax
            javaee-web-api
            7.0
            provided
        
    

    Then later in the POM I upgraded this plugin from 6.0 to 7.0:

            
                org.apache.maven.plugins
                maven-dependency-plugin
                2.1
                
                    
                        ...
                        
                            ...
                            
                                
                                    javax
                                    javaee-endorsed-api
                                    7.0
                                    jar
                                
                            
                        
                    
                
            
    

提交回复
热议问题