• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Replacing web.xml with WebApplicationInitializer

 
Bartender
Posts: 2419
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am trying to replace the web.xml by WebApplicationInitializer in chapter 12's bankapp of Getting Started with Spring Framework 5 , 4th edition.
But I got an error from Tomcat 9:

The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.



What I added are:





The detailed code is here :
https://github.com/aCodeRancher/4thEdition/tree/myfeature/chapter%2012/ch12-bankapp


If anyone has suggestion to fix it, please help. Thanks in advanced.
 
Himai Minh
Bartender
Posts: 2419
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know why I need to use AbstractAnnotationConfigDispatcherServletInitializer and a subclass of a deprecated class, WebMvcConfigurerAdapter to make it work.
But I don't want to use the deprecated class.
My code is here:
https://github.com/aCodeRancher/4thEdition/tree/myfeature_1/chapter%2012/ch12-bankapp/src/main/java/sample/spring/chapter12/config
 
reply
    Bookmark Topic Watch Topic
  • New Topic