Java Doc for LZHttpUtils.java in  » Ajax » Laszlo-4.0.10 » org » openlaszlo » utils » 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 » Ajax » Laszlo 4.0.10 » org.openlaszlo.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openlaszlo.utils.LZHttpUtils

LZHttpUtils
public class LZHttpUtils (Code)
Utility class for http servlets


Field Summary
final public static  StringACCEPT_ENCODING
    
final public static  StringACCEPT_RANGES
    
final public static  StringAUTHORIZATION
    
final public static  StringCACHE_CONTROL
    
final public static  StringCONNECTION
    
final public static  StringCONTENT_ENCODING
    
final public static  StringCONTENT_LENGTH
    
final public static  StringCONTENT_TYPE
    
final public static  StringCOOKIE
    
final public static  StringHOST
    
final public static  StringIF_MODIFIED_SINCE
    
final public static  StringIF_NONE_MATCH
    
final public static  StringIF_RANGE
    
final public static  StringLAST_MODIFIED
    
final public static  StringNO_CACHE
    
final public static  StringNO_STORE
    
final public static  StringRANGE
    
final public static  StringTRANSFER_ENCODING
    
final public static  StringUSER_AGENT
    


Method Summary
public static  booleanallowForward(String header, Enumeration connEnum)
     From RFC2616, 14.10: HTTP/1.1 proxies MUST parse the Connection header field before a message is forwarded and, for each connection-token in this field, remove any header field(s) from the message with the same name as the connection-token.
public static  StringgetCookie(HttpServletRequest req, String name)
     Fetch cookie value for a particular cookie name.
public static  longgetDate(String s)
    
public static  StringgetDateString(long d)
    
public static  StringgetRealPath(ServletContext ctxt, String path)
     Replace real path forward slash characters to back-slash for Windoze. This is to get around a WebSphere problem (see bug 988).
public static  StringgetRealPath(ServletContext ctxt, HttpServletRequest req)
     Replace real path forward slash characters to back-slash for Windoze.
public static  URLgetRequestURL(HttpServletRequest req)
    
public static  StringmodifyWEBAPP(HttpServletRequest req, String url)
     If a URL contains /@WEBAPP@, replaces that string with context path.
public static  URInewURI(String s)
    
public static  voidnoStore(HttpServletResponse res)
    
public static  voidproxyRequestHeaders(HttpServletRequest req, HttpMethodBase method)
     Add request headers into method.
public static  voidproxyResponseHeaders(HttpMethodBase meth, HttpServletResponse res, boolean isSecure)
     Pull response headers from method and put into servlet response object.
public static  Stringurldecode(String s, String enc)
     Decodes a urlencoded string using a specific charset encoding.

Field Detail
ACCEPT_ENCODING
final public static String ACCEPT_ENCODING(Code)



ACCEPT_RANGES
final public static String ACCEPT_RANGES(Code)



AUTHORIZATION
final public static String AUTHORIZATION(Code)



CACHE_CONTROL
final public static String CACHE_CONTROL(Code)



CONNECTION
final public static String CONNECTION(Code)



CONTENT_ENCODING
final public static String CONTENT_ENCODING(Code)



CONTENT_LENGTH
final public static String CONTENT_LENGTH(Code)



CONTENT_TYPE
final public static String CONTENT_TYPE(Code)



COOKIE
final public static String COOKIE(Code)



HOST
final public static String HOST(Code)



IF_MODIFIED_SINCE
final public static String IF_MODIFIED_SINCE(Code)



IF_NONE_MATCH
final public static String IF_NONE_MATCH(Code)



IF_RANGE
final public static String IF_RANGE(Code)



LAST_MODIFIED
final public static String LAST_MODIFIED(Code)



NO_CACHE
final public static String NO_CACHE(Code)



NO_STORE
final public static String NO_STORE(Code)



RANGE
final public static String RANGE(Code)



TRANSFER_ENCODING
final public static String TRANSFER_ENCODING(Code)



USER_AGENT
final public static String USER_AGENT(Code)





Method Detail
allowForward
public static boolean allowForward(String header, Enumeration connEnum)(Code)
From RFC2616, 14.10: HTTP/1.1 proxies MUST parse the Connection header field before a message is forwarded and, for each connection-token in this field, remove any header field(s) from the message with the same name as the connection-token. Connection options are signaled by the presence of a connection-token in the Connection header field, not by any corresponding additional header field(s), since the additional header field may not be sent if there are no parameters associated with that connection option.



getCookie
public static String getCookie(HttpServletRequest req, String name)(Code)
Fetch cookie value for a particular cookie name.
Parameters:
  req - servlet request.
Parameters:
  name - name of cookie key to fetch.



getDate
public static long getDate(String s)(Code)
Convert an HTTP Date String to a long the long or -1 if the string doesn't parse correctly.



getDateString
public static String getDateString(long d)(Code)
Convert a long utc value to an HTTP Date String (TZ must be GMT)



getRealPath
public static String getRealPath(ServletContext ctxt, String path)(Code)
Replace real path forward slash characters to back-slash for Windoze. This is to get around a WebSphere problem (see bug 988). Note that if the web application content is being served directly from a .war file, this method will return null. See ServletContext.getRealPath() for more details.
Parameters:
  ctxt - servlet context
Parameters:
  path - virtual webapp path to resolve into a real path the real path, or null if the translation cannot be performed



getRealPath
public static String getRealPath(ServletContext ctxt, HttpServletRequest req)(Code)
Replace real path forward slash characters to back-slash for Windoze.
Parameters:
  ctxt - servlet context
Parameters:
  req - generating request the real path, or null if the translation cannot be performed



getRequestURL
public static URL getRequestURL(HttpServletRequest req)(Code)
the URL for the request // with the query string?
Parameters:
  req - the request



modifyWEBAPP
public static String modifyWEBAPP(HttpServletRequest req, String url)(Code)
If a URL contains /@WEBAPP@, replaces that string with context path. If context path is /, the function just removes the /@WEBAPP@ string.
Parameters:
  url - URL to check if /@WEBAPP@ token exists. if /@WEBAPP@ exists, new modified URL else old URL.



newURI
public static URI newURI(String s) throws URIException(Code)
Return a URI object, escaping input only if needed



noStore
public static void noStore(HttpServletResponse res)(Code)
Mark response with no-store cache control



proxyRequestHeaders
public static void proxyRequestHeaders(HttpServletRequest req, HttpMethodBase method)(Code)
Add request headers into method.
Parameters:
  req - http servlet request object
Parameters:
  method - method to insert request headers into



proxyResponseHeaders
public static void proxyResponseHeaders(HttpMethodBase meth, HttpServletResponse res, boolean isSecure)(Code)
Pull response headers from method and put into servlet response object.
Parameters:
  method - method to proxy from
Parameters:
  res - http servlet response object to proxy to
Parameters:
  isSecure - true if get method is secure



urldecode
public static String urldecode(String s, String enc) throws UnsupportedEncodingException(Code)
Decodes a urlencoded string using a specific charset encoding.



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.