后台:
Map<String,String> map= new HashMap<String, String>();
判断
map.put(“tax_cert_display”,invoiceCompany.getTax_cert_thumbnail());
map.put(“tax_cert_type”,”url”);
map.put(“tax_prove_display”, invoiceCompany.getTax_prove_thumbnail());
map.put(“tax_prove_type”,”url”);
map.put(“bank_licence_display”, invoiceCompany.getBank_licence_thumbnail());
map.put(“bank_licence_type”,”url”);
map.put(“business_license_display”,invoiceCompany.getBusiness_license() );
map.put(“business_license_type”,”url”);
map.put(“auth_cert_display”, invoiceCompany.getAuth_cert_thumbnail());
map.put(“auth_cert_type”,”url”);
map.put(“tax_cert_display”,tax_cert);
map.put(“tax_cert_type”,”base64″);
map.put(“tax_prove_display”, tax_prove);
map.put(“tax_prove_type”,”base64″);
map.put(“bank_licence_display”, bank_licence);
map.put(“bank_licence_type”,”base64″);
map.put(“business_license_display”, bank_licence);
map.put(“business_license_type”,”base64″);
map.put(“auth_cert_display”, auth_cert);
map.put(“auth_cert_type”,”base64″);
前台
<c:if test="${not empty map['tax_cert_display'] }"> <p><span>税务登记证:</span> <c:if test="${map['tax_cert_type'] eq 'url'}"> <img style="height: 150px; width: 150px;" src="${map['tax_cert_display']}"></img> </c:if> <c:if test="${map['tax_cert_type'] eq 'base64'}"> <img style="height: 150px; width: 150px;" src="data:image/jpg;base64,${map['tax_cert_display']}"></img> </c:if> </p> <div class="clear"></div> </c:if>