本文整理汇总了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;
}
示例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;
}
示例3: doStartTag
public int doStartTag() throws JspException {
boolean authorized = getPermissionChecker().isAuthorized(permission);
if (!authorized) {
return Tag.SKIP_BODY;
}
return Tag.EVAL_BODY_INCLUDE;
}
示例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;
}
示例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;
}
示例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;
}
示例7: doStartTag
@Override
public int doStartTag() throws JspException {
try {
pageContext.getOut().println("Hello World!");
}
catch (IOException ioe) {
ioe.printStackTrace();
}
return Tag.SKIP_BODY;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例14: doStartTag
public int doStartTag() {
if (!isAccessible()) {
return Tag.SKIP_BODY;
} else {
return Tag.EVAL_BODY_INCLUDE;
}
}
示例15: doStartTag
@Override
public int doStartTag() throws JspException {
pageContext.setAttribute(id, new GreetingBean(), PageContext.PAGE_SCOPE);
return Tag.SKIP_BODY;
}