Skip to content
Advertisement

Tag: url-parameters

RestTemplate: How to send URL and query parameters together

I am trying to pass path param and query params in a URL but I am getting a weird error. Below is the code. and my url is becoming http://test.com/Services/rest/%7Bid%7D/Identifier?name=myName What should I do to make it work? I am expecting http://test.com/Services/rest/{id}/Identifier?name=myName so that params will add id to the url. Answer I would use buildAndExpand from UriComponentsBuilder to pass

Pass Hidden parameters using response.sendRedirect()

How would I pass hidden parameters? I want to call a page (test.jsp) but also pass 2 hidden parameters like a post. Answer TheNewIdiot’s answer successfully explains the problem and the reason why you can’t send attributes in request through a redirect. Possible solutions: Using forwarding. This will enable that request attributes could be passed to the view and you

Advertisement