ShowLetter.java
资源名称:shihua.rar [点击查看]
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:2k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- package com.chinacannel.xlchemical.Tag;
- import javax.servlet.jsp.tagext.TagSupport;
- import javax.servlet.jsp.JspWriter;
- import javax.servlet.jsp.JspException;
- public class ShowLetter extends TagSupport {
- private String ENLetter;
- private String CNLetter;
- private String TWLetter;
- public String getCNLetter() {
- return CNLetter;
- }
- public void setCNLetter(String CNLetter) {
- this.CNLetter = CNLetter;
- }
- public String getENLetter() {
- return ENLetter;
- }
- public void setENLetter(String ENLetter) {
- this.ENLetter = ENLetter;
- }
- public String getTWLetter() {
- return TWLetter;
- }
- public void setTWLetter(String TWLetter) {
- this.TWLetter = TWLetter;
- }
- public int doStartTag() throws JspException {
- String Language = "CN";
- if (this.pageContext.getSession().getAttribute("Language") != null) {
- Language = this.pageContext.getSession().getAttribute("Language").
- toString();
- }
- try {
- JspWriter out = pageContext.getOut();
- if (Language.equals("CN")) {
- out.print(this.getCNLetter());
- } else if (Language.equals("EN")) {
- out.print(this.getENLetter());
- } else if (Language.equals("TW")) {
- out.print(this.getTWLetter());
- }
- } catch (Exception e) {
- throw new JspException(e);
- }
- return 0;
- }
- }