Example #1
0
 private boolean _jspx_meth_c_005fotherwise_005f0(
     javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fchoose_005f0,
     javax.servlet.jsp.PageContext _jspx_page_context,
     int[] _jspx_push_body_count_c_005fforEach_005f0)
     throws java.lang.Throwable {
   javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
   javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
   //  c:otherwise
   org.apache.taglibs.standard.tag.common.core.OtherwiseTag _jspx_th_c_005fotherwise_005f0 =
       (org.apache.taglibs.standard.tag.common.core.OtherwiseTag)
           _005fjspx_005ftagPool_005fc_005fotherwise.get(
               org.apache.taglibs.standard.tag.common.core.OtherwiseTag.class);
   _jspx_th_c_005fotherwise_005f0.setPageContext(_jspx_page_context);
   _jspx_th_c_005fotherwise_005f0.setParent(
       (javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fchoose_005f0);
   int _jspx_eval_c_005fotherwise_005f0 = _jspx_th_c_005fotherwise_005f0.doStartTag();
   if (_jspx_eval_c_005fotherwise_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     do {
       out.write("\n");
       out.write("\t\t\t\t\t\t\t\t\t\tNo\n");
       out.write("\t\t\t\t\t\t\t\t\t\t");
       int evalDoAfterBody = _jspx_th_c_005fotherwise_005f0.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
   }
   if (_jspx_th_c_005fotherwise_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f0);
     throw new javax.servlet.jsp.SkipPageException();
   }
   _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f0);
   return false;
 }
 private void LoadMenu2(String menuparentid) {
   HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
   HttpSession session = request.getSession();
   String contextPath = request.getContextPath();
   int userable = ((LogonForm) session.getAttribute("logonuser")).getUserable();
   JspWriter jspwriter = pageContext.getOut();
   String selectmenu2 = (String) session.getAttribute("selectmenu2");
   if (selectmenu2 == null) selectmenu2 = "";
   ArrayList menulist2 = new ArrayList();
   String sql =
       "select * from "
           + Content.TB_MENU
           + " where "
           + Content.MENUPARENTID
           + "='"
           + menuparentid
           + "' and "
           + Content.MENUJIBIE
           + "='2' and "
           + Content.USERABLE
           + " <= "
           + userable
           + " order by "
           + Content.MENUORDER;
   DB db = new DB();
   menulist2 = db.getmenulist(sql);
   try {
     if (menulist2 != null && menulist2.size() != 0) {
       jspwriter.write(
           "<tr><td align='center' colspan='2' style='padding-top:5;padding-bottom:5;padding-left:5;padding-right:5' background='"
               + contextPath
               + "/image/menu2b.jpg'><table border='0' width='187' cellpadding='0' cellspacing='1' bordercolor='#6DB0CB' rules='none'>");
       for (int i = 0; i < menulist2.size(); i++) {
         MenuSigle menu2sigle = (MenuSigle) menulist2.get(i);
         if (selectmenu2.equals((menu2sigle).getMenuid())) {
           jspwriter.write(
               "<tr bgcolor='#FFFCED'><td height='28' style='text-indent:20' valign='bottom' nowrap>◆<b>&nbsp;<a href='"
                   + contextPath
                   + menu2sigle.getMenuaction()
                   + "'>"
                   + menu2sigle.getMenuname()
                   + "</b></td></tr>");
           session.setAttribute("pagepath", menu2sigle.getMenuaction());
           LoadMenu3(menu2sigle.getMenuid());
         } else {
           jspwriter.write(
               "<tr bgcolor='#FFFCED'><td height='28' style='text-indent:20' valign='bottom' nowrap>◆&nbsp;<a href='"
                   + contextPath
                   + menu2sigle.getMenuaction()
                   + "'>"
                   + menu2sigle.getMenuname()
                   + "</a></td></tr>");
         }
       }
       jspwriter.write("</table></td></tr>");
     }
   } catch (IOException e) {
     e.printStackTrace();
   }
 }
