⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 util.jsp

📁 航空自助值机java BS模式程序
💻 JSP
字号:
<%!
public String getRealPath(){
  return getServletConfig().getServletContext().getRealPath("");
}

public String getConfigurationFile() {
  return getRealPath() + "\\resources\\configGlobalDemo.xml";
}

public String getBookingFile() {
  return getRealPath() + "\\resources\\bookings.xml";
}

public String getSvgBoardingPassFile() {
  return getRealPath() + "\\resources\\svgBoardingPass.svg";
}

public String getAeaBoardingPassFile() {
  return getRealPath() + "\\resources\\aeaBoardingPass.txt";
}

public String getAeaBoardingPassFile2() {
  return getRealPath() + "\\resources\\aeaBoardingPass2.txt";
}

public String getAeaBaggageTagFile() {
  return getRealPath() + "\\resources\\aeaBaggageTag.txt";
}
%>

<%
String backgroundImageName = "";
String backgroundImageWidth = "";
String backgroundImageHeight =  "";
String companyLogoName = "";
String companyLogoWidth = "";
String companyLogoHeight = "";

ImageProperties backgroundProperties = (ImageProperties)session.getAttribute("Background");
ImageProperties companyLogoProperties = (ImageProperties)session.getAttribute("CompanyLogo");

if (backgroundProperties == null) {
  backgroundProperties = ApplicationConfiguration.getImage(getConfigurationFile(), "Background");
  session.setAttribute("Background", backgroundProperties);
}

if (companyLogoProperties == null) {
  companyLogoProperties = ApplicationConfiguration.getImage(getConfigurationFile(), "CompanyLogo");
  session.setAttribute("CompanyLogo", companyLogoProperties);	
}

if (backgroundProperties != null) {
  backgroundImageName = "img/background/" + backgroundProperties.getImageName();
  backgroundImageWidth =  backgroundProperties.getImageWidth();
  backgroundImageHeight =  backgroundProperties.getImageHeight();
}

if (companyLogoProperties != null) {
  companyLogoName =  "img/companyLogo/" + companyLogoProperties.getImageName();
  companyLogoWidth =  companyLogoProperties.getImageWidth();
  companyLogoHeight =  companyLogoProperties.getImageHeight();
}


String classicReadersAnimationName = "";
String classicReadersAnimationWidth = "";
String classicReadersAnimationHeight =  "";
String passportAnimationName = "";
String passportAnimationWidth = "";
String passportAnimationHeight = "";

ImageProperties classicReadersProperties = (ImageProperties)session.getAttribute("ClassicReaders");
ImageProperties passportProperties = (ImageProperties)session.getAttribute("Passport");

if (classicReadersProperties == null) {
  classicReadersProperties = ApplicationConfiguration.getAnimation(getConfigurationFile(),"ClassicReaders");
  session.setAttribute("ClassicReaders", classicReadersProperties);
}

if (passportProperties == null) {
  passportProperties = ApplicationConfiguration.getAnimation(getConfigurationFile(), "Passport");
  session.setAttribute("Passport", passportProperties);	
}

if (classicReadersProperties != null) {
  classicReadersAnimationName = "img/swf/" + classicReadersProperties.getImageName();
  classicReadersAnimationWidth =  classicReadersProperties.getImageWidth();
  classicReadersAnimationHeight =  classicReadersProperties.getImageHeight();
}

if (companyLogoProperties != null) {
  passportAnimationName =  "img/swf/" + passportProperties.getImageName();
  passportAnimationWidth =  passportProperties.getImageWidth();
  passportAnimationHeight =  passportProperties.getImageHeight();
}



String titleBrowser = (String)session.getAttribute("titleBrowser"); 
String titlePage = (String)session.getAttribute("titlePage"); 

if ((titleBrowser == null) || (titlePage == null)) {
 String[] titles = ApplicationConfiguration.getTitles(getConfigurationFile());
 titleBrowser = titles[0];
 titlePage = titles[1];
 session.setAttribute("titleBrowser", titleBrowser);
 session.setAttribute("titlePage", titlePage);	
}

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -