Source Code Cross Referenced for ExtendletContext.java in  » Ajax » zk » org » zkoss » web » util » resource » 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.util.resource 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* ExtendletContext.java
002:
003:        {{IS_NOTE
004:        	Purpose:
005:        		
006:        	Description:
007:        		
008:        	History:
009:        		Mon Aug 29 18:27:04     2005, Created by tomyeh
010:        }}IS_NOTE
011:
012:        Copyright (C) 2005 Potix Corporation. All Rights Reserved.
013:
014:        {{IS_RIGHT
015:        	This program is distributed under GPL Version 2.0 in the hope that
016:        	it will be useful, but WITHOUT ANY WARRANTY.
017:        }}IS_RIGHT
018:         */
019:        package org.zkoss.web.util.resource;
020:
021:        import java.util.Map;
022:        import java.io.InputStream;
023:        import java.io.UnsupportedEncodingException;
024:        import java.net.URL;
025:
026:        import javax.servlet.ServletContext;
027:        import javax.servlet.ServletRequest;
028:        import javax.servlet.ServletResponse;
029:        import javax.servlet.ServletException;
030:        import javax.servlet.RequestDispatcher;
031:        import javax.servlet.http.HttpServletRequest;
032:        import javax.servlet.http.HttpServletResponse;
033:
034:        import org.zkoss.util.resource.Locator;
035:
036:        /**
037:         * This interface defines an extended context that
038:         * {@link org.zkoss.web.servlet.Servlets#getRequestDispatcher} will try to
039:         * resolve.
040:         * When {@link org.zkoss.web.servlet.Servlets#getRequestDispatcher} is
041:         * called, it detects whether ~xxx/ is specified.
042:         * If specified, it looks up any extended context
043:         * is registered as xxx. If found, the extend context is used.
044:         * If not found, it looks up any servlet context called xxx.
045:         *
046:         * <p>To registers an extended context, use 
047:         * {@link org.zkoss.web.servlet.Servlets#addExtendletContext}.
048:         *
049:         * @author tomyeh
050:         */
051:        public interface ExtendletContext {
052:            /** Returns the encoded URL.
053:             * The returned URL is also encoded with HttpServletResponse.encodeURL.
054:             *
055:             * <p>It resolves "*" contained in URI, if any, to the proper Locale,
056:             * and the browser code.
057:             * Refer to {@link org.zkoss.web.servlet.Servlets#locate(javax.servlet.ServletContext, ServletRequest, String, org.zkoss.util.resource.Locator)}
058:             * for details. 
059:             *
060:             * @param uri it must be empty or starts with "/". It might contain
061:             * "*" for current browser code and Locale.
062:             * @return the complete URI (excluding the machine name).
063:             * It includes the context path and the servelt to interpret
064:             * this extended resource.
065:             */
066:            public String encodeURL(ServletRequest request,
067:                    ServletResponse response, String uri)
068:                    throws ServletException, UnsupportedEncodingException;
069:
070:            /** Returns  the encoded URL for send redirect.
071:             * The URL is also encoded with HttpServletResposne.encodeRedirectURL.
072:             */
073:            public String encodeRedirectURL(HttpServletRequest request,
074:                    HttpServletResponse response, String uri, Map params,
075:                    int mode);
076:
077:            /* Returns the request dispatcher that acts as a wrapper for
078:             * the resource located at the given path, or null if not found.
079:             */
080:            public RequestDispatcher getRequestDispatcher(String uri);
081:
082:            /** Returns the URL of the specified URI, or null if not found.
083:             */
084:            public URL getResource(String uri);
085:
086:            /** Returns the resource of the specified URI as input stream,
087:             * or null if not found.
088:             */
089:            public InputStream getResourceAsStream(String uri);
090:
091:            /** Returns the servlet context.
092:             */
093:            public ServletContext getServletContext();
094:
095:            /** Returns the locator of this context used to locate resorces.
096:             */
097:            public Locator getLocator();
098:
099:            /** Tests whether to compress the specified extension, e.g, "js" and
100:             * "css".
101:             *
102:             * <p>It returns false if the request is included by other Serlets.
103:             */
104:            public boolean shallCompress(ServletRequest request, String ext);
105:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.