Hi,
I am using the below code snippet,
router.attach("/trade/{tradeId}/{ValueDate}", explainHandler);
router.attach("/portfolio/{portfolioCode}/{ValueDate}", explainHandler);
i.e. same handler is attached to 2 diff URI patterns.
Now when I type the URI in the browser matching the 1st one, it does go to
correct handler and gets me back the result. However, when I type a URL matching
the 2nd in the browser, it fails because
request.getAttributes().get("portfolioCode") returns NULL.
On the other hand, if after restarting the RestServer, I type the URL mathcing
the 2nd first, it returns back the correct result, and then when I type a URL
matching the 1st one, it fails because request.getAttributes().get("tradeId")
returns NULL.
Am I missing something in the configuration or can we not bind the same handler
for multiple URLs. OR do I need to bind different instances of same handler.
Right now I am binding the same instance with both.
Regards,
Rohit