Example usage for javax.servlet.jsp PageContext REQUEST_SCOPE

List of usage examples for javax.servlet.jsp PageContext REQUEST_SCOPE

Introduction

In this page you can find the example usage for javax.servlet.jsp PageContext REQUEST_SCOPE.

Prototype

int REQUEST_SCOPE

To view the source code for javax.servlet.jsp PageContext REQUEST_SCOPE.

Click Source Link

Document

Request scope: the named reference remains available from the ServletRequest associated with the Servlet until the current request is completed.

Usage

From source file:org.apache.struts.taglib.bean.TestMessageTag_fr.java

public void testMessageTagNoArgNamePropertyNoScopeAlternateBundle_fr() {
    pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message"),
            PageContext.REQUEST_SCOPE);
    runMyTest("testMessageTagNoArgNamePropertyNoScopeAlternateBundle", new Locale("fr", "fr"));
}

From source file:org.apache.struts.taglib.bean.TestMessageTag_fr.java

public void testMessageTagNoArgNamePropertyRequestScopeAlternateBundle_fr() {
    pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message"),
            PageContext.REQUEST_SCOPE);
    runMyTest("testMessageTagNoArgNamePropertyRequestScopeAlternateBundle", new Locale("fr", "fr"));
}

From source file:org.apache.struts.taglib.bean.TestPageTag.java

public void testPageTagRequest() {
    pageContext.setAttribute(PAGETAG_KEY, PAGETAG_VAL, PageContext.REQUEST_SCOPE);
    runMyTest("testPageTagRequest");
}

From source file:org.apache.struts.taglib.bean.TestSizeTag.java

public void testSizeTagNameArrayRequestScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNameArrayRequestScope");
    pageContext.setAttribute(REQUEST_KEY, strings, PageContext.REQUEST_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

From source file:org.apache.struts.taglib.bean.TestSizeTag.java

public void testSizeTagNamePropertyArrayRequestScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyArrayRequestScope");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    sbft.setArray(strings);/*from ww w. ja va 2  s .c  o  m*/
    pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.REQUEST_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

From source file:org.apache.struts.taglib.bean.TestSizeTag.java

public void testSizeTagNamePropertyArrayRequestScopeNested() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyArrayRequestScopeNested");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    SimpleBeanForTesting sbft2 = new SimpleBeanForTesting();
    sbft.setArray(strings);//from  ww w .  ja  va2 s  . c om
    sbft2.setNestedObject(sbft);
    pageContext.setAttribute(REQUEST_KEY, sbft2, PageContext.REQUEST_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

From source file:org.apache.struts.taglib.bean.TestSizeTag.java

public void testSizeTagNameCollectionRequestScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNameCollectionRequestScope");
    pageContext.setAttribute(REQUEST_KEY, collection, PageContext.REQUEST_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

From source file:org.apache.struts.taglib.bean.TestSizeTag.java

public void testSizeTagNamePropertyCollectionRequestScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyCollectionRequestScope");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    sbft.setCollection(collection);//from   w  ww .  j ava 2s  .  c o m
    pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.REQUEST_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

From source file:org.apache.struts.taglib.bean.TestSizeTag.java

public void testSizeTagNamePropertyCollectionRequestScopeNested() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyCollectionRequestScopeNested");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    SimpleBeanForTesting sbft2 = new SimpleBeanForTesting();
    sbft.setCollection(collection);/*from   w  w w  . j  a v  a2 s  . c  o m*/
    sbft2.setNestedObject(sbft);
    pageContext.setAttribute(REQUEST_KEY, sbft2, PageContext.REQUEST_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

From source file:org.apache.struts.taglib.bean.TestSizeTag.java

public void testSizeTagNameMapRequestScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNameMapRequestScope");
    pageContext.setAttribute(REQUEST_KEY, map, PageContext.REQUEST_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}