Spring 3 - Combination of @PathVariable and HttpServletRequest

I have this controller mapping

@RequestMapping("/{language}/payment/{id}/reward/{rewardId}/name/{name}/address/{address}")
public String paymentPackage(@PathVariable Long id, @PathVariable Long
rewardId, @PathVariable String name, @PathVariable String address,
ModelMap model, HttpServletRequest request)

It works well, but now I need to pass "HttpServletRequest request" to other methods, but request does not contain variables from REST URL (id, name, ...) Is it possible to have this variables in HttpServletRequest too? Thank you.

Answers


create a filter and modify request to contain all needed variables. Or modify the request inside the controler.

 request.setAttribute("name", name);

set the value in model and access from the page. In case if you need to access from other method pass it to method as parameter.

model.addAttribute("request", request);

Need Your Help

HLSL: Keep Getting An Oval When I Want a Circle! (Pixel Shader)

2d shader pixel circle hlsl

I'm trying to tint a circle around the player in my 2D side scroller but I keep getting an oval! Here's the part of the code I'm using that matters:

adding a column dynamically and hiding the first column like jquery slider

javascript jquery slider

I have a html page with 10 columns but I don't have show all in same page instead I have to show only 4 column moreover I have to render those column on a button click call add column.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.