示例#1
0
 public int doStartTag() throws JspTagException {
   Page page = (Page) pageContext.getAttribute("page");
   try {
     pageContext.getOut().print(encode((String) page.getAttribute(propertyName), page));
   } catch (Exception e) {
     throw new JspTagException("unexpected IO problems");
   }
   return SKIP_BODY;
 }
示例#2
0
 private String encode(String value, Page page) {
   if (StringUtils.isEmpty(value)) {
     return "";
   }
   String val =
       StringUtils.replace(
           SessionStorage.getInstance(page.getRequest()).encodeURL(value), " ", "%20");
   int pos = val.indexOf(";");
   if (pos > -1) {
     if (pos == 0) {
       return "";
     }
     val = val.substring(0, pos);
   }
   return val;
 }