【发布时间】:2016-06-30 20:54:35
【问题描述】:
如何加密表单参数并通过 url 发送,然后使用 spring mvc 解密并打开所需的页面?
这是我的主表单页面
<html>
<form:form action="go/show" method="get" target="_blank" >
<table>
<tr>
<td class="label"><label>Application Name:</label></td>
<td class="field"><form:input path="appnames" name="appname" value="test" id="appname"/></td>
</tr>
</table>
</form>
从此参数转到getter和setter 然后到控制器
@RequestMapping(value = "/", method = RequestMethod.GET)
public ModelAndView form() {
return new ModelAndView("form","command",new Credentials());
}
@RequestMapping(value = "/go/show", method = RequestMethod.GET)
public ModelAndView show(@ModelAttribute("credentials") Credentials credentials()
{
return new ModelAndView("go/show")}
我的登陆jsp在哪里显示
我的 URL 显示为 localhost:8080/go/show?appnames=test 并显示我的登录页面 show.jsp
没有 Https 不是一个选项,每当我尝试将 url 重定向到类似 localhost:8080/go/show?cjavs%20cknbs= 的内容时,它会显示找不到页面...之后如何显示所需的页面
【问题讨论】:
-
如果使用 HTTPS 是一个选项,它已经完成,无需您采取进一步行动......
-
no Https 不是一个选项,每当我尝试将 url 重定向到类似 localhost:8080/go/show?cjavs%20cknbs= 它显示页面未找到...之后如何显示想要的页面,谁能帮忙
标签: java jsp spring-mvc