• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Spring + JSF + Spring REST Confused with Configurations

 
Ranch Hand
Posts: 499
Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We are developing an application that consist of Spring, JSF and Spring REST. We started working on it and we have added some test files. I am working with the REST API part. I added the configuration, ran the project and accessed the api but it throws a 404, requested resource is not available. Following are the locations and files

WEB-INF/web.xml


WEB-INF/springrestcontroller-servlet.xml


com.company.api.CommonController


The url I used to access the api is
localhost:8081/MilkyWaySpringJSF/api/

This should return the String "Hello Welcome to API" but only 404 is thrown. No errors or exception is thrown in Log or console.

EDIT:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

When I remove request mapping from class and change the web.xml mapping to the following



the project works fine. But if I change back the controller and web.xml, 404 is thrown. I am

As far as I know, if the url pattern in web.xml should be same as controller class request mapping, then api should work fine but this isn't working.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic