org.springframework.web.util
Class TagUtils


public abstract class TagUtils

Utility class to transform Strings to scopes:
page will be transformed to javax.servlet.jsp.PageContext#PAGE_SCOPE request will be transformed to javax.servlet.jsp.PageContext#REQUEST_SCOPE
session will be transformed to javax.servlet.jsp.PageContext#SESSION_SCOPE
application will be transformed to javax.servlet.jsp.PageContext#APPLICATION_SCOPE

Author:
Alef Arendsen

Field Summary
 final static StringSCOPE_APPLICATION
          constant identifying the application scope String
 final static StringSCOPE_PAGE
          constant identifying the page scope String
 final static StringSCOPE_REQUEST
          constant identifying the request scope String
 final static StringSCOPE_SESSION
          constant identifying the session scope String

Method Summary
 static intgetScope(String scope)
          Determines the scope for a given input String.

Field Detail

SCOPE_APPLICATION

public final static String SCOPE_APPLICATION
constant identifying the application scope String

SCOPE_PAGE

public final static String SCOPE_PAGE
constant identifying the page scope String

SCOPE_REQUEST

public final static String SCOPE_REQUEST
constant identifying the request scope String

SCOPE_SESSION

public final static String SCOPE_SESSION
constant identifying the session scope String
Method Detail

getScope

public static int getScope(String scope)
Determines the scope for a given input String. If the string does not match 'request', 'session', 'page' or 'application', the method will return PageContext.PAGE_SCOPE.
Parameters:
scope - the string to inspect
Returns: the scope found, or PageContext.PAGE_SCOPE if no scope matched.
Throws:
java.lang.IllegalArgumentException - if the scope is null

Association Links

to Class java.lang.String

constant identifying the page scope String

to Class java.lang.String

constant identifying the request scope String

to Class java.lang.String

constant identifying the session scope String

to Class java.lang.String

constant identifying the application scope String