Java Doc for JspContext.java in  » Sevlet-Container » apache-tomcat-6.0.14 » javax » servlet » jsp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » javax.servlet.jsp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.servlet.jsp.JspContext

All known Subclasses:   javax.servlet.jsp.PageContext,
JspContext
abstract public class JspContext (Code)

JspContext serves as the base class for the PageContext class and abstracts all information that is not specific to servlets. This allows for Simple Tag Extensions to be used outside of the context of a request/response Servlet.

The JspContext provides a number of facilities to the page/component author and page implementor, including:

  • a single API to manage the various scoped namespaces
  • a mechanism to obtain the JspWriter for output
  • a mechanism to expose page directive attributes to the scripting environment

Methods Intended for Container Generated Code

The following methods enable the management of nested JspWriter streams to implement Tag Extensions: pushBody() and popBody()

Methods Intended for JSP authors

Some methods provide uniform access to the diverse objects representing scopes. The implementation must use the underlying machinery corresponding to that scope, so information can be passed back and forth between the underlying environment (e.g. Servlets) and JSP pages. The methods are: setAttribute(), getAttribute(), findAttribute(), removeAttribute(), getAttributesScope() and getAttributeNamesInScope().

The following methods provide convenient access to implicit objects: getOut()

The following methods provide programmatic access to the Expression Language evaluator: getExpressionEvaluator(), getVariableResolver()
since:
   2.0




Constructor Summary
public  JspContext()
     Sole constructor.

Method Summary
abstract public  ObjectfindAttribute(String name)
     Searches for the named attribute in page, request, session (if valid), and application scope(s) in order and returns the value associated or null.
abstract public  ObjectgetAttribute(String name)
     Returns the object associated with the name in the page scope or null if not found.
abstract public  ObjectgetAttribute(String name, int scope)
     Return the object associated with the name in the specified scope or null if not found.
abstract public  Enumeration<String>getAttributeNamesInScope(int scope)
     Enumerate all the attributes in a given scope.
abstract public  intgetAttributesScope(String name)
     Get the scope where a given attribute is defined.
abstract public  ELContextgetELContext()
    
abstract public  ExpressionEvaluatorgetExpressionEvaluator()
     Provides programmatic access to the ExpressionEvaluator.
abstract public  JspWritergetOut()
     The current value of the out object (a JspWriter).
abstract public  VariableResolvergetVariableResolver()
     Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object.
public  JspWriterpopBody()
     Return the previous JspWriter "out" saved by the matching pushBody(), and update the value of the "out" attribute in the page scope attribute namespace of the JspContext.
public  JspWriterpushBody(java.io.Writer writer)
     Return a new JspWriter object that sends output to the provided Writer.
abstract public  voidremoveAttribute(String name)
     Remove the object reference associated with the given name from all scopes.
abstract public  voidremoveAttribute(String name, int scope)
     Remove the object reference associated with the specified name in the given scope.
abstract public  voidsetAttribute(String name, Object value)
     Register the name and value specified with page scope semantics.
abstract public  voidsetAttribute(String name, Object value, int scope)
     Register the name and value specified with appropriate scope semantics.


Constructor Detail
JspContext
public JspContext()(Code)
Sole constructor. (For invocation by subclass constructors, typically implicit.)




Method Detail
findAttribute
abstract public Object findAttribute(String name)(Code)
Searches for the named attribute in page, request, session (if valid), and application scope(s) in order and returns the value associated or null.
Parameters:
  name - the name of the attribute to search for the value associated or null
throws:
  NullPointerException - if the name is null



getAttribute
abstract public Object getAttribute(String name)(Code)
Returns the object associated with the name in the page scope or null if not found.
Parameters:
  name - the name of the attribute to get the object associated with the name in the page scope or null if not found.
throws:
  NullPointerException - if the name is null



getAttribute
abstract public Object getAttribute(String name, int scope)(Code)
Return the object associated with the name in the specified scope or null if not found.
Parameters:
  name - the name of the attribute to set
Parameters:
  scope - the scope with which to associate the name/object the object associated with the name in the specifiedscope or null if not found.
throws:
  NullPointerException - if the name is null
throws:
  IllegalArgumentException - if the scope is invalid
