0

I have a problem with my REST application.

I've created controller with method:

@RequestMapping(value = "/ofert/${id}", method = RequestMethod.GET)
public String showOfert(@PathVariable("id") long serviceId, Model model) {
    model.addAttribute("idOferty", serviceId);
    return "ofertDetail";
}

But when I invoke url like localhost:8080/project/ofert/2 I get error:

WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/project/oferta/2/] in DispatcherServlet with name 'appServlet'

I also tried @RequestMapping(value = "/ofert/{id}", method = RequestMethod.GET) (with out $ sign) but it also isn't working. What is wrong with this?

Dave Newton
  • 158,873
  • 26
  • 254
  • 302
Fixus
  • 4,631
  • 10
  • 38
  • 67
  • I`ve found the problem. A had @RequestMapping in my controller. So I had to append it with ** or delete the mapping for controller and set the loger @RequestMapping for each method. I`ve chose the second method – Fixus Dec 31 '11 at 12:20
  • 1
    answer your question and accept your answer so it doesn't dangle unanswered forever – soulcheck Dec 31 '11 at 13:21

0 Answers0