This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Replacing web.xml with WebApplicationInitializer  RSS feed

 
Ranch Hand
Posts: 1729
12
  • Mark post as helpful
  • send pies
  • 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
Ranch Hand
Posts: 1729
12
  • Mark post as helpful
  • send pies
  • 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
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!