开发者

jSP form Query Parameters

开发者 https://www.devze.com 2023-02-15 13:51 出处:网络
While using an HTML form on a jsp page, the data/values automatically get picked up on subm开发者_JAVA百科it and a url gets generated: nextPage.do?param1=value1&param2=value2

While using an HTML form on a jsp page, the data/values automatically get picked up on subm开发者_JAVA百科it and a url gets generated: nextPage.do?param1=value1&param2=value2

Is there a way to change the generated url without redirecting again: nextPage.do?q={param1=value1$param2=value2}.

Thanks.


Use JavaScript to handle the form submission, extract the parameters, and transform them. But be careful about special characters : what if some parameter value has a dollar sign inside? I wonder why you want to do that.

0

精彩评论

暂无评论...
验证码 换一张
取 消