• 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

DispatcherServlet not working

 
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In web.xml I have

In the controller I have

When I run the application in the STS server the browser displays "http://localhost:8080/spring-security-helloworld-xml/"; I am getting a 404 error. The Tomcat console says "WARNING: No mapping found for HTTP request with URI [/spring-security-helloworld-xml/] in DispatcherServlet with name 'mvc-dispatcher'".
The strangest thins is that it is picking "spring-security-helloworld-xml" form the Maven pom.xml where I have

All the code comes from"http://www.mkyong.com/spring-security/spring-security-hello-world-example/".
 
Alejandro Barrero
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now I understand that "spring-security-helloworld-xml" is the name of the application. The question is why the controller with

is not working.
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems like you are deploying your application to the root context. So if you open http://localhost:8080/ in your browser, it should work. Can you also share your mvc-dispatcher-servlet.xml file...
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic