I need to decode a URL/URI with JSTL so that an encoded string such as:

%3Fname%3DUpHelix

becomes:

?name=UpHelix

I know you can use URLDecoder in regular java but I don't know how to pull it off in JSTL.

Is there a JSTL method that will accomplish this?

有帮助吗?

解决方案

There is no standard tag to do that. So you should do it in the controller, or create your own tag that does it and use this tag in the JSP.

This doesn't look like view logic (i.e. markup generation logic) to me, so the best place is probably in the controller.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top