Example usage for javax.servlet.jsp PageContext APPLICATION_SCOPE

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

Introduction

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

Prototype

int APPLICATION_SCOPE

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

Click Source Link

Document

Application scope: named reference remains available in the ServletContext until it is reclaimed.

Usage

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

public void testMessageTag4ArgNamePropertyApplicationScopeAlternateBundle() {
    pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.4"),
            PageContext.APPLICATION_SCOPE);
    runMyTest("testMessageTag4ArgNamePropertyApplicationScopeAlternateBundle", new Locale("", ""));
}

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

public void testMessageTag4ArgNamePropertyApplicationScopeDefaultBundle_fr() {
    pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message.4"),
            PageContext.APPLICATION_SCOPE);
    runMyTest("testMessageTag4ArgNamePropertyApplicationScopeDefaultBundle", new Locale("fr", "fr"));
}

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

public void testMessageTag4ArgNamePropertyApplicationScopeAlternateBundle_fr() {
    pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message.4"),
            PageContext.APPLICATION_SCOPE);
    runMyTest("testMessageTag4ArgNamePropertyApplicationScopeAlternateBundle", new Locale("fr", "fr"));
}

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

public void testMessageTagNoArgNamePropertyApplicationScopeDefaultBundle_fr() {
    pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message"),
            PageContext.APPLICATION_SCOPE);
    runMyTest("testMessageTagNoArgNamePropertyApplicationScopeDefaultBundle", new Locale("fr", "fr"));
}

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

public void testMessageTagNoArgNamePropertyApplicationScopeAlternateBundle_fr() {
    pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message"),
            PageContext.APPLICATION_SCOPE);
    runMyTest("testMessageTagNoArgNamePropertyApplicationScopeAlternateBundle", new Locale("fr", "fr"));
}

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

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

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

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

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

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

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

public void testSizeTagNamePropertyArrayNoScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyArrayNoScope");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    sbft.setArray(strings);//from   www  .java 2  s  .  com
    pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.APPLICATION_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

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

public void testSizeTagNamePropertyArrayApplicationScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyArrayApplicationScope");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    sbft.setArray(strings);//from www  . j a va  2  s. c om
    pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.APPLICATION_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}