博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在一个页面加载另一个渲染的页面
阅读量:6938 次
发布时间:2019-06-27

本文共 2374 字,大约阅读时间需要 7 分钟。

 
     
     
       
           
       
     
 

@RequestMapping(value = "similarProduct.json", method = RequestMethod.POST) public String getSimilarProduct(HttpServletRequest request,                                 ModelMap model,                                 @RequestParam(value = "maxResult") int maxResult,                                 @RequestParam(value = "pageNo") int pageNo,                                 @RequestParam(value = "productId", defaultValue = "0") long productId,                                 HttpSession session) {
   Locale currentLocale = getRequestLanguage(session, request);    ProductJsons productJsons = null;    productJsons = extendProductService.moreLikeTag(productId, maxResult, currentLocale.toString());    if (productJsons != null) {
       if (productJsons.getProductJsonList() != null) {
           ArrayList
ids = new ArrayList<>();            for (ProductJson productJson : productJsons.getProductJsonList()) {
               ids.add(productJson.getId());            }            model.addAttribute("ratingMap", getAverageRatingById(ids));            model.addAttribute("checkWish", checkWishById(ids));            model.addAttribute("productJsons", productJsons);        }    }    return "moreLikeThis"; }

moreLikeThis.jsp

<%@ page language="java" pageEncoding="UTF-8" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 
 
 
     
       
     
 
本文转自wiwi博客51CTO博客,原文链接http://blog.51cto.com/wiwili/1968589如需转载请自行联系原作者
wiwili
你可能感兴趣的文章
6、OC —— 内存管理基本概念
查看>>
在多台linux主机上执行相同的命令
查看>>
1.6的锁优化(适应性自旋/锁粗化/锁削除/轻量级锁/偏向锁)
查看>>
vsm安装(6)
查看>>
webapi使用System.Web.Http.Cors配置跨域访问的几点注意事项
查看>>
使用 JIRA API 更新用户头像
查看>>
IE浏览器“增强保护模式”的笔记
查看>>
SEP防火墙规则处理顺序
查看>>
linux AMP默认安装位置
查看>>
oracle表空间的创建、删除、查看、表空间不存在、及修改默认表空间详解
查看>>
Docker-compose install
查看>>
函数的使用
查看>>
ACL的使用和查看系统上登录的用户的命令使用
查看>>
C/C++源码网站
查看>>
SICP 2.40 2.41 2.42 2.43
查看>>
建立cover组 成员有cover01 cover02 建立team组 成员有team 01 team02 建立user组 成员有user...
查看>>
linux pxe 系统自动化安装
查看>>
iOS游戏开发有奖征文
查看>>
控制台读写
查看>>
LVS+keepalived负载均衡实战
查看>>