當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。