Example #3
0
 private boolean _jspx_meth_c_005fotherwise_005f0(
     javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fchoose_005f0, PageContext _jspx_page_context)
     throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  c:otherwise
   org.apache.taglibs.standard.tag.common.core.OtherwiseTag _jspx_th_c_005fotherwise_005f0 =
       (org.apache.taglibs.standard.tag.common.core.OtherwiseTag)
           _005fjspx_005ftagPool_005fc_005fotherwise.get(
               org.apache.taglibs.standard.tag.common.core.OtherwiseTag.class);
   _jspx_th_c_005fotherwise_005f0.setPageContext(_jspx_page_context);
   _jspx_th_c_005fotherwise_005f0.setParent(
       (javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fchoose_005f0);
   int _jspx_eval_c_005fotherwise_005f0 = _jspx_th_c_005fotherwise_005f0.doStartTag();
   if (_jspx_eval_c_005fotherwise_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     do {
       out.write("\r\n\t\t\t\t<tr class=\"listA\">\r\n\t\t\t\t");
       if (_jspx_meth_c_005fset_005f0(_jspx_th_c_005fotherwise_005f0, _jspx_page_context))
         return true;
       out.write("\r\n\t\t\t");
       int evalDoAfterBody = _jspx_th_c_005fotherwise_005f0.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
   }
   if (_jspx_th_c_005fotherwise_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f0);
     return true;
   }
   _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f0);
   return false;
 }
