Java, Spring, Apache Tiles error : Could not resolve view with name 'index' in servlet with name 'dispatcher'

前端 未结 6 1598
不知归路
不知归路 2021-01-13 06:57

I\'m new to Tiles and Spring MVC (I looked through several similar issues but found no solution for \'my problem\')

controller:

@Controller
public cl         


        
6条回答
  •  难免孤独
    2021-01-13 07:07

    The problem is extremely simple. Replace your web.xml with

    
    
      my-first-app
    
    
      
            dispatcher
            org.springframework.web.servlet.DispatcherServlet
    
            1
        
    
        
            dispatcher
            /
        
    
    

    I also added a jstl dependency to the pom

    
        javax.servlet
        jstl
        1.2
    
    

    After these changes, a request to localhost:8080/index correctly renders the appropriate response

提交回复
热议问题