getting an warning as“ [org.springframework.web.servlet.PageNotFound] (default task-1) No mapping for GET /ProjectFE/”

后端 未结 1 1058
梦毁少年i
梦毁少年i 2021-01-26 14:50

so as the title says I\'m getting an error a [org.springframework.web.servlet.PageNotFound] (default task-1) No mapping for GET /ProjectFE/ how should I fix this?

1条回答
  •  后悔当初
    2021-01-26 15:01

    First of all arrange your web.xml like this

        
        
    
    
        
        
            appServlet
            org.springframework.web.servlet.DispatcherServlet
            1
        
    
        
            appServlet
            /
        
    
        
            contextConfigLocation
            
                WEB-INF/spring-config.xml
            
        
       
            org.springframework.web.context.ContextLoaderListener
        
    
    

    As you are defining contex-param you don't need to use init-param same xml file. Now change a little in spring-config.xml

    
    
    
    
    
    
    
    
        
        
     
    
              
     
    

    Look carefully in line . Your folder name is Views but you defined view. That's why perhaps you are getting error.

    Give a shout if it works.

    0 讨论(0)
提交回复
热议问题