当前位置: 首页>>代码示例>>Java>>正文


Java JspContext.getOut方法代码示例

本文整理汇总了Java中javax.servlet.jsp.JspContext.getOut方法的典型用法代码示例。如果您正苦于以下问题:Java JspContext.getOut方法的具体用法?Java JspContext.getOut怎么用?Java JspContext.getOut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.servlet.jsp.JspContext的用法示例。


在下文中一共展示了JspContext.getOut方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doTag

import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
/**
 * Ecriture HTML du Tag
 * @throws JspException
 * @throws IOException 
 */
@Override
public void doTag() throws JspException, IOException {
    JspContext jsp = this.getJspContext();
    JspWriter out =jsp.getOut();
    
    // Create a top menu or reuse the existing one
    if (menuCache == null) {
        leftMenu(out);
        
    } else {
        out.println("<div id='" + cssDivMenu + "'>");
        out.println(menuCache);
        out.println("</div>");
    }
}
 
开发者ID:caylabenoit,项目名称:dgm,代码行数:21,代码来源:JoyMenuTag.java

示例2: doTag

import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
/**
 * Ecriture HTML du Tag
 * @throws JspException
 * @throws IOException 
 */
@Override
public void doTag() throws JspException, IOException {
    JspContext jsp = this.getJspContext();
    JspWriter out =jsp.getOut();

    try {
        Action actionform = (Action)jsp.findAttribute(C.ACTION_FORM_BEAN);
        String embedded = actionform.getSessionAttr("mode");
        if (embedded.equalsIgnoreCase("embedded")) 
            leftMenu(out);
        else 
            topMenu(out);
        
    } catch (IOException ex) {
        Joy.log().debug ( ex.toString());
        out.println("No menu defined.");
    }
}
 
开发者ID:caylabenoit,项目名称:dgm,代码行数:24,代码来源:JoyMenuMegaTag.java

示例3: doTag

import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
@Override
public void doTag() throws JspException, IOException {
    
    JspContext jsp = this.getJspContext();
    //Get the writer object for output.
    JspWriter out =jsp.getOut();
    // get the action object
    
    String infoMsg =  "";
    String errorMsg = "";
    
    Action actionform = (Action)jsp.findAttribute(C.ACTION_FORM_BEAN);
    if (actionform != null) {
        List<ActionLogReport> errors = actionform.getAllDisplayMessages();
        if (errors != null) {
            for (ActionLogReport error : errors) {
                if (error.getCriticity() == ActionLogReport.enum_CRITICITY.ERROR) {
                    errorMsg += error.getDescription() + "<BR>";
                } else {
                    infoMsg += error.getDescription() + "<BR>";
                }
            }
        }
        
        if (!errorMsg.isEmpty()) {
            out.println("<div class='alert alert-danger'>");
            out.println(errorMsg);
            out.println("</div>");
        }
        
        if (!infoMsg.isEmpty()) {
            out.println("<div class='alert alert-success'>");
            out.println(infoMsg);
            out.println("</div>");
        }
        
    }

    //out.println("TEST");
}
 
开发者ID:caylabenoit,项目名称:dgm,代码行数:41,代码来源:JoyResultMsgTag.java

示例4: doTag

import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
public void doTag() throws JspException, IOException {
	JspContext jspContext = super.getJspContext();
	JspWriter out = jspContext.getOut();
	String roleName = WizardWebUtils.getRoleName(jspContext);
	MenuService menuService = SpringContextUtils.getBean("menuServiceImpl",
			MenuService.class);
	List<WizardMenu> parentNodes = menuService.getParentNodes(roleName);

	for (WizardMenu parentNode : parentNodes) {
		out.print("<a href=\"#menu");
		out.print(parentNode.getPkId());

		if (!WizardUtils.isBlank(parentNode.getMenuPath())) {
			out.print("\" onClick=\"addTabItem('");
			out.print(parentNode.getMenuName());
			out.print("', '");
			out.print(parentNode.getMenuPath());
			out.print("');");
		}
		out.print("\" class=\"nav-header menu-first collapsed\" data-toggle=\"collapse\">");
		out.print(parentNode.getMenuName());
		out.println("</a>");
		out.println("<ul id=\"menu" + parentNode.getPkId()
				+ "\" class=\"nav nav-list collapse menu-second\">");
		List<WizardMenu> childNodes = menuService.getChildNodes(
				parentNode.getPkId(), roleName);
		for (WizardMenu childNode : childNodes) {
			out.print("<li><a href=\"#\" onClick=\"addTabItem('");
			out.print(childNode.getMenuName());
			out.print("', '");
			out.print(childNode.getMenuPath());
			out.print("');\">");
			out.print(childNode.getMenuName());
			out.println("</a></li>");
		}
		out.println("</ul>");
	}

}
 
开发者ID:joaquinaimar,项目名称:wizard,代码行数:40,代码来源:MenuTag.java

示例5: doTag

import javax.servlet.jsp.JspContext; //导入方法依赖的package包/类
public void doTag() throws JspException, IOException {
	JspContext jspContext = super.getJspContext();
	JspWriter out = jspContext.getOut();
	String roleName = WizardWebUtils.getRoleName(jspContext);
	MenuService menuService = SpringContextUtils.getBean("menuServiceImpl",
			MenuService.class);
	List<WizardMenu> parentNodes = menuService.getParentNodes(roleName);

	for (WizardMenu parentNode : parentNodes) {
		out.print("<a href=\"#menu");
		out.print(parentNode.getPkId());

		if (!WizardUtils.isBlank(parentNode.getMenuPath())) {
			out.print("\" onClick=\"addTabItem('");
			out.print(parentNode.getMenuName());
			out.print("', '");
			out.print(parentNode.getMenuPath());
			out.print("');");
		}
		out.print("\" class=\"nav navbar-link menu-first collapsed\" data-toggle=\"collapse\">");
		out.print(parentNode.getMenuName());
		out.println("</a>");
		out.println("<ul id=\"menu" + parentNode.getPkId()
				+ "\" class=\"nav nav-stacked collapse\">");
		List<WizardMenu> childNodes = menuService.getChildNodes(
				parentNode.getPkId(), roleName);
		for (WizardMenu childNode : childNodes) {
			out.print("<li><a href=\"#\" onClick=\"addTabItem('");
			out.print(childNode.getMenuName());
			out.print("', '");
			out.print(childNode.getMenuPath());
			out.print("');\">");
			out.print(childNode.getMenuName());
			out.println("</a></li>");
		}
		out.println("</ul>");
	}

}
 
开发者ID:joaquinaimar,项目名称:wizard,代码行数:40,代码来源:MenuTag.java


注:本文中的javax.servlet.jsp.JspContext.getOut方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。