SHARE
TWEET

na rado chushkopeka ot minalia web

a guest Oct 18th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String queryString = req.getQueryString().split("=")[1];
  2. // tuk ako imam nqkolko dumi s interval m/u tqh slaga %20 sled kato splitnem sas =
  3.  
  4.         ProductServiceModel modelName = this.productService.getProductByName(URLDecoder.decode(queryString, StandardCharsets.UTF_8));
  5. // i za tova tuka izpolzvam URLDecoder.decode i pravi black magic i go opravq...
  6.  
  7.         ProductDetailsViewModel productDetailsViewModel = this.modelMapper.map(modelName, ProductDetailsViewModel.class);
  8.  
  9.         String htmlContent = this.htmlReader
  10.                 .readHtmlFile(PRODUCT_DETAILS_HTML_FILE_PATH)
  11.                 .replace("{{productName}}", productDetailsViewModel.getName())
  12.                 .replace("{{productDescription}}", productDetailsViewModel.getDescription())
  13.                 .replace("{{productType}}", productDetailsViewModel.getType());
  14.  
  15.         resp.getWriter().println(htmlContent);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top