Java Doc for Https.java in  » Ajax » zk » org » zkoss » web » servlet » http » 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 » zk » org.zkoss.web.servlet.http 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.zkoss.web.servlet.Servlets
      org.zkoss.web.servlet.http.Https

Https
public class Https extends Servlets (Code)
The Servlet-related utilities.
author:
   tomyeh




Method Summary
final public static  StringencodeRedirectURL(ServletContext ctx, HttpServletRequest request, HttpServletResponse response, String uri, Map params, int mode)
     Encodes an URL such that it can be used with HttpServletResponse.sendRedirect.
final public static  StringgetCompleteContext(HttpServletRequest hreq)
     Gets the complete context path, including protocol, server, ports, and context.
final public static  StringgetCompleteServerName(HttpServletRequest hreq)
     Gets the complete server name, including protocol, server, and ports.
final public static  StringgetCookieValue(HttpServletRequest request, String name)
     Gets the value of the specified cookie, or null if not found.
final public static  StringgetOriginContextPath(ServletRequest request)
     Gets the original context path regardless of being forwarded or not.
final public static  StringgetOriginFullRequest(ServletRequest request)
     Returns the request uri + query string.
final public static  StringgetOriginFullServlet(ServletRequest request)
     Returns the servlet path + path info + query string. Because the path info is decoded, the return string can be considered as decoded.
final public static  StringgetOriginPathInfo(ServletRequest request)
     Gets the path info regardless of being forwarded or not.
final public static  StringgetOriginQueryString(ServletRequest request)
     Gets the query string regardless of being forwarded or not.
final public static  StringgetOriginRequestURI(ServletRequest request)
     Gets the request URI regardless of being forwarded or not.
final public static  StringgetOriginServletPath(ServletRequest request)
     Gets the original servlet path regardless of being forwarded or not.
final public static  StringgetServletURI(HttpServletRequest request)
     Returns the servlet uri of the request.
final public static  StringgetThisContextPath(ServletRequest request)
     Gets the context path of this page.
final public static  StringgetThisPathInfo(ServletRequest request)
     Gets the path info of this page.
final public static  StringgetThisQueryString(ServletRequest request)
     Gets the query string of this page.
final public static  StringgetThisRequestURI(ServletRequest request)
     Gets the request URI of this page.
final public static  StringgetThisServletPath(ServletRequest request)
     Gets the servlet path of this page.
final public static  byte[]gzip(HttpServletRequest request, HttpServletResponse response, InputStream content1, byte[] content2)
     Compresses the content into an byte array, or null if the browser doesn't support the compression (accept-encoding).
Parameters:
  content1 - the first part of the content to compress; null to ignore.If you have multiple input streams, use java.io.SequenceInputStreamto concatenate them
Parameters:
  content2 - the second part of the content to compress; null to ignore.
final public static  voidsendRedirect(ServletContext ctx, HttpServletRequest request, HttpServletResponse response, String uri, Map params, int mode)
     Redirects to another URL by prefixing the context path and encoding with encodeRedirectURL.

It encodes the URI automatically (encodeRedirectURL). Parameters are encoded by Encodes.setToQueryString(StringBufferMap) .

Like Encodes.encodeURL , the servlet context is prefixed if uri starts with "/".

final public static  DatetoDate(String sdate)
     Converts a date string to a Date instance.
final public static  StringtoString(Date date)
     Converts a data to a string complaint to HTTP protocol.



Method Detail
encodeRedirectURL
final public static String encodeRedirectURL(ServletContext ctx, HttpServletRequest request, HttpServletResponse response, String uri, Map params, int mode)(Code)
Encodes an URL such that it can be used with HttpServletResponse.sendRedirect.



getCompleteContext
final public static String getCompleteContext(HttpServletRequest hreq)(Code)
Gets the complete context path, including protocol, server, ports, and context. Example, http://mysite.com:8080/we



getCompleteServerName
final public static String getCompleteServerName(HttpServletRequest hreq)(Code)
Gets the complete server name, including protocol, server, and ports. Example, http://mysite.com:8080



getCookieValue
final public static String getCookieValue(HttpServletRequest request, String name)(Code)
Gets the value of the specified cookie, or null if not found.
Parameters:
  name - the cookie's name



getOriginContextPath
final public static String getOriginContextPath(ServletRequest request)(Code)
Gets the original context path regardless of being forwarded or not. Unlike getContextPath, it won't be affected by forwarding.



getOriginFullRequest
final public static String getOriginFullRequest(ServletRequest request)(Code)
Returns the request uri + query string. Unlik Https.getOriginFullServlet , this is in the encoded form (e.g., %nn still exists, if any). Note: request uri = context path + servlet path + path info.



getOriginFullServlet
final public static String getOriginFullServlet(ServletRequest request)(Code)
Returns the servlet path + path info + query string. Because the path info is decoded, the return string can be considered as decoded. On the other hand Https.getOriginFullRequest is in the encoded form.
See Also:   Https.getOriginFullRequest



getOriginPathInfo
final public static String getOriginPathInfo(ServletRequest request)(Code)
Gets the path info regardless of being forwarded or not. Unlike getPathInfo, it won't be affected by forwarding.



getOriginQueryString
final public static String getOriginQueryString(ServletRequest request)(Code)
Gets the query string regardless of being forwarded or not. Unlike getQueryString, it won't be affected by forwarding.



getOriginRequestURI
final public static String getOriginRequestURI(ServletRequest request)(Code)
Gets the request URI regardless of being forwarded or not. Unlike HttpServletRequest.getRequestURI, it won't be affected by forwarding.



getOriginServletPath
final public static String getOriginServletPath(ServletRequest request)(Code)
Gets the original servlet path regardless of being forwarded or not. Unlike getServletPath, it won't be affected by forwarding.



getServletURI
final public static String getServletURI(HttpServletRequest request)(Code)
Returns the servlet uri of the request. A servlet uri is getServletPath() + getPathInfo(). In other words, a servlet uri is a request uri without the context path.

However, HttpServletRequest.getRequestURI returns in encoded format, while this method returns in decode format (i.e., %nn is converted).




getThisContextPath
final public static String getThisContextPath(ServletRequest request)(Code)
Gets the context path of this page. Unlike getContextPath, it detects whether the current page is included. "/" if request is not a http request



getThisPathInfo
final public static String getThisPathInfo(ServletRequest request)(Code)
Gets the path info of this page. Unlike getPathInfo, it detects whether the current page is included. null if request is not a http request



getThisQueryString
final public static String getThisQueryString(ServletRequest request)(Code)
Gets the query string of this page. Unlike getQueryString, it detects whether the current page is included. null if request is not a http request



getThisRequestURI
final public static String getThisRequestURI(ServletRequest request)(Code)
Gets the request URI of this page. Unlike getRequestURI, it detects whether the current page is included. "/" if request is not a http request



getThisServletPath
final public static String getThisServletPath(ServletRequest request)(Code)
Gets the servlet path of this page. Unlike getServletPath, it detects whether the current page is included. "/" if request is not a http request



gzip
final public static byte[] gzip(HttpServletRequest request, HttpServletResponse response, InputStream content1, byte[] content2) throws IOException(Code)
Compresses the content into an byte array, or null if the browser doesn't support the compression (accept-encoding).
Parameters:
  content1 - the first part of the content to compress; null to ignore.If you have multiple input streams, use java.io.SequenceInputStreamto concatenate them
Parameters:
  content2 - the second part of the content to compress; null to ignore. the compressed result in an byte array,null if the browser doesn't support the compression.
since:
   2.4.1



sendRedirect
final public static void sendRedirect(ServletContext ctx, HttpServletRequest request, HttpServletResponse response, String uri, Map params, int mode) throws IOException, ServletException(Code)
Redirects to another URL by prefixing the context path and encoding with encodeRedirectURL.

It encodes the URI automatically (encodeRedirectURL). Parameters are encoded by Encodes.setToQueryString(StringBufferMap) .

Like Encodes.encodeURL , the servlet context is prefixed if uri starts with "/". In other words, to redirect other application, the complete URL must be used, e.g., http://host/other.

Also, HttpServletResponse.encodeRedirectURL is called automatically.
Parameters:
  request - the request; used only if params is not null
Parameters:
  response - the response
