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


Java Tag.SKIP_BODY属性代码示例

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


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

示例1: doStartTag

@Override
   public int doStartTag() throws JspException {
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

String path = WebUtil.getBaseServerURL() + request.getContextPath();
if (!path.endsWith("/")) {
    path += "/";
}

try {
    JspWriter writer = pageContext.getOut();
    writer.print(path);
} catch (IOException e) {
    WebAppURLTag.log.error("ServerURLTag unable to write out server URL due to IOException. ", e);
    throw new JspException(e);
}
return Tag.SKIP_BODY;
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:WebAppURLTag.java

示例2: doStartTag

@Override
   public int doStartTag() throws JspException {
HttpSession ss = SessionManager.getSession();
if (ss != null) {
    UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
    if (user != null) {
	processProperty(user);
    } else {
	UserTag.log.warn("UserTag unable to access user details as userDTO is missing. Session is " + ss);
    }
} else {
    UserTag.log.warn("UserTag unable to access user details as shared session is missing");
}

return Tag.SKIP_BODY;
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:UserTag.java

示例3: doStartTag

public int doStartTag() throws JspException {
    boolean authorized = getPermissionChecker().isAuthorized(permission);

    if (!authorized) {
        return Tag.SKIP_BODY;
    }

    return Tag.EVAL_BODY_INCLUDE;
}
 
开发者ID:zhaojunfei,项目名称:lemon,代码行数:9,代码来源:PermissionTag.java

示例4: doStartTag

@Override
public int doStartTag() throws JspException
{
    UIComponentClassicTagBase componentTag = UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);

    if (componentTag == null)
    {
        throw new JspException("no parent UIComponentTag found");
    }

    if (!componentTag.getCreated())
    {
        return Tag.SKIP_BODY;
    }

    Validator validator = createValidator();

    UIComponent component = componentTag.getComponentInstance();
    if (component == null)
    {
        throw new JspException("parent UIComponentTag has no UIComponent");
    }

    if (!(component instanceof EditableValueHolder))
    {
        throw new JspException("UIComponent is no EditableValueHolder");
    }
    ((EditableValueHolder)component).addValidator(validator);

    return Tag.SKIP_BODY;
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:31,代码来源:TrinidadValidatorELTag.java

示例5: doEndTag

@Override
   public int doEndTag() throws JspException {

String serverURL = Configuration.get(ConfigurationKeys.SERVER_URL);
serverURL = serverURL == null ? null : serverURL.trim();

try {
    if (userId != null && userId.length() > 0) {
	String code = null;
	HashMap<String, String> cache = getPortraitCache();
	code = cache.get(userId);

	if (code == null) {
	    Integer userIdInt = Integer.decode(userId);
	    User user = (User) getUserManagementService().findById(User.class, userIdInt);
	    boolean isHover = (hover != null ? Boolean.valueOf(hover) : false);
	    if ( isHover ) {
		code = buildHoverUrl(user);
	    } else {
		code = buildDivUrl(user);
	    }
	    cache.put(userId, code);
	}

	JspWriter writer = pageContext.getOut();
	writer.print(code);
    }

} catch (NumberFormatException nfe) {
    PortraitTag.log.error("PortraitId unable to write out portrait details as userId is invalid. " + userId,
	    nfe);
} catch (IOException ioe) {
    PortraitTag.log.error(
	    "PortraitId unable to write out portrait details due to IOException. UserId is " + userId, ioe);
} catch (Exception e) {
    PortraitTag.log.error(
	    "PortraitId unable to write out portrait details due to an exception. UserId is " + userId, e);
}
return Tag.SKIP_BODY;
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:40,代码来源:PortraitTag.java

示例6: doStartTag

@Override
   public int doStartTag() throws JspException {

String serverURL = Configuration.get(ConfigurationKeys.SERVER_URL);
serverURL = serverURL == null ? null : serverURL.trim();

if (serverURL != null) {
    try {
	HttpSession session = ((HttpServletRequest) this.pageContext.getRequest()).getSession();
	String pageDirection = (String) session.getAttribute(LocaleFilter.DIRECTION); // RTL or LTR (default)
	boolean rtl = CssTag.RTL_DIR.equalsIgnoreCase(pageDirection);

	List<String> themeList = CSSThemeUtil.getAllUserThemes();
	String customStylesheetLink = null;
	for (String theme : themeList) {
	    if (theme != null) {
		theme = appendStyle(theme, rtl);
		customStylesheetLink = generateLink(theme, serverURL);
	    }

	    if (customStylesheetLink != null) {
		JspWriter writer = pageContext.getOut();
		writer.println(customStylesheetLink);
	    }
	}

    } catch (IOException e) {
	CssTag.log.error("CssTag unable to write out CSS details due to IOException.", e);
	// don't throw a JSPException as we want the system to still function.
    }
} else {
    CssTag.log.warn(
	    "CSSTag unable to write out CSS entries as the server url is missing from the configuration file.");
}

return Tag.SKIP_BODY;
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:37,代码来源:CssTag.java

示例7: doStartTag

@Override
public int doStartTag() throws JspException {
	try {
		pageContext.getOut().println("Hello World!");
	}
	catch (IOException ioe) {
		ioe.printStackTrace();
	}
	return Tag.SKIP_BODY;
}
 
开发者ID:biblelamp,项目名称:JavaEE,代码行数:10,代码来源:HelloWorldTag.java

示例8: doStartTag

@Override
public int doStartTag() {
	String ret = PathUtils.getParent(path);

	try {
		pageContext.getOut().write(ret);
	} catch (IOException e) {
		e.printStackTrace();
	}

	return Tag.SKIP_BODY;
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:12,代码来源:GetParentTag.java

示例9: doStartTag

@Override
public int doStartTag() {
	boolean ret = string.startsWith(prefix);

	try {
		pageContext.getOut().write(Boolean.toString(ret));
	} catch (IOException e) {
		e.printStackTrace();
	}

	return Tag.SKIP_BODY;
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:12,代码来源:StartsWithTag.java

示例10: doStartTag

@Override
public int doStartTag() {
	String ret = FormatUtil.escapeHtml(string);

	try {
		pageContext.getOut().write(ret);
	} catch (IOException e) {
		e.printStackTrace();
	}

	return Tag.SKIP_BODY;
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:12,代码来源:EscapeHtmlTag.java

示例11: doStartTag

@Override
public int doStartTag() {
	String ret = PathUtils.getName(path);

	try {
		pageContext.getOut().write(ret);
	} catch (IOException e) {
		e.printStackTrace();
	}

	return Tag.SKIP_BODY;
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:12,代码来源:GetNameTag.java

示例12: doStartTag

@Override
public int doStartTag() {
	String ret = FormatUtil.formatSize(size);

	try {
		pageContext.getOut().write(ret);
	} catch (IOException e) {
		e.printStackTrace();
	}

	return Tag.SKIP_BODY;
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:12,代码来源:FormatSizeTag.java

示例13: doStartTag

@Override
public int doStartTag() {
	String ret = FormatUtil.formatMiliSeconds(time);

	try {
		pageContext.getOut().write(ret);
	} catch (IOException e) {
		e.printStackTrace();
	}

	return Tag.SKIP_BODY;
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:12,代码来源:FormatMiliSecondsTag.java

示例14: doStartTag

public int doStartTag() {
    if (!isAccessible()) {
        return Tag.SKIP_BODY;
    } else {
        return Tag.EVAL_BODY_INCLUDE;
    }
}
 
开发者ID:ArneLimburg,项目名称:jpasecurity,代码行数:7,代码来源:AbstractSecurityTag.java

示例15: doStartTag

@Override
public int doStartTag() throws JspException {
	pageContext.setAttribute(id, new GreetingBean(), PageContext.PAGE_SCOPE);
    return Tag.SKIP_BODY;
  }
 
开发者ID:biblelamp,项目名称:JavaEE,代码行数:5,代码来源:GreetingTag.java


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