Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

About using XMLWebApplicationInitializer

 
Ranch Foreman
Posts: 1924
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am trying to replace web.xml in ch12-bankapp example of Getting Started With SpringFramework 4th edition.
This is the web.xml provided in the book:


I converted it into Java code:



This is the Tomcat 9 log :


I cannot get any result from the browser.
If anyone knows, please help. Thanks.
This is my detailed code in GitHub:
https://github.com/aCodeRancher/4thEdition/tree/master/chapter%2012/ch12-bankapp
 
Himai Minh
Ranch Foreman
Posts: 1924
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I find a fix to my code, but I don't think my fix is perfect. If anyone has a better solution, please let me know.
In the applicationContext.xml, I add the viewResolver:


This is my bankapp-servlet.xml


I committed my code there :
https://github.com/aCodeRancher/4thEdition/tree/my-bank-app/chapter%2012/ch12-bankapp
 
I've read about this kind of thing at the checkout counter. That's where I met this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic