Example usage for javax.servlet.jsp PageContext SESSION_SCOPE

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

Introduction

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

Prototype

int SESSION_SCOPE

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

Click Source Link

Document

Session scope (only valid if this page participates in a session): the named reference remains available from the HttpSession (if any) associated with the Servlet until the HttpSession is invalidated.

Usage

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

public void testMessageTagNoArgNamePropertySessionScopeDefaultBundle_fr() {
    pageContext.setAttribute("key", new SimpleBeanForTesting("default.bundle.message"),
            PageContext.SESSION_SCOPE);
    runMyTest("testMessageTagNoArgNamePropertySessionScopeDefaultBundle", new Locale("fr", "fr"));
}

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

public void testMessageTagNoArgNamePropertySessionScopeAlternateBundle_fr() {
    pageContext.setAttribute("key", new SimpleBeanForTesting("alternate.bundle.message"),
            PageContext.SESSION_SCOPE);
    runMyTest("testMessageTagNoArgNamePropertySessionScopeAlternateBundle", new Locale("fr", "fr"));
}

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

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

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

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

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

public void testSizeTagNamePropertyArraySessionScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyArraySessionScope");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    sbft.setArray(strings);//w w  w .  java2 s .c  o m
    pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.SESSION_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

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

public void testSizeTagNamePropertyArraySessionScopeNested() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyArraySessionScopeNested");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    SimpleBeanForTesting sbft2 = new SimpleBeanForTesting();
    sbft.setArray(strings);//from   w  ww  .java2s . c  o m
    sbft2.setNestedObject(sbft);
    pageContext.setAttribute(REQUEST_KEY, sbft2, PageContext.SESSION_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

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

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

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

public void testSizeTagNamePropertyCollectionSessionScope() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyCollectionSessionScope");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    sbft.setCollection(collection);/*  w w w . ja v  a2 s  .  c om*/
    pageContext.setAttribute(REQUEST_KEY, sbft, PageContext.SESSION_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

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

public void testSizeTagNamePropertyCollectionSessionScopeNested() throws IOException, ServletException {
    request.setAttribute("runTest", "testSizeTagNamePropertyCollectionSessionScopeNested");
    SimpleBeanForTesting sbft = new SimpleBeanForTesting();
    SimpleBeanForTesting sbft2 = new SimpleBeanForTesting();
    sbft.setCollection(collection);/*  w w  w .  j av  a 2s  .  co  m*/
    sbft2.setNestedObject(sbft);
    pageContext.setAttribute(REQUEST_KEY, sbft2, PageContext.SESSION_SCOPE);
    pageContext.forward("/test/org/apache/struts/taglib/bean/TestSizeTag.jsp");
}

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

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