<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@page language="java" %> <%@page import="com.qtrade.constant.AppConstant"%> <%@page import="com.web.controller.BaseController"%> <%@page import="com.web.controller.HomeController"%> <%@page import="com.web.controller.SubscriptionPageController" %> <%! private String escapeHtmlAttr(String value) { if (value == null) { return ""; } return value.replace("&", "&") .replace("<", "<") .replace(">", ">") .replace("\"", """); } %> <% final String siteName = "I3 Intelligence"; String headPage = (String) request.getAttribute(BaseController.PAGE_HEAD); String bodyPage = (String) request.getAttribute(BaseController.PAGE_BODY); if ((headPage == null || headPage.isBlank()) && bodyPage != null && bodyPage.endsWith(".jsp")) { headPage = bodyPage.substring(0, bodyPage.length() - 4) + ".seo.jsp"; } boolean hasHeadPage = false; if (headPage != null && !headPage.isBlank()) { try { hasHeadPage = application.getResource(headPage) != null; } catch (Exception ignored) { hasHeadPage = false; } } %> <% if (hasHeadPage) { %> <% } %> <% String pageTitle = (String) request.getAttribute(BaseController.PAGE_TITLE); String metaDescription = (String) request.getAttribute(BaseController.PAGE_META_DESCRIPTION); String metaKeywords = (String) request.getAttribute(BaseController.PAGE_META_KEYWORDS); String metaRobots = (String) request.getAttribute(BaseController.PAGE_META_ROBOTS); String canonicalUrl = (String) request.getAttribute(BaseController.PAGE_META_CANONICAL); String metaImage = (String) request.getAttribute(BaseController.PAGE_META_IMAGE); if (pageTitle == null || pageTitle.isBlank()) { pageTitle = siteName; } else { pageTitle = pageTitle + " | " + siteName; } if (metaDescription == null || metaDescription.isBlank()) { metaDescription = "I3 Intelligence brings together AI-guided research, market sentiment, screening, and portfolio workflows for investors."; } if (metaRobots == null || metaRobots.isBlank()) { metaRobots = "noindex,nofollow"; } if (canonicalUrl == null || canonicalUrl.isBlank()) { canonicalUrl = request.getRequestURL().toString(); } String escapedTitle = escapeHtmlAttr(pageTitle); String escapedDescription = escapeHtmlAttr(metaDescription); String escapedRobots = escapeHtmlAttr(metaRobots); String escapedCanonical = escapeHtmlAttr(canonicalUrl); String escapedImage = escapeHtmlAttr(metaImage); %> <%=escapedTitle%> <% if (metaKeywords != null && !metaKeywords.isBlank()) { %> <% } %> "> <% if (metaImage != null && !metaImage.isBlank()) { %> <% } %> <% // bootstrap and jquery %> <% if (AppConstant.FLAG_YES.equals(request.getAttribute(AppConstant.WEB_DATA_TABLE))) { // use datatable - various listing pages %> <% } // use datatable %> <% if (AppConstant.FLAG_YES.equals(request.getAttribute(AppConstant.WEB_HIGHCHARTS))) { // use highcharts %> <% } // use highcharts %>