IsAdminTag.java :  » Wiki-Engine » VeryQuickWiki » vqwiki » tags » Java Open Source

Java Open Source » Wiki Engine » VeryQuickWiki 
VeryQuickWiki » vqwiki » tags » IsAdminTag.java
package vqwiki.tags;

import vqwiki.utils.Utilities;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

/**
 * @author garethc
 * Date: 7/03/2003
 */
public class IsAdminTag extends TagSupport {

    String var;

    /**
     *
     */
    public int doEndTag() throws JspException {
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        pageContext.setAttribute(var, new Boolean(Utilities.isAdmin(request)));
        return EVAL_PAGE;
    }

    /**
     *
     */
    public String getVar() {
        return var;
    }

    /**
     *
     */
    public void setVar(String var) {
        this.var = var;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.