Parameters:
  uri - the redirect uri (not encoded; not including context-path),or null to denote Https.getOriginFullServletIt is OK to relevant (without leading '/').If starts with "/", the context path of request is assumed.To reference to foreign context, use "~ctx/" where ctx is thecontext path of the foreign context (without leading '/').
Parameters:
  params - the attributes that will be set when the redirectionis back; null to ignore; format: (String, Object)
Parameters:
  mode - one of Https.OVERWRITE_URI, Https.IGNORE_PARAM,and Https.APPEND_PARAM. It defines how to handle if both uriand params contains the same parameter.




toDate
final public static Date toDate(String sdate) throws ParseException(Code)
Converts a date string to a Date instance. The format of the giving date string must be complaint to HTTP proptocol.
exception:
  ParseException - if the string is not valid



toString
final public static String toString(Date date)(Code)
Converts a data to a string complaint to HTTP protocol.



Fields inherited from org.zkoss.web.servlet.Servlets
final public static int APPEND_PARAM(Code)(Java Doc)
final public static int IGNORE_PARAM(Code)(Java Doc)
final public static int OVERWRITE_URI(Code)(Java Doc)
final public static int PASS_THRU_ATTR(Code)(Java Doc)

Methods inherited from org.zkoss.web.servlet.Servlets
final public static ExtendletContext addExtendletContext(ServletContext ctx, String name, ExtendletContext extctx)(Code)(Java Doc)
final public static void forward(ServletContext ctx, ServletRequest request, ServletResponse response, String uri, Map params, int mode) throws IOException, ServletException(Code)(Java Doc)
final public static void forward(ServletContext ctx, ServletRequest request, ServletResponse response, String uri) throws IOException, ServletException(Code)(Java Doc)
final public static String generateURI(String uri, Map params, int mode)(Code)(Java Doc)
final public static List getContextPaths()(Code)(Java Doc)
final public static ExtendletContext getExtendletContext(ServletContext ctx, String name)(Code)(Java Doc)
final public static String getExtension(String path)(Code)(Java Doc)
final public static String getLimitTimeOffer()(Code)(Java Doc)
final public static RequestDispatcher getRequestDispatcher(ServletContext ctx, ServletRequest request, String uri, Map params, int mode) throws ServletException(Code)(Java Doc)
final public static URL getResource(ServletContext ctx, String uri) throws MalformedURLException(Code)(Java Doc)
final public static InputStream getResourceAsStream(ServletContext ctx, String uri)(Code)(Java Doc)
final public static String getUserAgent(ServletRequest req)(Code)(Java Doc)
final public static void include(ServletContext ctx, ServletRequest request, ServletResponse response, String uri, Map params, int mode) throws IOException, ServletException(Code)(Java Doc)
final public static void include(ServletContext ctx, ServletRequest request, ServletResponse response, String uri) throws IOException, ServletException(Code)(Java Doc)
final public static boolean isExplorer(ServletRequest req)(Code)(Java Doc)
final public static boolean isExplorer7(ServletRequest req)(Code)(Java Doc)
final public static boolean isForwarded(ServletRequest request)(Code)(Java Doc)
final public static boolean isGecko(ServletRequest req)(Code)(Java Doc)
final public static boolean isHilDevice(ServletRequest req)(Code)(Java Doc)
final public static boolean isIncluded(ServletRequest request)(Code)(Java Doc)
final public static boolean isMilDevice(ServletRequest req)(Code)(Java Doc)
final public static boolean isOfferExpired(String lto, int timeout)(Code)(Java Doc)
final public static boolean isOpera(ServletRequest req)(Code)(Java Doc)
final public static boolean isRobot(ServletRequest req)(Code)(Java Doc)
final public static boolean isSafari(ServletRequest req)(Code)(Java Doc)
final public static boolean isServlet23()(Code)(Java Doc)
final public static boolean isServlet24()(Code)(Java Doc)
final public static boolean isUniversalURL(String uri)(Code)(Java Doc)
final public static String locate(ServletContext ctx, ServletRequest request, String pgpath, Locator locator) throws ServletException(Code)(Java Doc)
final public static ExtendletContext removeExtendletContext(ServletContext ctx, String name)(Code)(Java Doc)

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.