javax.servlet.jsp

Class PageContext

Known Direct Subclasses:
AbstractPageContextWrapper

public abstract class PageContext
extends JspContext

Field Summary

static String
APPLICATION
static int
APPLICATION_SCOPE
static String
CONFIG
static String
EXCEPTION
static String
OUT
static String
PAGE
static String
PAGECONTEXT
static int
PAGE_SCOPE
static String
REQUEST
static int
REQUEST_SCOPE
static String
RESPONSE
static String
SESSION
static int
SESSION_SCOPE

Method Summary

abstract void
forward(String relativeUrl)
Forwards the request relative to the current URL.
abstract Object
getAttribute(String name)
Gets the named page attribute.
abstract Enumeration<E>
getAttributeNames()
Return an enumeration of all the attribute names.
abstract ErrorData
getErrorData()
Returns an error data instance.
abstract Exception
getException()
Returns the exception for error pages.
abstract JspWriter
getOut()
Returns the current output for the page.
abstract Object
getPage()
Return the servlet object for the page.
abstract ServletRequest
getRequest()
Returns the ServletRequest for the page.
abstract ServletResponse
getResponse()
Returns the ServletResponse for the page.
abstract ServletConfig
getServletConfig()
Returns the servletConfig for the JSP page.
abstract ServletContext
getServletContext()
Returns the servletContext (application object) for the request.
abstract HttpSession
getSession()
Returns the request's session.
abstract void
handlePageException(Exception e)
Internal routine to support errorPages.
abstract void
handlePageException(Throwable t)
Internal routine to support errorPages
void
include(String relativeUrl)
Includes the a page relative to the current URL.
abstract void
include(String relativeUrl, boolean flush)
Includes the a page relative to the current URL.
abstract void
initialize(Servlet servlet, ServletRequest request, ServletResponse response, String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush)
Internal routine to initialize the PageContext for a page.
BodyContent
pushBody()
Internal routine to support BodyTags.
abstract void
release()
Internal routine to free PageContext resources at the end of a page.
abstract void
removeAttribute(String name)
Removes the named page attribute.
abstract void
setAttribute(String name, Object attribute)
Sets the named page attribute.

Methods inherited from class javax.servlet.jsp.JspContext

findAttribute, getAttribute, getAttribute, getAttributeNames, getAttributeNamesInScope, getAttributesScope, getELContext, getExpressionEvaluator, getOut, getVariableResolver, popBody, pushBody, removeAttribute, removeAttribute, setAttribute, setAttribute

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

APPLICATION

public static final String APPLICATION
Field Value:
"javax.servlet.jsp.jspApplication"

APPLICATION_SCOPE

public static final int APPLICATION_SCOPE
Field Value:
4
Usages and Demos :

View More Examples of PageContext.APPLICATION_SCOPE
   1:         String actual = (String) pageContext.getAttribute(var,
   2:             PageContext.APPLICATION_SCOPE);
   3:         assertEquals(expected, actual);
   4:     }
   5: }

View Full Code Here
   1:             conf = getInitParameter(name, 
   2:                                     PageContext.APPLICATION_SCOPE);
   3:         }
   4:         
   5:         try {

View Full Code Here
   1:         return pageContext.getAttribute( name,
   2:                 PageContext.APPLICATION_SCOPE );
   3:     }
   4: 
   5:     public String formatDate(java.util.Date date)

View Full Code Here
   1:             ((PageContext) pageContext).getAttributeNamesInScope(
   2:                 PageContext.APPLICATION_SCOPE);
   3:         while (e.hasMoreElements()) {
   4:             list.add(e.nextElement());
   5:         }

View Full Code Here
   1:         else if (scope.equals(SCOPE_APPLICATION)) {
   2:             return PageContext.APPLICATION_SCOPE;
   3:         }
   4:         else {
   5:             return PageContext.PAGE_SCOPE;

View Full Code Here

CONFIG

public static final String CONFIG
Field Value:
"javax.servlet.jsp.jspConfig"

EXCEPTION

public static final String EXCEPTION
Field Value:
"javax.servlet.jsp.jspException"

OUT

public static final String OUT
Field Value:
"javax.servlet.jsp.jspOut"

PAGE

public static final String PAGE
Field Value:
"javax.servlet.jsp.jspPage"
Usages and Demos :

View More Examples of PageContext.PAGE
   1:   private int scope = PageContext.PAGE_SCOPE;
   2:   private String sscope = PageContext.PAGE;
   3: }

View Full Code Here

PAGECONTEXT

public static final String PAGECONTEXT
Field Value:
"javax.servlet.jsp.jspPageContext"

PAGE_SCOPE

public static final int PAGE_SCOPE
Field Value:
1
Usages and Demos :

View More Examples of PageContext.PAGE_SCOPE
   1:                                  v, 
   2:                                  PageContext.PAGE_SCOPE);
   3:     }    
   4:     
   5:     protected void clearProperties()