Example #4
0
 private boolean _jspx_meth_admin_subnavbar_0(PageContext _jspx_page_context) throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  admin:subnavbar
   org.jivesoftware.admin.SubnavTag _jspx_th_admin_subnavbar_0 =
       (org.jivesoftware.admin.SubnavTag)
           _jspx_tagPool_admin_subnavbar_currentcss_css.get(
               org.jivesoftware.admin.SubnavTag.class);
   _jspx_th_admin_subnavbar_0.setPageContext(_jspx_page_context);
   _jspx_th_admin_subnavbar_0.setParent(null);
   _jspx_th_admin_subnavbar_0.setCss("");
   _jspx_th_admin_subnavbar_0.setCurrentcss("current");
   int _jspx_eval_admin_subnavbar_0 = _jspx_th_admin_subnavbar_0.doStartTag();
   if (_jspx_eval_admin_subnavbar_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     if (_jspx_eval_admin_subnavbar_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
       out = _jspx_page_context.pushBody();
       _jspx_th_admin_subnavbar_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
       _jspx_th_admin_subnavbar_0.doInitBody();
     }
     do {
       out.write(
           "\n                <a href=\"[url]\" title=\"[description]\"\n                  onmouseover=\"self.status='[description]';return true;\" onmouseout=\"self.status='';return true;\"\n                  >[name]</a>\n            ");
       int evalDoAfterBody = _jspx_th_admin_subnavbar_0.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
     if (_jspx_eval_admin_subnavbar_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
       out = _jspx_page_context.popBody();
   }
   if (_jspx_th_admin_subnavbar_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _jspx_tagPool_admin_subnavbar_currentcss_css.reuse(_jspx_th_admin_subnavbar_0);
     return true;
   }
   _jspx_tagPool_admin_subnavbar_currentcss_css.reuse(_jspx_th_admin_subnavbar_0);
   return false;
 }
Example #5
0
 private boolean _jspx_meth_s_005flink_005f0(
     javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0,
     PageContext _jspx_page_context,
     int[] _jspx_push_body_count_c_005fforEach_005f0)
     throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  s:link
   org.seasar.struts.taglib.S2LinkTag _jspx_th_s_005flink_005f0 =
       (org.seasar.struts.taglib.S2LinkTag)
           _005fjspx_005ftagPool_005fs_005flink_0026_005fhref.get(
               org.seasar.struts.taglib.S2LinkTag.class);
   _jspx_th_s_005flink_005f0.setPageContext(_jspx_page_context);
   _jspx_th_s_005flink_005f0.setParent(
       (javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0);
   // /WEB-INF/view/search/searchResult.jsp(47,5) name = href type = null reqTime = true required =
   // false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false
   // methodSignature = null
   _jspx_th_s_005flink_005f0.setHref(
       (java.lang.String)
           org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
               "/userpage?userni=${search.userid}",
               java.lang.String.class,
               (PageContext) _jspx_page_context,
               null,
               false));
   int _jspx_eval_s_005flink_005f0 = _jspx_th_s_005flink_005f0.doStartTag();
   if (_jspx_eval_s_005flink_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     if (_jspx_eval_s_005flink_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
       out = _jspx_page_context.pushBody();
       _jspx_push_body_count_c_005fforEach_005f0[0]++;
       _jspx_th_s_005flink_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
       _jspx_th_s_005flink_005f0.doInitBody();
     }
     do {
       out.write(' ');
       out.write(
           (java.lang.String)
               org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(
                   "${search.usernick}",
                   java.lang.String.class,
                   (PageContext) _jspx_page_context,
                   null,
                   false));
       out.write(' ');
       int evalDoAfterBody = _jspx_th_s_005flink_005f0.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
     if (_jspx_eval_s_005flink_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
       out = _jspx_page_context.popBody();
       _jspx_push_body_count_c_005fforEach_005f0[0]--;
     }
   }
   if (_jspx_th_s_005flink_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _005fjspx_005ftagPool_005fs_005flink_0026_005fhref.reuse(_jspx_th_s_005flink_005f0);
     return true;
   }
   _005fjspx_005ftagPool_005fs_005flink_0026_005fhref.reuse(_jspx_th_s_005flink_005f0);
   return false;
 }
Example #6
0
  @Override
  public int doEndTag() throws JspException {
    HttpSession httpSession = this.pageContext.getSession();
    Member loginMember = (Member) httpSession.getAttribute("ss_member");

    if (loginMember != null) userId = loginMember.getUserId();

    MyMenuInfo myMenuInfo = new MyMenuInfo();
    myMenuInfo.setUserId(userId);

    elementList = elementsService.getMyMenuInfoList(myMenuInfo);

    if (elementList.size() < 1) return EVAL_PAGE;

    StringBuffer htmlBuf = new StringBuffer();
    this.genMyMenuHtml(htmlBuf);

    // System.out.println(htmlBuf.toString());
    JspWriter w = pageContext.getOut();
    try {
      w.print(htmlBuf.toString());
    } catch (IOException e) {
      // TODO Auto-generated catch block
      throw new JspException(e.toString(), e);
    }
    return super.doEndTag();
  }
Example #7
0
  public int doEndTag() throws JspException {
    try {
      List<ValidationMetaData> rules = new ArrayList<ValidationMetaData>();
      if (commandName != null) {
        rules.addAll(getValidationMetaDataForCommand());
      }
      String bodyString = null;
      if (bodyContent != null) {
        // body can be a JSON object, specifying date formats, or other extra configuration info
        bodyString = FileCopyUtils.copyToString(bodyContent.getReader());
        bodyString = bodyString.trim().replaceAll("\\s{2,}", " ");
      }

      JspWriter out = pageContext.getOut();
      out.write("<script type=\"text/javascript\" id=\"");
      out.write(commandName + "JSR303JSValidator");
      out.write("\">");
      generator.generateJavaScript(
          out,
          commandName,
          true,
          bodyString,
          rules,
          new MessageSourceAccessor(
              getRequestContext().getWebApplicationContext(), getRequestContext().getLocale()));
      out.write("</script>");
      return EVAL_PAGE;
    } catch (IOException e) {
      throw new JspException("Could not write validation rules", e);
    }
  }
 private boolean _jspx_meth_c_when_2(
     javax.servlet.jsp.tagext.Tag _jspx_th_c_choose_2,
     javax.servlet.jsp.PageContext pageContext,
     int[] _jspx_push_body_count_c_forEach_0)
     throws Throwable {
   JspWriter out = pageContext.getOut();
   /* ----  c:when ---- */
   org.apache.taglibs.standard.tag.el.core.WhenTag _jspx_th_c_when_2 =
       (org.apache.taglibs.standard.tag.el.core.WhenTag)
           _jspx_tagPool_c_when_test.get(org.apache.taglibs.standard.tag.el.core.WhenTag.class);
   _jspx_th_c_when_2.setPageContext(pageContext);
   _jspx_th_c_when_2.setParent(_jspx_th_c_choose_2);
   _jspx_th_c_when_2.setTest("${empty resultitem.queryResult.columnResultsInError}");
   int _jspx_eval_c_when_2 = _jspx_th_c_when_2.doStartTag();
   if (_jspx_eval_c_when_2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     do {
       out.write("\n\t                \t\t\t\t");
       if (_jspx_meth_fmt_message_10(
           _jspx_th_c_when_2, pageContext, _jspx_push_body_count_c_forEach_0)) return true;
       out.write("\n\t                    \t\t");
       int evalDoAfterBody = _jspx_th_c_when_2.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
   }
   if (_jspx_th_c_when_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return true;
   _jspx_tagPool_c_when_test.reuse(_jspx_th_c_when_2);
   return false;
 }
 private boolean _jspx_meth_c_otherwise_2(
     javax.servlet.jsp.tagext.Tag _jspx_th_c_choose_2,
     javax.servlet.jsp.PageContext pageContext,
     int[] _jspx_push_body_count_c_forEach_0)
     throws Throwable {
   JspWriter out = pageContext.getOut();
   /* ----  c:otherwise ---- */
   org.apache.taglibs.standard.tag.common.core.OtherwiseTag _jspx_th_c_otherwise_2 =
       (org.apache.taglibs.standard.tag.common.core.OtherwiseTag)
           _jspx_tagPool_c_otherwise.get(
               org.apache.taglibs.standard.tag.common.core.OtherwiseTag.class);
   _jspx_th_c_otherwise_2.setPageContext(pageContext);
   _jspx_th_c_otherwise_2.setParent(_jspx_th_c_choose_2);
   int _jspx_eval_c_otherwise_2 = _jspx_th_c_otherwise_2.doStartTag();
   if (_jspx_eval_c_otherwise_2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     do {
       out.write("\n\t\t\t\t\t\t\t\t\t");
       out.write("<span class=\"error\">");
       if (_jspx_meth_fmt_message_11(
           _jspx_th_c_otherwise_2, pageContext, _jspx_push_body_count_c_forEach_0)) return true;
       out.write("</span>\n\t\t\t\t\t\t\t\t");
       int evalDoAfterBody = _jspx_th_c_otherwise_2.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
   }
   if (_jspx_th_c_otherwise_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return true;
   _jspx_tagPool_c_otherwise.reuse(_jspx_th_c_otherwise_2);
   return false;
 }
Example #10
0
  /**
   * Default processing of the start tag returning EVAL_BODY_BUFFERED.
   *
   * @return EVAL_BODY_BUFFERED
   * @throws JspException if an error occurred while processing this tag
   * @see BodyTag#doStartTag
   */
  @Override
  public int doStartTag() throws JspException {
    try {
      JspWriter out = this.pageContext.getOut();
      this.sys = this.getSys() != null ? this.getSys().trim() : "";
      this.app = this.getApp() != null ? this.getApp().trim() : "";
      this.title = this.getTitle() != null ? this.getTitle().trim() : "";
      this.accessKey = this.getAccessKey() != null ? this.getAccessKey().trim() : "";

      TagElement tagElem = new TagElement(ElementType.LI);
      tagElem.addClass(this.getTagType() + " sub_nav " + TAG);
      tagElem.attr(SYS, this.sys);
      tagElem.attr(APP, this.app);
      tagElem.attr(ACCESSKEY, this.accessKey);
      tagElem.html(
          "<a class='title'>"
              + this.title
              + "</a><a class='_title'>"
              + this.getShortName()
              + "</a>");
      out.print(tagElem.toString());
    } catch (IOException e) {
      LOG.error(EXCEPTION + e.getMessage(), e);
    }
    return (SKIP_BODY);
  }
Example #11
0
 private boolean _jspx_meth_c_005fotherwise_005f1(
     javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fchoose_005f1,
     javax.servlet.jsp.PageContext _jspx_page_context)
     throws java.lang.Throwable {
   javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
   javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
   //  c:otherwise
   org.apache.taglibs.standard.tag.common.core.OtherwiseTag _jspx_th_c_005fotherwise_005f1 =
       (org.apache.taglibs.standard.tag.common.core.OtherwiseTag)
           _005fjspx_005ftagPool_005fc_005fotherwise.get(
               org.apache.taglibs.standard.tag.common.core.OtherwiseTag.class);
   _jspx_th_c_005fotherwise_005f1.setPageContext(_jspx_page_context);
   _jspx_th_c_005fotherwise_005f1.setParent(
       (javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fchoose_005f1);
   int _jspx_eval_c_005fotherwise_005f1 = _jspx_th_c_005fotherwise_005f1.doStartTag();
   if (_jspx_eval_c_005fotherwise_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     do {
       out.write("[다음]");
       int evalDoAfterBody = _jspx_th_c_005fotherwise_005f1.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
   }
   if (_jspx_th_c_005fotherwise_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f1);
     return true;
   }
   _005fjspx_005ftagPool_005fc_005fotherwise.reuse(_jspx_th_c_005fotherwise_005f1);
   return false;
 }
  private void writeFolderTree(JspWriter out) throws IOException {
    List<GroupWorkspaceProjectPageFolder> folders =
        new LinkedList<GroupWorkspaceProjectPageFolder>(groupWorkspaceProjectPage.getRootFolders());
    Collections.sort(folders, new AscendingNameComparator());

    List<GroupWorkspaceProjectPageFile> files =
        new LinkedList<GroupWorkspaceProjectPageFile>(groupWorkspaceProjectPage.getRootFiles());
    Collections.sort(files, new AscendingNameComparator());

    List<GroupWorkspaceProjectPagePublication> publications =
        new LinkedList<GroupWorkspaceProjectPagePublication>(
            groupWorkspaceProjectPage.getRootPublications());
    Collections.sort(publications, new AscendingNameComparator());

    List<GroupWorkspaceProjectPageInstitutionalItem> items =
        new LinkedList<GroupWorkspaceProjectPageInstitutionalItem>(
            groupWorkspaceProjectPage.getRootInstitutionalItems());
    Collections.sort(items, new AscendingNameComparator());

    List<GroupWorkspaceProjectPageFileSystemLink> links =
        new LinkedList<GroupWorkspaceProjectPageFileSystemLink>(
            groupWorkspaceProjectPage.getRootLinks());
    Collections.sort(links, new AscendingNameComparator());

    out.write("<ul>");
    for (GroupWorkspaceProjectPageFolder folder : folders) {
      writeFolder(folder, out);
    }

    writeFiles(files, out);
    writePublications(publications, out);
    writeItems(items, out);
    writeLinks(links, out);
    out.write("</ul>");
  }
Example #13
0
 private boolean _jspx_meth_shiro_005flacksPermission_005f0(PageContext _jspx_page_context)
     throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  shiro:lacksPermission
   org.apache.shiro.web.tags.LacksPermissionTag _jspx_th_shiro_005flacksPermission_005f0 =
       (org.apache.shiro.web.tags.LacksPermissionTag)
           _005fjspx_005ftagPool_005fshiro_005flacksPermission_0026_005fname.get(
               org.apache.shiro.web.tags.LacksPermissionTag.class);
   _jspx_th_shiro_005flacksPermission_005f0.setPageContext(_jspx_page_context);
   _jspx_th_shiro_005flacksPermission_005f0.setParent(null);
   // /WEB-INF/views/modules/sys/dictForm.jsp(31,162) name = name type = null reqTime = true
   // required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod
   // = false methodSignature = null
   _jspx_th_shiro_005flacksPermission_005f0.setName("sys:dict:edit");
   int _jspx_eval_shiro_005flacksPermission_005f0 =
       _jspx_th_shiro_005flacksPermission_005f0.doStartTag();
   if (_jspx_eval_shiro_005flacksPermission_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     do {
       out.write('查');
       out.write('看');
       int evalDoAfterBody = _jspx_th_shiro_005flacksPermission_005f0.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
   }
   if (_jspx_th_shiro_005flacksPermission_005f0.doEndTag()
       == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _005fjspx_005ftagPool_005fshiro_005flacksPermission_0026_005fname.reuse(
         _jspx_th_shiro_005flacksPermission_005f0);
     return true;
   }
   _005fjspx_005ftagPool_005fshiro_005flacksPermission_0026_005fname.reuse(
       _jspx_th_shiro_005flacksPermission_005f0);
   return false;
 }
 /**
  * @return
  * @throws JspException 作者:孙树林 创建日期:2010-12-29
  */
 @Override
 public int doStartTag() throws JspException {
   JspWriter writer = pageContext.getOut();
   try {
     ValueStack stack = TagUtils.getStack(pageContext);
     Object obj = stack.findValue("ex");
     GeneralException exception = (GeneralException) obj;
     writer.print("错误信息:<br>");
     writer.print(exception.getMessage() + "<br>");
     StackTraceElement[] elements = exception.getStackTrace();
     writer.print("详细内容:<br>");
     for (StackTraceElement element : elements) {
       writer.println(
           element.getClassName()
               + "."
               + element.getMethodName()
               + "("
               + element.getFileName()
               + ": "
               + element.getLineNumber()
               + ")<br>");
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return EVAL_PAGE;
 }
 private boolean _jspx_meth_c_if_1(javax.servlet.jsp.PageContext pageContext) throws Throwable {
   JspWriter out = pageContext.getOut();
   HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
   HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
   /* ----  c:if ---- */
   org.apache.taglibs.standard.tag.el.core.IfTag _jspx_th_c_if_1 =
       (org.apache.taglibs.standard.tag.el.core.IfTag)
           _jspx_tagPool_c_if_test.get(org.apache.taglibs.standard.tag.el.core.IfTag.class);
   _jspx_th_c_if_1.setPageContext(pageContext);
   _jspx_th_c_if_1.setParent(null);
   _jspx_th_c_if_1.setTest("${param.orgAdminPopup}");
   int _jspx_eval_c_if_1 = _jspx_th_c_if_1.doStartTag();
   if (_jspx_eval_c_if_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     do {
       out.write("\n    ");
       JspRuntimeLibrary.include(
           request,
           response,
           "/includes/orgAdmin_header.jsp"
               + "?"
               + "help="
               + "monitoringadmin%2Fusers%2FWTHelp_User.html",
           out,
           false);
       out.write("\n");
       int evalDoAfterBody = _jspx_th_c_if_1.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
   }
   if (_jspx_th_c_if_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return true;
   _jspx_tagPool_c_if_test.reuse(_jspx_th_c_if_1);
   return false;
 }
Example #16
0
 public int doEndTag() throws JspException {
   JspWriter writer = pageContext.getOut();
   if (label != null) {
     try {
       writer.write("<div class='control-group'><label class='control-label'>");
       writer.write(label);
       writer.write("</label><div class='controls'>");
     } catch (IOException e) {
       if (LOG.isInfoEnabled()) {
         LOG.info("Could not print out value '" + label + "'", e);
       }
     }
   }
   component.end(writer, getBody());
   if (label != null) {
     try {
       writer.write("</div></div>");
     } catch (IOException e) {
       if (LOG.isInfoEnabled()) {
         LOG.info("Could not print out value '" + label + "'", e);
       }
     }
   }
   component = null;
   return EVAL_PAGE;
 }
 private boolean _jspx_meth_s_if_0(PageContext _jspx_page_context) throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  s:if
   org.apache.struts2.views.jsp.IfTag _jspx_th_s_if_0 =
       (org.apache.struts2.views.jsp.IfTag)
           _jspx_tagPool_s_if_test.get(org.apache.struts2.views.jsp.IfTag.class);
   _jspx_th_s_if_0.setPageContext(_jspx_page_context);
   _jspx_th_s_if_0.setParent(null);
   _jspx_th_s_if_0.setTest("#attribute.required");
   int _jspx_eval_s_if_0 = _jspx_th_s_if_0.doStartTag();
   if (_jspx_eval_s_if_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     if (_jspx_eval_s_if_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
       out = _jspx_page_context.pushBody();
       _jspx_th_s_if_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
       _jspx_th_s_if_0.doInitBody();
     }
     do {
       out.write("&#32;<span class=\"icon fa fa-asterisk text-muted\" title=\"");
       if (_jspx_meth_s_text_0(
           (javax.servlet.jsp.tagext.JspTag) _jspx_th_s_if_0, _jspx_page_context)) return true;
       out.write("\"></span>");
       int evalDoAfterBody = _jspx_th_s_if_0.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
     if (_jspx_eval_s_if_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
       out = _jspx_page_context.popBody();
   }
   if (_jspx_th_s_if_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _jspx_tagPool_s_if_test.reuse(_jspx_th_s_if_0);
     return true;
   }
   _jspx_tagPool_s_if_test.reuse(_jspx_th_s_if_0);
   return false;
 }
Example #18
0
  @Override
  public void doTag() throws JspException, IOException {
    final boolean enabled = Config.getBoolean(ENABLE_TEST_IDS_PROPERTY, false);
    if (enabled) {
      final PageContext pageContext = (PageContext) getJspContext();
      final JspWriter jspWriter = pageContext.getOut();

      final int nextUniqueId = getNextUniqueId(pageContext);

      jspWriter
          .append("<div id=\"")
          .append("test_")
          .append(cleanupHtmlId(getCode()))
          .append("_$")
          .append(String.valueOf(nextUniqueId))
          .append("\" style=\"display:inline\">");

      // Write the body out
      getJspBody().invoke(jspWriter);

      jspWriter.println("</div>");
    } else {
      // Just render the contents
      getJspBody().invoke(getJspContext().getOut());
    }
  }
Example #19
0
  private void writeAsSpanLabel() throws JspException {
    try {
      getAttributes().remove("radio");
      if (isChecked()) {
        JspWriter writer = getPageContext().getOut();
        if (getId() != null) {
          set("id", getId());
        }
        set("class", !Str.isEmpty(readOnlyClass) ? readOnlyClass : DEFAULT_READONLY_CLASS);

        writeOpenTag(getPageContext().getOut(), "span");
        writer.print(checkedLabel);
        writeCloseTag(getPageContext().getOut(), "span");
      }
    } catch (IOException ioe) {
      JspException jspe =
          new JspException(
              MessageFormat.format(
                  "IOException encountered while writing value [{0}]  to the JspWriter.",
                  checkedLabel),
              ioe);
      LOG.warn(jspe);
      throw jspe;
    } finally {
      if (getId() != null) {
        getAttributes().remove("id");
      }
      getAttributes().remove("class");
    }
  }
Example #20
0
 private boolean _jspx_meth_c_005fif_005f0(PageContext _jspx_page_context) throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  c:if
   org.apache.taglibs.standard.tag.el.core.IfTag _jspx_th_c_005fif_005f0 =
       (org.apache.taglibs.standard.tag.el.core.IfTag)
           _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(
               org.apache.taglibs.standard.tag.el.core.IfTag.class);
   _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
   _jspx_th_c_005fif_005f0.setParent(null);
   // /createUser.jsp(16,3) name = test type = java.lang.String reqTime = false required = true
   // fragment = false deferredValue = false expectedTypeName = null deferredMethod = false
   // methodSignature = null
   _jspx_th_c_005fif_005f0.setTest("${not empty message}");
   int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
   if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     do {
       out.write("\n");
       out.write("\t\t\t<div id=\"message\">");
       if (_jspx_meth_c_005fout_005f0(_jspx_th_c_005fif_005f0, _jspx_page_context)) return true;
       out.write("</div>\t\n");
       out.write("\t\t ");
       int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
   }
   if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
     return true;
   }
   _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
   return false;
 }
  @Override
  public int doStartTag() throws JspException {
    String language = (String) pageContext.getSession().getAttribute("param.language");

    Locale locale;
    if (language != null) {
      locale = new Locale(language, language.toUpperCase());
    } else {
      locale = pageContext.getRequest().getLocale();
    }

    ResourceBundle resource =
        ResourceBundle.getBundle("by.gstu.Testing.resource.pagestext", locale);
    JspWriter writer = pageContext.getOut();
    try {
      try {
        writer.print(new String(resource.getString(key).getBytes("ISO-8859-1"), "UTF-8"));
      } catch (MissingResourceException ex) {
        logger.debug(ex);
        writer.print(resource.getString("resource.not.found"));
      }
    } catch (IOException ex) {

    }
    return SKIP_BODY;
  }
  private void _jspService(
      javax.servlet.http.HttpServletRequest request,
      javax.servlet.http.HttpServletResponse response,
      com.caucho.jsp.PageContextImpl pageContext,
      javax.servlet.ServletContext application,
      javax.servlet.http.HttpSession session,
      TagState _jsp_state)
      throws Throwable {
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    final javax.el.ELContext _jsp_env = pageContext.getELContext();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    javax.servlet.jsp.tagext.JspTag _jsp_parent_tag = null;
    com.caucho.jsp.PageContextImpl _jsp_parentContext = pageContext;
    response.setContentType("text/html");
    response.setCharacterEncoding("utf-8");

    out.write(_jsp_string0, 0, _jsp_string0.length);
    if (false == session.getAttribute("loggedin")) {
      response.sendRedirect("login.jsp");
    } else if (null == session.getAttribute("loggedin")) {
      response.sendRedirect("login.jsp");
    }
    out.write(_jsp_string1, 0, _jsp_string1.length);
  }
Example #23
0
 public void _jspService(
     javax.servlet.http.HttpServletRequest request,
     javax.servlet.http.HttpServletResponse response)
     throws java.io.IOException, javax.servlet.ServletException {
   com.caucho.server.webapp.WebApp _jsp_application = _caucho_getApplication();
   javax.servlet.ServletContext application = _jsp_application;
   com.caucho.jsp.PageContextImpl pageContext =
       _jsp_application
           .getJspApplicationContext()
           .allocatePageContext(
               this, _jsp_application, request, response, null, null, 8192, true, false);
   javax.servlet.jsp.PageContext _jsp_parentContext = pageContext;
   javax.servlet.jsp.JspWriter out = pageContext.getOut();
   final javax.el.ELContext _jsp_env = pageContext.getELContext();
   javax.servlet.ServletConfig config = getServletConfig();
   javax.servlet.Servlet page = this;
   response.setContentType("text/html;charset=UTF-8");
   request.setCharacterEncoding("UTF-8");
   try {
     out.write(_jsp_string0, 0, _jsp_string0.length);
   } catch (java.lang.Throwable _jsp_e) {
     pageContext.handlePageException(_jsp_e);
   } finally {
     _jsp_application.getJspApplicationContext().freePageContext(pageContext);
   }
 }
Example #24
0
 public int doStartTag() throws JspTagException {
   javax.servlet.jsp.tagext.Tag parent = getParent();
   ServletRequest request = pageContext.getRequest();
   JspWriter out = pageContext.getOut();
   if (name == null && param == null)
     throw new JspTagException("ListElemTag >> name or param is required");
   if (value == null && param == null)
     throw new JspTagException("ListElemTag >> value or param is required");
   if (name == null) name = param;
   if (value == null && param != null) value = request.getAttribute(param);
   if (value == null) throw new JspTagException("ListElemTag >> value is null");
   if (value instanceof List) iter = ((List) value).iterator();
   else if (value instanceof Iterator) iter = (Iterator) value;
   else throw new JspTagException("value must be List or Iterator");
   try {
     out.print("<list name='" + name + "'>\n");
     if (iter.hasNext()) {
       cnt++;
       data = iter.next();
       out.print("<entry no='" + cnt++ + "'>");
       return 1;
     }
   } catch (IOException e) {
     throw new JspTagException("ListElemTag >> " + e.getMessage());
   }
   return 0;
 }
 private boolean _jspx_meth_logic_equal_2(PageContext _jspx_page_context) throws Throwable {
   PageContext pageContext = _jspx_page_context;
   JspWriter out = _jspx_page_context.getOut();
   //  logic:equal
   org.apache.struts.taglib.logic.EqualTag _jspx_th_logic_equal_2 =
       (org.apache.struts.taglib.logic.EqualTag)
           _jspx_tagPool_logic_equal_value_name.get(org.apache.struts.taglib.logic.EqualTag.class);
   _jspx_th_logic_equal_2.setPageContext(_jspx_page_context);
   _jspx_th_logic_equal_2.setParent(null);
   _jspx_th_logic_equal_2.setName("subscribed");
   _jspx_th_logic_equal_2.setValue("true");
   int _jspx_eval_logic_equal_2 = _jspx_th_logic_equal_2.doStartTag();
   if (_jspx_eval_logic_equal_2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
     do {
       out.write("true");
       int evalDoAfterBody = _jspx_th_logic_equal_2.doAfterBody();
       if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break;
     } while (true);
   }
   if (_jspx_th_logic_equal_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
     _jspx_tagPool_logic_equal_value_name.reuse(_jspx_th_logic_equal_2);
     return true;
   }
   _jspx_tagPool_logic_equal_value_name.reuse(_jspx_th_logic_equal_2);
   return false;
 }
Example #26
0
 public void addTableRow(JspWriter out, String[] columns) throws IOException {
   out.print("<tr>");
   for (String col : columns) {
     out.print("<td>" + col + "</td>\n");
   }
   out.print("</tr>");
 }
Example #27
0
 @Override
 protected void doView(JspWriter out) throws IOException {
   if (userRole != null) {
     out.println("<input type=\"hidden\" name=\"userRole\" value=\"" + userRole + "\"/>");
     out.print(userRole);
   }
 }
  @Override
  public int doStartTag() throws JspException {
    String context = "";
    try {
      System.out.println("jsp tag start...");

      ut.begin();
      JMSProducer producer = jmsContext.createProducer();
      TextMessage msg = jmsContext.createTextMessage("Hello JSP Tag");
      producer.send(queue, msg);
      context = jmsContext.toString();
      ut.commit();

      if (context.indexOf(transactionScope) == -1) {
        throw new JspException("NOT in transaction scope!");
      }
      // Get the writer object for output.
      JspWriter out = pageContext.getOut();

      // Perform substr operation on string.
      out.println(text);

    } catch (Exception e) {
      throw new JspException(e);
    }
    return SKIP_BODY;
  }
  /**
   * Render observation.
   *
   * @return return result code
   */
  public int doStartTag() throws JspException {
    try {
      final JspWriter out = pageContext.getOut();
      if (birthdate != null || !requiresBirthdate()) {
        try {
          if (showValue != null && showValue) {
            writeNumericValue(out);
            if (showClassification != null && showClassification) {
              out.write(" (");
              writeClassificationValue(out);
              out.write(")");
            }
          } else if (showClassification != null && showClassification) {
            writeClassificationValue(out);
          }
        } catch (NumberFormatException nfe) {
          out.write("[Invalid Data]");
        }
      } else {
        out.write(noEnteredDataText);
      }
    } catch (IOException e) {
      log.error("Unable to generate chart servlet url", e);
    }

    return EVAL_BODY_BUFFERED;
  }
Example #30
0
 public int doStartTag() throws JspException {
   try {
     JspWriter out = pageContext.getOut();
     if (LOG.isTraceEnabled()) {
       LOG.trace(StringUtil.beanToString(this, null, TagSupport.class, true));
     }
     rowNo = StringUtil.asInteger(row, new Integer(0)).intValue();
     if (rowNo == getTableRowIndex()) {
       String cellStyle = this.cellStyle != null ? this.cellStyle : getTableCellStyle();
       String align = this.align != null ? this.align : getTableAlign();
       String valign = this.valign != null ? this.valign : getTableValign();
       String width = this.cellWidth != null ? this.cellWidth : getTableCellWidth();
       String height = this.cellHeight != null ? this.cellHeight : getTableCellHeight();
       out.write(
           "<td"
               + (cellStyle != null ? " class=\"" + cellStyle + "\"" : "")
               + (align != null ? " align=\"" + align + "\"" : "")
               + (valign != null ? " valign=\"" + valign + "\"" : "")
               + (width != null ? " width=\"" + width + "\"" : "")
               + (height != null ? " height=\"" + height + "\"" : "")
               + ">");
       return EVAL_BODY_INCLUDE;
     }
   } catch (IOException e) {
     e
         .printStackTrace(); // To change body of catch statement use File | Settings | File
                             // Templates.
   }
   rowNo = -1;
   return SKIP_BODY;
 }