3

I am new to spring. I want to map all the requests to single controller method. That's why I have specified following requestmapping

@RequestMapping
(
  value="/PnPanel.go/CData/**", 
  method={RequestMethod.GET, RequestMethod.POST}
)

But still it's giving 404 error, when URL is requested

http://localhost:8088/PnPanel.go/CData/invokeCDScreen

Don't know, what I am missing here. I tried searching on net, but all the solutions didn't work for me.

Thanks in advance.

Mangu Singh Rajpurohit
  • 10,806
  • 4
  • 68
  • 97
  • 1
    _http://{hostname}:{port}/{war-name}/{controller-mapping}_ . _http://localhost:8088/PnPanel.go/CData/invokeCDScreen_ will work if your war name is _ROOT.war_ – Mihir Dec 23 '15 at 13:11

2 Answers2

4

Actually, I had solved it myself. I was missing the following thing :-

@RequestMapping
(
  value="/PnPanel.go/CData/*", 
  method={RequestMethod.GET, RequestMethod.POST}
)

Thus, instead of using two asterisks, only one was required.

Mangu Singh Rajpurohit
  • 10,806
  • 4
  • 68
  • 97
3

Your URL should be http://localhost:8088/<project-name>/PnPanel.go/CData/invokeCDScreen to match the request mapping.

akash
  • 22,664
  • 11
  • 59
  • 87