// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   WcBaseTag.java

package com.ptc.windchill.enterprise.doc.tags;

import com.ptc.netmarkets.util.beans.NmContextBean;
import com.ptc.netmarkets.util.beans.NmLinkBean;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import wt.httpgw.WTContextBean;

public class WcBaseTag extends SimpleTagSupport
{

    public WcBaseTag()
    {
    }

    public void doTag()
        throws JspException
    {
        try
        {
            PageContext pagecontext = (PageContext)getJspContext();
            out = pagecontext.getOut();
            request = (HttpServletRequest)pagecontext.getRequest();
            response = (HttpServletResponse)pagecontext.getResponse();
            wtcontext = new WTContextBean();
            wtcontext.setRequest(request);
            request.setAttribute("wtcontext", wtcontext);
            linkBean = new NmLinkBean();
            nmcontext = new NmContextBean();
            if(request.getParameter("portlet") != null)
                nmcontext.setPortlet(request.getParameter("portlet"));
            nmcontext.setRequest(request);
            nmcontext.setResponse(response);
            nmcontext.adjustContext(request);
        }
        catch(Exception exception)
        {
            throw new JspException(exception);
        }
    }

    protected HttpServletRequest request;
    protected HttpServletResponse response;
    protected JspWriter out;
    protected NmContextBean nmcontext;
    protected NmLinkBean linkBean;
    protected WTContextBean wtcontext;
}