View Full Code Here
   1:                                     new Boolean(b), 
   2:                                     PageContext.PAGE_SCOPE);
   3:         }
   4: 
   5:         if(b) {

View Full Code Here
   1:         {
   2:             PageContext.PAGE_SCOPE,
   3:             PageContext.REQUEST_SCOPE,
   4:             PageContext.SESSION_SCOPE };

View Full Code Here
   1:                                                    c), 
   2:                                  PageContext.PAGE_SCOPE);                                    
   3:     }    
   4:     
   5:     protected DbConnectionWrapper getDbConnectionWrapper()    

View Full Code Here
   1:         String conf = getInitParameter(name, 
   2:                                        PageContext.PAGE_SCOPE);
   3:         if(null == conf) {
   4:             conf = getInitParameter(name, 
   5:                                     PageContext.APPLICATION_SCOPE);

View Full Code Here

REQUEST

public static final String REQUEST
Field Value:
"javax.servlet.jsp.jspRequest"

REQUEST_SCOPE

public static final int REQUEST_SCOPE
Field Value:
2
Usages and Demos :

View More Examples of PageContext.REQUEST_SCOPE
   1:          (String)pageContext.getAttribute(nazev, 
   2:                              PageContext.REQUEST_SCOPE);
   3:       if(hodnota == null) {
   4:          hodnota = vchzi;
   5:       }

View Full Code Here
   1:             ContentNodeIterator.CURRENT_INDEX,
   2:             PageContext.REQUEST_SCOPE)).intValue();
   3:         return (currentIndex == 0) ? EVAL_BODY_INCLUDE : SKIP_BODY;
   4:     }

View Full Code Here
   1:     public int doStartTag() {
   2:         int size = ((Integer) pageContext.getAttribute(ContentNodeIterator.SIZE, PageContext.REQUEST_SCOPE)).intValue();
   3:         int currentIndex = ((Integer) pageContext.getAttribute(
   4:         ...
   5:             ContentNodeIterator.CURRENT_INDEX,
   6:             PageContext.REQUEST_SCOPE)).intValue();
   7:         if (currentIndex == (size - 1)) {
   8:             return EVAL_BODY_INCLUDE;
   9:         }

View Full Code Here
   1:             PageContext.PAGE_SCOPE,
   2:             PageContext.REQUEST_SCOPE,
   3:             PageContext.SESSION_SCOPE };
   4: 
   5:     protected Log logger = LogFactory.getLog(getClass());

View Full Code Here
   1:         Collection list = (Collection)pageContext.getAttribute( "searchresults",
   2:                                                                 PageContext.REQUEST_SCOPE );
   3:         if( list == null || list.size() == 0 )
   4:         {   
   5:             return EVAL_BODY_INCLUDE;

View Full Code Here

RESPONSE

public static final String RESPONSE
Field Value:
"javax.servlet.jsp.jspResponse"

SESSION

public static final String SESSION
Field Value:
"javax.servlet.jsp.jspSession"

SESSION_SCOPE

public static final int SESSION_SCOPE
Field Value:
3
Usages and Demos :

View More Examples of PageContext.SESSION_SCOPE
   1:             PageContext.REQUEST_SCOPE,
   2:             PageContext.SESSION_SCOPE };
   3: 
   4:         ...
   5:                 Globals.LOCALE_KEY,
   6:                 PageContext.SESSION_SCOPE);
   7:         if (locale == null) {
   8:             locale = Locale.getDefault();
   9:         }

View Full Code Here
   1:         return pageContext.getAttribute( name,
   2:                 PageContext.SESSION_SCOPE );
   3:     }
   4: 
   5:     public Object findAttributeInPage( String name )

View Full Code Here
   1:             ((PageContext) pageContext).getAttributeNamesInScope(
   2:                 PageContext.SESSION_SCOPE);
   3:         while (e.hasMoreElements()) {
   4:             list.add(e.nextElement());
   5:         }

View Full Code Here
   1:         else if (scope.equals(SCOPE_SESSION)) {
   2:             return PageContext.SESSION_SCOPE;
   3:         }
   4:         else if (scope.equals(SCOPE_APPLICATION)) {
   5:             return PageContext.APPLICATION_SCOPE;

View Full Code Here
   1:         } else if(scope.equalsIgnoreCase("session")) {
   2:             return PageContext.SESSION_SCOPE;
   3:         } else if(scope.equalsIgnoreCase("application")) {
   4:             return PageContext.APPLICATION_SCOPE;
   5:         }

View Full Code Here

Method Details

forward

public abstract void forward(String relativeUrl)
            throws ServletException,
                   IOException
Forwards the request relative to the current URL.
Usages and Demos :

