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.TestSizeTag.java

public void testSizeTagNamePropertyMapRequestScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyMapRequestScope");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    sbft.setMap(map);/*  w  ww . ja v a 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 testSizeTagNamePropertyMapRequestScopeNested() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyMapRequestScopeNested");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    SimpleBeanForTesting sbft2 = new SimpleBeanForTesting();
    sbft.setMap(map);//  w  ww .  j  a va  2s  . 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.TestWriteTag.java

public void testWriteTagName() {
    pageContext.setAttribute(REQUEST_KEY, TEST_STRING_VAL, PageContext.REQUEST_SCOPE);
    runMyTest("testWriteTagName", "");
}

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

public void testWriteTagNameProperty() {
    SimpleBeanForTesting sbft = new SimpleBeanForTesting(TEST_STRING_VAL);
    pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.REQUEST_SCOPE);
    runMyTest("testWriteTagNameProperty", "");
}

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

public void testWriteTagNameFormat() {
    pageContext.setAttribute(REQUEST_KEY, TEST_INTEGER_VAL, PageContext.REQUEST_SCOPE);
    runMyTest("testWriteTagNameFormat", "");
}

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

public void testWriteTagNameFormatKeyDefaultBundle() {
    pageContext.setAttribute(REQUEST_KEY, TEST_INTEGER_VAL, PageContext.REQUEST_SCOPE);
    runMyTest("testWriteTagNameFormatKeyDefaultBundle", "");
}

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

public void testWriteTagNameFormatKeyAlternateBundle() {
    pageContext.setAttribute(REQUEST_KEY, TEST_INTEGER_VAL, PageContext.REQUEST_SCOPE);
    runMyTest("testWriteTagNameFormatKeyAlternateBundle", "");
}

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

public void testWriteTagNameFormatKeyDefaultBundleDouble() {
    pageContext.setAttribute(REQUEST_KEY, TEST_DOUBLE_VAL, PageContext.REQUEST_SCOPE);
    runMyTest("testWriteTagNameFormatKeyDefaultBundleDouble", "");
}

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

public void testWriteTagNameFormatKeyAlternateBundleDouble() {
    pageContext.setAttribute(REQUEST_KEY, TEST_DOUBLE_VAL, PageContext.REQUEST_SCOPE);
    runMyTest("testWriteTagNameFormatKeyAlternateBundleDouble", "");
}

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

public void testWriteTagNameFormatKeyDefaultBundle_fr() {
    pageContext.setAttribute(REQUEST_KEY, TEST_DOUBLE_VAL, PageContext.REQUEST_SCOPE);
    runMyTest("testWriteTagNameFormatKeyDefaultBundle", "fr");
}