SpringMVC ModelAndView跳转问题
SpringMVC中ModelAndView或者其他的返回方式,如果以post方式返回结果给另外一个应用
比如我有一个项目test发送了一个post请求到 projectMVC,在projectMVC中的controller中如何以post方式返回结果给请求的项目test?
User.java
id;
userName;
password;
@.........
public ..... testController{
public ModelAndView test(HttpServletRequest request){
..................;
Map<String, String> map = new HashMap<String, String>();
map.put("id", user.getId());
map.put("userName", user.getUserName());
map.put("password", user.getPassword());
return new ModelAndView(new RedirectView("http://localhost:8080/test/test.jsp"), map); }
}
这样的转发是get方式,所有的参数都会被暴露在地址栏,想问一下有没有post方式直接把对象返回到
http://localhost:8080/test/test.jsp
比如我有一个项目test发送了一个post请求到 projectMVC,在projectMVC中的controller中如何以post方式返回结果给请求的项目test?
User.java
id;
userName;
password;
@.........
public ..... testController{
public ModelAndView test(HttpServletRequest request){
..................;
Map<String, String> map = new HashMap<String, String>();
map.put("id", user.getId());
map.put("userName", user.getUserName());
map.put("password", user.getPassword());
return new ModelAndView(new RedirectView("http://localhost:8080/test/test.jsp"), map); }
}
这样的转发是get方式,所有的参数都会被暴露在地址栏,想问一下有没有post方式直接把对象返回到
http://localhost:8080/test/test.jsp
...全文
相关推荐
浅谈Springmvc中的页面跳转问题
主要介绍了浅谈Springmvc中的页面跳转问题,具有一定参考价值,需要的朋友可以了解下。
SpringMVC杂记(三) 向导型Controller的实现(基于SpringMVC 3.1.1)
NULL 博文链接:https://yingzhuo.iteye.com/blog/1453438
SpringMVC登录实例
SpringMVC登录实例
SpringMVC快速入门 深入分析
SpringMVC 开发中的不同注意点 PDF格式 清晰
Java SpringMVC 学习路线.pdf
适用于Java后台开发SpringMVC框架使用者,包括注解的使用、配置文件配置参考和SSM框架整合内容


