Java Doc for TestHttpServletRequest.java in » Wiki-Engine » JSPWiki » com » ecyrd » jspwiki » 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
»
Wiki Engine
»
JSPWiki
»
com.ecyrd.jspwiki
Source Cross Reference
Class Diagram
Java Document (Java Doc)
java.lang
.Object
com.ecyrd.jspwiki
.TestHttpServletRequest
TestHttpServletRequest
public
class TestHttpServletRequest implements
HttpServletRequest
(Code)
A mock HttpServletRequest object, used for testing. The following methods work as they should:
TestHttpServletRequest.getCookies()
,
TestHttpServletRequest.getUserPrincipal()
,
TestHttpServletRequest.getRemoteUser()
,
TestHttpServletRequest.getRemoteAddr()
,
TestHttpServletRequest.isUserInRole(String)
,
TestHttpServletRequest.getSession()
,
TestHttpServletRequest.getSession(boolean)
. All others either return null, or don't work they way they should.
author:
Andrew R. Jaquith
Field Summary
protected
Cookie
[]
m_cookies
protected
Map
m_params
protected
String
m_remoteAddr
protected
String
m_remoteUser
protected
Set
m_roles
protected
String
m_servletPath
protected
HttpSession
m_session
protected
Principal
m_userPrincipal
Method Summary
public
Object
getAttribute
(
String
arg0)
public
Enumeration
getAttributeNames
()
public
String
getAuthType
()
public
String
getCharacterEncoding
()
public
int
getContentLength
()
public
String
getContentType
()
public
String
getContextPath
()
public
Cookie
[]
getCookies
()
public
long
getDateHeader
(
String
arg0)
public
String
getHeader
(
String
arg0)
public
Enumeration
getHeaderNames
()
public
Enumeration
getHeaders
(
String
arg0)
public
ServletInputStream
getInputStream
()
public
int
getIntHeader
(
String
arg0)
public
String
getLocalAddr
()
public
String
getLocalName
()
public
int
getLocalPort
()
public
Locale
getLocale
()
public
Enumeration
getLocales
()
public
String
getMethod
()
public
String
getParameter
(
String
arg0)
public
Map
getParameterMap
()
public
Enumeration
getParameterNames
()
public
String
[]
getParameterValues
(
String
arg0)
public
String
getPathInfo
()
public
String
getPathTranslated
()
public
String
getProtocol
()
public
String
getQueryString
()
public
BufferedReader
getReader
()
public
String
getRealPath
(
String
arg0)
public
String
getRemoteAddr
()
public
String
getRemoteHost
()
public
int
getRemotePort
()
public
String
getRemoteUser
()
public
RequestDispatcher
getRequestDispatcher
(
String
arg0)
public
String
getRequestURI
()
public
StringBuffer
getRequestURL
()
public
String
getRequestedSessionId
()
public
String
getScheme
()
public
String
getServerName
()
public
int
getServerPort
()
public
String
getServletPath
()
public
HttpSession
getSession
()
public
HttpSession
getSession
(boolean arg0)
public
Principal
getUserPrincipal
()
public
boolean
isRequestedSessionIdFromCookie
()
public
boolean
isRequestedSessionIdFromURL
()
public
boolean
isRequestedSessionIdFromUrl
()
public
boolean
isRequestedSessionIdValid
()
public
boolean
isSecure
()
public
boolean
isUserInRole
(
String
arg0)
public
void
removeAttribute
(
String
arg0)
public
void
setAttribute
(
String
arg0,
Object
arg1)
public
void
setCharacterEncoding
(
String
arg0)
public
void
setCookies
(
Cookie
[] cookies)
public
void
setParameter
(
String
key,
String
value)
public
void
setRemoteAddr
(
String
remoteAddr)
public
void
setRemoteUser
(
String
remoteUser)
public
void
setRoles
(
String
[] roles)
Sets the roles that this request's user should be considered a member of.
public
void
setServletPath
(
String
path)
Sets the servlet path; e.g., /JSPWiki/Wiki.jsp.
public
void
setUserPrincipal
(
Principal
principal)
Field Detail
m_cookies
protected
Cookie
[] m_cookies
(Code)
m_params
protected
Map
m_params
(Code)
m_remoteAddr
protected
String
m_remoteAddr
(Code)
m_remoteUser
protected
String
m_remoteUser
(Code)
m_roles
protected
Set
m_roles
(Code)
m_servletPath
protected
String
m_servletPath
(Code)
Everything to right of servlet root
m_session
protected
HttpSession
m_session
(Code)
m_userPrincipal
protected
Principal
m_userPrincipal
(Code)
Method Detail
getAttribute
public
Object
getAttribute(
String
arg0)
(Code)
See Also:
javax.servlet.ServletRequest.getAttribute(java.lang.String)
getAttributeNames
public
Enumeration
getAttributeNames()
(Code)
See Also:
javax.servlet.ServletRequest.getAttributeNames
getAuthType
public
String
getAuthType()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getAuthType
getCharacterEncoding
public
String
getCharacterEncoding()
(Code)
See Also:
javax.servlet.ServletRequest.getCharacterEncoding
getContentLength
public
int getContentLength()
(Code)
See Also:
javax.servlet.ServletRequest.getContentLength
getContentType
public
String
getContentType()
(Code)
See Also:
javax.servlet.ServletRequest.getContentType
getContextPath
public
String
getContextPath()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getContextPath
getCookies
public
Cookie
[] getCookies()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getCookies
getDateHeader
public
long getDateHeader(
String
arg0)
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getDateHeader(java.lang.String)
getHeader
public
String
getHeader(
String
arg0)
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getHeader(java.lang.String)
getHeaderNames
public
Enumeration
getHeaderNames()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getHeaderNames
getHeaders
public
Enumeration
getHeaders(
String
arg0)
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getHeaders(java.lang.String)
getInputStream
public
ServletInputStream
getInputStream() throws
IOException
(Code)
See Also:
javax.servlet.ServletRequest.getInputStream
getIntHeader
public
int getIntHeader(
String
arg0)
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getIntHeader(java.lang.String)
getLocalAddr
public
String
getLocalAddr()
(Code)
getLocalName
public
String
getLocalName()
(Code)
getLocalPort
public
int getLocalPort()
(Code)
getLocale
public
Locale
getLocale()
(Code)
See Also:
javax.servlet.ServletRequest.getLocale
getLocales
public
Enumeration
getLocales()
(Code)
See Also:
javax.servlet.ServletRequest.getLocales
getMethod
public
String
getMethod()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getMethod
getParameter
public
String
getParameter(
String
arg0)
(Code)
See Also:
javax.servlet.ServletRequest.getParameter(java.lang.String)
getParameterMap
public
Map
getParameterMap()
(Code)
See Also:
javax.servlet.ServletRequest.getParameterMap
getParameterNames
public
Enumeration
getParameterNames()
(Code)
See Also:
javax.servlet.ServletRequest.getParameterNames
getParameterValues
public
String
[] getParameterValues(
String
arg0)
(Code)
See Also:
javax.servlet.ServletRequest.getParameterValues(java.lang.String)
getPathInfo
public
String
getPathInfo()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getPathInfo
getPathTranslated
public
String
getPathTranslated()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getPathTranslated
getProtocol
public
String
getProtocol()
(Code)
See Also:
javax.servlet.ServletRequest.getProtocol
getQueryString
public
String
getQueryString()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getQueryString
getReader
public
BufferedReader
getReader() throws
IOException
(Code)
See Also:
javax.servlet.ServletRequest.getReader
getRealPath
public
String
getRealPath(
String
arg0)
(Code)
See Also:
javax.servlet.ServletRequest.getRealPath(java.lang.String)
getRemoteAddr
public
String
getRemoteAddr()
(Code)
See Also:
javax.servlet.ServletRequest.getRemoteAddr
getRemoteHost
public
String
getRemoteHost()
(Code)
See Also:
javax.servlet.ServletRequest.getRemoteHost
getRemotePort
public
int getRemotePort()
(Code)
getRemoteUser
public
String
getRemoteUser()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getRemoteUser
getRequestDispatcher
public
RequestDispatcher
getRequestDispatcher(
String
arg0)
(Code)
See Also:
javax.servlet.ServletRequest.getRequestDispatcher(java.lang.String)
getRequestURI
public
String
getRequestURI()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getRequestURI
getRequestURL
public
StringBuffer
getRequestURL()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getRequestURL
getRequestedSessionId
public
String
getRequestedSessionId()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getRequestedSessionId
getScheme
public
String
getScheme()
(Code)
See Also:
javax.servlet.ServletRequest.getScheme
getServerName
public
String
getServerName()
(Code)
See Also:
javax.servlet.ServletRequest.getServerName
getServerPort
public
int getServerPort()
(Code)
See Also:
javax.servlet.ServletRequest.getServerPort
getServletPath
public
String
getServletPath()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getServletPath
getSession
public
HttpSession
getSession()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getSession
getSession
public
HttpSession
getSession(boolean arg0)
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getSession(boolean)
getUserPrincipal
public
Principal
getUserPrincipal()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.getUserPrincipal
isRequestedSessionIdFromCookie
public
boolean isRequestedSessionIdFromCookie()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.isRequestedSessionIdFromCookie
isRequestedSessionIdFromURL
public
boolean isRequestedSessionIdFromURL()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.isRequestedSessionIdFromURL
isRequestedSessionIdFromUrl
public
boolean isRequestedSessionIdFromUrl()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.isRequestedSessionIdFromUrl
isRequestedSessionIdValid
public
boolean isRequestedSessionIdValid()
(Code)
See Also:
javax.servlet.http.HttpServletRequest.isRequestedSessionIdValid
isSecure
public
boolean isSecure()
(Code)
See Also:
javax.servlet.ServletRequest.isSecure
isUserInRole
public
boolean isUserInRole(
String
arg0)
(Code)
See Also:
javax.servlet.http.HttpServletRequest.isUserInRole(java.lang.String)
removeAttribute
public
void removeAttribute(
String
arg0)
(Code)
See Also:
javax.servlet.ServletRequest.removeAttribute(java.lang.String)
setAttribute
public
void setAttribute(
String
arg0,
Object
arg1)
(Code)
See Also:
javax.servlet.ServletRequest.setAttribute(java.lang.Stringjava.lang.Object)
setCharacterEncoding
public
void setCharacterEncoding(
String
arg0) throws
UnsupportedEncodingException
(Code)
See Also:
javax.servlet.ServletRequest.setCharacterEncoding(java.lang.String)
setCookies
public
void setCookies(
Cookie
[] cookies)
(Code)
Parameters:
cookies - The cookies to set.
setParameter
public
void setParameter(
String
key,
String
value)
(Code)
setRemoteAddr
public
void setRemoteAddr(
String
remoteAddr)
(Code)
Parameters:
remoteAddr - The remoteAddr to set.
setRemoteUser
public
void setRemoteUser(
String
remoteUser)
(Code)
Parameters:
remoteUser - The remoteUser to set.
setRoles
public
void setRoles(
String
[] roles)
(Code)
Sets the roles that this request's user should be considered a member of. The
Parameters:
roles - The roles to set.
setServletPath
public
void setServletPath(
String
path)
(Code)
Sets the servlet path; e.g., /JSPWiki/Wiki.jsp.
Parameters:
path - the servlet path
setUserPrincipal
public
void setUserPrincipal(
Principal
principal)
(Code)
Parameters:
userPrincipal - The userPrincipal to set.
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.