Source Code Cross Referenced for Context.java in  » Sevlet-Container » tomcat-catalina » org » apache » catalina » 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 » Sevlet Container » tomcat catalina » org.apache.catalina 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * Copyright 1999,2004 The Apache Software Foundation.
0003:         * 
0004:         * Licensed under the Apache License, Version 2.0 (the "License");
0005:         * you may not use this file except in compliance with the License.
0006:         * You may obtain a copy of the License at
0007:         * 
0008:         *      http://www.apache.org/licenses/LICENSE-2.0
0009:         * 
0010:         * Unless required by applicable law or agreed to in writing, software
0011:         * distributed under the License is distributed on an "AS IS" BASIS,
0012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013:         * See the License for the specific language governing permissions and
0014:         * limitations under the License.
0015:         */
0016:
0017:        package org.apache.catalina;
0018:
0019:        import javax.servlet.ServletContext;
0020:
0021:        import org.apache.tomcat.util.http.mapper.Mapper;
0022:
0023:        import org.apache.catalina.deploy.ApplicationParameter;
0024:        import org.apache.catalina.deploy.ContextEjb;
0025:        import org.apache.catalina.deploy.ContextEnvironment;
0026:        import org.apache.catalina.deploy.ContextLocalEjb;
0027:        import org.apache.catalina.deploy.ContextResource;
0028:        import org.apache.catalina.deploy.ContextResourceLink;
0029:        import org.apache.catalina.deploy.ErrorPage;
0030:        import org.apache.catalina.deploy.FilterDef;
0031:        import org.apache.catalina.deploy.FilterMap;
0032:        import org.apache.catalina.deploy.LoginConfig;
0033:        import org.apache.catalina.deploy.NamingResources;
0034:        import org.apache.catalina.deploy.SecurityConstraint;
0035:        import org.apache.catalina.util.CharsetMapper;
0036:
0037:        /**
0038:         * A <b>Context</b> is a Container that represents a servlet context, and
0039:         * therefore an individual web application, in the Catalina servlet engine.
0040:         * It is therefore useful in almost every deployment of Catalina (even if a
0041:         * Connector attached to a web server (such as Apache) uses the web server's
0042:         * facilities to identify the appropriate Wrapper to handle this request.
0043:         * It also provides a convenient mechanism to use Interceptors that see
0044:         * every request processed by this particular web application.
0045:         * <p>
0046:         * The parent Container attached to a Context is generally a Host, but may
0047:         * be some other implementation, or may be omitted if it is not necessary.
0048:         * <p>
0049:         * The child containers attached to a Context are generally implementations
0050:         * of Wrapper (representing individual servlet definitions).
0051:         * <p>
0052:         *
0053:         * @author Craig R. McClanahan
0054:         * @version $Revision: 1.12 $ $Date: 2004/05/26 15:25:12 $
0055:         */
0056:
0057:        public interface Context extends Container {
0058:
0059:            // ----------------------------------------------------- Manifest Constants
0060:
0061:            /**
0062:             * The LifecycleEvent type sent when a context is reloaded.
0063:             */
0064:            public static final String RELOAD_EVENT = "reload";
0065:
0066:            // ------------------------------------------------------------- Properties
0067:
0068:            /**
0069:             * Return the set of initialized application event listener objects,
0070:             * in the order they were specified in the web application deployment
0071:             * descriptor, for this application.
0072:             *
0073:             * @exception IllegalStateException if this method is called before
0074:             *  this application has started, or after it has been stopped
0075:             */
0076:            public Object[] getApplicationEventListeners();
0077:
0078:            /**
0079:             * Store the set of initialized application event listener objects,
0080:             * in the order they were specified in the web application deployment
0081:             * descriptor, for this application.
0082:             *
0083:             * @param listeners The set of instantiated listener objects.
0084:             */
0085:            public void setApplicationEventListeners(Object listeners[]);
0086:
0087:            /**
0088:             * Return the set of initialized application lifecycle listener objects,
0089:             * in the order they were specified in the web application deployment
0090:             * descriptor, for this application.
0091:             *
0092:             * @exception IllegalStateException if this method is called before
0093:             *  this application has started, or after it has been stopped
0094:             */
0095:            public Object[] getApplicationLifecycleListeners();
0096:
0097:            /**
0098:             * Store the set of initialized application lifecycle listener objects,
0099:             * in the order they were specified in the web application deployment
0100:             * descriptor, for this application.
0101:             *
0102:             * @param listeners The set of instantiated listener objects.
0103:             */
0104:            public void setApplicationLifecycleListeners(Object listeners[]);
0105:
0106:            /**
0107:             * Return the application available flag for this Context.
0108:             */
0109:            public boolean getAvailable();
0110:
0111:            /**
0112:             * Set the application available flag for this Context.
0113:             *
0114:             * @param available The new application available flag
0115:             */
0116:            public void setAvailable(boolean available);
0117:
0118:            /**
0119:             * Return the Locale to character set mapper for this Context.
0120:             */
0121:            public CharsetMapper getCharsetMapper();
0122:
0123:            /**
0124:             * Set the Locale to character set mapper for this Context.
0125:             *
0126:             * @param mapper The new mapper
0127:             */
0128:            public void setCharsetMapper(CharsetMapper mapper);
0129:
0130:            /**
0131:             * Return the path to a file to save this Context information.
0132:             */
0133:            public String getConfigFile();
0134:
0135:            /**
0136:             * Set the path to a file to save this Context information.
0137:             *
0138:             * @param configFile The path to a file to save this Context information.
0139:             */
0140:            public void setConfigFile(String configFile);
0141:
0142:            /**
0143:             * Return the "correctly configured" flag for this Context.
0144:             */
0145:            public boolean getConfigured();
0146:
0147:            /**
0148:             * Set the "correctly configured" flag for this Context.  This can be
0149:             * set to false by startup listeners that detect a fatal configuration
0150:             * error to avoid the application from being made available.
0151:             *
0152:             * @param configured The new correctly configured flag
0153:             */
0154:            public void setConfigured(boolean configured);
0155:
0156:            /**
0157:             * Return the "use cookies for session ids" flag.
0158:             */
0159:            public boolean getCookies();
0160:
0161:            /**
0162:             * Set the "use cookies for session ids" flag.
0163:             *
0164:             * @param cookies The new flag
0165:             */
0166:            public void setCookies(boolean cookies);
0167:
0168:            /**
0169:             * Return the "allow crossing servlet contexts" flag.
0170:             */
0171:            public boolean getCrossContext();
0172:
0173:            /**
0174:             * Return the alternate Deployment Descriptor name.
0175:             */
0176:            public String getAltDDName();
0177:
0178:            /**
0179:             * Set an alternate Deployment Descriptor name.
0180:             */
0181:            public void setAltDDName(String altDDName);
0182:
0183:            /**
0184:             * Set the "allow crossing servlet contexts" flag.
0185:             *
0186:             * @param crossContext The new cross contexts flag
0187:             */
0188:            public void setCrossContext(boolean crossContext);
0189:
0190:            /**
0191:             * Return the display name of this web application.
0192:             */
0193:            public String getDisplayName();
0194:
0195:            /**
0196:             * Set the display name of this web application.
0197:             *
0198:             * @param displayName The new display name
0199:             */
0200:            public void setDisplayName(String displayName);
0201:
0202:            /**
0203:             * Return the distributable flag for this web application.
0204:             */
0205:            public boolean getDistributable();
0206:
0207:            /**
0208:             * Set the distributable flag for this web application.
0209:             *
0210:             * @param distributable The new distributable flag
0211:             */
0212:            public void setDistributable(boolean distributable);
0213:
0214:            /**
0215:             * Return the document root for this Context.  This can be an absolute
0216:             * pathname, a relative pathname, or a URL.
0217:             */
0218:            public String getDocBase();
0219:
0220:            /**
0221:             * Set the document root for this Context.  This can be an absolute
0222:             * pathname, a relative pathname, or a URL.
0223:             *
0224:             * @param docBase The new document root
0225:             */
0226:            public void setDocBase(String docBase);
0227:
0228:            /**
0229:             * Return the login configuration descriptor for this web application.
0230:             */
0231:            public LoginConfig getLoginConfig();
0232:
0233:            /**
0234:             * Set the login configuration descriptor for this web application.
0235:             *
0236:             * @param config The new login configuration
0237:             */
0238:            public void setLoginConfig(LoginConfig config);
0239:
0240:            /**
0241:             * Get the request dispatcher mapper.
0242:             */
0243:            public Mapper getMapper();
0244:
0245:            /**
0246:             * Return the naming resources associated with this web application.
0247:             */
0248:            public NamingResources getNamingResources();
0249:
0250:            /**
0251:             * Set the naming resources for this web application.
0252:             *
0253:             * @param namingResources The new naming resources
0254:             */
0255:            public void setNamingResources(NamingResources namingResources);
0256:
0257:            /**
0258:             * Return the context path for this web application.
0259:             */
0260:            public String getPath();
0261:
0262:            /**
0263:             * Set the context path for this web application.
0264:             *
0265:             * @param path The new context path
0266:             */
0267:            public void setPath(String path);
0268:
0269:            /**
0270:             * Return the public identifier of the deployment descriptor DTD that is
0271:             * currently being parsed.
0272:             */
0273:            public String getPublicId();
0274:
0275:            /**
0276:             * Set the public identifier of the deployment descriptor DTD that is
0277:             * currently being parsed.
0278:             *
0279:             * @param publicId The public identifier
0280:             */
0281:            public void setPublicId(String publicId);
0282:
0283:            /**
0284:             * Return the reloadable flag for this web application.
0285:             */
0286:            public boolean getReloadable();
0287:
0288:            /**
0289:             * Set the reloadable flag for this web application.
0290:             *
0291:             * @param reloadable The new reloadable flag
0292:             */
0293:            public void setReloadable(boolean reloadable);
0294:
0295:            /**
0296:             * Return the override flag for this web application.
0297:             */
0298:            public boolean getOverride();
0299:
0300:            /**
0301:             * Set the override flag for this web application.
0302:             *
0303:             * @param override The new override flag
0304:             */
0305:            public void setOverride(boolean override);
0306:
0307:            /**
0308:             * Return the privileged flag for this web application.
0309:             */
0310:            public boolean getPrivileged();
0311:
0312:            /**
0313:             * Set the privileged flag for this web application.
0314:             *
0315:             * @param privileged The new privileged flag
0316:             */
0317:            public void setPrivileged(boolean privileged);
0318:
0319:            /**
0320:             * Return the servlet context for which this Context is a facade.
0321:             */
0322:            public ServletContext getServletContext();
0323:
0324:            /**
0325:             * Return the default session timeout (in minutes) for this
0326:             * web application.
0327:             */
0328:            public int getSessionTimeout();
0329:
0330:            /**
0331:             * Set the default session timeout (in minutes) for this
0332:             * web application.
0333:             *
0334:             * @param timeout The new default session timeout
0335:             */
0336:            public void setSessionTimeout(int timeout);
0337:
0338:            /**
0339:             * Return the Java class name of the Wrapper implementation used
0340:             * for servlets registered in this Context.
0341:             */
0342:            public String getWrapperClass();
0343:
0344:            /**
0345:             * Set the Java class name of the Wrapper implementation used
0346:             * for servlets registered in this Context.
0347:             *
0348:             * @param wrapperClass The new wrapper class
0349:             */
0350:            public void setWrapperClass(String wrapperClass);
0351:
0352:            // --------------------------------------------------------- Public Methods
0353:
0354:            /**
0355:             * Add a new Listener class name to the set of Listeners
0356:             * configured for this application.
0357:             *
0358:             * @param listener Java class name of a listener class
0359:             */
0360:            public void addApplicationListener(String listener);
0361:
0362:            /**
0363:             * Add a new application parameter for this application.
0364:             *
0365:             * @param parameter The new application parameter
0366:             */
0367:            public void addApplicationParameter(ApplicationParameter parameter);
0368:
0369:            /**
0370:             * Add a security constraint to the set for this web application.
0371:             */
0372:            public void addConstraint(SecurityConstraint constraint);
0373:
0374:            /**
0375:             * Add an EJB resource reference for this web application.
0376:             *
0377:             * @param ejb New EJB resource reference
0378:             */
0379:            public void addEjb(ContextEjb ejb);
0380:
0381:            /**
0382:             * Add an environment entry for this web application.
0383:             *
0384:             * @param environment New environment entry
0385:             */
0386:            public void addEnvironment(ContextEnvironment environment);
0387:
0388:            /**
0389:             * Add an error page for the specified error or Java exception.
0390:             *
0391:             * @param errorPage The error page definition to be added
0392:             */
0393:            public void addErrorPage(ErrorPage errorPage);
0394:
0395:            /**
0396:             * Add a filter definition to this Context.
0397:             *
0398:             * @param filterDef The filter definition to be added
0399:             */
0400:            public void addFilterDef(FilterDef filterDef);
0401:
0402:            /**
0403:             * Add a filter mapping to this Context.
0404:             *
0405:             * @param filterMap The filter mapping to be added
0406:             */
0407:            public void addFilterMap(FilterMap filterMap);
0408:
0409:            /**
0410:             * Add the classname of an InstanceListener to be added to each
0411:             * Wrapper appended to this Context.
0412:             *
0413:             * @param listener Java class name of an InstanceListener class
0414:             */
0415:            public void addInstanceListener(String listener);
0416:
0417:            /**
0418:             * Add the given URL pattern as a jsp-property-group.  This maps
0419:             * resources that match the given pattern so they will be passed
0420:             * to the JSP container.  Though there are other elements in the
0421:             * property group, we only care about the URL pattern here.  The
0422:             * JSP container will parse the rest.
0423:             *
0424:             * @param pattern URL pattern to be mapped 
0425:             */
0426:            public void addJspMapping(String pattern);
0427:
0428:            /**
0429:             * Add a Locale Encoding Mapping (see Sec 5.4 of Servlet spec 2.4)
0430:             *
0431:             * @param locale locale to map an encoding for
0432:             * @param encoding encoding to be used for a give locale
0433:             */
0434:            public void addLocaleEncodingMappingParameter(String locale,
0435:                    String encoding);
0436:
0437:            /**
0438:             * Add a local EJB resource reference for this web application.
0439:             *
0440:             * @param ejb New local EJB resource reference
0441:             */
0442:            public void addLocalEjb(ContextLocalEjb ejb);
0443:
0444:            /**
0445:             * Add a new MIME mapping, replacing any existing mapping for
0446:             * the specified extension.
0447:             *
0448:             * @param extension Filename extension being mapped
0449:             * @param mimeType Corresponding MIME type
0450:             */
0451:            public void addMimeMapping(String extension, String mimeType);
0452:
0453:            /**
0454:             * Add a new context initialization parameter, replacing any existing
0455:             * value for the specified name.
0456:             *
0457:             * @param name Name of the new parameter
0458:             * @param value Value of the new  parameter
0459:             */
0460:            public void addParameter(String name, String value);
0461:
0462:            /**
0463:             * Add a resource reference for this web application.
0464:             *
0465:             * @param resource New resource reference
0466:             */
0467:            public void addResource(ContextResource resource);
0468:
0469:            /**
0470:             * Add a resource environment reference for this web application.
0471:             *
0472:             * @param name The resource environment reference name
0473:             * @param type The resource environment reference type
0474:             */
0475:            public void addResourceEnvRef(String name, String type);
0476:
0477:            /**
0478:             * Add a resource link for this web application.
0479:             *
0480:             * @param resourceLink New resource link
0481:             */
0482:            public void addResourceLink(ContextResourceLink resourceLink);
0483:
0484:            /**
0485:             * Add a security role reference for this web application.
0486:             *
0487:             * @param role Security role used in the application
0488:             * @param link Actual security role to check for
0489:             */
0490:            public void addRoleMapping(String role, String link);
0491:
0492:            /**
0493:             * Add a new security role for this web application.
0494:             *
0495:             * @param role New security role
0496:             */
0497:            public void addSecurityRole(String role);
0498:
0499:            /**
0500:             * Add a new servlet mapping, replacing any existing mapping for
0501:             * the specified pattern.
0502:             *
0503:             * @param pattern URL pattern to be mapped
0504:             * @param name Name of the corresponding servlet to execute
0505:             */
0506:            public void addServletMapping(String pattern, String name);
0507:
0508:            /**
0509:             * Add a JSP tag library for the specified URI.
0510:             *
0511:             * @param uri URI, relative to the web.xml file, of this tag library
0512:             * @param location Location of the tag library descriptor
0513:             */
0514:            public void addTaglib(String uri, String location);
0515:
0516:            /**
0517:             * Add a new welcome file to the set recognized by this Context.
0518:             *
0519:             * @param name New welcome file name
0520:             */
0521:            public void addWelcomeFile(String name);
0522:
0523:            /**
0524:             * Add the classname of a LifecycleListener to be added to each
0525:             * Wrapper appended to this Context.
0526:             *
0527:             * @param listener Java class name of a LifecycleListener class
0528:             */
0529:            public void addWrapperLifecycle(String listener);
0530:
0531:            /**
0532:             * Add the classname of a ContainerListener to be added to each
0533:             * Wrapper appended to this Context.
0534:             *
0535:             * @param listener Java class name of a ContainerListener class
0536:             */
0537:            public void addWrapperListener(String listener);
0538:
0539:            /**
0540:             * Factory method to create and return a new Wrapper instance, of
0541:             * the Java implementation class appropriate for this Context
0542:             * implementation.  The constructor of the instantiated Wrapper
0543:             * will have been called, but no properties will have been set.
0544:             */
0545:            public Wrapper createWrapper();
0546:
0547:            /**
0548:             * Return the set of application listener class names configured
0549:             * for this application.
0550:             */
0551:            public String[] findApplicationListeners();
0552:
0553:            /**
0554:             * Return the set of application parameters for this application.
0555:             */
0556:            public ApplicationParameter[] findApplicationParameters();
0557:
0558:            /**
0559:             * Return the set of security constraints for this web application.
0560:             * If there are none, a zero-length array is returned.
0561:             */
0562:            public SecurityConstraint[] findConstraints();
0563:
0564:            /**
0565:             * Return the EJB resource reference with the specified name, if any;
0566:             * otherwise, return <code>null</code>.
0567:             *
0568:             * @param name Name of the desired EJB resource reference
0569:             */
0570:            public ContextEjb findEjb(String name);
0571:
0572:            /**
0573:             * Return the defined EJB resource references for this application.
0574:             * If there are none, a zero-length array is returned.
0575:             */
0576:            public ContextEjb[] findEjbs();
0577:
0578:            /**
0579:             * Return the environment entry with the specified name, if any;
0580:             * otherwise, return <code>null</code>.
0581:             *
0582:             * @param name Name of the desired environment entry
0583:             */
0584:            public ContextEnvironment findEnvironment(String name);
0585:
0586:            /**
0587:             * Return the set of defined environment entries for this web
0588:             * application.  If none have been defined, a zero-length array
0589:             * is returned.
0590:             */
0591:            public ContextEnvironment[] findEnvironments();
0592:
0593:            /**
0594:             * Return the error page entry for the specified HTTP error code,
0595:             * if any; otherwise return <code>null</code>.
0596:             *
0597:             * @param errorCode Error code to look up
0598:             */
0599:            public ErrorPage findErrorPage(int errorCode);
0600:
0601:            /**
0602:             * Return the error page entry for the specified Java exception type,
0603:             * if any; otherwise return <code>null</code>.
0604:             *
0605:             * @param exceptionType Exception type to look up
0606:             */
0607:            public ErrorPage findErrorPage(String exceptionType);
0608:
0609:            /**
0610:             * Return the set of defined error pages for all specified error codes
0611:             * and exception types.
0612:             */
0613:            public ErrorPage[] findErrorPages();
0614:
0615:            /**
0616:             * Return the filter definition for the specified filter name, if any;
0617:             * otherwise return <code>null</code>.
0618:             *
0619:             * @param filterName Filter name to look up
0620:             */
0621:            public FilterDef findFilterDef(String filterName);
0622:
0623:            /**
0624:             * Return the set of defined filters for this Context.
0625:             */
0626:            public FilterDef[] findFilterDefs();
0627:
0628:            /**
0629:             * Return the set of filter mappings for this Context.
0630:             */
0631:            public FilterMap[] findFilterMaps();
0632:
0633:            /**
0634:             * Return the set of InstanceListener classes that will be added to
0635:             * newly created Wrappers automatically.
0636:             */
0637:            public String[] findInstanceListeners();
0638:
0639:            /**
0640:             * Return the local EJB resource reference with the specified name, if any;
0641:             * otherwise, return <code>null</code>.
0642:             *
0643:             * @param name Name of the desired EJB resource reference
0644:             */
0645:            public ContextLocalEjb findLocalEjb(String name);
0646:
0647:            /**
0648:             * Return the defined local EJB resource references for this application.
0649:             * If there are none, a zero-length array is returned.
0650:             */
0651:            public ContextLocalEjb[] findLocalEjbs();
0652:
0653:            /**
0654:             * Return the MIME type to which the specified extension is mapped,
0655:             * if any; otherwise return <code>null</code>.
0656:             *
0657:             * @param extension Extension to map to a MIME type
0658:             */
0659:            public String findMimeMapping(String extension);
0660:
0661:            /**
0662:             * Return the extensions for which MIME mappings are defined.  If there
0663:             * are none, a zero-length array is returned.
0664:             */
0665:            public String[] findMimeMappings();
0666:
0667:            /**
0668:             * Return the value for the specified context initialization
0669:             * parameter name, if any; otherwise return <code>null</code>.
0670:             *
0671:             * @param name Name of the parameter to return
0672:             */
0673:            public String findParameter(String name);
0674:
0675:            /**
0676:             * Return the names of all defined context initialization parameters
0677:             * for this Context.  If no parameters are defined, a zero-length
0678:             * array is returned.
0679:             */
0680:            public String[] findParameters();
0681:
0682:            /**
0683:             * Return the resource reference with the specified name, if any;
0684:             * otherwise return <code>null</code>.
0685:             *
0686:             * @param name Name of the desired resource reference
0687:             */
0688:            public ContextResource findResource(String name);
0689:
0690:            /**
0691:             * Return the resource environment reference type for the specified
0692:             * name, if any; otherwise return <code>null</code>.
0693:             *
0694:             * @param name Name of the desired resource environment reference
0695:             */
0696:            public String findResourceEnvRef(String name);
0697:
0698:            /**
0699:             * Return the set of resource environment reference names for this
0700:             * web application.  If none have been specified, a zero-length
0701:             * array is returned.
0702:             */
0703:            public String[] findResourceEnvRefs();
0704:
0705:            /**
0706:             * Return the resource link with the specified name, if any;
0707:             * otherwise return <code>null</code>.
0708:             *
0709:             * @param name Name of the desired resource link
0710:             */
0711:            public ContextResourceLink findResourceLink(String name);
0712:
0713:            /**
0714:             * Return the defined resource links for this application.  If
0715:             * none have been defined, a zero-length array is returned.
0716:             */
0717:            public ContextResourceLink[] findResourceLinks();
0718:
0719:            /**
0720:             * Return the defined resource references for this application.  If
0721:             * none have been defined, a zero-length array is returned.
0722:             */
0723:            public ContextResource[] findResources();
0724:
0725:            /**
0726:             * For the given security role (as used by an application), return the
0727:             * corresponding role name (as defined by the underlying Realm) if there
0728:             * is one.  Otherwise, return the specified role unchanged.
0729:             *
0730:             * @param role Security role to map
0731:             */
0732:            public String findRoleMapping(String role);
0733:
0734:            /**
0735:             * Return <code>true</code> if the specified security role is defined
0736:             * for this application; otherwise return <code>false</code>.
0737:             *
0738:             * @param role Security role to verify
0739:             */
0740:            public boolean findSecurityRole(String role);
0741:
0742:            /**
0743:             * Return the security roles defined for this application.  If none
0744:             * have been defined, a zero-length array is returned.
0745:             */
0746:            public String[] findSecurityRoles();
0747:
0748:            /**
0749:             * Return the servlet name mapped by the specified pattern (if any);
0750:             * otherwise return <code>null</code>.
0751:             *
0752:             * @param pattern Pattern for which a mapping is requested
0753:             */
0754:            public String findServletMapping(String pattern);
0755:
0756:            /**
0757:             * Return the patterns of all defined servlet mappings for this
0758:             * Context.  If no mappings are defined, a zero-length array is returned.
0759:             */
0760:            public String[] findServletMappings();
0761:
0762:            /**
0763:             * Return the context-relative URI of the error page for the specified
0764:             * HTTP status code, if any; otherwise return <code>null</code>.
0765:             *
0766:             * @param status HTTP status code to look up
0767:             */
0768:            public String findStatusPage(int status);
0769:
0770:            /**
0771:             * Return the set of HTTP status codes for which error pages have
0772:             * been specified.  If none are specified, a zero-length array
0773:             * is returned.
0774:             */
0775:            public int[] findStatusPages();
0776:
0777:            /**
0778:             * Return the tag library descriptor location for the specified taglib
0779:             * URI, if any; otherwise, return <code>null</code>.
0780:             *
0781:             * @param uri URI, relative to the web.xml file
0782:             */
0783:            public String findTaglib(String uri);
0784:
0785:            /**
0786:             * Return the URIs of all tag libraries for which a tag library
0787:             * descriptor location has been specified.  If none are specified,
0788:             * a zero-length array is returned.
0789:             */
0790:            public String[] findTaglibs();
0791:
0792:            /**
0793:             * Return <code>true</code> if the specified welcome file is defined
0794:             * for this Context; otherwise return <code>false</code>.
0795:             *
0796:             * @param name Welcome file to verify
0797:             */
0798:            public boolean findWelcomeFile(String name);
0799:
0800:            /**
0801:             * Return the set of welcome files defined for this Context.  If none are
0802:             * defined, a zero-length array is returned.
0803:             */
0804:            public String[] findWelcomeFiles();
0805:
0806:            /**
0807:             * Return the set of LifecycleListener classes that will be added to
0808:             * newly created Wrappers automatically.
0809:             */
0810:            public String[] findWrapperLifecycles();
0811:
0812:            /**
0813:             * Return the set of ContainerListener classes that will be added to
0814:             * newly created Wrappers automatically.
0815:             */
0816:            public String[] findWrapperListeners();
0817:
0818:            /**
0819:             * Reload this web application, if reloading is supported.
0820:             *
0821:             * @exception IllegalStateException if the <code>reloadable</code>
0822:             *  property is set to <code>false</code>.
0823:             */
0824:            public void reload();
0825:
0826:            /**
0827:             * Remove the specified application listener class from the set of
0828:             * listeners for this application.
0829:             *
0830:             * @param listener Java class name of the listener to be removed
0831:             */
0832:            public void removeApplicationListener(String listener);
0833:
0834:            /**
0835:             * Remove the application parameter with the specified name from
0836:             * the set for this application.
0837:             *
0838:             * @param name Name of the application parameter to remove
0839:             */
0840:            public void removeApplicationParameter(String name);
0841:
0842:            /**
0843:             * Remove the specified security constraint from this web application.
0844:             *
0845:             * @param constraint Constraint to be removed
0846:             */
0847:            public void removeConstraint(SecurityConstraint constraint);
0848:
0849:            /**
0850:             * Remove any EJB resource reference with the specified name.
0851:             *
0852:             * @param name Name of the EJB resource reference to remove
0853:             */
0854:            public void removeEjb(String name);
0855:
0856:            /**
0857:             * Remove any environment entry with the specified name.
0858:             *
0859:             * @param name Name of the environment entry to remove
0860:             */
0861:            public void removeEnvironment(String name);
0862:
0863:            /**
0864:             * Remove the error page for the specified error code or
0865:             * Java language exception, if it exists; otherwise, no action is taken.
0866:             *
0867:             * @param errorPage The error page definition to be removed
0868:             */
0869:            public void removeErrorPage(ErrorPage errorPage);
0870:
0871:            /**
0872:             * Remove the specified filter definition from this Context, if it exists;
0873:             * otherwise, no action is taken.
0874:             *
0875:             * @param filterDef Filter definition to be removed
0876:             */
0877:            public void removeFilterDef(FilterDef filterDef);
0878:
0879:            /**
0880:             * Remove a filter mapping from this Context.
0881:             *
0882:             * @param filterMap The filter mapping to be removed
0883:             */
0884:            public void removeFilterMap(FilterMap filterMap);
0885:
0886:            /**
0887:             * Remove a class name from the set of InstanceListener classes that
0888:             * will be added to newly created Wrappers.
0889:             *
0890:             * @param listener Class name of an InstanceListener class to be removed
0891:             */
0892:            public void removeInstanceListener(String listener);
0893:
0894:            /**
0895:             * Remove any local EJB resource reference with the specified name.
0896:             *
0897:             * @param name Name of the EJB resource reference to remove
0898:             */
0899:            public void removeLocalEjb(String name);
0900:
0901:            /**
0902:             * Remove the MIME mapping for the specified extension, if it exists;
0903:             * otherwise, no action is taken.
0904:             *
0905:             * @param extension Extension to remove the mapping for
0906:             */
0907:            public void removeMimeMapping(String extension);
0908:
0909:            /**
0910:             * Remove the context initialization parameter with the specified
0911:             * name, if it exists; otherwise, no action is taken.
0912:             *
0913:             * @param name Name of the parameter to remove
0914:             */
0915:            public void removeParameter(String name);
0916:
0917:            /**
0918:             * Remove any resource reference with the specified name.
0919:             *
0920:             * @param name Name of the resource reference to remove
0921:             */
0922:            public void removeResource(String name);
0923:
0924:            /**
0925:             * Remove any resource environment reference with the specified name.
0926:             *
0927:             * @param name Name of the resource environment reference to remove
0928:             */
0929:            public void removeResourceEnvRef(String name);
0930:
0931:            /**
0932:             * Remove any resource link with the specified name.
0933:             *
0934:             * @param name Name of the resource link to remove
0935:             */
0936:            public void removeResourceLink(String name);
0937:
0938:            /**
0939:             * Remove any security role reference for the specified name
0940:             *
0941:             * @param role Security role (as used in the application) to remove
0942:             */
0943:            public void removeRoleMapping(String role);
0944:
0945:            /**
0946:             * Remove any security role with the specified name.
0947:             *
0948:             * @param role Security role to remove
0949:             */
0950:            public void removeSecurityRole(String role);
0951:
0952:            /**
0953:             * Remove any servlet mapping for the specified pattern, if it exists;
0954:             * otherwise, no action is taken.
0955:             *
0956:             * @param pattern URL pattern of the mapping to remove
0957:             */
0958:            public void removeServletMapping(String pattern);
0959:
0960:            /**
0961:             * Remove the tag library location forthe specified tag library URI.
0962:             *
0963:             * @param uri URI, relative to the web.xml file
0964:             */
0965:            public void removeTaglib(String uri);
0966:
0967:            /**
0968:             * Remove the specified welcome file name from the list recognized
0969:             * by this Context.
0970:             *
0971:             * @param name Name of the welcome file to be removed
0972:             */
0973:            public void removeWelcomeFile(String name);
0974:
0975:            /**
0976:             * Remove a class name from the set of LifecycleListener classes that
0977:             * will be added to newly created Wrappers.
0978:             *
0979:             * @param listener Class name of a LifecycleListener class to be removed
0980:             */
0981:            public void removeWrapperLifecycle(String listener);
0982:
0983:            /**
0984:             * Remove a class name from the set of ContainerListener classes that
0985:             * will be added to newly created Wrappers.
0986:             *
0987:             * @param listener Class name of a ContainerListener class to be removed
0988:             */
0989:            public void removeWrapperListener(String listener);
0990:
0991:            /**
0992:             * Get the server.xml <context> attribute's xmlNamespaceAware.
0993:             * @return true if namespace awarenes is enabled.
0994:             *
0995:             */
0996:            public boolean getXmlNamespaceAware();
0997:
0998:            /**
0999:             * Get the server.xml <context> attribute's xmlValidation.
1000:             * @return true if validation is enabled.
1001:             *
1002:             */
1003:            public boolean getXmlValidation();
1004:
1005:            /**
1006:             * Set the validation feature of the XML parser used when
1007:             * parsing xml instances.
1008:             * @param xmlValidation true to enable xml instance validation
1009:             */
1010:            public void setXmlValidation(boolean xmlValidation);
1011:
1012:            /**
1013:             * Set the namespace aware feature of the XML parser used when
1014:             * parsing xml instances.
1015:             * @param xmlNamespaceAware true to enable namespace awareness
1016:             */
1017:            public void setXmlNamespaceAware(boolean xmlNamespaceAware);
1018:
1019:            /**
1020:             * Get the server.xml <context> attribute's xmlValidation.
1021:             * @return true if validation is enabled.
1022:             */
1023:
1024:            /**
1025:             * Set the validation feature of the XML parser used when
1026:             * parsing tlds files. 
1027:             * @param tldValidation true to enable xml instance validation
1028:             */
1029:            public void setTldValidation(boolean tldValidation);
1030:
1031:            /**
1032:             * Get the server.xml <context> attribute's webXmlValidation.
1033:             * @return true if validation is enabled.
1034:             *
1035:             */
1036:            public boolean getTldValidation();
1037:
1038:            /**
1039:             * Get the server.xml <host> attribute's xmlNamespaceAware.
1040:             * @return true if namespace awarenes is enabled.
1041:             */
1042:            public boolean getTldNamespaceAware();
1043:
1044:            /**
1045:             * Set the namespace aware feature of the XML parser used when
1046:             * parsing xml instances.
1047:             * @param tldNamespaceAware true to enable namespace awareness
1048:             */
1049:            public void setTldNamespaceAware(boolean tldNamespaceAware);
1050:
1051:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.