throws:
  IllegalStateException - if the scope is PageContext.SESSION_SCOPE but the page that was requesteddoes not participate in a session or the session has beeninvalidated.



getAttributeNamesInScope
abstract public Enumeration<String> getAttributeNamesInScope(int scope)(Code)
Enumerate all the attributes in a given scope.
Parameters:
  scope - the scope to enumerate all the attributes for an enumeration of names (java.lang.String) of all the attributes the specified scope
throws:
  IllegalArgumentException - if the scope is invalid
throws:
  IllegalStateException - if the scope is PageContext.SESSION_SCOPE but the page that was requesteddoes not participate in a session or the session has beeninvalidated.



getAttributesScope
abstract public int getAttributesScope(String name)(Code)
Get the scope where a given attribute is defined.
Parameters:
  name - the name of the attribute to return the scope for the scope of the object associated with the name specified or 0
throws:
  NullPointerException - if the name is null



getELContext
abstract public ELContext getELContext()(Code)



getExpressionEvaluator
abstract public ExpressionEvaluator getExpressionEvaluator()(Code)
Provides programmatic access to the ExpressionEvaluator. The JSP Container must return a valid instance of an ExpressionEvaluator that can parse EL expressions. A valid instance of an ExpressionEvaluator.
since:
   2.0



getOut
abstract public JspWriter getOut()(Code)
The current value of the out object (a JspWriter). the current JspWriter stream being used for client response



getVariableResolver
abstract public VariableResolver getVariableResolver()(Code)
Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object. A valid instance of a VariableResolver.
since:
   2.0



popBody
public JspWriter popBody()(Code)
Return the previous JspWriter "out" saved by the matching pushBody(), and update the value of the "out" attribute in the page scope attribute namespace of the JspContext. the saved JspWriter.



pushBody
public JspWriter pushBody(java.io.Writer writer)(Code)
Return a new JspWriter object that sends output to the provided Writer. Saves the current "out" JspWriter, and updates the value of the "out" attribute in the page scope attribute namespace of the JspContext.

The returned JspWriter must implement all methods and behave as though it were unbuffered. More specifically:

  • clear() must throw an IOException
  • clearBuffer() does nothing
  • getBufferSize() always returns 0
  • getRemaining() always returns 0


Parameters:
  writer - The Writer for the returned JspWriter to sendoutput to. a new JspWriter that writes to the given Writer.
since:
   2.0



removeAttribute
abstract public void removeAttribute(String name)(Code)
Remove the object reference associated with the given name from all scopes. Does nothing if there is no such object.
Parameters:
  name - The name of the object to remove.
throws:
  NullPointerException - if the name is null



removeAttribute
abstract public void removeAttribute(String name, int scope)(Code)
Remove the object reference associated with the specified name in the given scope. Does nothing if there is no such object.
Parameters:
  name - The name of the object to remove.
Parameters:
  scope - The scope where to look.
throws:
  IllegalArgumentException - if the scope is invalid
throws:
  IllegalStateException - if the scope is PageContext.SESSION_SCOPE but the page that was requesteddoes not participate in a session or the session has beeninvalidated.
throws:
  NullPointerException - if the name is null



setAttribute
abstract public void setAttribute(String name, Object value)(Code)
Register the name and value specified with page scope semantics. If the value passed in is null, this has the same effect as calling removeAttribute( name, PageContext.PAGE_SCOPE ).
Parameters:
  name - the name of the attribute to set
Parameters:
  value - the value to associate with the name, or null if theattribute is to be removed from the page scope.
throws:
  NullPointerException - if the name is null



setAttribute
abstract public void setAttribute(String name, Object value, int scope)(Code)
Register the name and value specified with appropriate scope semantics. If the value passed in is null, this has the same effect as calling removeAttribute( name, scope ).
Parameters:
  name - the name of the attribute to set
Parameters:
  value - the object to associate with the name, or null ifthe attribute is to be removed from the specified scope.
Parameters:
  scope - the scope with which to associate the name/object
throws:
  NullPointerException - if the name is null
throws:
  IllegalArgumentException - if the scope is invalid
throws:
  IllegalStateException - if the scope is PageContext.SESSION_SCOPE but the page that was requesteddoes not participate in a session or the session has beeninvalidated.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.