【发布时间】:2013-07-29 21:19:25
【问题描述】:
我有一个这样的引荐来源网址:
http://myUrl.com?page=thisPage&gotoUrl=https://yahoo.com?gotoPage
如何在我的 Spring Controller 中获取“page”和“gotoUrl”的值?
我想将这些值存储为变量,以便以后重复使用。
【问题讨论】:
-
看看@RequestParam注解。
-
你真的是想说“推荐人”吗?如果是这样,则接受的答案是错误的。
-
您可能应该对
gotoUrl的值进行 URL 编码(尽管我不确定在这个特定示例中它在功能上是否重要)。
标签: java spring jsp spring-mvc