Java Doc for ServletUtils.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » util » internal » 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 » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.util.internal 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.beehive.netui.util.internal.ServletUtils

ServletUtils
public class ServletUtils (Code)


Field Summary
final public static  StringSESSION_MUTEX_ATTRIBUTE
    


Method Summary
public static  voiddumpRequest(ServletRequest request, PrintStream output)
     Print parameters and attributes in the given request.
public static  voiddumpServletContext(ServletContext context, PrintStream output)
     Print attributes in the given ServletContext.
public static  StringgetBaseName(String uri)
     Get the base filename of the given URI.
Parameters:
  uri - the URI from which to get the base filename.
public static  StringgetDirName(String uri)
     Get the directory path of the given URI.
Parameters:
  uri - the URI from which to get the directory path.
public static  ObjectgetSessionMutex(HttpSession httpSession, String attributeName)
     Returns a mutex object for the given HttpSession that can be used as a lock for a given session.
public static  voidpreventCache(ServletResponse response)
     Set response headers to prevent caching of the response by the browser.
public static  voidthrowServletException(Throwable cause)
     This initializes the 'cause' on the exception before throwing it; otherwise, the chain of exceptions is hidden because of legacy behavior in ServletException ('rootCause' vs.

Field Detail
SESSION_MUTEX_ATTRIBUTE
final public static String SESSION_MUTEX_ATTRIBUTE(Code)





Method Detail
dumpRequest
public static void dumpRequest(ServletRequest request, PrintStream output)(Code)
Print parameters and attributes in the given request.
Parameters:
  request - the current HttpServletRequest.
Parameters:
  output - a PrintStream to which to output request parameters and request/sessionattributes; if null, System.err is used.



dumpServletContext
public static void dumpServletContext(ServletContext context, PrintStream output)(Code)
Print attributes in the given ServletContext.
Parameters:
  context - the current ServletContext.
Parameters:
  output - a PrintStream to which to output ServletContext attributes; if null,System.err is used.



getBaseName
public static String getBaseName(String uri)(Code)
Get the base filename of the given URI.
Parameters:
  uri - the URI from which to get the base filename. a String containing everything after the last slash of the given URI.



getDirName
public static String getDirName(String uri)(Code)
Get the directory path of the given URI.
Parameters:
  uri - the URI from which to get the directory path. a String containing everything before the last slash of the given URI.



getSessionMutex
public static Object getSessionMutex(HttpSession httpSession, String attributeName)(Code)
Returns a mutex object for the given HttpSession that can be used as a lock for a given session. For example, to synchronize lazy initialization of session scoped objects.

The semantics for locking on an HttpSession object are unspecified, and servlet containers are free to implement the HttpSession in such a way that acquiring a lock on the HttpSession itself is not safe. When used in conjunction with a HttpSessionListener (such as NetUI's HttpSessionMutexListener) that puts a mutex object on the session when the session is created, this method provides a lock that is 100% safe to use across servlet containers. If a HttpSessionListener is not registered in web.xml and there is no object for the given attribute name, the HttpSession itself is returned as the next best lock.


Parameters:
  httpSession - the current session
Parameters:
  attributeName - the attribute name of the mutex object on the session a mutex that can be used to serialize operations on the HttpSession



preventCache
public static void preventCache(ServletResponse response)(Code)
Set response headers to prevent caching of the response by the browser.
Parameters:
  response - the current ServletResponse



throwServletException
public static void throwServletException(Throwable cause) throws ServletException(Code)
This initializes the 'cause' on the exception before throwing it; otherwise, the chain of exceptions is hidden because of legacy behavior in ServletException ('rootCause' vs. 'cause').



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.