Java Doc for MockPageContext.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » mock » 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 » Web Framework » struts 1.3.8 » org.apache.struts.mock 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.servlet.jsp.PageContext
   org.apache.struts.mock.MockPageContext

MockPageContext
public class MockPageContext extends PageContext (Code)

Mock ServletContext object for low-level unit tests of Struts controller components. Coarser grained tests should be implemented in terms of the Cactus framework, instead of the mock object classes.

WARNING - Only the minimal set of methods needed to create unit tests is provided, plus additional methods to configure this object as necessary. Methods for unsupported operations will throw UnsupportedOperationException.

WARNING - Because unit tests operate in a single threaded environment, no synchronization is performed.


version:
   $Rev: 471754 $ $Date: 2005-05-07 12:45:39 -0400 (Sat, 07 May 2005)
version:
   $


Field Summary
protected  ServletContextapplication
    
protected  HashMapattributes
    
protected  ServletConfigconfig
    
protected  ServletRequestrequest
    
protected  ServletResponseresponse
    
protected  HttpSessionsession
    

Constructor Summary
public  MockPageContext()
    
public  MockPageContext(ServletConfig config, ServletRequest request, ServletResponse response)
    
public  MockPageContext(boolean throwIOException, boolean returnBody)
    

Construct a new PageContext impl.


Method Summary
public  ObjectfindAttribute(String name)
    
public  voidforward(String path)
    
public  ObjectgetAttribute(String name)
    
public  ObjectgetAttribute(String name, int scope)
    
public  EnumerationgetAttributeNamesInScope(int scope)
    
public  intgetAttributesScope(String name)
    
public  ExceptiongetException()
    
public  JspWritergetOut()
    

Custom JspWriter that throws the specified exception (supplied on the constructor...if any), else it simply returns.

public  ObjectgetPage()
    
public  ServletRequestgetRequest()
    
public  ServletResponsegetResponse()
    
public  ServletConfiggetServletConfig()
    
public  ServletContextgetServletContext()
    
public  HttpSessiongetSession()
    
public  voidhandlePageException(Exception e)
    
public  voidhandlePageException(Throwable t)
    
public  voidinclude(String path)
    
public  voidinitialize(Servlet servlet, ServletRequest request, ServletResponse response, String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush)
    
public  JspWriterpopBody()
    
public  BodyContentpushBody()
    
public  voidrelease()
    
public  voidremoveAttribute(String name)
    
public  voidremoveAttribute(String name, int scope)
    
public  voidsetAttribute(String name, Object value)
    
public  voidsetAttribute(String name, Object value, int scope)
    
public  voidsetValues(ServletConfig config, ServletRequest request, ServletResponse response)
    

Field Detail
application
protected ServletContext application(Code)



attributes
protected HashMap attributes(Code)



config
protected ServletConfig config(Code)



request
protected ServletRequest request(Code)



response
protected ServletResponse response(Code)



session
protected HttpSession session(Code)




Constructor Detail
MockPageContext
public MockPageContext()(Code)



MockPageContext
public MockPageContext(ServletConfig config, ServletRequest request, ServletResponse response)(Code)



MockPageContext
public MockPageContext(boolean throwIOException, boolean returnBody)(Code)

Construct a new PageContext impl.


Parameters:
  throwIOException - Determines if the returned JspWriter shouldthrow an IOException on any method call.
Parameters:
  returnBody - Determines if getOut() should return a newJspWriter or a BodyContent.




Method Detail
findAttribute
public Object findAttribute(String name)(Code)



forward
public void forward(String path)(Code)



getAttribute
public Object getAttribute(String name)(Code)



getAttribute
public Object getAttribute(String name, int scope)(Code)



getAttributeNamesInScope
public Enumeration getAttributeNamesInScope(int scope)(Code)



getAttributesScope
public int getAttributesScope(String name)(Code)



getException
public Exception getException()(Code)



getOut
public JspWriter getOut()(Code)

Custom JspWriter that throws the specified exception (supplied on the constructor...if any), else it simply returns.




getPage
public Object getPage()(Code)



getRequest
public ServletRequest getRequest()(Code)



getResponse
public ServletResponse getResponse()(Code)



getServletConfig
public ServletConfig getServletConfig()(Code)



getServletContext
public ServletContext getServletContext()(Code)



getSession
public HttpSession getSession()(Code)



handlePageException
public void handlePageException(Exception e)(Code)



handlePageException
public void handlePageException(Throwable t)(Code)



include
public void include(String path)(Code)



initialize
public void initialize(Servlet servlet, ServletRequest request, ServletResponse response, String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush)(Code)



popBody
public JspWriter popBody()(Code)



pushBody
public BodyContent pushBody()(Code)



release
public void release()(Code)



removeAttribute
public void removeAttribute(String name)(Code)



removeAttribute
public void removeAttribute(String name, int scope)(Code)



setAttribute
public void setAttribute(String name, Object value)(Code)



setAttribute
public void setAttribute(String name, Object value, int scope)(Code)



setValues
public void setValues(ServletConfig config, ServletRequest request, ServletResponse response)(Code)



Fields inherited from javax.servlet.jsp.PageContext
final public static String APPLICATION(Code)(Java Doc)
final public static int APPLICATION_SCOPE(Code)(Java Doc)
final public static String CONFIG(Code)(Java Doc)
final public static String EXCEPTION(Code)(Java Doc)
final public static String OUT(Code)(Java Doc)
final public static String PAGE(Code)(Java Doc)
final public static String PAGECONTEXT(Code)(Java Doc)
final public static int PAGE_SCOPE(Code)(Java Doc)
final public static String REQUEST(Code)(Java Doc)
final public static int REQUEST_SCOPE(Code)(Java Doc)
final public static String RESPONSE(Code)(Java Doc)
final public static String SESSION(Code)(Java Doc)
final public static int SESSION_SCOPE(Code)(Java Doc)

Methods inherited from javax.servlet.jsp.PageContext
abstract public void forward(String relativeUrlPath) throws ServletException, IOException(Code)(Java Doc)
public ErrorData getErrorData()(Code)(Java Doc)
abstract public Exception getException()(Code)(Java Doc)
abstract public Object getPage()(Code)(Java Doc)
abstract public ServletRequest getRequest()(Code)(Java Doc)
abstract public ServletResponse getResponse()(Code)(Java Doc)
abstract public ServletConfig getServletConfig()(Code)(Java Doc)
abstract public ServletContext getServletContext()(Code)(Java Doc)
abstract public HttpSession getSession()(Code)(Java Doc)
abstract public void handlePageException(Exception e) throws ServletException, IOException(Code)(Java Doc)
abstract public void handlePageException(Throwable t) throws ServletException, IOException(Code)(Java Doc)
abstract public void include(String relativeUrlPath) throws ServletException, IOException(Code)(Java Doc)
abstract public void include(String relativeUrlPath, boolean flush) throws ServletException, IOException(Code)(Java Doc)
abstract public void initialize(Servlet servlet, ServletRequest request, ServletResponse response, String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush) throws IOException, IllegalStateException, IllegalArgumentException(Code)(Java Doc)
public BodyContent pushBody()(Code)(Java Doc)
abstract public void release()(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.