View More Examples of forward(String relativeUrl)
   1: {
   2:    public static void handleValidationException(PageContext pageContext,
   3:       ValidationException theException) throws JspTagException
   4:         ...
   5:    {
   6:       pageContext.getRequest().setAttribute(
   7:          com.inetbasics.iap.core.jsp.FormErrorTag.ERROR_OBJECT_ATTRIBUTE, theException);
   8:         ...
   9:          {
  10:             pageContext.forward(request.getParameter("callingPage"));
  11:          }
  12:         ...
  13:          {
  14:             pageContext.forward("/");

View Full Code Here
   1: import javax.servlet.jsp.JspWriter;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.JspException;
   4:         ...
   5:     private String clearlist;
   6:     private PageContext context;
   7:     private Map dialogMap;
   8:         ...
   9:         
  10:     public void setContext(PageContext context) {
  11:         this.context = context;
  12:         ...
  13:         try {
  14:             context.forward(submit);

View Full Code Here
   1:         JspFactory _jspxFactory = null;
   2:         PageContext pageContext = null;
   3:         HttpSession session = null;
   4:         ...
   5:             response.setContentType("text/html;charset=8859_1");
   6:             pageContext = _jspxFactory.getPageContext(this, request, response,
   7:             "", true, 8192, true);
   8:         ...
   9:                     String _jspx_qfStr = "";
  10:                     pageContext.forward("id.xml" +  _jspx_qfStr);
  11:                     return;
  12:         ...
  13:                     String _jspx_qfStr = "";
  14:                     pageContext.forward("/servlet/com.valtech.bootcamp.carRental.web.cocoon.CocoonFromServlet" +  _jspx_qfStr);

View Full Code Here
   1:         JspFactory _jspxFactory = null;
   2:         PageContext pageContext = null;
   3:         HttpSession session = null;
   4:         ...
   5:             response.setContentType("text/html;charset=8859_1");
   6:             pageContext = _jspxFactory.getPageContext(this, request, response,
   7:             "", true, 8192, true);
   8:         ...
   9:                     String _jspx_qfStr = "";
  10:                     pageContext.forward("id.xml" +  _jspx_qfStr);
  11:                     return;
  12:         ...
  13:                     String _jspx_qfStr = "";
  14:                     pageContext.forward("/servlet/com.valtech.bootcamp.carRental.web.cocoon.CocoonFromServlet" +  _jspx_qfStr);

View Full Code Here
   1:         JspFactory _jspxFactory = null;
   2:         PageContext pageContext = null;
   3:         HttpSession session = null;
   4:         ...
   5:             response.setContentType("text/html;charset=8859_1");
   6:             pageContext = _jspxFactory.getPageContext(this, request, response,
   7:             "", true, 8192, true);
   8:         ...
   9:                     String _jspx_qfStr = "";
  10:                     pageContext.forward("id.xml" +  _jspx_qfStr);
  11:                     return;
  12:         ...
  13:                     String _jspx_qfStr = "";
  14:                     pageContext.forward("/servlet/com.valtech.bootcamp.carRental.web.cocoon.CocoonFromServlet" +  _jspx_qfStr);

View Full Code Here

getAttribute

public abstract Object getAttribute(String name)
Gets the named page attribute.
Overrides:
getAttribute in interface JspContext
Parameters:
name - of the attribute
Usages and Demos :

View More Examples of getAttribute(String name)
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.Tag;
   4:         ...
   5:     private int intSize                =     0;
   6:     private PageContext pageContext    =    null;
   7:     private Tag t    =    null;
   8:         ...
   9:             {
  10:                 Object objBean    =    pageContext.getAttribute(getName ());

View Full Code Here
   1: import javax.servlet.http.HttpServletRequest;
   2: import javax.servlet.jsp.PageContext;
   3: import java.io.IOException;
   4:         ...
   5: public class PageContextAttributeMap extends AbstractMap {
   6:   private PageContext _pageContext;
   7:   private int _scope;
   8:         ...
   9:     
  10:   public PageContextAttributeMap(PageContext pageContext, int scope)
  11:   {
  12:         ...
  13:   {
  14:     return _pageContext.getAttribute((String) key, _scope);

View Full Code Here
   1: import javax.servlet.http.HttpServletResponse;
   2: import javax.servlet.jsp.PageContext;
   3: 
   4:         ...
   5: 
   6:     private PageContext pageContext;
   7: 
   8:         ...
   9: 
  10:         PortletResponse portletResponse = (PortletResponse) pageContext.getAttribute(PORTLET_RESPONSE);

View Full Code Here
   1: import javax.servlet.http.HttpServletRequest;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.jstl.core.Config;
   4:         ...
   5: 
   6:     public String getResource(String resourceKey, String defaultValue, Tag tag, PageContext pageContext)
   7:     {
   8: 
   9:         String key = (resourceKey != null) ? resourceKey : defaultValue;

View Full Code Here
   1: import javax.servlet.jsp.JspContext;
   2: import javax.servlet.jsp.PageContext;
   3: import java.io.IOException;
   4:         ...
   5:   {
   6:     PageContext page = (PageContext) env.getContext(JspContext.class);
   7: 
   8:         ...
   9:     case ImplicitObjectExpr.APPLICATION_SCOPE:
  10:       return page.getServletContext().getAttribute(fieldString);
  11: 
  12:         ...
  13:     if (session != null) {
  14:       return session.getAttribute(fieldString);

View Full Code Here

getAttributeNames

public abstract Enumeration<E> getAttributeNames()
Return an enumeration of all the attribute names.
Overrides:
getAttributeNames in interface JspContext

getErrorData

public abstract ErrorData getErrorData()
Returns an error data instance.

getException

public abstract Exception getException()
Returns the exception for error pages.

getOut

public abstract JspWriter getOut()
Returns the current output for the page.
Overrides:
getOut in interface JspContext
Usages and Demos :

View More Examples of getOut()
   1: {
   2:     private PageContext pageContext;
   3:     private Tag parent;
   4:         ...
   5:         {
   6:             pageContext.getOut().write("Hello World Tag");
   7:         }
   8:         ...
   9:     public void release(){}
  10:     public void setPageContext(final javax.servlet.jsp.PageContext pageContext)
  11:     {

View Full Code Here
   1: {
   2:     private PageContext pageContext;
   3:     private Tag parent;
   4:         ...
   5:         {
   6:             pageContext.getOut().write("test2");
   7:         }
   8:         ...
   9:   
  10:     public void setPageContext(final javax.servlet.jsp.PageContext pageContext) 
  11:     {

View Full Code Here
   1: 
   2:   private PageContext pc = null; 
   3:   private Tag parent = null; 
   4:         ...
   5:       if (name != null) {
   6:         pc.getOut().write("Your name is " + name); 
   7:         pc.setAttribute("currentTry", new Integer(0)); 
   8:         ...
   9:       } else {
  10:         pc.getOut().write("You aren't using the tag correctly. 
  11:                You need to set the name attribute");
  12:         ...
  13: 
  14:   public void setPageContext(PageContext p) 

View Full Code Here
   1:       {
   2:          pageContext.getOut().print(
   3:         ...
   4:             getHostURLParameter(pageContext, fieldName, defaultValue));
   5:       }
   6:         ...
   7:    public static String getHostURLParameter(
   8:       javax.servlet.jsp.PageContext pageContext,
   9:       String parameterName, String defaultParameterValue)

View Full Code Here
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.JspFragment;
   4:         ...
   5: 
   6:   private PageContext _pageContext;
   7:                      
   8:         ...
   9:   public static StaticJspFragmentSupport create(StaticJspFragmentSupport frag,
  10:                         PageContext pageContext,
  11:                         String value)
  12:         ...
  13:       if (out == null)
  14:     _pageContext.getOut().write(_value);

View Full Code Here

getPage

public abstract Object getPage()
Return the servlet object for the page.

getRequest

public abstract ServletRequest getRequest()
Returns the ServletRequest for the page.
Usages and Demos :

View More Examples of getRequest()
   1: import javax.servlet.http.HttpServletResponse;
   2: import javax.servlet.jsp.PageContext;
   3: import java.util.List;
   4:         ...
   5:         stack.push(tag);
   6:         PageContext pageContext = (PageContext) stack.getContext().get(ServletActionContext.PAGE_CONTEXT);
   7:         List<Template> templates = template.getPossibleTemplates(this);
   8:         ...
   9:                 Include.include(getFinalTemplateName(t), pageContext.getOut(),
  10:                         pageContext.getRequest(), (HttpServletResponse) pageContext.getResponse());
  11:                 success = true;

View Full Code Here
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.BodyContent;
   4:         ...
   5: 
   6:       ELContext env = pageContext.getELContext();
   7: 
   8:         ...
   9:       if (value != null)
  10:     pageContext.setAttribute(var, value);
  11:       else
  12:         ...
  13:       if (value != null)
  14:     pageContext.getRequest().setAttribute(var, value);

View Full Code Here
   1: import javax.servlet.jsp.JspContext;
   2: import javax.servlet.jsp.PageContext;
   3: import java.io.IOException;
   4:         ...
   5:   {
   6:     PageContext page = (PageContext) env.getContext(JspContext.class);
   7: 
   8:         ...
   9:       {
  10:     return page.getRequest().getAttribute(fieldString);
  11:       }
  12:         ...
  13:     case ImplicitObjectExpr.PARAM:
  14:       return page.getRequest().getParameter(fieldString);

View Full Code Here
   1:        private Tag parent;
   2:     private PageContext pageContext;
   3:      
   4:         ...
   5:     public void setParent(Tag parent) { this.parent = parent; } 
   6:     public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; }
   7:     public Tag getParent() { return parent; }
   8:         ...
   9:         
  10:           String keyFieldName = pageContext.getRequest().getParameter("keyFieldName");
  11:         ...
  12:         String keyFieldValue =pageContext.getRequest().getParameter("keyFieldValue");

View Full Code Here
   1: import javax.servlet.http.HttpSession;
   2: import javax.servlet.jsp.PageContext;
   3: import org.apache.commons.jxpath.JXPathContext;
   4:         ...
   5:         JXPathIntrospector.registerDynamicClass(
   6:                 PageContext.class,
   7:                 PageContextHandler.class);
   8:         ...
   9: 
  10:     public static JXPathContext getPageContext(PageContext pageContext) {
  11:         JXPathContext context =
  12:         ...
  13:                 getRequestContext(
  14:                     pageContext.getRequest(),

View Full Code Here

getResponse

public abstract ServletResponse getResponse()
Returns the ServletResponse for the page.
Usages and Demos :

View More Examples of getResponse()
   1: import javax.servlet.ServletResponse;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.el.VariableResolver;
   4:         ...
   5: public class PageELContext implements ELContext {
   6:     private final PageContext _pc;
   7: 
   8:         ...
   9:     public PageELContext(PageContext pc) {
  10:         _pc = pc;
  11:         ...
  12:     public ServletResponse getResponse() {
  13:         return _pc.getResponse();

View Full Code Here
   1: import javax.servlet.jsp.JspTagException;
   2: import javax.servlet.jsp.PageContext;
   3: 
   4:         ...
   5:     
   6:     protected static Subject getSubject(PageContext pageContext) throws JspTagException {
   7:         HttpSession session = pageContext.getSession();
   8:         ...
   9:             try {
  10:                 HttpAuthenticationUtils.authenticate((HttpServletRequest)pageContext.getRequest(),(HttpServletResponse)pageContext.getResponse(),false,local);
  11:                 subject = ((HttpAuthenticationUtils)session.getAttribute(HttpConstants.AUTHN_UTILS)).getSubject();

View Full Code Here
   1: import javax.servlet.http.HttpServletResponse;
   2: import javax.servlet.jsp.PageContext;
   3: import java.util.List;
   4:         ...
   5:         stack.push(tag);
   6:         PageContext pageContext = (PageContext) stack.getContext().get(ServletActionContext.PAGE_CONTEXT);
   7:         List<Template> templates = template.getPossibleTemplates(this);
   8:         ...
   9:                 Include.include(getFinalTemplateName(t), pageContext.getOut(),
  10:                         pageContext.getRequest(), (HttpServletResponse) pageContext.getResponse());
  11:                 success = true;

View Full Code Here
   1: import org.mmbase.bridge.jsp.taglib.LocaleTag;
   2: import javax.servlet.jsp.PageContext;
   3: import org.mmbase.util.functions.*;
   4:         ...
   5: 
   6:     public void getEditorHTML(PageContext context) throws IOException {
   7: 
   8:         ...
   9:     }
  10:     protected String getValue(String param, Cloud cloud, String nodenr, PageContext context) {
  11:            Function urlFunction = patterns.getFunction(parameters.getString(param));
  12:         ...
  13:            urlParameters.setIfDefined(Parameter.REQUEST, context.getRequest());
  14:            urlParameters.setIfDefined(Parameter.RESPONSE, context.getResponse());

View Full Code Here
   1:   {
   2:     PageContext pageContext = this.pageContext;
   3: 
   4:         ...
   5:     ServletResponse response = pageContext.getResponse();
   6: 
   7:         ...
   8: 
   9:     pageContext.getResponse().setLocale(context.getViewRoot().getLocale());

View Full Code Here

getServletConfig

public abstract ServletConfig getServletConfig()
Returns the servletConfig for the JSP page.
Usages and Demos :

View More Examples of getServletConfig()
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.TagSupport;
   4:         ...
   5:     protected String getContextParam(final String name) {
   6:         String value = pageContext.getServletConfig().getInitParameter(name);
   7:         if (value == null) {
   8:         ...
   9:             value = pageContext.getServletContext().getInitParameter(name);
  10:         }
  11:         ...
  12: 
  13:     public void setPageContext(PageContext pageContext) {

View Full Code Here
   1: import javax.servlet.jsp.JspWriter;
   2: import javax.servlet.jsp.PageContext;
   3: 
   4:         ...
   5: 
   6:     public void init(PageContext pageContext) {
   7: 
   8:         ...
   9:         String webAppRfsPath = pageContext.getServletConfig().getServletContext().getRealPath("/");
  10: 
  11:         ...
  12: 
  13:         m_servletConfig = pageContext.getServletConfig();

View Full Code Here

getServletContext

public abstract ServletContext getServletContext()
Returns the servletContext (application object) for the request.
Usages and Demos :

View More Examples of getServletContext()
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.BodyContent;
   4:         ...
   5:   {
   6:     setValue(pageContext, _var, _scope, value);
   7:   }
   8:         ...
   9: 
  10:   public static void setValue(PageContext pageContext,
  11:                               String var, String scope, Object value)
  12:         ...
  13:       if (value != null)
  14:         pageContext.getServletContext().setAttribute(var, value);

View Full Code Here
   1:     try {
   2:         HttpServletRequest req=(HttpServletRequest)pageContext.
   3:         getRequest();
   4:         ...
   5:         }
   6:         pageContext.setAttribute("cm", cm);
   7:         Context ctx=null;
   8:         ...
   9:             found=true;
  10:             pageContext.setAttribute("ctx", ctx);
  11:             System.out.println("Found " + ctx );
  12:         ...
  13:     if( realRequest==null )
  14:         pageContext.getServletContext().log("Untrusted Application");

View Full Code Here
   1: import javax.servlet.http.HttpServletResponse;
   2: import javax.servlet.jsp.PageContext;
   3: 
   4:         ...
   5: 
   6:     public static ValueStack getStack(PageContext pageContext) {
   7:         HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
   8:         ...
   9:                     new SessionMap(req),
  10:                     new ApplicationMap(pageContext.getServletContext()),
  11:                     req,
  12:         ...
  13:                     res,
  14:                     pageContext.getServletContext());

View Full Code Here
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.BodyContent;
   4:         ...
   5: 
   6:       ELContext env = pageContext.getELContext();
   7: 
   8:         ...
   9:       if (value != null)
  10:     pageContext.setAttribute(var, value);
  11:       else
  12:         ...
  13:       if (value != null)
  14:     pageContext.getServletContext().setAttribute(var, value);

View Full Code Here
   1: import javax.servlet.http.HttpSession;
   2: import javax.servlet.jsp.PageContext;
   3: 
   4:         ...
   5: 
   6:     public String getUrl( PageContext pctx ) 
   7:     {
   8:         ...
   9:         {
  10:             pctx.getServletContext().log(
  11:                 "ERROR in menu creating URL",e);

View Full Code Here

getSession

public abstract HttpSession getSession()
Returns the request's session.
Usages and Demos :

View More Examples of getSession()
   1: 
   2:     public String handleRequest(PageContext pageContext, HttpServletRequest request) {
   3:         ...
   4:         pageContext.getSession().invalidate();
   5:         return RequestController.LOGIN_PAGE;
   6:     }

View Full Code Here
   1: 
   2:     public String handleRequest(PageContext pageContext, HttpServletRequest request) {
   3:         ...
   4:         pageContext.getSession().invalidate();
   5:         return LOGOUT_PAGE;
   6:     }

View Full Code Here
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.BodyContent;
   4:         ...
   5:   {
   6:     setValue(pageContext, _var, _scope, value);
   7:   }
   8:         ...
   9: 
  10:   public static void setValue(PageContext pageContext,
  11:                               String var, String scope, Object value)
  12:         ...
  13:       if (value != null)
  14:         pageContext.getSession().setAttribute(var, value);

View Full Code Here
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.BodyContent;
   4:         ...
   5: 
   6:       ELContext env = pageContext.getELContext();
   7: 
   8:         ...
   9:       if (value != null)
  10:     pageContext.setAttribute(var, value);
  11:       else
  12:         ...
  13:       if (value != null)
  14:     pageContext.getSession().setAttribute(var, value);

View Full Code Here
   1: import javax.servlet.jsp.JspWriter;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.JspException;
   4:         ...
   5:     private String clearlist;
   6:     private PageContext context;
   7:     private Map dialogMap;
   8:         ...
   9:         
  10:     public void setContext(PageContext context) {
  11:         this.context = context;
  12:         ...
  13:         if (!RDCUtils.isStringEmpty(namelist)) {
  14:             Map viewsMap = (Map) context.getSession().

View Full Code Here

handlePageException

public abstract void handlePageException(Exception e)
            throws ServletException,
                   IOException
Internal routine to support errorPages. Kept for backward compatibility.
Usages and Demos :

View More Examples of handlePageException(Exception e)
   1:         JspFactory factory = JspFactory.getDefaultFactory();
   2:         PageContext pageContext = factory.getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
   3:         ...
   4:         HttpSession session = pageContext.getSession();
   5:         if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
   6:         ...
   7:             }
   8:             pageContext.handlePageException( e);
   9:         }

View Full Code Here
   1:         JspFactory _jspxFactory = null;
   2:         PageContext pageContext = null;
   3:         HttpSession session = null;
   4:         ...
   5:             response.setContentType("text/html;charset=8859_1");
   6:             pageContext = _jspxFactory.getPageContext(this, request, response,
   7:             "", true, 8192, true);
   8:         ...
   9:                 out.clearBuffer();
  10:             pageContext.handlePageException(ex);
  11:         } finally {

View Full Code Here
   1:     response.setContentType( "text/html;charset=windows-1252");
   2:     PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
   3:         ...
   4:     HttpSession session = pageContext.getSession();
   5:     if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
   6:         ...
   7:       }
   8:       pageContext.handlePageException( e);
   9:     }

View Full Code Here
   1:         JspFactory factory = JspFactory.getDefaultFactory();
   2:         PageContext pageContext = factory.getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
   3:         ...
   4:         HttpSession session = pageContext.getSession();
   5:         if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
   6:         ...
   7:             }
   8:             pageContext.handlePageException( e);
   9:         }

View Full Code Here
   1:         JspFactory factory = JspFactory.getDefaultFactory();
   2:         PageContext pageContext = factory.getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
   3:         ...
   4:         HttpSession session = pageContext.getSession();
   5:         if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
   6:         ...
   7:             }
   8:             pageContext.handlePageException( e);
   9:         }

View Full Code Here

handlePageException

public abstract void handlePageException(Throwable t)
            throws ServletException,
                   IOException
Internal routine to support errorPages
Usages and Demos :

View More Examples of handlePageException(Throwable t)
   1:         JspFactory factory = JspFactory.getDefaultFactory();
   2:         PageContext pageContext = factory.getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
   3:         ...
   4:         HttpSession session = pageContext.getSession();
   5:         if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
   6:         ...
   7:             }
   8:             pageContext.handlePageException( e);
   9:         }

View Full Code Here
   1:         JspFactory _jspxFactory = null;
   2:         PageContext pageContext = null;
   3:         HttpSession session = null;
   4:         ...
   5:             response.setContentType("text/html;charset=8859_1");
   6:             pageContext = _jspxFactory.getPageContext(this, request, response,
   7:             "", true, 8192, true);
   8:         ...
   9:                 out.clearBuffer();
  10:             pageContext.handlePageException(ex);
  11:         } finally {

View Full Code Here
   1:     response.setContentType( "text/html;charset=windows-1252");
   2:     PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
   3:         ...
   4:     HttpSession session = pageContext.getSession();
   5:     if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
   6:         ...
   7:       }
   8:       pageContext.handlePageException( e);
   9:     }

View Full Code Here
   1:         JspFactory factory = JspFactory.getDefaultFactory();
   2:         PageContext pageContext = factory.getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
   3:         ...
   4:         HttpSession session = pageContext.getSession();
   5:         if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
   6:         ...
   7:             }
   8:             pageContext.handlePageException( e);
   9:         }

View Full Code Here
   1:         JspFactory factory = JspFactory.getDefaultFactory();
   2:         PageContext pageContext = factory.getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
   3:         ...
   4:         HttpSession session = pageContext.getSession();
   5:         if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
   6:         ...
   7:             }
   8:             pageContext.handlePageException( e);
   9:         }

View Full Code Here

include

public void include(String relativeUrl)
            throws ServletException,
                   IOException
Includes the a page relative to the current URL.
Usages and Demos :

View More Examples of include(String relativeUrl)
   1: import javax.servlet.jsp.JspWriter;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.JspException;
   4:         ...
   5:     RDCTemplate template;
   6:     PageContext context;
   7: 
   8:         ...
   9:     
  10:     public void setContext(PageContext context) {
  11:         this.context = context;
  12:         ...
  13:             context.getRequest().setAttribute("constants",new Constants());
  14:             context.include(template.getFsmFragment());

View Full Code Here
   1: import javax.servlet.jsp.JspTagException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.SimpleTagSupport;
   4:         ...
   5:         boolean directInclude = false;
   6:         PageContext context = (PageContext) getJspContext();
   7: 
   8:         ...
   9:                 if ((parameter != null) && (parameter.getValue() != null)) {
  10:                     context.include(parameter.getValue());
  11:                 }

View Full Code Here
   1: import javax.servlet.http.HttpServletResponse;
   2: import javax.servlet.jsp.PageContext;
   3: 
   4:         ...
   5: 
   6:         PageContext pageContext = ServletActionContext.getPageContext();
   7: 
   8:         ...
   9:         if (pageContext != null) {
  10:             pageContext.include(finalLocation);
  11:         } else {

View Full Code Here

include

public abstract void include(String relativeUrl,
                             boolean flush)
            throws ServletException,
                   IOException
Includes the a page relative to the current URL.

initialize

public abstract void initialize(Servlet servlet,
                                ServletRequest request,
                                ServletResponse response,
                                String errorPageURL,
                                boolean needsSession,
                                int bufferSize,
                                boolean autoFlush)
            throws IOException,
                   IllegalStateException,
                   IllegalArgumentException
Internal routine to initialize the PageContext for a page.

pushBody

public BodyContent pushBody()
Internal routine to support BodyTags. Pushes the new bodyContent to become the value of getOut().
Usages and Demos :

View More Examples of pushBody()
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.BodyContent;
   4:         ...
   5:             Assert.assertEquals(expectedValues[theIteration],
   6:                 pageContext.getAttribute(name, scope));
   7:         }
   8:         ...
   9:             {
  10:                 pageContext.getOut().print(text);
  11:             }
  12:         ...
  13:                         BodyTag bodyTag = (BodyTag) this.tag;
  14:                         body = pageContext.pushBody();

View Full Code Here

release

public abstract void release()
Internal routine to free PageContext resources at the end of a page.
Usages and Demos :

View More Examples of release()
   1: 
   2:   public PageContext getPageContext(Servlet         servlet,
   3:                     ServletRequest  request,
   4:         ...
   5:     
   6:   public void releasePageContext (PageContext pc) 
   7:   {
   8:         ...
   9:     pc.release();
  10:   }

View Full Code Here
   1: import javax.servlet.jsp.JspFactory;
   2: import javax.servlet.jsp.PageContext;
   3: 
   4:         ...
   5: 
   6:   public PageContext getPageContext(Servlet servlet,
   7:                     ServletRequest request,
   8:         ...
   9: 
  10:   public void releasePageContext(PageContext pc)
  11:   {
  12:         ...
  13:     if (pc != null) {
  14:       pc.release();

View Full Code Here

removeAttribute

public abstract void removeAttribute(String name)
Removes the named page attribute.
Overrides:
removeAttribute in interface JspContext
Usages and Demos :

View More Examples of removeAttribute(String name)
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.BodyContent;
   4:         ...
   5:   {
   6:     setValue(pageContext, _var, _scope, value);
   7:   }
   8:         ...
   9: 
  10:   public static void setValue(PageContext pageContext,
  11:                               String var, String scope, Object value)
  12:         ...
  13:       else
  14:         pageContext.removeAttribute(var);

View Full Code Here
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.BodyContent;
   4:         ...
   5: 
   6:       ELContext env = pageContext.getELContext();
   7: 
   8:         ...
   9:       if (value != null)
  10:     pageContext.setAttribute(var, value);
  11:       else
  12:         ...
  13:     pageContext.removeAttribute(var);

View Full Code Here
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: import javax.servlet.jsp.tagext.Tag;
   4:         ...
   5:     
   6:     public static void setVarInPageContext(PageContext ctxt,PageBean pageBean,String varName,Object var){
   7:         if(var == null)
   8:         ...
   9:         if(var == null)
  10:             ctxt.removeAttribute(varName);
  11:         else
  12:         ...
  13:             throw new JspException("No pageBean found for uri: "+uri);                
  14:         this.pageContext.setAttribute(PAGE_BEAN_VAR, pageBean);

View Full Code Here
   1: 
   2: import javax.servlet.jsp.PageContext;
   3: import java.util.*;
   4:         ...
   5:     private static int uniqueNumbers = 0;
   6:     private static final int SCOPE = PageContext.PAGE_SCOPE;
   7: 
   8:         ...
   9:     private final boolean isELIgnored;
  10:     private  PageContext pageContext;
  11: 
  12:         ...
  13:                                     }
  14:                                     pageContext.removeAttribute(key);

View Full Code Here

setAttribute

public abstract void setAttribute(String name,
                                  Object attribute)
Sets the named page attribute.
Overrides:
setAttribute in interface JspContext
Parameters:
name - name of the attribute
attribute - non-null attribute value.
Usages and Demos :

View More Examples of setAttribute(String name,Object attribute)
   1: import javax.servlet.jsp.JspException;
   2: import javax.servlet.jsp.PageContext;
   3: 
   4:         ...
   5:     public void testEvaluate() throws Exception {
   6:         PageContext ctx = new MockPageContext();
   7:         
   8:         ...
   9:         ctx.setAttribute("bla", "blie");
  10:         String expr = "${bla}";
  11:         ...
  12:     public void testEvaluateString() throws Exception {
  13:         PageContext ctx = new MockPageContext();

View Full Code Here
   1:     try {
   2:         HttpServletRequest req=(HttpServletRequest)pageContext.
   3:         getRequest();
   4:         ...
   5: 
   6:         cm=(ContextManager)pageContext.getAttribute("cm");
   7:         if( cm==null )
   8:         ...
   9:             if( ctxPath.equals( ctx.getPath())) {
  10:             pageContext.setAttribute("ctx", ctx);
  11:             break;

View Full Code Here
   1:     try {
   2:         HttpServletRequest req=(HttpServletRequest)pageContext.
   3:         getRequest();
   4:         ...
   5:         }
   6:         pageContext.setAttribute("cm", cm);
   7:         Context ctx=null;
   8:         ...
   9:             found=true;
  10:             pageContext.setAttribute("ctx", ctx);
  11:             System.out.println("Found " + ctx );
  12:         ...
  13:     if( realRequest==null )
  14:         pageContext.getServletContext().log("Untrusted Application");

View Full Code Here
   1:     private Tag parent;
   2:     private PageContext pageContext;
   3:    
   4:         ...
   5:     public void setParent(Tag parent) { this.parent = parent; } 
   6:     public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; }
   7:     public Tag getParent() { return parent; }
   8:         ...
   9:             connection = DriverManager.getConnection(url, user, password);
  10:             pageContext.setAttribute("connection", connection);
  11:             return EVAL_BODY_TAG;

View Full Code Here
   1:     private Tag parent;
   2:     private PageContext pageContext;
   3:     private PreparedStatement ps;
   4:         ...
   5:     public void setParent(Tag parent) { this.parent = parent; } 
   6:     public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; }
   7:     public Tag getParent() { return parent; }
   8:         ...
   9:                 more =true;
  10:                 pageContext.setAttribute("dataReturned", Boolean.TRUE);
  11:             }
  12:         ...
  13:             else
  14:                 pageContext.setAttribute("dataReturned", Boolean.FALSE);

View Full Code Here