Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRĂ¼diger Herrmann2011-06-28 17:08:26 -0400
committerRĂ¼diger Herrmann2011-06-28 17:08:26 -0400
commit19e34879509ffaf8c601d4f90cf4bbdbea1f8465 (patch)
treef0000e1c0bbfa87ed9dd88bf52a08486b80d9d88
downloadorg.apache.tomcat-19e34879509ffaf8c601d4f90cf4bbdbea1f8465.tar.gz
org.apache.tomcat-19e34879509ffaf8c601d4f90cf4bbdbea1f8465.tar.xz
org.apache.tomcat-19e34879509ffaf8c601d4f90cf4bbdbea1f8465.zip
Initial commit of [CQ 5286] Tomcat 7.0.12 Version: Subset (PB CQ5094)
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ArrayELResolver.java172
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/BeanELResolver.java480
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/CompositeELResolver.java239
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ELContext.java85
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ELContextEvent.java40
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ELContextListener.java28
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ELException.java68
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ELResolver.java80
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/Expression.java39
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ExpressionFactory.java287
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/FunctionMapper.java29
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ListELResolver.java179
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/LocalStrings.properties25
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/LocalStrings_es.properties21
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/MapELResolver.java149
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/MethodExpression.java42
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/MethodInfo.java52
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/MethodNotFoundException.java55
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/PropertyNotFoundException.java56
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/PropertyNotWritableException.java55
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ResourceBundleELResolver.java138
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ValueExpression.java44
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/ValueReference.java44
-rw-r--r--bundles/org.apache.tomcat/src/javax/el/VariableMapper.java28
-rw-r--r--bundles/org.apache.tomcat/src/javax/mail/internet/InternetAddress.java24
-rw-r--r--bundles/org.apache.tomcat/src/javax/mail/internet/MimeMessage.java32
-rw-r--r--bundles/org.apache.tomcat/src/javax/mail/internet/MimePart.java21
-rw-r--r--bundles/org.apache.tomcat/src/javax/mail/internet/MimePartDataSource.java24
-rw-r--r--bundles/org.apache.tomcat/src/javax/persistence/PersistenceContext.java34
-rw-r--r--bundles/org.apache.tomcat/src/javax/persistence/PersistenceContextType.java24
-rw-r--r--bundles/org.apache.tomcat/src/javax/persistence/PersistenceContexts.java31
-rw-r--r--bundles/org.apache.tomcat/src/javax/persistence/PersistenceProperty.java30
-rw-r--r--bundles/org.apache.tomcat/src/javax/persistence/PersistenceUnit.java32
-rw-r--r--bundles/org.apache.tomcat/src/javax/persistence/PersistenceUnits.java31
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyContent.java125
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyTag.java162
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyTagSupport.java153
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/DynamicAttributes.java52
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/FunctionInfo.java79
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/IterationTag.java121
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspFragment.java85
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspIdConsumer.java21
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspTag.java27
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/PageData.java50
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/SimpleTag.java140
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/SimpleTagSupport.java217
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/Tag.java264
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagAdapter.java167
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagAttributeInfo.java236
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagData.java153
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagExtraInfo.java145
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagFileInfo.java86
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagInfo.java447
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagLibraryInfo.java287
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagLibraryValidator.java144
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagSupport.java291
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagVariableInfo.java109
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TryCatchFinally.java99
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/ValidationMessage.java77
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/VariableInfo.java257
-rw-r--r--bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/package.html47
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/AccessLog.java103
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Authenticator.java60
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/CatalinaFactory.java52
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Cluster.java128
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Contained.java54
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Container.java479
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ContainerEvent.java106
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ContainerListener.java42
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ContainerServlet.java53
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Context.java1366
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/DistributedManager.java45
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Engine.java96
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Executor.java39
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Globals.java197
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Group.java123
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Host.java211
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/InstanceEvent.java434
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/InstanceListener.java42
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Lifecycle.java320
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/LifecycleEvent.java105
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/LifecycleException.java76
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/LifecycleListener.java43
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/LifecycleState.java69
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Loader.java169
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Manager.java367
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Pipeline.java148
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Realm.java204
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Role.java76
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Server.java191
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Service.java151
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Session.java326
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/SessionEvent.java114
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/SessionListener.java42
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Store.java145
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/User.java174
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/UserDatabase.java174
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Valve.java153
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/Wrapper.java389
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/AuthenticatorBase.java860
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/BasicAuthenticator.java184
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/Constants.java114
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/DigestAuthenticator.java712
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/FormAuthenticator.java629
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/LocalStrings.properties40
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/LocalStrings_es.properties27
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/LocalStrings_fr.properties25
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/LocalStrings_ja.properties26
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/NonLoginAuthenticator.java110
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/SSLAuthenticator.java177
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/SavedRequest.java174
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/SingleSignOn.java598
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/SingleSignOnEntry.java186
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/SpnegoAuthenticator.java263
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/mbeans-descriptors.xml293
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/authenticator/package.html54
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/comet/CometEvent.java147
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/comet/CometFilter.java82
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/comet/CometFilterChain.java46
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/comet/CometProcessor.java45
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/ClientAbortException.java149
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/CometEventImpl.java146
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/Connector.java1018
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/Constants.java26
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/CoyoteAdapter.java1192
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/CoyoteInputStream.java246
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/CoyoteOutputStream.java115
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/CoyotePrincipal.java78
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/CoyoteReader.java219
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/CoyoteWriter.java319
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/InputBuffer.java544
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/LocalStrings.properties90
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/LocalStrings_es.properties61
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/LocalStrings_fr.properties70
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/LocalStrings_ja.properties70
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/MapperListener.java479
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/OutputBuffer.java586
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/Request.java3120
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/RequestFacade.java1090
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/Response.java1707
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/ResponseFacade.java622
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/connector/mbeans-descriptors.xml204
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationContext.java1608
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationContextFacade.java882
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationDispatcher.java1021
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationFilterChain.java591
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationFilterConfig.java447
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationFilterFactory.java368
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationFilterRegistration.java214
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationHttpRequest.java975
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationHttpResponse.java401
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationJspConfigDescriptor.java45
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationJspPropertyGroupDescriptor.java172
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationPart.java160
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationRequest.java213
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationResponse.java196
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationServletRegistration.java210
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationSessionCookieConfig.java225
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ApplicationTaglibDescriptor.java78
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/AprLifecycleListener.java258
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/AsyncContextImpl.java480
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/AsyncListenerWrapper.java64
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/Constants.java30
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ContainerBase.java1406
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/DefaultInstanceManager.java532
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/JasperListener.java80
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/JreMemoryLeakPreventionListener.java362
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/LocalStrings.properties252
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/LocalStrings_es.properties194
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/LocalStrings_fr.properties167
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/LocalStrings_ja.properties172
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/NamingContextListener.java1217
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/RestrictedFilters.properties16
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/RestrictedListeners.properties14
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/RestrictedServlets.properties18
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardContext.java6527
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardContextValve.java232
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardEngine.java499
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardEngineValve.java142
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardHost.java814
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardHostValve.java500
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardPipeline.java478
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardServer.java860
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardService.java634
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardThreadExecutor.java334
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardWrapper.java1894
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardWrapperFacade.java100
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/StandardWrapperValve.java574
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java228
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/core/mbeans-descriptors.xml1843
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ApplicationParameter.java124
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/Constants.java26
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ContextEjb.java119
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ContextEnvironment.java97
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ContextHandler.java155
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ContextLocalEjb.java116
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ContextResource.java134
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ContextResourceEnvRef.java76
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ContextResourceLink.java87
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ContextService.java268
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ContextTransaction.java108
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ErrorPage.java181
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/FilterDef.java205
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/FilterMap.java226
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/Injectable.java25
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/InjectionTarget.java52
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/JspPropertyGroup.java102
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/LocalStrings.properties52
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/LoginConfig.java225
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/MessageDestination.java115
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/MessageDestinationRef.java100
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/MultipartDef.java138
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/NamingResources.java1103
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ResourceBase.java149
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/SecurityCollection.java427
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/SecurityConstraint.java549
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/SecurityRoleRef.java89
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/ServletDef.java267
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/SessionConfig.java105
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/WebXml.java2182
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/mbeans-descriptors.xml210
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/deploy/package.html26
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/AddDefaultCharsetFilter.java130
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/Constants.java41
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/CsrfPreventionFilter.java320
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/ExpiresFilter.java1600
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/FilterBase.java62
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/LocalStrings.properties36
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/LocalStrings_es.properties16
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/LocalStrings_fr.properties16
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/RemoteAddrFilter.java101
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/RemoteHostFilter.java102
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/RemoteIpFilter.java1053
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/RequestDumperFilter.java285
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/RequestFilter.java246
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/filters/WebdavFixFilter.java151
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/BackupManager.java276
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/ClusterManagerBase.java91
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/ClusterSessionListener.java114
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/Constants.java32
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/DeltaManager.java1516
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/DeltaRequest.java406
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/DeltaSession.java836
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/JvmRouteBinderValve.java485
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java180
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/LocalStrings.properties92
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/LocalStrings_es.properties90
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/SerializablePrincipal.java246
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/SessionIDMessage.java133
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/SessionMessage.java104
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/SessionMessageImpl.java175
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/session/mbeans-descriptors.xml622
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/tcp/Constants.java33
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/tcp/LocalStrings.properties78
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/tcp/LocalStrings_es.properties78
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/tcp/ReplicationValve.java621
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/tcp/SendMessageData.java82
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/tcp/SimpleTcpCluster.java949
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/ha/tcp/mbeans-descriptors.xml174
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/manager/host/Constants.java122
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/manager/host/HTMLHostManagerServlet.java540
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/manager/host/HostManagerServlet.java729
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/manager/host/LocalStrings.properties83
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/manager/host/LocalStrings_es.properties69
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/mbeans-descriptors.xml168
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/CombinedRealm.java344
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/Constants.java45
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/DataSourceRealm.java642
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/GenericPrincipal.java262
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/JAASCallbackHandler.java228
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/JAASMemoryLoginModule.java370
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/JAASRealm.java610
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/JDBCRealm.java810
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/JNDIRealm.java2409
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/LocalStrings.properties100
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/LocalStrings_es.properties81
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/LocalStrings_fr.properties56
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/LocalStrings_ja.properties62
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/LockOutRealm.java447
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/MemoryRealm.java317
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/MemoryRuleSet.java138
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/RealmBase.java1419
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/UserDatabaseRealm.java290
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/mbeans-descriptors.xml591
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/realm/package.html80
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/security/Constants.java25
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/security/LocalStrings.properties21
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/security/LocalStrings_es.properties17
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/security/LocalStrings_fr.properties17
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/security/LocalStrings_ja.properties17
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/security/SecurityClassLoad.java258
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/security/SecurityConfig.java133
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/security/SecurityListener.java195
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/security/SecurityUtil.java429
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/servlets/CGIServlet.java1916
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/servlets/Constants.java27
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/servlets/DefaultServlet.java2157
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/servlets/LocalStrings.properties30
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/servlets/LocalStrings_es.properties27
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/servlets/LocalStrings_fr.properties27
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/servlets/LocalStrings_ja.properties27
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/servlets/WebdavServlet.java3142
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/servlets/package.html33
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/Constants.java32
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/FileStore.java450
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/JDBCStore.java1010
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/LocalStrings.properties76
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/LocalStrings_es.properties71
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/LocalStrings_fr.properties70
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/LocalStrings_ja.properties72
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/ManagerBase.java1330
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/PersistentManager.java79
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/PersistentManagerBase.java1003
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/StandardManager.java552
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/StandardSession.java1906
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/StandardSessionFacade.java196
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/StoreBase.java253
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/mbeans-descriptors.xml413
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/session/package.html68
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/Authenticators.properties21
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/Bootstrap.java539
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/Catalina.java899
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/CatalinaProperties.java185
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/ClassLoaderFactory.java299
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/ClusterRuleSetFactory.java205
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/ConnectorCreateRule.java93
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/Constants.java181
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/ContextConfig.java2386
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/ContextRuleSet.java217
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/CopyParentClassLoaderRule.java79
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/DigesterFactory.java215
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/Embedded.java986
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/EngineConfig.java113
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/EngineRuleSet.java137
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/ExpandWar.java424
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/HomesUserDatabase.java144
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/HostConfig.java1476
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/HostRuleSet.java141
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/LifecycleListenerRule.java135
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/LocalStrings.properties127
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/LocalStrings_es.properties80
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/LocalStrings_fr.properties61
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/LocalStrings_ja.properties66
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/NamingRuleSet.java144
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/PasswdUserDatabase.java194
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/RealmRuleSet.java110
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/SetAllPropertiesRule.java80
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/SetContextPropertiesRule.java75
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/SetNextNamingRule.java127
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/TldConfig.java605
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/TldRuleSet.java188
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/Tomcat.java953
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/Tool.java250
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/UserConfig.java337
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/UserDatabase.java70
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/WebAnnotationSet.java367
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/WebRuleSet.java1173
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/XmlErrorHandler.java77
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/catalina.properties81
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/startup/mbeans-descriptors.xml168
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java118
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java246
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java108
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/MessageDispatch15Interceptor.java123
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java217
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java851
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java332
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.java118
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/StaticMembershipInterceptor.java124
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java375
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java183
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java164
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/group/interceptors/TwoPhaseCommitInterceptor.java151
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/io/BufferPool.java92
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/io/BufferPool15Impl.java63
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/io/ChannelData.java366
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java64
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/io/ListenCallback.java42
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/io/ObjectReader.java170
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/io/ReplicationStream.java166
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/io/XByteBuffer.java604
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/AbstractRxTask.java87
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/AbstractSender.java357
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/Constants.java43
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/DataSender.java45
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/LocalStrings.properties66
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/LocalStrings_es.properties76
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/MultiPointSender.java38
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/PooledSender.java235
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/ReceiverBase.java588
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/ReplicationTransmitter.java132
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/RxTaskPool.java153
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/SenderState.java111
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/bio/BioReceiver.java155
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/bio/BioReplicationTask.java191
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/bio/BioSender.java295
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java156
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java76
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/AbstractGroup.java170
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/AbstractRole.java123
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/AbstractUser.java226
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/Constants.java35
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/LocalStrings.properties25
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/LocalStrings_es.properties19
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/LocalStrings_fr.properties19
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/LocalStrings_ja.properties19
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/MemoryGroup.java223
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/MemoryRole.java105
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/MemoryUser.java308
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/MemoryUserDatabase.java833
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/MemoryUserDatabaseFactory.java112
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/users/mbeans-descriptors.xml155
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/Base64.java374
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/CharsetMapper.java135
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/CharsetMapperDefault.properties17
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/ContextName.java171
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/CustomObjectInputStream.java110
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/DOMWriter.java335
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/DateTool.java115
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/Enumerator.java176
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/Extension.java305
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/ExtensionValidator.java446
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/HexUtils.java179
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/IOTools.java87
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/InstanceSupport.java341
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/LifecycleBase.java388
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/LifecycleMBeanBase.java246
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/LifecycleSupport.java154
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/LocalStrings.properties43
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/LocalStrings_es.properties25
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/LocalStrings_fr.properties25
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/LocalStrings_ja.properties26
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/MD5Encoder.java73
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/MIME2Java.java604
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/ManifestResource.java243
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/ParameterMap.java218
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/RequestUtil.java460
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/ResourceSet.java189
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/SchemaResolver.java135
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/ServerInfo.java127
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/ServerInfo.properties18
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/SessionIdGenerator.java254
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/Strftime.java263
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/StringParser.java324
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/TomcatCSS.java37
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/URLEncoder.java100
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/util/XMLWriter.java245
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/AccessLogValve.java1491
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/CometConnectionManagerValve.java329
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/Constants.java41
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/CrawlerSessionManagerValve.java233
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/ErrorReportValve.java292
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/ExtendedAccessLogValve.java882
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/JDBCAccessLogValve.java684
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/LocalStrings.properties89
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/LocalStrings_es.properties75
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/LocalStrings_fr.properties74
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/LocalStrings_ja.properties31
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/PersistentValve.java214
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/RemoteAddrValve.java90
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/RemoteHostValve.java90
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/RemoteIpValve.java790
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/RequestFilterValve.java224
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/SSLValve.java133
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/SemaphoreValve.java210
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/ValveBase.java334
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/mbeans-descriptors.xml393
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/catalina/valves/package.html28
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/AbstractProtocolHandler.java444
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/ActionCode.java200
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/ActionHook.java48
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/Adapter.java65
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/AsyncContextCallback.java28
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/AsyncStateMachine.java322
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/Constants.java62
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/InputBuffer.java46
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/LocalStrings.properties32
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/OutputBuffer.java54
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/Processor.java28
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/ProtocolHandler.java85
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/Request.java527
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/RequestGroupInfo.java164
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/RequestInfo.java246
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/Response.java573
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/BufferedInputFilter.java139
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/ChunkedInputFilter.java534
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/ChunkedOutputFilter.java181
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java108
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/GzipOutputFilter.java186
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/IdentityInputFilter.java216
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/IdentityOutputFilter.java155
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/SavedRequestInputFilter.java118
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/VoidInputFilter.java135
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/coyote/http11/filters/VoidOutputFilter.java107
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/el/util/ConcurrentCache.java59
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/el/util/MessageFactory.java48
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/el/util/ReflectionUtil.java315
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/el/util/Validation.java109
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/AttributeParser.java351
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/BeanRepository.java73
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/Collector.java217
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/Compiler.java613
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/DefaultErrorHandler.java113
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/Dumper.java220
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/ELFunctionMapper.java332
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/ELNode.java269
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/ELParser.java401
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/ErrorDispatcher.java616
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/ErrorHandler.java73
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/Generator.java4241
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java222
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JarResource.java45
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JarScannerFactory.java48
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JarURLResource.java60
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JasperTagInfo.java64
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JavacErrorDetail.java231
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JspConfig.java598
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JspDocumentParser.java1484
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JspReader.java626
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JspRuntimeContext.java618
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/JspUtil.java937
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/Localizer.java163
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/Mark.java263
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/Node.java2584
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/PageDataImpl.java747
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/PageInfo.java737
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/Parser.java1793
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/ParserController.java612
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/ScriptingVariabler.java157
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/ServletWriter.java155
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/SmapGenerator.java172
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/SmapStratum.java338
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/SmapUtil.java700
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/TagConstants.java116
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/TagFileProcessor.java684
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/TagLibraryInfoImpl.java760
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/TagPluginManager.java256
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/TextOptimizer.java123
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/TldLocation.java60
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/TldLocationsCache.java452
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/Validator.java1852
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/compiler/WebXml.java121
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/ASCIIReader.java205
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/EncodingMap.java1022
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/ParserUtils.java240
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/SymbolTable.java302
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/TreeNode.java328
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/UCSReader.java309
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/UTF8Reader.java637
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/XMLChar.java1028
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/XMLEncodingDetector.java1640
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/XMLString.java150
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/jasper/xmlparser/XMLStringBuffer.java153
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/juli/logging/DirectJDKLog.java200
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/juli/logging/Log.java234
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/juli/logging/LogConfigurationException.java96
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/juli/logging/LogFactory.java365
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/juli/logging/package.html37
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/Constants.java35
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/ContextAccessController.java127
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/ContextBindings.java368
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/EjbRef.java138
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/HandlerRef.java178
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/JndiPermission.java64
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/LocalStrings.properties28
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/LocalStrings_es.properties28
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/LocalStrings_fr.properties26
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/LocalStrings_ja.properties26
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/NameParserImpl.java58
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/NamingContext.java946
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/NamingContextBindingsEnumeration.java134
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/NamingContextEnumeration.java101
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/NamingEntry.java83
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/ResourceEnvRef.java99
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/ResourceLinkRef.java111
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/ResourceRef.java178
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/SelectorContext.java785
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/ServiceRef.java206
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/StringManager.java171
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/TransactionRef.java95
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/java/javaURLContextFactory.java124
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/java/package.html23
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/naming/package.html23
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/InstanceManager.java41
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/JarScanner.java44
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/JarScannerCallback.java35
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/PeriodicEventListener.java25
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Address.java114
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/BIOCallback.java56
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Directory.java97
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Error.java98
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/FileInfo.java67
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Library.java225
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Local.java75
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Lock.java123
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Mmap.java73
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Multicast.java78
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/OS.java130
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/PasswordCallback.java34
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Poll.java157
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Pool.java164
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/PoolCallback.java33
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Proc.java210
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/ProcErrorCallback.java38
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Procattr.java172
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Registry.java235
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/SSL.java344
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/SSLContext.java284
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/SSLSocket.java112
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Shm.java124
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Sockaddr.java42
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Socket.java586
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Status.java265
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Stdlib.java90
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/Time.java74
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/jni/User.java127
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/Constants.java553
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/AccessFlags.java36
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java96
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java63
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java96
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Annotations.java88
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java84
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Attribute.java242
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/AttributeReader.java57
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java53
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ClassFormatException.java44
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ClassParser.java282
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Code.java265
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/CodeException.java128
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Constant.java159
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantCP.java102
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantClass.java90
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantDouble.java91
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantFieldref.java47
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantFloat.java91
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantInteger.java91
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantInterfaceMethodref.java47
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantLong.java91
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantMethodref.java47
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantNameAndType.java103
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantObject.java31
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantPool.java276
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantString.java91
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantUtf8.java80
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ConstantValue.java123
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Deprecated.java109
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ElementValue.java135
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java64
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java71
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java59
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java136
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Field.java131
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java107
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/InnerClass.java133
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/InnerClasses.java127
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/JavaClass.java285
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/LineNumber.java92
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java139
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/LocalVariable.java142
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java147
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java121
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Method.java175
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/PMGClass.java119
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java51
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java81
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java72
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java59
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java72
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java59
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Signature.java105
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java125
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/SourceFile.java114
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/StackMap.java134
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java139
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/StackMapTable.java134
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java214
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/StackMapType.java142
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Synthetic.java119
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Unknown.java145
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/Utility.java783
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/classfile/package.html30
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/bcel/package.html33
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/buf/res/LocalStrings.properties18
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/buf/res/LocalStrings_es.properties19
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/buf/res/LocalStrings_fr.properties18
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/buf/res/LocalStrings_ja.properties18
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/AbstractObjectCreationFactory.java78
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/AbstractRulesImpl.java150
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/ArrayStack.java168
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/CallMethodRule.java585
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/CallParamRule.java242
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/Digester.java2786
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/FactoryCreateRule.java402
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/GenericParser.java86
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/NodeCreateRule.java440
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/ObjectCreateRule.java188
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/ObjectCreationFactory.java59
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/ObjectParamRule.java126
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/ParserFeatureSetterFactory.java73
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/PathCallParamRule.java95
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/Rule.java226
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/RuleSet.java66
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/RuleSetBase.java70
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/Rules.java113
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/RulesBase.java276
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/SetNextRule.java224
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/SetPropertiesRule.java276
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/SetPropertyRule.java163
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/SetRootRule.java225
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/SetTopRule.java225
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java159
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/XercesParser.java189
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/digester/package.html1244
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/ContentType.java96
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/CookieSupport.java230
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/Cookies.java495
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/FastHttpDateFormat.java230
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/HttpMessages.java138
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/MimeHeaders.java482
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/Parameters.java377
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/ServerCookie.java337
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java312
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/DeferredFileOutputStream.java270
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java259
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileDeleteStrategy.java158
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileItem.java227
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileItemFactory.java50
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileItemHeaders.java77
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileItemHeadersSupport.java47
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileItemIterator.java48
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileItemStream.java97
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileUpload.java108
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileUploadBase.java1197
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileUploadException.java102
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/FileUtils.java228
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/IOUtils.java158
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/InvalidFileNameException.java50
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/MultipartStream.java967
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/ParameterParser.java330
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/ProgressListener.java34
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/RequestContext.java64
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/ThresholdingOutputStream.java262
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/fileupload/package.html94
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/http/package.html30
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/AttributeInfo.java160
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/BaseAttributeFilter.java160
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/BaseModelMBean.java1174
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java240
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/ConstructorInfo.java53
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/FeatureInfo.java86
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/FixedNotificationFilter.java96
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/ManagedBean.java632
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/NotificationInfo.java142
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/OperationInfo.java161
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/ParameterInfo.java58
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/Registry.java902
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/RegistryMBean.java142
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/mbeans-descriptors.dtd249
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/modeler/package.html248
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/net/jsse/JSSEImplementation.java64
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/net/jsse/JSSEKeyManager.java151
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java840
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/net/jsse/JSSESupport.java272
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/net/jsse/NioX509KeyManager.java92
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/scan/Constants.java38
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/scan/LocalStrings.properties24
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/scan/StandardJarScanner.java282
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/scan/package.html30
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/threads/res/LocalStrings.properties16
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/threads/res/LocalStrings_es.properties15
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/threads/res/LocalStrings_fr.properties15
-rw-r--r--bundles/org.apache.tomcat/src/org/apache/tomcat/util/threads/res/LocalStrings_ja.properties15
773 files changed, 221344 insertions, 0 deletions
diff --git a/bundles/org.apache.tomcat/src/javax/el/ArrayELResolver.java b/bundles/org.apache.tomcat/src/javax/el/ArrayELResolver.java
new file mode 100644
index 0000000..a319d60
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ArrayELResolver.java
@@ -0,0 +1,172 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.beans.FeatureDescriptor;
+import java.lang.reflect.Array;
+import java.util.Arrays;
+import java.util.Iterator;
+
+public class ArrayELResolver extends ELResolver {
+
+ private final boolean readOnly;
+
+ public ArrayELResolver() {
+ this.readOnly = false;
+ }
+
+ public ArrayELResolver(boolean readOnly) {
+ this.readOnly = readOnly;
+ }
+
+ @Override
+ public Object getValue(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base != null && base.getClass().isArray()) {
+ context.setPropertyResolved(true);
+ int idx = coerce(property);
+ if (idx < 0 || idx >= Array.getLength(base)) {
+ return null;
+ }
+ return Array.get(base, idx);
+ }
+
+ return null;
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base != null && base.getClass().isArray()) {
+ context.setPropertyResolved(true);
+ int idx = coerce(property);
+ checkBounds(base, idx);
+ return base.getClass().getComponentType();
+ }
+
+ return null;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object base, Object property,
+ Object value) throws NullPointerException,
+ PropertyNotFoundException, PropertyNotWritableException,
+ ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base != null && base.getClass().isArray()) {
+ context.setPropertyResolved(true);
+
+ if (this.readOnly) {
+ throw new PropertyNotWritableException(message(context,
+ "resolverNotWriteable", new Object[] { base.getClass()
+ .getName() }));
+ }
+
+ int idx = coerce(property);
+ checkBounds(base, idx);
+ if (value != null &&
+ !base.getClass().getComponentType().isAssignableFrom(
+ value.getClass())) {
+ throw new ClassCastException(message(context,
+ "objectNotAssignable",
+ new Object[] {value.getClass().getName(),
+ base.getClass().getComponentType().getName()}));
+ }
+ Array.set(base, idx, value);
+ }
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base != null && base.getClass().isArray()) {
+ context.setPropertyResolved(true);
+ int idx = coerce(property);
+ checkBounds(base, idx);
+ }
+
+ return this.readOnly;
+ }
+
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+ if (base != null && base.getClass().isArray()) {
+ FeatureDescriptor[] descs = new FeatureDescriptor[Array.getLength(base)];
+ for (int i = 0; i < descs.length; i++) {
+ descs[i] = new FeatureDescriptor();
+ descs[i].setDisplayName("["+i+"]");
+ descs[i].setExpert(false);
+ descs[i].setHidden(false);
+ descs[i].setName(""+i);
+ descs[i].setPreferred(true);
+ descs[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
+ descs[i].setValue(TYPE, Integer.class);
+ }
+ return Arrays.asList(descs).iterator();
+ }
+ return null;
+ }
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ if (base != null && base.getClass().isArray()) {
+ return Integer.class;
+ }
+ return null;
+ }
+
+ private static final void checkBounds(Object base, int idx) {
+ if (idx < 0 || idx >= Array.getLength(base)) {
+ throw new PropertyNotFoundException(
+ new ArrayIndexOutOfBoundsException(idx).getMessage());
+ }
+ }
+
+ private static final int coerce(Object property) {
+ if (property instanceof Number) {
+ return ((Number) property).intValue();
+ }
+ if (property instanceof Character) {
+ return ((Character) property).charValue();
+ }
+ if (property instanceof Boolean) {
+ return (((Boolean) property).booleanValue() ? 1 : 0);
+ }
+ if (property instanceof String) {
+ return Integer.parseInt((String) property);
+ }
+ throw new IllegalArgumentException(property != null ?
+ property.toString() : "null");
+ }
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/BeanELResolver.java b/bundles/org.apache.tomcat/src/javax/el/BeanELResolver.java
new file mode 100644
index 0000000..7ba9ce0
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/BeanELResolver.java
@@ -0,0 +1,480 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.beans.BeanInfo;
+import java.beans.FeatureDescriptor;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.WeakHashMap;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class BeanELResolver extends ELResolver {
+
+ private static final int CACHE_SIZE;
+ private static final String CACHE_SIZE_PROP =
+ "org.apache.el.BeanELResolver.CACHE_SIZE";
+
+ static {
+ if (System.getSecurityManager() == null) {
+ CACHE_SIZE = Integer.parseInt(
+ System.getProperty(CACHE_SIZE_PROP, "1000"));
+ } else {
+ CACHE_SIZE = AccessController.doPrivileged(
+ new PrivilegedAction<Integer>() {
+
+ @Override
+ public Integer run() {
+ return Integer.valueOf(
+ System.getProperty(CACHE_SIZE_PROP, "1000"));
+ }
+ }).intValue();
+ }
+ }
+
+ private final boolean readOnly;
+
+ private final ConcurrentCache<String, BeanProperties> cache =
+ new ConcurrentCache<String, BeanProperties>(CACHE_SIZE);
+
+ public BeanELResolver() {
+ this.readOnly = false;
+ }
+
+ public BeanELResolver(boolean readOnly) {
+ this.readOnly = readOnly;
+ }
+
+ @Override
+ public Object getValue(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (base == null || property == null) {
+ return null;
+ }
+
+ context.setPropertyResolved(true);
+ Method m = this.property(context, base, property).read(context);
+ try {
+ return m.invoke(base, (Object[]) null);
+ } catch (IllegalAccessException e) {
+ throw new ELException(e);
+ } catch (InvocationTargetException e) {
+ throw new ELException(message(context, "propertyReadError",
+ new Object[] { base.getClass().getName(),
+ property.toString() }), e.getCause());
+ } catch (Exception e) {
+ throw new ELException(e);
+ }
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (base == null || property == null) {
+ return null;
+ }
+
+ context.setPropertyResolved(true);
+ return this.property(context, base, property).getPropertyType();
+ }
+
+ @Override
+ public void setValue(ELContext context, Object base, Object property,
+ Object value) throws NullPointerException,
+ PropertyNotFoundException, PropertyNotWritableException,
+ ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (base == null || property == null) {
+ return;
+ }
+
+ context.setPropertyResolved(true);
+
+ if (this.readOnly) {
+ throw new PropertyNotWritableException(message(context,
+ "resolverNotWriteable", new Object[] { base.getClass()
+ .getName() }));
+ }
+
+ Method m = this.property(context, base, property).write(context);
+ try {
+ m.invoke(base, value);
+ } catch (IllegalAccessException e) {
+ throw new ELException(e);
+ } catch (InvocationTargetException e) {
+ throw new ELException(message(context, "propertyWriteError",
+ new Object[] { base.getClass().getName(),
+ property.toString() }), e.getCause());
+ } catch (Exception e) {
+ throw new ELException(e);
+ }
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (base == null || property == null) {
+ return false;
+ }
+
+ context.setPropertyResolved(true);
+ return this.readOnly
+ || this.property(context, base, property).isReadOnly();
+ }
+
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base == null) {
+ return null;
+ }
+
+ try {
+ BeanInfo info = Introspector.getBeanInfo(base.getClass());
+ PropertyDescriptor[] pds = info.getPropertyDescriptors();
+ for (int i = 0; i < pds.length; i++) {
+ pds[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
+ pds[i].setValue(TYPE, pds[i].getPropertyType());
+ }
+ return Arrays.asList((FeatureDescriptor[]) pds).iterator();
+ } catch (IntrospectionException e) {
+ //
+ }
+
+ return null;
+ }
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base != null) {
+ return Object.class;
+ }
+
+ return null;
+ }
+
+ protected static final class BeanProperties {
+ private final Map<String, BeanProperty> properties;
+
+ private final Class<?> type;
+
+ public BeanProperties(Class<?> type) throws ELException {
+ this.type = type;
+ this.properties = new HashMap<String, BeanProperty>();
+ try {
+ BeanInfo info = Introspector.getBeanInfo(this.type);
+ PropertyDescriptor[] pds = info.getPropertyDescriptors();
+ for (int i = 0; i < pds.length; i++) {
+ this.properties.put(pds[i].getName(), new BeanProperty(
+ type, pds[i]));
+ }
+ } catch (IntrospectionException ie) {
+ throw new ELException(ie);
+ }
+ }
+
+ private BeanProperty get(ELContext ctx, String name) {
+ BeanProperty property = this.properties.get(name);
+ if (property == null) {
+ throw new PropertyNotFoundException(message(ctx,
+ "propertyNotFound",
+ new Object[] { type.getName(), name }));
+ }
+ return property;
+ }
+
+ public BeanProperty getBeanProperty(String name) {
+ return get(null, name);
+ }
+
+ private Class<?> getType() {
+ return type;
+ }
+ }
+
+ protected static final class BeanProperty {
+ private final Class<?> type;
+
+ private final Class<?> owner;
+
+ private final PropertyDescriptor descriptor;
+
+ private Method read;
+
+ private Method write;
+
+ public BeanProperty(Class<?> owner, PropertyDescriptor descriptor) {
+ this.owner = owner;
+ this.descriptor = descriptor;
+ this.type = descriptor.getPropertyType();
+ }
+
+ // Can't use Class<?> because API needs to match specification
+ @SuppressWarnings("rawtypes")
+ public Class getPropertyType() {
+ return this.type;
+ }
+
+ public boolean isReadOnly() {
+ return this.write == null
+ && (null == (this.write = getMethod(this.owner, descriptor.getWriteMethod())));
+ }
+
+ public Method getWriteMethod() {
+ return write(null);
+ }
+
+ public Method getReadMethod() {
+ return this.read(null);
+ }
+
+ private Method write(ELContext ctx) {
+ if (this.write == null) {
+ this.write = getMethod(this.owner, descriptor.getWriteMethod());
+ if (this.write == null) {
+ throw new PropertyNotFoundException(message(ctx,
+ "propertyNotWritable", new Object[] {
+ type.getName(), descriptor.getName() }));
+ }
+ }
+ return this.write;
+ }
+
+ private Method read(ELContext ctx) {
+ if (this.read == null) {
+ this.read = getMethod(this.owner, descriptor.getReadMethod());
+ if (this.read == null) {
+ throw new PropertyNotFoundException(message(ctx,
+ "propertyNotReadable", new Object[] {
+ type.getName(), descriptor.getName() }));
+ }
+ }
+ return this.read;
+ }
+ }
+
+ private final BeanProperty property(ELContext ctx, Object base,
+ Object property) {
+ Class<?> type = base.getClass();
+ String prop = property.toString();
+
+ BeanProperties props = this.cache.get(type.getName());
+ if (props == null || type != props.getType()) {
+ props = new BeanProperties(type);
+ this.cache.put(type.getName(), props);
+ }
+
+ return props.get(ctx, prop);
+ }
+
+ private static final Method getMethod(Class<?> type, Method m) {
+ if (m == null || Modifier.isPublic(type.getModifiers())) {
+ return m;
+ }
+ Class<?>[] inf = type.getInterfaces();
+ Method mp = null;
+ for (int i = 0; i < inf.length; i++) {
+ try {
+ mp = inf[i].getMethod(m.getName(), m.getParameterTypes());
+ mp = getMethod(mp.getDeclaringClass(), mp);
+ if (mp != null) {
+ return mp;
+ }
+ } catch (NoSuchMethodException e) {
+ // Ignore
+ }
+ }
+ Class<?> sup = type.getSuperclass();
+ if (sup != null) {
+ try {
+ mp = sup.getMethod(m.getName(), m.getParameterTypes());
+ mp = getMethod(mp.getDeclaringClass(), mp);
+ if (mp != null) {
+ return mp;
+ }
+ } catch (NoSuchMethodException e) {
+ // Ignore
+ }
+ }
+ return null;
+ }
+
+ private static final class ConcurrentCache<K,V> {
+
+ private final int size;
+ private final Map<K,V> eden;
+ private final Map<K,V> longterm;
+
+ public ConcurrentCache(int size) {
+ this.size = size;
+ this.eden = new ConcurrentHashMap<K,V>(size);
+ this.longterm = new WeakHashMap<K,V>(size);
+ }
+
+ public V get(K key) {
+ V value = this.eden.get(key);
+ if (value == null) {
+ synchronized (longterm) {
+ value = this.longterm.get(key);
+ }
+ if (value != null) {
+ this.eden.put(key, value);
+ }
+ }
+ return value;
+ }
+
+ public void put(K key, V value) {
+ if (this.eden.size() >= this.size) {
+ synchronized (longterm) {
+ this.longterm.putAll(this.eden);
+ }
+ this.eden.clear();
+ }
+ this.eden.put(key, value);
+ }
+
+ }
+
+ /**
+ * @since EL 2.2
+ */
+ @Override
+ public Object invoke(ELContext context, Object base, Object method,
+ Class<?>[] paramTypes, Object[] params) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ if (base == null || method == null) {
+ return null;
+ }
+
+ ExpressionFactory factory = ExpressionFactory.newInstance();
+
+ String methodName = (String) factory.coerceToType(method, String.class);
+
+ // Find the matching method
+ Method matchingMethod = null;
+ Class<?> clazz = base.getClass();
+ if (paramTypes != null) {
+ try {
+ matchingMethod = clazz.getMethod(methodName, paramTypes);
+ } catch (NoSuchMethodException e) {
+ throw new MethodNotFoundException(e);
+ }
+ } else {
+ int paramCount = 0;
+ if (params != null) {
+ paramCount = params.length;
+ }
+ Method[] methods = clazz.getMethods();
+ for (Method m : methods) {
+ if (methodName.equals(m.getName()) &&
+ m.getParameterTypes().length == paramCount) {
+ // Same number of parameters - use the first match
+ matchingMethod = m;
+ break;
+ }
+ if (m.isVarArgs()) {
+ matchingMethod = m;
+ }
+ }
+ if (matchingMethod == null) {
+ throw new MethodNotFoundException(
+ "Unable to find method [" + methodName + "] with ["
+ + paramCount + "] parameters");
+ }
+ }
+
+ Class<?>[] parameterTypes = matchingMethod.getParameterTypes();
+ Object[] parameters = null;
+ if (parameterTypes.length > 0) {
+ parameters = new Object[parameterTypes.length];
+ @SuppressWarnings("null") // params.length >= parameterTypes.length
+ int paramCount = params.length;
+ if (matchingMethod.isVarArgs()) {
+ int varArgIndex = parameterTypes.length - 1;
+ // First argCount-1 parameters are standard
+ for (int i = 0; (i < varArgIndex - 1); i++) {
+ parameters[i] = factory.coerceToType(params[i],
+ parameterTypes[i]);
+ }
+ // Last parameter is the varags
+ Class<?> varArgClass =
+ parameterTypes[varArgIndex].getComponentType();
+ for (int i = (varArgIndex); i < paramCount; i++) {
+ Object varargs = Array.newInstance(
+ parameterTypes[paramCount],
+ (paramCount - varArgIndex));
+ Array.set(varargs, i,
+ factory.coerceToType(params[i], varArgClass));
+ parameters[varArgIndex] = varargs;
+ }
+ } else {
+ parameters = new Object[parameterTypes.length];
+ for (int i = 0; i < parameterTypes.length; i++) {
+ parameters[i] = factory.coerceToType(params[i],
+ parameterTypes[i]);
+ }
+ }
+ }
+ Object result = null;
+ try {
+ result = matchingMethod.invoke(base, parameters);
+ } catch (IllegalArgumentException e) {
+ throw new ELException(e);
+ } catch (IllegalAccessException e) {
+ throw new ELException(e);
+ } catch (InvocationTargetException e) {
+ throw new ELException(e.getCause());
+ }
+
+ context.setPropertyResolved(true);
+ return result;
+ }
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/CompositeELResolver.java b/bundles/org.apache.tomcat/src/javax/el/CompositeELResolver.java
new file mode 100644
index 0000000..7d9ed11
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/CompositeELResolver.java
@@ -0,0 +1,239 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.beans.FeatureDescriptor;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+public class CompositeELResolver extends ELResolver {
+
+ private static final Class<?> SCOPED_ATTRIBUTE_EL_RESOLVER;
+ static {
+ Class<?> clazz = null;
+ try {
+ clazz =
+ Class.forName("javax.servlet.jsp.el.ScopedAttributeELResolver");
+ } catch (ClassNotFoundException e) {
+ // Ignore. This is expected if using the EL stand-alone
+ }
+ SCOPED_ATTRIBUTE_EL_RESOLVER = clazz;
+ }
+
+ private int size;
+
+ private ELResolver[] resolvers;
+
+ public CompositeELResolver() {
+ this.size = 0;
+ this.resolvers = new ELResolver[8];
+ }
+
+ public void add(ELResolver elResolver) {
+ if (elResolver == null) {
+ throw new NullPointerException();
+ }
+
+ if (this.size >= this.resolvers.length) {
+ ELResolver[] nr = new ELResolver[this.size * 2];
+ System.arraycopy(this.resolvers, 0, nr, 0, this.size);
+ this.resolvers = nr;
+ }
+ this.resolvers[this.size++] = elResolver;
+ }
+
+ @Override
+ public Object getValue(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ context.setPropertyResolved(false);
+ int sz = this.size;
+ Object result = null;
+ for (int i = 0; i < sz; i++) {
+ result = this.resolvers[i].getValue(context, base, property);
+ if (context.isPropertyResolved()) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object base, Object property,
+ Object value) throws NullPointerException,
+ PropertyNotFoundException, PropertyNotWritableException,
+ ELException {
+ context.setPropertyResolved(false);
+ int sz = this.size;
+ for (int i = 0; i < sz; i++) {
+ this.resolvers[i].setValue(context, base, property, value);
+ if (context.isPropertyResolved()) {
+ return;
+ }
+ }
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ context.setPropertyResolved(false);
+ int sz = this.size;
+ boolean readOnly = false;
+ for (int i = 0; i < sz; i++) {
+ readOnly = this.resolvers[i].isReadOnly(context, base, property);
+ if (context.isPropertyResolved()) {
+ return readOnly;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+ return new FeatureIterator(context, base, this.resolvers, this.size);
+ }
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ int sz = this.size;
+ Class<?> commonType = null, type = null;
+ for (int i = 0; i < sz; i++) {
+ type = this.resolvers[i].getCommonPropertyType(context, base);
+ if (type != null
+ && (commonType == null || commonType.isAssignableFrom(type))) {
+ commonType = type;
+ }
+ }
+ return commonType;
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ context.setPropertyResolved(false);
+ int sz = this.size;
+ Class<?> type;
+ for (int i = 0; i < sz; i++) {
+ type = this.resolvers[i].getType(context, base, property);
+ if (context.isPropertyResolved()) {
+ if (SCOPED_ATTRIBUTE_EL_RESOLVER != null &&
+ SCOPED_ATTRIBUTE_EL_RESOLVER.isAssignableFrom(
+ resolvers[i].getClass())) {
+ // Special case since
+ // javax.servlet.jsp.el.ScopedAttributeELResolver will
+ // always return Object.class for type
+ Object value =
+ resolvers[i].getValue(context, base, property);
+ if (value != null) {
+ return value.getClass();
+ }
+ }
+ return type;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @since EL 2.2
+ */
+ @Override
+ public Object invoke(ELContext context, Object base, Object method,
+ Class<?>[] paramTypes, Object[] params) {
+ context.setPropertyResolved(false);
+ int sz = this.size;
+ Object obj;
+ for (int i = 0; i < sz; i++) {
+ obj = this.resolvers[i].invoke(context, base, method, paramTypes,
+ params);
+ if (context.isPropertyResolved()) {
+ return obj;
+ }
+ }
+ return null;
+ }
+
+ private static final class FeatureIterator implements Iterator<FeatureDescriptor> {
+
+ private final ELContext context;
+
+ private final Object base;
+
+ private final ELResolver[] resolvers;
+
+ private final int size;
+
+ private Iterator<FeatureDescriptor> itr;
+
+ private int idx;
+
+ private FeatureDescriptor next;
+
+ public FeatureIterator(ELContext context, Object base,
+ ELResolver[] resolvers, int size) {
+ this.context = context;
+ this.base = base;
+ this.resolvers = resolvers;
+ this.size = size;
+
+ this.idx = 0;
+ this.guaranteeIterator();
+ }
+
+ private void guaranteeIterator() {
+ while (this.itr == null && this.idx < this.size) {
+ this.itr = this.resolvers[this.idx].getFeatureDescriptors(
+ this.context, this.base);
+ this.idx++;
+ }
+ }
+
+ @Override
+ public boolean hasNext() {
+ if (this.next != null)
+ return true;
+ if (this.itr != null){
+ while (this.next == null && itr.hasNext()) {
+ this.next = itr.next();
+ }
+ } else {
+ return false;
+ }
+ if (this.next == null) {
+ this.itr = null;
+ this.guaranteeIterator();
+ }
+ return hasNext();
+ }
+
+ @Override
+ public FeatureDescriptor next() {
+ if (!hasNext())
+ throw new NoSuchElementException();
+ FeatureDescriptor result = this.next;
+ this.next = null;
+ return result;
+
+ }
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ELContext.java b/bundles/org.apache.tomcat/src/javax/el/ELContext.java
new file mode 100644
index 0000000..1cdf5c7
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ELContext.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ *
+ */
+public abstract class ELContext {
+
+ private Locale locale;
+
+ private Map<Class<?>, Object> map;
+
+ private boolean resolved;
+
+ /**
+ *
+ */
+ public ELContext() {
+ this.resolved = false;
+ }
+
+ // Can't use Class<?> because API needs to match specification
+ public Object getContext(@SuppressWarnings("rawtypes") Class key) {
+ if (this.map == null) {
+ return null;
+ }
+ return this.map.get(key);
+ }
+
+ // Can't use Class<?> because API needs to match specification
+ public void putContext(@SuppressWarnings("rawtypes") Class key,
+ Object contextObject) throws NullPointerException {
+ if (key == null || contextObject == null) {
+ throw new NullPointerException();
+ }
+
+ if (this.map == null) {
+ this.map = new HashMap<Class<?>, Object>();
+ }
+
+ this.map.put(key, contextObject);
+ }
+
+ public void setPropertyResolved(boolean resolved) {
+ this.resolved = resolved;
+ }
+
+ public boolean isPropertyResolved() {
+ return this.resolved;
+ }
+
+ public abstract ELResolver getELResolver();
+
+ public abstract FunctionMapper getFunctionMapper();
+
+ public abstract VariableMapper getVariableMapper();
+
+ public Locale getLocale() {
+ return this.locale;
+ }
+
+ public void setLocale(Locale locale) {
+ this.locale = locale;
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ELContextEvent.java b/bundles/org.apache.tomcat/src/javax/el/ELContextEvent.java
new file mode 100644
index 0000000..a667525
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ELContextEvent.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.util.EventObject;
+
+/**
+ *
+ */
+public class ELContextEvent extends EventObject {
+
+ private static final long serialVersionUID = 1255131906285426769L;
+
+ /**
+ * @param source
+ */
+ public ELContextEvent(ELContext source) {
+ super(source);
+ }
+
+ public ELContext getELContext() {
+ return (ELContext) this.getSource();
+ }
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ELContextListener.java b/bundles/org.apache.tomcat/src/javax/el/ELContextListener.java
new file mode 100644
index 0000000..a21038b
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ELContextListener.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+/**
+ * @author Jacob Hookom [jacob/hookom.net]
+ *
+ */
+public interface ELContextListener extends java.util.EventListener {
+
+ public void contextCreated(ELContextEvent event);
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ELException.java b/bundles/org.apache.tomcat/src/javax/el/ELException.java
new file mode 100644
index 0000000..22efff7
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ELException.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+/**
+ * Represents any of the exception conditions that can arise during expression
+ * evaluation.
+ *
+ * @since 2.1
+ */
+public class ELException extends RuntimeException {
+
+ private static final long serialVersionUID = -6228042809457459161L;
+
+ /**
+ * Creates an ELException with no detail message
+ */
+ public ELException() {
+ super();
+ }
+
+ /**
+ * Creates an ELException with the provided detail message.
+ *
+ * @param message
+ * the detail message
+ */
+ public ELException(String message) {
+ super(message);
+ }
+
+ /**
+ * Creates an ELException with the given detail message and root cause.
+ *
+ * @param message
+ * the detail message
+ * @param cause
+ * the originating cause of this exception
+ */
+ public ELException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Creates an ELException with the given cause
+ *
+ * @param cause
+ * the originating cause of this exception
+ */
+ public ELException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ELResolver.java b/bundles/org.apache.tomcat/src/javax/el/ELResolver.java
new file mode 100644
index 0000000..4c90503
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ELResolver.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.text.MessageFormat;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Jacob Hookom [jacob/hookom.net]
+ *
+ */
+public abstract class ELResolver {
+
+ static String message(ELContext context, String name, Object[] props) {
+ Locale locale = context.getLocale();
+ if (locale == null) {
+ locale = Locale.getDefault();
+ if (locale == null) {
+ return "";
+ }
+ }
+ ResourceBundle bundle = ResourceBundle.getBundle(
+ "javax.el.LocalStrings", locale);
+ try {
+ String template = bundle.getString(name);
+ if (props != null) {
+ template = MessageFormat.format(template, props);
+ }
+ return template;
+ } catch (MissingResourceException e) {
+ return "Missing Resource: '" + name + "' for Locale "
+ + locale.getDisplayName();
+ }
+ }
+
+ public static final String RESOLVABLE_AT_DESIGN_TIME = "resolvableAtDesignTime";
+
+ public static final String TYPE = "type";
+
+ public abstract Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException;
+
+ public abstract Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException;
+
+ public abstract void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException;
+
+ public abstract boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException;
+
+ public abstract Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base);
+
+ public abstract Class<?> getCommonPropertyType(ELContext context, Object base);
+
+ /**
+ * @since EL 2.2
+ */
+ public Object invoke(@SuppressWarnings("unused") ELContext context,
+ @SuppressWarnings("unused") Object base,
+ @SuppressWarnings("unused") Object method,
+ @SuppressWarnings("unused") Class<?>[] paramTypes,
+ @SuppressWarnings("unused") Object[] params) {
+ return null;
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/Expression.java b/bundles/org.apache.tomcat/src/javax/el/Expression.java
new file mode 100644
index 0000000..40fbd57
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/Expression.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public abstract class Expression implements Serializable {
+
+ private static final long serialVersionUID = -6663767980471823812L;
+
+ @Override
+ public abstract boolean equals(Object obj);
+
+ @Override
+ public abstract int hashCode();
+
+ public abstract String getExpressionString();
+
+ public abstract boolean isLiteralText();
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ExpressionFactory.java b/bundles/org.apache.tomcat/src/javax/el/ExpressionFactory.java
new file mode 100644
index 0000000..7f4a240
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ExpressionFactory.java
@@ -0,0 +1,287 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+/**
+ *
+ * @since 2.1
+ */
+public abstract class ExpressionFactory {
+
+ private static final boolean IS_SECURITY_ENABLED =
+ (System.getSecurityManager() != null);
+
+ private static final String SERVICE_RESOURCE_NAME =
+ "META-INF/services/javax.el.ExpressionFactory";
+
+ private static final String PROPERTY_NAME = "javax.el.ExpressionFactory";
+
+ private static final String SEP;
+ private static final String PROPERTY_FILE;
+
+ static {
+ if (IS_SECURITY_ENABLED) {
+ SEP = AccessController.doPrivileged(
+ new PrivilegedAction<String>(){
+ @Override
+ public String run() {
+ return System.getProperty("file.separator");
+ }
+
+ }
+ );
+ PROPERTY_FILE = AccessController.doPrivileged(
+ new PrivilegedAction<String>(){
+ @Override
+ public String run() {
+ return System.getProperty("java.home") + SEP +
+ "lib" + SEP + "el.properties";
+ }
+
+ }
+ );
+ } else {
+ SEP = System.getProperty("file.separator");
+ PROPERTY_FILE = System.getProperty("java.home") + SEP + "lib" +
+ SEP + "el.properties";
+ }
+ }
+
+ public abstract Object coerceToType(Object obj, Class<?> expectedType)
+ throws ELException;
+
+ public abstract ValueExpression createValueExpression(ELContext context,
+ String expression, Class<?> expectedType)
+ throws NullPointerException, ELException;
+
+ public abstract ValueExpression createValueExpression(Object instance,
+ Class<?> expectedType);
+
+ public abstract MethodExpression createMethodExpression(ELContext context,
+ String expression, Class<?> expectedReturnType,
+ Class<?>[] expectedParamTypes) throws ELException,
+ NullPointerException;
+
+ /**
+ * Create a new {@link ExpressionFactory}. The class to use is determined by
+ * the following search order:
+ * <ol>
+ * <li>services API (META-INF/services/javax.el.ExpressionFactory)</li>
+ * <li>$JRE_HOME/lib/el.properties - key javax.el.ExpressionFactory</li>
+ * <li>javax.el.ExpressionFactory</li>
+ * <li>Platform default implementation -
+ * org.apache.el.ExpressionFactoryImpl</li>
+ * </ol>
+ * @return the new ExpressionFactory
+ */
+ public static ExpressionFactory newInstance() {
+ return newInstance(null);
+ }
+
+ /**
+ * Create a new {@link ExpressionFactory} passing in the provided
+ * {@link Properties}. Search order is the same as {@link #newInstance()}.
+ *
+ * @param properties the properties to be passed to the new instance (may be null)
+ * @return the new ExpressionFactory
+ */
+ public static ExpressionFactory newInstance(Properties properties) {
+ String className = null;
+ ExpressionFactory result = null;
+
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+
+ // First services API
+ className = getClassNameServices(tccl);
+ if (className == null) {
+ if (IS_SECURITY_ENABLED) {
+ className = AccessController.doPrivileged(
+ new PrivilegedAction<String>() {
+ @Override
+ public String run() {
+ return getClassNameJreDir();
+ }
+ }
+ );
+ } else {
+ // Second el.properties file
+ className = getClassNameJreDir();
+ }
+ }
+ if (className == null) {
+ if (IS_SECURITY_ENABLED) {
+ className = AccessController.doPrivileged(
+ new PrivilegedAction<String>() {
+ @Override
+ public String run() {
+ return getClassNameSysProp();
+ }
+ }
+ );
+ } else {
+ // Third system property
+ className = getClassNameSysProp();
+ }
+ }
+ if (className == null) {
+ // Fourth - default
+ className = "org.apache.el.ExpressionFactoryImpl";
+ }
+
+ try {
+ Class<?> clazz = null;
+ if (tccl == null) {
+ clazz = Class.forName(className);
+ } else {
+ clazz = tccl.loadClass(className);
+ }
+ Constructor<?> constructor = null;
+ // Do we need to look for a constructor that will take properties?
+ if (properties != null) {
+ try {
+ constructor = clazz.getConstructor(Properties.class);
+ } catch (SecurityException se) {
+ throw new ELException(se);
+ } catch (NoSuchMethodException nsme) {
+ // This can be ignored
+ // This is OK for this constructor not to exist
+ }
+ }
+ if (constructor == null) {
+ result = (ExpressionFactory) clazz.newInstance();
+ } else {
+ result =
+ (ExpressionFactory) constructor.newInstance(properties);
+ }
+
+ } catch (ClassNotFoundException e) {
+ throw new ELException(
+ "Unable to find ExpressionFactory of type: " + className,
+ e);
+ } catch (InstantiationException e) {
+ throw new ELException(
+ "Unable to create ExpressionFactory of type: " + className,
+ e);
+ } catch (IllegalAccessException e) {
+ throw new ELException(
+ "Unable to create ExpressionFactory of type: " + className,
+ e);
+ } catch (IllegalArgumentException e) {
+ throw new ELException(
+ "Unable to create ExpressionFactory of type: " + className,
+ e);
+ } catch (InvocationTargetException e) {
+ throw new ELException(
+ "Unable to create ExpressionFactory of type: " + className,
+ e);
+ }
+
+ return result;
+ }
+
+ private static String getClassNameServices(ClassLoader tccl) {
+ InputStream is = null;
+
+ if (tccl == null) {
+ is = ClassLoader.getSystemResourceAsStream(SERVICE_RESOURCE_NAME);
+ } else {
+ is = tccl.getResourceAsStream(SERVICE_RESOURCE_NAME);
+ }
+
+ if (is != null) {
+ String line = null;
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+ line = br.readLine();
+ if (line != null && line.trim().length() > 0) {
+ return line.trim();
+ }
+ } catch (UnsupportedEncodingException e) {
+ // Should never happen with UTF-8
+ // If it does - ignore & return null
+ } catch (IOException e) {
+ throw new ELException("Failed to read " + SERVICE_RESOURCE_NAME,
+ e);
+ } finally {
+ try {
+ if (br != null) {
+ br.close();
+ }
+ } catch (IOException ioe) {/*Ignore*/}
+ try {
+ is.close();
+ } catch (IOException ioe) {/*Ignore*/}
+ }
+ }
+
+ return null;
+ }
+
+ private static String getClassNameJreDir() {
+ File file = new File(PROPERTY_FILE);
+ if (file.canRead()) {
+ InputStream is = null;
+ try {
+ is = new FileInputStream(file);
+ Properties props = new Properties();
+ props.load(is);
+ String value = props.getProperty(PROPERTY_NAME);
+ if (value != null && value.trim().length() > 0) {
+ return value.trim();
+ }
+ } catch (FileNotFoundException e) {
+ // Should not happen - ignore it if it does
+ } catch (IOException e) {
+ throw new ELException("Failed to read " + PROPERTY_FILE, e);
+ } finally {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ private static final String getClassNameSysProp() {
+ String value = System.getProperty(PROPERTY_NAME);
+ if (value != null && value.trim().length() > 0) {
+ return value.trim();
+ }
+ return null;
+ }
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/FunctionMapper.java b/bundles/org.apache.tomcat/src/javax/el/FunctionMapper.java
new file mode 100644
index 0000000..666a76c
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/FunctionMapper.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.lang.reflect.Method;
+
+/**
+ *
+ */
+public abstract class FunctionMapper {
+
+ public abstract Method resolveFunction(String prefix, String localName);
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ListELResolver.java b/bundles/org.apache.tomcat/src/javax/el/ListELResolver.java
new file mode 100644
index 0000000..989fcb5
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ListELResolver.java
@@ -0,0 +1,179 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+public class ListELResolver extends ELResolver {
+
+ private final boolean readOnly;
+
+ private static final Class<?> UNMODIFIABLE =
+ Collections.unmodifiableList(new ArrayList<Object>()).getClass();
+
+ public ListELResolver() {
+ this.readOnly = false;
+ }
+
+ public ListELResolver(boolean readOnly) {
+ this.readOnly = readOnly;
+ }
+
+ @Override
+ public Object getValue(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof List<?>) {
+ context.setPropertyResolved(true);
+ List<?> list = (List<?>) base;
+ int idx = coerce(property);
+ if (idx < 0 || idx >= list.size()) {
+ return null;
+ }
+ return list.get(idx);
+ }
+
+ return null;
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof List<?>) {
+ context.setPropertyResolved(true);
+ List<?> list = (List<?>) base;
+ int idx = coerce(property);
+ if (idx < 0 || idx >= list.size()) {
+ throw new PropertyNotFoundException(
+ new ArrayIndexOutOfBoundsException(idx).getMessage());
+ }
+ Object obj = list.get(idx);
+ return (obj != null) ? obj.getClass() : null;
+ }
+
+ return null;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object base, Object property,
+ Object value) throws NullPointerException,
+ PropertyNotFoundException, PropertyNotWritableException,
+ ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof List<?>) {
+ context.setPropertyResolved(true);
+ @SuppressWarnings("unchecked") // Must be OK to cast to Object
+ List<Object> list = (List<Object>) base;
+
+ if (this.readOnly) {
+ throw new PropertyNotWritableException(message(context,
+ "resolverNotWriteable", new Object[] { base.getClass()
+ .getName() }));
+ }
+
+ int idx = coerce(property);
+ try {
+ list.set(idx, value);
+ } catch (UnsupportedOperationException e) {
+ throw new PropertyNotWritableException(e);
+ } catch (IndexOutOfBoundsException e) {
+ throw new PropertyNotFoundException(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof List<?>) {
+ context.setPropertyResolved(true);
+ List<?> list = (List<?>) base;
+ int idx = coerce(property);
+ if (idx < 0 || idx >= list.size()) {
+ throw new PropertyNotFoundException(
+ new ArrayIndexOutOfBoundsException(idx).getMessage());
+ }
+ return this.readOnly || UNMODIFIABLE.equals(list.getClass());
+ }
+
+ return this.readOnly;
+ }
+
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+ if (base instanceof List<?>) {
+ FeatureDescriptor[] descs = new FeatureDescriptor[((List<?>) base).size()];
+ for (int i = 0; i < descs.length; i++) {
+ descs[i] = new FeatureDescriptor();
+ descs[i].setDisplayName("["+i+"]");
+ descs[i].setExpert(false);
+ descs[i].setHidden(false);
+ descs[i].setName(""+i);
+ descs[i].setPreferred(true);
+ descs[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
+ descs[i].setValue(TYPE, Integer.class);
+ }
+ return Arrays.asList(descs).iterator();
+ }
+ return null;
+ }
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ if (base instanceof List<?>) { // implies base != null
+ return Integer.class;
+ }
+ return null;
+ }
+
+ private static final int coerce(Object property) {
+ if (property instanceof Number) {
+ return ((Number) property).intValue();
+ }
+ if (property instanceof Character) {
+ return ((Character) property).charValue();
+ }
+ if (property instanceof Boolean) {
+ return (((Boolean) property).booleanValue() ? 1 : 0);
+ }
+ if (property instanceof String) {
+ return Integer.parseInt((String) property);
+ }
+ throw new IllegalArgumentException(property != null ?
+ property.toString() : "null");
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/LocalStrings.properties b/bundles/org.apache.tomcat/src/javax/el/LocalStrings.properties
new file mode 100644
index 0000000..2a753d7
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/LocalStrings.properties
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Default localized string information
+# Localized for Locale en_US
+
+propertyNotFound=Property ''{1}'' not found on type {0}
+propertyNotReadable=Property ''{1}'' not readable on type {0}
+propertyNotWritable=Property ''{1}'' not writable on type {0}
+propertyReadError=Error reading ''{1}'' on type {0}
+propertyWriteError=Error writing ''{1}'' on type {0}
+resolverNotWritable=ELResolver not writable for type {0}
+objectNotAssignable=Unable to add an object of type [{0}] to an array of objects of type [{1}]
diff --git a/bundles/org.apache.tomcat/src/javax/el/LocalStrings_es.properties b/bundles/org.apache.tomcat/src/javax/el/LocalStrings_es.properties
new file mode 100644
index 0000000..68cfad2
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/LocalStrings_es.properties
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+propertyNotFound = Propiedad ''{1}'' no hallada en el tipo {0}
+propertyNotReadable = Propiedad ''{1}'' no legible para el tipo {0}
+propertyNotWritable = Propiedad ''{1}'' no grabable para el tipo {0}
+propertyReadError = Error reading ''{1}'' en el tipo {0}
+propertyWriteError = Error writing ''{1}'' en el tipo {0}
+resolverNotWritable = ELResolver no grabable para el tipo {0}
diff --git a/bundles/org.apache.tomcat/src/javax/el/MapELResolver.java b/bundles/org.apache.tomcat/src/javax/el/MapELResolver.java
new file mode 100644
index 0000000..e7aa462
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/MapELResolver.java
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+public class MapELResolver extends ELResolver {
+
+ private static final Class<?> UNMODIFIABLE = Collections.unmodifiableMap(
+ new HashMap<Object, Object>()).getClass();
+
+ private final boolean readOnly;
+
+ public MapELResolver() {
+ this.readOnly = false;
+ }
+
+ public MapELResolver(boolean readOnly) {
+ this.readOnly = readOnly;
+ }
+
+ @Override
+ public Object getValue(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof Map<?,?>) {
+ context.setPropertyResolved(true);
+ return ((Map<?,?>) base).get(property);
+ }
+
+ return null;
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof Map<?,?>) {
+ context.setPropertyResolved(true);
+ Object obj = ((Map<?,?>) base).get(property);
+ return (obj != null) ? obj.getClass() : null;
+ }
+
+ return null;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object base, Object property,
+ Object value) throws NullPointerException,
+ PropertyNotFoundException, PropertyNotWritableException,
+ ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof Map<?, ?>) {
+ context.setPropertyResolved(true);
+
+ if (this.readOnly) {
+ throw new PropertyNotWritableException(message(context,
+ "resolverNotWriteable", new Object[] { base.getClass()
+ .getName() }));
+ }
+
+ try {
+ @SuppressWarnings("unchecked") // Must be OK
+ Map<Object, Object> map = ((Map<Object, Object>) base);
+ map.put(property, value);
+ } catch (UnsupportedOperationException e) {
+ throw new PropertyNotWritableException(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof Map<?, ?>) {
+ context.setPropertyResolved(true);
+ return this.readOnly || UNMODIFIABLE.equals(base.getClass());
+ }
+
+ return this.readOnly;
+ }
+
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+ if (base instanceof Map<?, ?>) {
+ Iterator<?> itr = ((Map<?, ?>) base).keySet().iterator();
+ List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
+ Object key;
+ FeatureDescriptor desc;
+ while (itr.hasNext()) {
+ key = itr.next();
+ desc = new FeatureDescriptor();
+ desc.setDisplayName(key.toString());
+ desc.setExpert(false);
+ desc.setHidden(false);
+ desc.setName(key.toString());
+ desc.setPreferred(true);
+ desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
+ desc.setValue(TYPE, key.getClass());
+ feats.add(desc);
+ }
+ return feats.iterator();
+ }
+ return null;
+ }
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ if (base instanceof Map<?, ?>) {
+ return Object.class;
+ }
+ return null;
+ }
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/MethodExpression.java b/bundles/org.apache.tomcat/src/javax/el/MethodExpression.java
new file mode 100644
index 0000000..6835a41
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/MethodExpression.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+/**
+ *
+ */
+public abstract class MethodExpression extends Expression {
+
+ private static final long serialVersionUID = 8163925562047324656L;
+
+ public abstract MethodInfo getMethodInfo(ELContext context) throws NullPointerException, PropertyNotFoundException, MethodNotFoundException, ELException;
+
+ public abstract Object invoke(ELContext context, Object[] params) throws NullPointerException, PropertyNotFoundException, MethodNotFoundException, ELException;
+
+ /**
+ * @since EL 2.2
+ *
+ * Note: The spelling mistake is deliberate.
+ * isParmetersProvided() - Specification definition
+ * isParametersProvided() - Corrected spelling
+ */
+ public boolean isParmetersProvided() {
+ // Expected to be over-ridden by implementation
+ return false;
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/MethodInfo.java b/bundles/org.apache.tomcat/src/javax/el/MethodInfo.java
new file mode 100644
index 0000000..8047e25
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/MethodInfo.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+/**
+ *
+ */
+public class MethodInfo {
+
+ private final String name;
+
+ private final Class<?>[] paramTypes;
+
+ private final Class<?> returnType;
+
+ /**
+ *
+ */
+ public MethodInfo(String name, Class<?> returnType, Class<?>[] paramTypes) {
+ this.name = name;
+ this.returnType = returnType;
+ this.paramTypes = paramTypes;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public Class<?>[] getParamTypes() {
+ return this.paramTypes;
+ }
+
+ public Class<?> getReturnType() {
+ return this.returnType;
+ }
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/MethodNotFoundException.java b/bundles/org.apache.tomcat/src/javax/el/MethodNotFoundException.java
new file mode 100644
index 0000000..be09681
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/MethodNotFoundException.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+/**
+ *
+ */
+public class MethodNotFoundException extends ELException {
+
+ private static final long serialVersionUID = -3631968116081480328L;
+
+ /**
+ *
+ */
+ public MethodNotFoundException() {
+ super();
+ }
+
+ /**
+ * @param message
+ */
+ public MethodNotFoundException(String message) {
+ super(message);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public MethodNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * @param cause
+ */
+ public MethodNotFoundException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/PropertyNotFoundException.java b/bundles/org.apache.tomcat/src/javax/el/PropertyNotFoundException.java
new file mode 100644
index 0000000..e19127a
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/PropertyNotFoundException.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+/**
+ *
+ */
+public class PropertyNotFoundException extends ELException {
+
+ private static final long serialVersionUID = -3799200961303506745L;
+
+ /**
+ *
+ */
+ public PropertyNotFoundException() {
+ super();
+ }
+
+ /**
+ * @param message
+ */
+ public PropertyNotFoundException(String message) {
+ super(message);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public PropertyNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * @param cause
+ */
+ public PropertyNotFoundException(Throwable cause) {
+ super(cause);
+ }
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/PropertyNotWritableException.java b/bundles/org.apache.tomcat/src/javax/el/PropertyNotWritableException.java
new file mode 100644
index 0000000..6beddb7
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/PropertyNotWritableException.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+/**
+ *
+ */
+public class PropertyNotWritableException extends ELException {
+
+ private static final long serialVersionUID = 827987155471214717L;
+
+ /**
+ *
+ */
+ public PropertyNotWritableException() {
+ super();
+ }
+
+ /**
+ * @param message
+ */
+ public PropertyNotWritableException(String message) {
+ super(message);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public PropertyNotWritableException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * @param cause
+ */
+ public PropertyNotWritableException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ResourceBundleELResolver.java b/bundles/org.apache.tomcat/src/javax/el/ResourceBundleELResolver.java
new file mode 100644
index 0000000..f10ae41
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ResourceBundleELResolver.java
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class ResourceBundleELResolver extends ELResolver {
+
+ public ResourceBundleELResolver() {
+ super();
+ }
+
+ @Override
+ public Object getValue(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof ResourceBundle) {
+ if (property != null) {
+ try {
+ Object result = ((ResourceBundle) base).getObject(property
+ .toString());
+ context.setPropertyResolved(true);
+ return result;
+ } catch (MissingResourceException mre) {
+ return "???" + property.toString() + "???";
+ }
+ }
+ }
+
+ return null;
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof ResourceBundle) {
+ context.setPropertyResolved(true);
+ }
+
+ return null;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object base, Object property,
+ Object value) throws NullPointerException,
+ PropertyNotFoundException, PropertyNotWritableException,
+ ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof ResourceBundle) {
+ context.setPropertyResolved(true);
+ throw new PropertyNotWritableException(message(context,
+ "resolverNotWriteable", new Object[] { base.getClass()
+ .getName() }));
+ }
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ throws NullPointerException, PropertyNotFoundException, ELException {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+
+ if (base instanceof ResourceBundle) {
+ context.setPropertyResolved(true);
+ }
+
+ return true;
+ }
+
+ @Override
+ // Can't use Iterator<FeatureDescriptor> because API needs to match
+ // specification
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public Iterator getFeatureDescriptors(
+ ELContext context, Object base) {
+ if (base instanceof ResourceBundle) {
+ List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
+ Enumeration<String> e = ((ResourceBundle) base).getKeys();
+ FeatureDescriptor feat;
+ String key;
+ while (e.hasMoreElements()) {
+ key = e.nextElement();
+ feat = new FeatureDescriptor();
+ feat.setDisplayName(key);
+ feat.setExpert(false);
+ feat.setHidden(false);
+ feat.setName(key);
+ feat.setPreferred(true);
+ feat.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
+ feat.setValue(TYPE, String.class);
+ feats.add(feat);
+ }
+ return feats.iterator();
+ }
+ return null;
+ }
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base) {
+ if (base instanceof ResourceBundle) {
+ return String.class;
+ }
+ return null;
+ }
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ValueExpression.java b/bundles/org.apache.tomcat/src/javax/el/ValueExpression.java
new file mode 100644
index 0000000..ad78548
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ValueExpression.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+/**
+ *
+ */
+public abstract class ValueExpression extends Expression {
+
+ private static final long serialVersionUID = 8577809572381654673L;
+
+ public abstract Class<?> getExpectedType();
+
+ public abstract Class<?> getType(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException;
+
+ public abstract boolean isReadOnly(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException;
+
+ public abstract void setValue(ELContext context, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException;
+
+ public abstract Object getValue(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException;
+
+ /**
+ * @since EL 2.2
+ */
+ public ValueReference getValueReference(@SuppressWarnings("unused") ELContext context) {
+ // Expected to be over-ridden by implementation
+ return null;
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/ValueReference.java b/bundles/org.apache.tomcat/src/javax/el/ValueReference.java
new file mode 100644
index 0000000..61807fe
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/ValueReference.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+import java.io.Serializable;
+
+/**
+ * @since EL 2.2
+ */
+public class ValueReference implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private final Object base;
+ private final Object property;
+
+ public ValueReference(Object base, Object property) {
+ this.base = base;
+ this.property = property;
+ }
+
+ public Object getBase() {
+ return base;
+ }
+
+ public Object getProperty() {
+ return property;
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/el/VariableMapper.java b/bundles/org.apache.tomcat/src/javax/el/VariableMapper.java
new file mode 100644
index 0000000..84c3682
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/el/VariableMapper.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.el;
+
+/**
+ *
+ */
+public abstract class VariableMapper {
+
+ public abstract ValueExpression resolveVariable(String variable);
+
+ public abstract ValueExpression setVariable(String variable, ValueExpression expression);
+}
diff --git a/bundles/org.apache.tomcat/src/javax/mail/internet/InternetAddress.java b/bundles/org.apache.tomcat/src/javax/mail/internet/InternetAddress.java
new file mode 100644
index 0000000..4daa35d
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/mail/internet/InternetAddress.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.mail.internet;
+
+@SuppressWarnings("unused") // Dummy implementation
+public class InternetAddress {
+ public InternetAddress(String from) {
+ // Dummy implementation
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/mail/internet/MimeMessage.java b/bundles/org.apache.tomcat/src/javax/mail/internet/MimeMessage.java
new file mode 100644
index 0000000..2587730
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/mail/internet/MimeMessage.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.mail.internet;
+
+import javax.mail.Session;
+
+@SuppressWarnings("unused") // Dummy implementation
+public class MimeMessage implements MimePart {
+ public MimeMessage(Session session) {
+ // Dummy implementation
+ }
+ public void setFrom(InternetAddress from) {
+ // Dummy implementation
+ }
+ public void setSubject(String subject) {
+ // Dummy implementation
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/mail/internet/MimePart.java b/bundles/org.apache.tomcat/src/javax/mail/internet/MimePart.java
new file mode 100644
index 0000000..4b57b20
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/mail/internet/MimePart.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.mail.internet;
+
+public interface MimePart {
+ // Dummy implementation
+}
diff --git a/bundles/org.apache.tomcat/src/javax/mail/internet/MimePartDataSource.java b/bundles/org.apache.tomcat/src/javax/mail/internet/MimePartDataSource.java
new file mode 100644
index 0000000..28a3f39
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/mail/internet/MimePartDataSource.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.mail.internet;
+
+@SuppressWarnings("unused") // Dummy implementation
+public class MimePartDataSource {
+ public MimePartDataSource(MimePart part) {
+ // Dummy implementation
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/persistence/PersistenceContext.java b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceContext.java
new file mode 100644
index 0000000..e8417e2
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceContext.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package javax.persistence;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface PersistenceContext {
+ String name() default "";
+ String unitName() default "";
+ PersistenceContextType type() default PersistenceContextType.TRANSACTION;
+ PersistenceProperty[] properties() default {};
+}
diff --git a/bundles/org.apache.tomcat/src/javax/persistence/PersistenceContextType.java b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceContextType.java
new file mode 100644
index 0000000..500c692
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceContextType.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package javax.persistence;
+
+public enum PersistenceContextType {
+ TRANSACTION,
+ EXTENDED
+} \ No newline at end of file
diff --git a/bundles/org.apache.tomcat/src/javax/persistence/PersistenceContexts.java b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceContexts.java
new file mode 100644
index 0000000..d451f24
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceContexts.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package javax.persistence;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface PersistenceContexts {
+ PersistenceContext[] value();
+}
diff --git a/bundles/org.apache.tomcat/src/javax/persistence/PersistenceProperty.java b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceProperty.java
new file mode 100644
index 0000000..20a42c5
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceProperty.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.persistence;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface PersistenceProperty {
+ String name();
+ String value();
+}
diff --git a/bundles/org.apache.tomcat/src/javax/persistence/PersistenceUnit.java b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceUnit.java
new file mode 100644
index 0000000..e42a3b2
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceUnit.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package javax.persistence;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface PersistenceUnit {
+ String name() default "";
+ String unitName() default "";
+}
diff --git a/bundles/org.apache.tomcat/src/javax/persistence/PersistenceUnits.java b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceUnits.java
new file mode 100644
index 0000000..3f51845
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/persistence/PersistenceUnits.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package javax.persistence;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+
+public @interface PersistenceUnits {
+ PersistenceUnit[] value();
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyContent.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyContent.java
new file mode 100644
index 0000000..f700cb6
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyContent.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.jsp.tagext;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+import javax.servlet.jsp.JspWriter;
+
+/**
+ * An encapsulation of the evaluation of the body of an action so it is
+ * available to a tag handler. BodyContent is a subclass of JspWriter.
+ * <p>
+ * Note that the content of BodyContent is the result of evaluation, so it will
+ * not contain actions and the like, but the result of their invocation.
+ * <p>
+ * BodyContent has methods to convert its contents into a String, to read its
+ * contents, and to clear the contents.
+ * <p>
+ * The buffer size of a BodyContent object is unbounded. A BodyContent object
+ * cannot be in autoFlush mode. It is not possible to invoke flush on a
+ * BodyContent object, as there is no backing stream.
+ * <p>
+ * Instances of BodyContent are created by invoking the pushBody and popBody
+ * methods of the PageContext class. A BodyContent is enclosed within another
+ * JspWriter (maybe another BodyContent object) following the structure of their
+ * associated actions.
+ * <p>
+ * A BodyContent is made available to a BodyTag through a setBodyContent() call.
+ * The tag handler can use the object until after the call to doEndTag().
+ */
+public abstract class BodyContent extends JspWriter {
+
+ /**
+ * Protected constructor. Unbounded buffer, no autoflushing.
+ *
+ * @param e
+ * the enclosing JspWriter
+ */
+ protected BodyContent(JspWriter e) {
+ super(UNBOUNDED_BUFFER, false);
+ this.enclosingWriter = e;
+ }
+
+ /**
+ * Redefined flush() so it is not legal.
+ * <p>
+ * It is not valid to flush a BodyContent because there is no backing stream
+ * behind it.
+ *
+ * @throws IOException
+ * always thrown
+ */
+ @Override
+ public void flush() throws IOException {
+ throw new IOException("Illegal to flush within a custom tag");
+ }
+
+ /**
+ * Clear the body without throwing any exceptions.
+ */
+ public void clearBody() {
+ try {
+ this.clear();
+ } catch (IOException ex) {
+ // TODO -- clean this one up.
+ throw new Error("internal error!;");
+ }
+ }
+
+ /**
+ * Return the value of this BodyContent as a Reader.
+ *
+ * @return the value of this BodyContent as a Reader
+ */
+ public abstract Reader getReader();
+
+ /**
+ * Return the value of the BodyContent as a String.
+ *
+ * @return the value of the BodyContent as a String
+ */
+ public abstract String getString();
+
+ /**
+ * Write the contents of this BodyContent into a Writer. Subclasses may
+ * optimize common invocation patterns.
+ *
+ * @param out
+ * The writer into which to place the contents of this body
+ * evaluation
+ * @throws IOException
+ * if an I/O error occurred while writing the contents of this
+ * BodyContent to the given Writer
+ */
+ public abstract void writeOut(Writer out) throws IOException;
+
+ /**
+ * Get the enclosing JspWriter.
+ *
+ * @return the enclosing JspWriter passed at construction time
+ */
+ public JspWriter getEnclosingWriter() {
+ return enclosingWriter;
+ }
+
+ // private fields
+
+ private final JspWriter enclosingWriter;
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyTag.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyTag.java
new file mode 100644
index 0000000..6452bd5
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyTag.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.jsp.tagext;
+
+import javax.servlet.jsp.JspException;
+
+
+/**
+ * The BodyTag interface extends IterationTag by defining additional methods
+ * that let a tag handler manipulate the content of evaluating its body.
+ * <p>
+ * It is the responsibility of the tag handler to manipulate the body content.
+ * For example the tag handler may take the body content, convert it into a
+ * String using the bodyContent.getString method and then use it. Or the tag
+ * handler may take the body content and write it out into its enclosing
+ * JspWriter using the bodyContent.writeOut method.
+ * <p>
+ * A tag handler that implements BodyTag is treated as one that implements
+ * IterationTag, except that the doStartTag method can return SKIP_BODY,
+ * EVAL_BODY_INCLUDE or EVAL_BODY_BUFFERED.
+ * <p>
+ * If EVAL_BODY_INCLUDE is returned, then evaluation happens as in IterationTag.
+ * <p>
+ * If EVAL_BODY_BUFFERED is returned, then a BodyContent object will be created
+ * (by code generated by the JSP compiler) to capture the body evaluation. The
+ * code generated by the JSP compiler obtains the BodyContent object by calling
+ * the pushBody method of the current pageContext, which additionally has the
+ * effect of saving the previous out value. The page compiler returns this
+ * object by calling the popBody method of the PageContext class; the call also
+ * restores the value of out.
+ * <p>
+ * The interface provides one new property with a setter method and one new
+ * action method.
+ * <p>
+ * <B>Properties</B>
+ * <p>
+ * There is a new property: bodyContent, to contain the BodyContent object,
+ * where the JSP Page implementation object will place the evaluation (and
+ * reevaluation, if appropriate) of the body. The setter method (setBodyContent)
+ * will only be invoked if doStartTag() returns EVAL_BODY_BUFFERED and the
+ * corresponding action element does not have an empty body.
+ * <p>
+ * <B>Methods</B>
+ * <p>
+ * In addition to the setter method for the bodyContent property, there is a new
+ * action method: doInitBody(), which is invoked right after setBodyContent()
+ * and before the body evaluation. This method is only invoked if doStartTag()
+ * returns EVAL_BODY_BUFFERED.
+ * <p>
+ * <B>Lifecycle</B>
+ * <p>
+ * Lifecycle details are described by the transition diagram below. Exceptions
+ * that are thrown during the computation of doStartTag(), setBodyContent(),
+ * doInitBody(), BODY, doAfterBody() interrupt the execution sequence and are
+ * propagated up the stack, unless the tag handler implements the
+ * TryCatchFinally interface; see that interface for details.
+ * <p>
+ * <IMG src="doc-files/BodyTagProtocol.gif"
+ * alt="Lifecycle Details Transition Diagram for BodyTag"/>
+ * <p>
+ * <B>Empty and Non-Empty Action</B>
+ * <p>
+ * If the TagLibraryDescriptor file indicates that the action must always have
+ * an empty element body, by an &lt;body-content&gt; entry of "empty", then the
+ * doStartTag() method must return SKIP_BODY. Otherwise, the doStartTag() method
+ * may return SKIP_BODY, EVAL_BODY_INCLUDE, or EVAL_BODY_BUFFERED.
+ * <p>
+ * Note that which methods are invoked after the doStartTag() depends on both
+ * the return value and on if the custom action element is empty or not in the
+ * JSP page, not how it's declared in the TLD.
+ * <p>
+ * If SKIP_BODY is returned the body is not evaluated, and doEndTag() is
+ * invoked.
+ * <p>
+ * If EVAL_BODY_INCLUDE is returned, and the custom action element is not empty,
+ * setBodyContent() is not invoked, doInitBody() is not invoked, the body is
+ * evaluated and "passed through" to the current out, doAfterBody() is invoked
+ * and then, after zero or more iterations, doEndTag() is invoked. If the custom
+ * action element is empty, only doStart() and doEndTag() are invoked.
+ * <p>
+ * If EVAL_BODY_BUFFERED is returned, and the custom action element is not
+ * empty, setBodyContent() is invoked, doInitBody() is invoked, the body is
+ * evaluated, doAfterBody() is invoked, and then, after zero or more iterations,
+ * doEndTag() is invoked. If the custom action element is empty, only doStart()
+ * and doEndTag() are invoked.
+ */
+public interface BodyTag extends IterationTag {
+
+ /**
+ * Deprecated constant that has the same value as EVAL_BODY_BUFFERED and
+ * EVAL_BODY_AGAIN. This name has been marked as deprecated to encourage the
+ * use of the two different terms, which are much more descriptive.
+ *
+ * @deprecated As of Java JSP API 1.2, use BodyTag.EVAL_BODY_BUFFERED or
+ * IterationTag.EVAL_BODY_AGAIN.
+ */
+ @SuppressWarnings("dep-ann")
+ // TCK signature test fails with annotation
+ public static final int EVAL_BODY_TAG = 2;
+
+ /**
+ * Request the creation of new buffer, a BodyContent on which to evaluate
+ * the body of this tag. Returned from doStartTag when it implements
+ * BodyTag. This is an illegal return value for doStartTag when the class
+ * does not implement BodyTag.
+ */
+ public static final int EVAL_BODY_BUFFERED = 2;
+
+ /**
+ * Set the bodyContent property. This method is invoked by the JSP page
+ * implementation object at most once per action invocation. This method
+ * will be invoked before doInitBody. This method will not be invoked for
+ * empty tags or for non-empty tags whose doStartTag() method returns
+ * SKIP_BODY or EVAL_BODY_INCLUDE.
+ * <p>
+ * When setBodyContent is invoked, the value of the implicit object out has
+ * already been changed in the pageContext object. The BodyContent object
+ * passed will have not data on it but may have been reused (and cleared)
+ * from some previous invocation.
+ * <p>
+ * The BodyContent object is available and with the appropriate content
+ * until after the invocation of the doEndTag method, at which case it may
+ * be reused.
+ *
+ * @param b
+ * the BodyContent
+ * @see #doInitBody
+ * @see #doAfterBody
+ */
+ void setBodyContent(BodyContent b);
+
+ /**
+ * Prepare for evaluation of the body. This method is invoked by the JSP
+ * page implementation object after setBodyContent and before the first time
+ * the body is to be evaluated. This method will not be invoked for empty
+ * tags or for non-empty tags whose doStartTag() method returns SKIP_BODY or
+ * EVAL_BODY_INCLUDE.
+ * <p>
+ * The JSP container will resynchronize the values of any AT_BEGIN and
+ * NESTED variables (defined by the associated TagExtraInfo or TLD) after
+ * the invocation of doInitBody().
+ *
+ * @throws JspException
+ * if an error occurred while processing this tag
+ * @see #doAfterBody
+ */
+ void doInitBody() throws JspException;
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyTagSupport.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyTagSupport.java
new file mode 100644
index 0000000..740a73b
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/BodyTagSupport.java
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.jsp.tagext;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+
+/**
+ * A base class for defining tag handlers implementing BodyTag.
+ * <p>
+ * The BodyTagSupport class implements the BodyTag interface and adds additional
+ * convenience methods including getter methods for the bodyContent property and
+ * methods to get at the previous out JspWriter.
+ * <p>
+ * Many tag handlers will extend BodyTagSupport and only redefine a few methods.
+ */
+public class BodyTagSupport extends TagSupport implements BodyTag {
+
+ private static final long serialVersionUID = -7235752615580319833L;
+
+ /**
+ * Default constructor, all subclasses are required to only define a public
+ * constructor with the same signature, and to call the superclass
+ * constructor. This constructor is called by the code generated by the JSP
+ * translator.
+ */
+ public BodyTagSupport() {
+ super();
+ }
+
+ /**
+ * Default processing of the start tag returning EVAL_BODY_BUFFERED.
+ *
+ * @return EVAL_BODY_BUFFERED
+ * @throws JspException
+ * if an error occurred while processing this tag
+ * @see BodyTag#doStartTag
+ */
+ @Override
+ public int doStartTag() throws JspException {
+ return EVAL_BODY_BUFFERED;
+ }
+
+ /**
+ * Default processing of the end tag returning EVAL_PAGE.
+ *
+ * @return EVAL_PAGE
+ * @throws JspException
+ * if an error occurred while processing this tag
+ * @see Tag#doEndTag
+ */
+ @Override
+ public int doEndTag() throws JspException {
+ return super.doEndTag();
+ }
+
+ // Actions related to body evaluation
+
+ /**
+ * Prepare for evaluation of the body: stash the bodyContent away.
+ *
+ * @param b
+ * the BodyContent
+ * @see #doAfterBody
+ * @see #doInitBody()
+ * @see BodyTag#setBodyContent
+ */
+ @Override
+ public void setBodyContent(BodyContent b) {
+ this.bodyContent = b;
+ }
+
+ /**
+ * Prepare for evaluation of the body just before the first body evaluation:
+ * no action.
+ *
+ * @throws JspException
+ * if an error occurred while processing this tag
+ * @see #setBodyContent
+ * @see #doAfterBody
+ * @see BodyTag#doInitBody
+ */
+ @Override
+ public void doInitBody() throws JspException {
+ // NOOP by default
+ }
+
+ /**
+ * After the body evaluation: do not reevaluate and continue with the page.
+ * By default nothing is done with the bodyContent data (if any).
+ *
+ * @return SKIP_BODY
+ * @throws JspException
+ * if an error occurred while processing this tag
+ * @see #doInitBody
+ * @see BodyTag#doAfterBody
+ */
+ @Override
+ public int doAfterBody() throws JspException {
+ return SKIP_BODY;
+ }
+
+ /**
+ * Release state.
+ *
+ * @see Tag#release
+ */
+ @Override
+ public void release() {
+ bodyContent = null;
+
+ super.release();
+ }
+
+ /**
+ * Get current bodyContent.
+ *
+ * @return the body content.
+ */
+ public BodyContent getBodyContent() {
+ return bodyContent;
+ }
+
+ /**
+ * Get surrounding out JspWriter.
+ *
+ * @return the enclosing JspWriter, from the bodyContent.
+ */
+ public JspWriter getPreviousOut() {
+ return bodyContent.getEnclosingWriter();
+ }
+
+ // protected fields
+
+ /**
+ * The current BodyContent for this BodyTag.
+ */
+ protected transient BodyContent bodyContent;
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/DynamicAttributes.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/DynamicAttributes.java
new file mode 100644
index 0000000..be77f64
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/DynamicAttributes.java
@@ -0,0 +1,52 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp.tagext;
+
+import javax.servlet.jsp.JspException;
+
+/**
+ * For a tag to declare that it accepts dynamic attributes, it must implement
+ * this interface. The entry for the tag in the Tag Library Descriptor must
+ * also be configured to indicate dynamic attributes are accepted.
+ * <br>
+ * For any attribute that is not declared in the Tag Library Descriptor for
+ * this tag, instead of getting an error at translation time, the
+ * <code>setDynamicAttribute()</code> method is called, with the name and
+ * value of the attribute. It is the responsibility of the tag to
+ * remember the names and values of the dynamic attributes.
+ *
+ * @since 2.0
+ */
+public interface DynamicAttributes {
+
+ /**
+ * Called when a tag declared to accept dynamic attributes is passed
+ * an attribute that is not declared in the Tag Library Descriptor.
+ *
+ * @param uri the namespace of the attribute, or null if in the default
+ * namespace.
+ * @param localName the name of the attribute being set.
+ * @param value the value of the attribute
+ * @throws JspException if the tag handler wishes to
+ * signal that it does not accept the given attribute. The
+ * container must not call doStartTag() or doTag() for this tag.
+ */
+ public void setDynamicAttribute(
+ String uri, String localName, Object value )
+ throws JspException;
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/FunctionInfo.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/FunctionInfo.java
new file mode 100644
index 0000000..56e2341
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/FunctionInfo.java
@@ -0,0 +1,79 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.servlet.jsp.tagext;
+
+/**
+ * Information for a function in a Tag Library.
+ * This class is instantiated from the Tag Library Descriptor file (TLD)
+ * and is available only at translation time.
+ *
+ * @since 2.0
+ */
+public class FunctionInfo {
+
+ /**
+ * Constructor for FunctionInfo.
+ *
+ * @param name The name of the function
+ * @param klass The class of the function
+ * @param signature The signature of the function
+ */
+
+ public FunctionInfo(String name, String klass, String signature) {
+ this.name = name;
+ this.functionClass = klass;
+ this.functionSignature = signature;
+ }
+
+ /**
+ * The name of the function.
+ *
+ * @return The name of the function
+ */
+
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * The class of the function.
+ *
+ * @return The class of the function
+ */
+
+ public String getFunctionClass() {
+ return functionClass;
+ }
+
+ /**
+ * The signature of the function.
+ *
+ * @return The signature of the function
+ */
+
+ public String getFunctionSignature() {
+ return functionSignature;
+ }
+
+ /*
+ * fields
+ */
+ private final String name;
+ private final String functionClass;
+ private final String functionSignature;
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/IterationTag.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/IterationTag.java
new file mode 100644
index 0000000..f2aaef5
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/IterationTag.java
@@ -0,0 +1,121 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.servlet.jsp.tagext;
+
+import javax.servlet.jsp.JspException;
+
+
+/**
+ * The IterationTag interface extends Tag by defining one additional
+ * method that controls the reevaluation of its body.
+ *
+ * <p> A tag handler that implements IterationTag is treated as one that
+ * implements Tag regarding the doStartTag() and doEndTag() methods.
+ * IterationTag provides a new method: <code>doAfterBody()</code>.
+ *
+ * <p> The doAfterBody() method is invoked after every body evaluation
+ * to control whether the body will be reevaluated or not. If doAfterBody()
+ * returns IterationTag.EVAL_BODY_AGAIN, then the body will be reevaluated.
+ * If doAfterBody() returns Tag.SKIP_BODY, then the body will be skipped
+ * and doEndTag() will be evaluated instead.
+ *
+ * <p><B>Properties</B>
+ * There are no new properties in addition to those in Tag.
+ *
+ * <p><B>Methods</B>
+ * There is one new methods: doAfterBody().
+ *
+ * <p><B>Lifecycle</B>
+ *
+ * <p> Lifecycle details are described by the transition diagram
+ * below. Exceptions that are thrown during the computation of
+ * doStartTag(), BODY and doAfterBody() interrupt the execution
+ * sequence and are propagated up the stack, unless the tag handler
+ * implements the TryCatchFinally interface; see that interface for
+ * details.
+ *
+ * <p>
+ * <IMG src="doc-files/IterationTagProtocol.gif"
+ * alt="Lifecycle Details Transition Diagram for IterationTag"/>
+ *
+ * <p><B>Empty and Non-Empty Action</B>
+ * <p> If the TagLibraryDescriptor file indicates that the action must
+ * always have an empty element body, by a &lt;body-content&gt; entry of
+ * "empty", then the doStartTag() method must return SKIP_BODY.
+ *
+ * <p>Note that which methods are invoked after the doStartTag() depends on
+ * both the return value and on if the custom action element is empty
+ * or not in the JSP page, not on how it's declared in the TLD.
+ *
+ * <p>
+ * If SKIP_BODY is returned the body is not evaluated, and then doEndTag()
+ * is invoked.
+ *
+ * <p>
+ * If EVAL_BODY_INCLUDE is returned, and the custom action element is not
+ * empty, the body is evaluated and "passed through" to the current out,
+ * then doAfterBody() is invoked and, after zero or more iterations,
+ * doEndTag() is invoked.
+ */
+
+public interface IterationTag extends Tag {
+
+ /**
+ * Request the reevaluation of some body.
+ * Returned from doAfterBody.
+ *
+ * For compatibility with JSP 1.1, the value is carefully selected
+ * to be the same as the, now deprecated, BodyTag.EVAL_BODY_TAG,
+ *
+ */
+
+ public static final int EVAL_BODY_AGAIN = 2;
+
+ /**
+ * Process body (re)evaluation. This method is invoked by the
+ * JSP Page implementation object after every evaluation of
+ * the body into the BodyEvaluation object. The method is
+ * not invoked if there is no body evaluation.
+ *
+ * <p>
+ * If doAfterBody returns EVAL_BODY_AGAIN, a new evaluation of the
+ * body will happen (followed by another invocation of doAfterBody).
+ * If doAfterBody returns SKIP_BODY, no more body evaluations will occur,
+ * and the doEndTag method will be invoked.
+ *
+ * <p>
+ * If this tag handler implements BodyTag and doAfterBody returns
+ * SKIP_BODY, the value of out will be restored using the popBody
+ * method in pageContext prior to invoking doEndTag.
+ *
+ * <p>
+ * The method re-invocations may be lead to different actions because
+ * there might have been some changes to shared state, or because
+ * of external computation.
+ *
+ * <p>
+ * The JSP container will resynchronize the values of any AT_BEGIN and
+ * NESTED variables (defined by the associated TagExtraInfo or TLD) after
+ * the invocation of doAfterBody().
+ *
+ * @return whether additional evaluations of the body are desired
+ * @throws JspException if an error occurred while processing this tag
+ */
+
+ int doAfterBody() throws JspException;
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspFragment.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspFragment.java
new file mode 100644
index 0000000..c5b3b08
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspFragment.java
@@ -0,0 +1,85 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.servlet.jsp.tagext;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.JspException;
+
+/**
+ * Encapsulates a portion of JSP code in an object that
+ * can be invoked as many times as needed. JSP Fragments are defined
+ * using JSP syntax as the body of a tag for an invocation to a SimpleTag
+ * handler, or as the body of a &lt;jsp:attribute&gt; standard action
+ * specifying the value of an attribute that is declared as a fragment,
+ * or to be of type JspFragment in the TLD.
+ * <p>
+ * The definition of the JSP fragment must only contain template
+ * text and JSP action elements. In other words, it must not contain
+ * scriptlets or scriptlet expressions. At translation time, the
+ * container generates an implementation of the JspFragment abstract class
+ * capable of executing the defined fragment.
+ * <p>
+ * A tag handler can invoke the fragment zero or more times, or
+ * pass it along to other tags, before returning. To communicate values
+ * to/from a JSP fragment, tag handlers store/retrieve values in
+ * the JspContext associated with the fragment.
+ * <p>
+ * Note that tag library developers and page authors should not generate
+ * JspFragment implementations manually.
+ * <p>
+ * <i>Implementation Note</i>: It is not necessary to generate a
+ * separate class for each fragment. One possible implementation is
+ * to generate a single helper class for each page that implements
+ * JspFragment. Upon construction, a discriminator can be passed to
+ * select which fragment that instance will execute.
+ *
+ * @since 2.0
+ */
+public abstract class JspFragment {
+
+ /**
+ * Executes the fragment and directs all output to the given Writer,
+ * or the JspWriter returned by the getOut() method of the JspContext
+ * associated with the fragment if out is null.
+ *
+ * @param out The Writer to output the fragment to, or null if
+ * output should be sent to JspContext.getOut().
+ * @throws javax.servlet.jsp.JspException Thrown if an error occurred
+ * while invoking this fragment.
+ * @throws javax.servlet.jsp.SkipPageException Thrown if the page
+ * that (either directly or indirectly) invoked the tag handler that
+ * invoked this fragment is to cease evaluation. The container
+ * must throw this exception if a Classic Tag Handler returned
+ * Tag.SKIP_PAGE or if a Simple Tag Handler threw SkipPageException.
+ * @throws java.io.IOException If there was an error writing to the
+ * stream.
+ */
+ public abstract void invoke( Writer out )
+ throws JspException, IOException;
+
+ /**
+ * Returns the JspContext that is bound to this JspFragment.
+ *
+ * @return The JspContext used by this fragment at invocation time.
+ */
+ public abstract JspContext getJspContext();
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspIdConsumer.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspIdConsumer.java
new file mode 100644
index 0000000..f3d49bf
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspIdConsumer.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.jsp.tagext;
+
+public interface JspIdConsumer {
+ public void setJspId(String jspId);
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspTag.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspTag.java
new file mode 100644
index 0000000..3c8d138
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/JspTag.java
@@ -0,0 +1,27 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp.tagext;
+
+/**
+ * Serves as a base class for Tag and SimpleTag.
+ * This is mostly for organizational and type-safety purposes.
+ *
+ * @since 2.0
+ */
+public interface JspTag {
+ // No methods even through there are some common methods
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/PageData.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/PageData.java
new file mode 100644
index 0000000..9f6343c
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/PageData.java
@@ -0,0 +1,50 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package javax.servlet.jsp.tagext;
+
+import java.io.InputStream;
+
+/**
+ * Translation-time information on a JSP page. The information
+ * corresponds to the XML view of the JSP page.
+ *
+ * <p>
+ * Objects of this type are generated by the JSP translator, e.g.
+ * when being passed to a TagLibraryValidator instance.
+ */
+
+public abstract class PageData {
+
+ /**
+ * Sole constructor. (For invocation by subclass constructors,
+ * typically implicit.)
+ */
+ public PageData() {
+ // NOOP by default
+ }
+
+ /**
+ * Returns an input stream on the XML view of a JSP page.
+ * The stream is encoded in UTF-8. Recall that the XML view of a
+ * JSP page has the include directives expanded.
+ *
+ * @return An input stream on the document.
+ */
+ public abstract InputStream getInputStream();
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/SimpleTag.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/SimpleTag.java
new file mode 100644
index 0000000..25569a7
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/SimpleTag.java
@@ -0,0 +1,140 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp.tagext;
+
+import javax.servlet.jsp.JspContext;
+
+/**
+ * Interface for defining Simple Tag Handlers.
+ *
+ * <p>Simple Tag Handlers differ from Classic Tag Handlers in that instead
+ * of supporting <code>doStartTag()</code> and <code>doEndTag()</code>,
+ * the <code>SimpleTag</code> interface provides a simple
+ * <code>doTag()</code> method, which is called once and only once for any
+ * given tag invocation. All tag logic, iteration, body evaluations, etc.
+ * are to be performed in this single method. Thus, simple tag handlers
+ * have the equivalent power of <code>BodyTag</code>, but with a much
+ * simpler lifecycle and interface.</p>
+ *
+ * <p>To support body content, the <code>setJspBody()</code>
+ * method is provided. The container invokes the <code>setJspBody()</code>
+ * method with a <code>JspFragment</code> object encapsulating the body of
+ * the tag. The tag handler implementation can call
+ * <code>invoke()</code> on that fragment to evaluate the body as
+ * many times as it needs.</p>
+ *
+ * <p>A SimpleTag handler must have a public no-args constructor. Most
+ * SimpleTag handlers should extend SimpleTagSupport.</p>
+ *
+ * <p><b>Lifecycle</b></p>
+ *
+ * <p>The following is a non-normative, brief overview of the
+ * SimpleTag lifecycle. Refer to the JSP Specification for details.</p>
+ *
+ * <ol>
+ * <li>A new tag handler instance is created each time by the container
+ * by calling the provided zero-args constructor. Unlike classic
+ * tag handlers, simple tag handlers are never cached and reused by
+ * the JSP container.</li>
+ * <li>The <code>setJspContext()</code> and <code>setParent()</code>
+ * methods are called by the container. The <code>setParent()</code>
+ * method is only called if the element is nested within another tag
+ * invocation.</li>
+ * <li>The setters for each attribute defined for this tag are called
+ * by the container.</li>
+ * <li>If a body exists, the <code>setJspBody()</code> method is called
+ * by the container to set the body of this tag, as a
+ * <code>JspFragment</code>. If the action element is empty in
+ * the page, this method is not called at all.</li>
+ * <li>The <code>doTag()</code> method is called by the container. All
+ * tag logic, iteration, body evaluations, etc. occur in this
+ * method.</li>
+ * <li>The <code>doTag()</code> method returns and all variables are
+ * synchronized.</li>
+ * </ol>
+ *
+ * @see SimpleTagSupport
+ * @since 2.0
+ */
+public interface SimpleTag extends JspTag {
+
+ /**
+ * Called by the container to invoke this tag.
+ * The implementation of this method is provided by the tag library
+ * developer, and handles all tag processing, body iteration, etc.
+ *
+ * <p>
+ * The JSP container will resynchronize any AT_BEGIN and AT_END
+ * variables (defined by the associated tag file, TagExtraInfo, or TLD)
+ * after the invocation of doTag().
+ *
+ * @throws javax.servlet.jsp.JspException If an error occurred
+ * while processing this tag.
+ * @throws javax.servlet.jsp.SkipPageException If the page that
+ * (either directly or indirectly) invoked this tag is to
+ * cease evaluation. A Simple Tag Handler generated from a
+ * tag file must throw this exception if an invoked Classic
+ * Tag Handler returned SKIP_PAGE or if an invoked Simple
+ * Tag Handler threw SkipPageException or if an invoked Jsp Fragment
+ * threw a SkipPageException.
+ * @throws java.io.IOException If there was an error writing to the
+ * output stream.
+ */
+ public void doTag()
+ throws javax.servlet.jsp.JspException, java.io.IOException;
+
+ /**
+ * Sets the parent of this tag, for collaboration purposes.
+ * <p>
+ * The container invokes this method only if this tag invocation is
+ * nested within another tag invocation.
+ *
+ * @param parent the tag that encloses this tag
+ */
+ public void setParent( JspTag parent );
+
+ /**
+ * Returns the parent of this tag, for collaboration purposes.
+ *
+ * @return the parent of this tag
+ */
+ public JspTag getParent();
+
+ /**
+ * Called by the container to provide this tag handler with
+ * the <code>JspContext</code> for this invocation.
+ * An implementation should save this value.
+ *
+ * @param pc the page context for this invocation
+ * @see Tag#setPageContext
+ */
+ public void setJspContext( JspContext pc );
+
+ /**
+ * Provides the body of this tag as a JspFragment object, able to be
+ * invoked zero or more times by the tag handler.
+ * <p>
+ * This method is invoked by the JSP page implementation
+ * object prior to <code>doTag()</code>. If the action element is
+ * empty in the page, this method is not called at all.
+ *
+ * @param jspBody The fragment encapsulating the body of this tag.
+ */
+ public void setJspBody( JspFragment jspBody );
+
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/SimpleTagSupport.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/SimpleTagSupport.java
new file mode 100644
index 0000000..43967ec
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/SimpleTagSupport.java
@@ -0,0 +1,217 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp.tagext;
+
+import java.io.IOException;
+
+import javax.servlet.jsp.JspContext;
+import javax.servlet.jsp.JspException;
+
+/**
+ * A base class for defining tag handlers implementing SimpleTag.
+ * <p>
+ * The SimpleTagSupport class is a utility class intended to be used
+ * as the base class for new simple tag handlers. The SimpleTagSupport
+ * class implements the SimpleTag interface and adds additional
+ * convenience methods including getter methods for the properties in
+ * SimpleTag.
+ *
+ * @since 2.0
+ */
+public class SimpleTagSupport implements SimpleTag {
+ /** Reference to the enclosing tag. */
+ private JspTag parentTag;
+
+ /** The JSP context for the upcoming tag invocation. */
+ private JspContext jspContext;
+
+ /** The body of the tag. */
+ private JspFragment jspBody;
+
+ /**
+ * Sole constructor. (For invocation by subclass constructors,
+ * typically implicit.)
+ */
+ public SimpleTagSupport() {
+ // NOOP by default
+ }
+
+ /**
+ * Default processing of the tag does nothing.
+ *
+ * @throws JspException Subclasses can throw JspException to indicate
+ * an error occurred while processing this tag.
+ * @throws javax.servlet.jsp.SkipPageException If the page that
+ * (either directly or indirectly) invoked this tag is to
+ * cease evaluation. A Simple Tag Handler generated from a
+ * tag file must throw this exception if an invoked Classic
+ * Tag Handler returned SKIP_PAGE or if an invoked Simple
+ * Tag Handler threw SkipPageException or if an invoked Jsp Fragment
+ * threw a SkipPageException.
+ * @throws IOException Subclasses can throw IOException if there was
+ * an error writing to the output stream
+ * @see SimpleTag#doTag()
+ */
+ @Override
+ public void doTag() throws JspException, IOException {
+ // NOOP by default
+ }
+
+ /**
+ * Sets the parent of this tag, for collaboration purposes.
+ * <p>
+ * The container invokes this method only if this tag invocation is
+ * nested within another tag invocation.
+ *
+ * @param parent the tag that encloses this tag
+ */
+ @Override
+ public void setParent( JspTag parent ) {
+ this.parentTag = parent;
+ }
+
+ /**
+ * Returns the parent of this tag, for collaboration purposes.
+ *
+ * @return the parent of this tag
+ */
+ @Override
+ public JspTag getParent() {
+ return this.parentTag;
+ }
+
+ /**
+ * Stores the provided JSP context in the private jspContext field.
+ * Subclasses can access the <code>JspContext</code> via
+ * <code>getJspContext()</code>.
+ *
+ * @param pc the page context for this invocation
+ * @see SimpleTag#setJspContext
+ */
+ @Override
+ public void setJspContext( JspContext pc ) {
+ this.jspContext = pc;
+ }
+
+ /**
+ * Returns the page context passed in by the container via
+ * setJspContext.
+ *
+ * @return the page context for this invocation
+ */
+ protected JspContext getJspContext() {
+ return this.jspContext;
+ }
+
+ /**
+ * Stores the provided JspFragment.
+ *
+ * @param jspBody The fragment encapsulating the body of this tag.
+ * If the action element is empty in the page, this method is
+ * not called at all.
+ * @see SimpleTag#setJspBody
+ */
+ @Override
+ public void setJspBody( JspFragment jspBody ) {
+ this.jspBody = jspBody;
+ }
+
+ /**
+ * Returns the body passed in by the container via setJspBody.
+ *
+ * @return the fragment encapsulating the body of this tag, or
+ * null if the action element is empty in the page.
+ */
+ protected JspFragment getJspBody() {
+ return this.jspBody;
+ }
+
+ /**
+ * Find the instance of a given class type that is closest to a given
+ * instance.
+ * This method uses the getParent method from the Tag and/or SimpleTag
+ * interfaces. This method is used for coordination among
+ * cooperating tags.
+ *
+ * <p> For every instance of TagAdapter
+ * encountered while traversing the ancestors, the tag handler returned by
+ * <tt>TagAdapter.getAdaptee()</tt> - instead of the TagAdpater itself -
+ * is compared to <tt>klass</tt>. If the tag handler matches, it - and
+ * not its TagAdapter - is returned.
+ *
+ * <p>
+ * The current version of the specification only provides one formal
+ * way of indicating the observable type of a tag handler: its
+ * tag handler implementation class, described in the tag-class
+ * subelement of the tag element. This is extended in an
+ * informal manner by allowing the tag library author to
+ * indicate in the description subelement an observable type.
+ * The type should be a subtype of the tag handler implementation
+ * class or void.
+ * This additional constraint can be exploited by a
+ * specialized container that knows about that specific tag library,
+ * as in the case of the JSP standard tag library.
+ *
+ * <p>
+ * When a tag library author provides information on the
+ * observable type of a tag handler, client programmatic code
+ * should adhere to that constraint. Specifically, the Class
+ * passed to findAncestorWithClass should be a subtype of the
+ * observable type.
+ *
+ *
+ * @param from The instance from where to start looking.
+ * @param klass The subclass of JspTag or interface to be matched
+ * @return the nearest ancestor that implements the interface
+ * or is an instance of the class specified
+ */
+ public static final JspTag findAncestorWithClass(
+ JspTag from, Class<?> klass)
+ {
+ boolean isInterface = false;
+
+ if (from == null || klass == null
+ || (!JspTag.class.isAssignableFrom(klass)
+ && !(isInterface = klass.isInterface()))) {
+ return null;
+ }
+
+ for (;;) {
+ JspTag parent = null;
+ if( from instanceof SimpleTag ) {
+ parent = ((SimpleTag)from).getParent();
+ }
+ else if( from instanceof Tag ) {
+ parent = ((Tag)from).getParent();
+ }
+ if (parent == null) {
+ return null;
+ }
+
+ if (parent instanceof TagAdapter) {
+ parent = ((TagAdapter) parent).getAdaptee();
+ }
+
+ if ((isInterface && klass.isInstance(parent))
+ || klass.isAssignableFrom(parent.getClass())) {
+ return parent;
+ }
+
+ from = parent;
+ }
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/Tag.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/Tag.java
new file mode 100644
index 0000000..fdd3b07
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/Tag.java
@@ -0,0 +1,264 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.servlet.jsp.tagext;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+
+
+/**
+ * The interface of a classic tag handler that does not want to manipulate
+ * its body. The Tag interface defines the basic protocol between a Tag
+ * handler and JSP page implementation class. It defines the life cycle
+ * and the methods to be invoked at start and end tag.
+ *
+ * <p><B>Properties</B></p>
+ *
+ * <p>The Tag interface specifies the setter and getter methods for the core
+ * pageContext and parent properties.</p>
+ *
+ * <p>The JSP page implementation object invokes setPageContext and
+ * setParent, in that order, before invoking doStartTag() or doEndTag().</p>
+ *
+ * <p><B>Methods</B></p>
+ *
+ * <p>There are two main actions: doStartTag and doEndTag. Once all
+ * appropriate properties have been initialized, the doStartTag and
+ * doEndTag methods can be invoked on the tag handler. Between these
+ * invocations, the tag handler is assumed to hold a state that must
+ * be preserved. After the doEndTag invocation, the tag handler is
+ * available for further invocations (and it is expected to have
+ * retained its properties).</p>
+ *
+ * <p><B>Lifecycle</B></p>
+ *
+ * <p>Lifecycle details are described by the transition diagram below,
+ * with the following comments:
+ * <ul>
+ * <li> [1] This transition is intended to be for releasing long-term data.
+ * no guarantees are assumed on whether any properties have been retained
+ * or not.
+ * <li> [2] This transition happens if and only if the tag ends normally
+ * without raising an exception
+ * <li> [3] Some setters may be called again before a tag handler is
+ * reused. For instance, <code>setParent()</code> is called if it's
+ * reused within the same page but at a different level,
+ * <code>setPageContext()</code> is called if it's used in another page,
+ * and attribute setters are called if the values differ or are expressed
+ * as request-time attribute values.
+ * <li> Check the TryCatchFinally interface for additional details related
+ * to exception handling and resource management.
+ * </ul></p>
+ *
+ * <IMG src="doc-files/TagProtocol.gif"
+ * alt="Lifecycle Details Transition Diagram for Tag"/>
+ *
+ * <p>Once all invocations on the tag handler
+ * are completed, the release method is invoked on it. Once a release
+ * method is invoked <em>all</em> properties, including parent and
+ * pageContext, are assumed to have been reset to an unspecified value.
+ * The page compiler guarantees that release() will be invoked on the Tag
+ * handler before the handler is released to the GC.</p>
+ *
+ * <p><B>Empty and Non-Empty Action</B></p>
+ * <p>If the TagLibraryDescriptor file indicates that the action must
+ * always have an empty action, by an &lt;body-content&gt; entry of "empty",
+ * then the doStartTag() method must return SKIP_BODY.</p>
+ *
+ * <p>Otherwise, the doStartTag() method may return SKIP_BODY or
+ * EVAL_BODY_INCLUDE.</p>
+ *
+ * <p>If SKIP_BODY is returned the body, if present, is not evaluated.</p>
+ *
+ * <p>If EVAL_BODY_INCLUDE is returned, the body is evaluated and
+ * "passed through" to the current out.</p>
+*/
+
+public interface Tag extends JspTag {
+
+ /**
+ * Skip body evaluation.
+ * Valid return value for doStartTag and doAfterBody.
+ */
+
+ public static final int SKIP_BODY = 0;
+
+ /**
+ * Evaluate body into existing out stream.
+ * Valid return value for doStartTag.
+ */
+
+ public static final int EVAL_BODY_INCLUDE = 1;
+
+ /**
+ * Skip the rest of the page.
+ * Valid return value for doEndTag.
+ */
+
+ public static final int SKIP_PAGE = 5;
+
+ /**
+ * Continue evaluating the page.
+ * Valid return value for doEndTag().
+ */
+
+ public static final int EVAL_PAGE = 6;
+
+ // Setters for Tag handler data
+
+
+ /**
+ * Set the current page context.
+ * This method is invoked by the JSP page implementation object
+ * prior to doStartTag().
+ * <p>
+ * This value is *not* reset by doEndTag() and must be explicitly reset
+ * by a page implementation if it changes between calls to doStartTag().
+ *
+ * @param pc The page context for this tag handler.
+ */
+
+ void setPageContext(PageContext pc);
+
+
+ /**
+ * Set the parent (closest enclosing tag handler) of this tag handler.
+ * Invoked by the JSP page implementation object prior to doStartTag().
+ * <p>
+ * This value is *not* reset by doEndTag() and must be explicitly reset
+ * by a page implementation.
+ *
+ * @param t The parent tag, or null.
+ */
+
+
+ void setParent(Tag t);
+
+
+ /**
+ * Get the parent (closest enclosing tag handler) for this tag handler.
+ *
+ * <p>
+ * The getParent() method can be used to navigate the nested tag
+ * handler structure at runtime for cooperation among custom actions;
+ * for example, the findAncestorWithClass() method in TagSupport
+ * provides a convenient way of doing this.
+ *
+ * <p>
+ * The current version of the specification only provides one formal
+ * way of indicating the observable type of a tag handler: its
+ * tag handler implementation class, described in the tag-class
+ * sub-element of the tag element. This is extended in an
+ * informal manner by allowing the tag library author to
+ * indicate in the description sub-element an observable type.
+ * The type should be a sub-type of the tag handler implementation
+ * class or void.
+ * This additional constraint can be exploited by a
+ * specialized container that knows about that specific tag library,
+ * as in the case of the JSP standard tag library.
+ *
+ * @return the current parent, or null if none.
+ * @see TagSupport#findAncestorWithClass
+ */
+
+ Tag getParent();
+
+
+ // Actions for basic start/end processing.
+
+
+ /**
+ * Process the start tag for this instance.
+ * This method is invoked by the JSP page implementation object.
+ *
+ * <p>
+ * The doStartTag method assumes that the properties pageContext and
+ * parent have been set. It also assumes that any properties exposed as
+ * attributes have been set too. When this method is invoked, the body
+ * has not yet been evaluated.
+ *
+ * <p>
+ * This method returns Tag.EVAL_BODY_INCLUDE or
+ * BodyTag.EVAL_BODY_BUFFERED to indicate
+ * that the body of the action should be evaluated or SKIP_BODY to
+ * indicate otherwise.
+ *
+ * <p>
+ * When a Tag returns EVAL_BODY_INCLUDE the result of evaluating
+ * the body (if any) is included into the current "out" JspWriter as it
+ * happens and then doEndTag() is invoked.
+ *
+ * <p>
+ * BodyTag.EVAL_BODY_BUFFERED is only valid if the tag handler
+ * implements BodyTag.
+ *
+ * <p>
+ * The JSP container will resynchronize the values of any AT_BEGIN and
+ * NESTED variables (defined by the associated TagExtraInfo or TLD)
+ * after the invocation of doStartTag(), except for a tag handler
+ * implementing BodyTag whose doStartTag() method returns
+ * BodyTag.EVAL_BODY_BUFFERED.
+ *
+ * @return EVAL_BODY_INCLUDE if the tag wants to process body, SKIP_BODY
+ * if it does not want to process it.
+ * @throws JspException if an error occurred while processing this tag
+ * @see BodyTag
+ */
+
+ int doStartTag() throws JspException;
+
+
+ /**
+ * Process the end tag for this instance.
+ * This method is invoked by the JSP page implementation object
+ * on all Tag handlers.
+ *
+ * <p>
+ * This method will be called after returning from doStartTag. The
+ * body of the action may or may not have been evaluated, depending on
+ * the return value of doStartTag.
+ *
+ * <p>
+ * If this method returns EVAL_PAGE, the rest of the page continues
+ * to be evaluated. If this method returns SKIP_PAGE, the rest of
+ * the page is not evaluated, the request is completed, and
+ * the doEndTag() methods of enclosing tags are not invoked. If this
+ * request was forwarded or included from another page (or Servlet),
+ * only the current page evaluation is stopped.
+ *
+ * <p>
+ * The JSP container will resynchronize the values of any AT_BEGIN and
+ * AT_END variables (defined by the associated TagExtraInfo or TLD)
+ * after the invocation of doEndTag().
+ *
+ * @return indication of whether to continue evaluating the JSP page.
+ * @throws JspException if an error occurred while processing this tag
+ */
+
+ int doEndTag() throws JspException;
+
+ /**
+ * Called on a Tag handler to release state.
+ * The page compiler guarantees that JSP page implementation
+ * objects will invoke this method on all tag handlers,
+ * but there may be multiple invocations on doStartTag and doEndTag in between.
+ */
+
+ void release();
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagAdapter.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagAdapter.java
new file mode 100644
index 0000000..3d2f19c
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagAdapter.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.jsp.tagext;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+
+/**
+ * Wraps any SimpleTag and exposes it using a Tag interface. This is used to
+ * allow collaboration between classic Tag handlers and SimpleTag handlers.
+ * <p>
+ * Because SimpleTag does not extend Tag, and because Tag.setParent() only
+ * accepts a Tag instance, a classic tag handler (one that implements Tag)
+ * cannot have a SimpleTag as its parent. To remedy this, a TagAdapter is
+ * created to wrap the SimpleTag parent, and the adapter is passed to
+ * setParent() instead. A classic Tag Handler can call getAdaptee() to retrieve
+ * the encapsulated SimpleTag instance.
+ *
+ * @since 2.0
+ */
+public class TagAdapter implements Tag {
+ /** The simple tag that's being adapted. */
+ private SimpleTag simpleTagAdaptee;
+
+ /** The parent, of this tag, converted (if necessary) to be of type Tag. */
+ private Tag parent;
+
+ // Flag indicating whether we have already determined the parent
+ private boolean parentDetermined;
+
+ /**
+ * Creates a new TagAdapter that wraps the given SimpleTag and returns the
+ * parent tag when getParent() is called.
+ *
+ * @param adaptee
+ * The SimpleTag being adapted as a Tag.
+ */
+ public TagAdapter(SimpleTag adaptee) {
+ if (adaptee == null) {
+ // Cannot wrap a null adaptee.
+ throw new IllegalArgumentException();
+ }
+ this.simpleTagAdaptee = adaptee;
+ }
+
+ /**
+ * Must not be called.
+ *
+ * @param pc
+ * ignored.
+ * @throws UnsupportedOperationException
+ * Must not be called
+ */
+ @Override
+ public void setPageContext(PageContext pc) {
+ throw new UnsupportedOperationException(
+ "Illegal to invoke setPageContext() on TagAdapter wrapper");
+ }
+
+ /**
+ * Must not be called. The parent of this tag is always
+ * getAdaptee().getParent().
+ *
+ * @param parentTag
+ * ignored.
+ * @throws UnsupportedOperationException
+ * Must not be called.
+ */
+ @Override
+ public void setParent(Tag parentTag) {
+ throw new UnsupportedOperationException(
+ "Illegal to invoke setParent() on TagAdapter wrapper");
+ }
+
+ /**
+ * Returns the parent of this tag, which is always getAdaptee().getParent().
+ * This will either be the enclosing Tag (if getAdaptee().getParent()
+ * implements Tag), or an adapter to the enclosing Tag (if
+ * getAdaptee().getParent() does not implement Tag).
+ *
+ * @return The parent of the tag being adapted.
+ */
+ @Override
+ public Tag getParent() {
+ if (!parentDetermined) {
+ JspTag adapteeParent = simpleTagAdaptee.getParent();
+ if (adapteeParent != null) {
+ if (adapteeParent instanceof Tag) {
+ this.parent = (Tag) adapteeParent;
+ } else {
+ // Must be SimpleTag - no other types defined.
+ this.parent = new TagAdapter((SimpleTag) adapteeParent);
+ }
+ }
+ parentDetermined = true;
+ }
+
+ return this.parent;
+ }
+
+ /**
+ * Gets the tag that is being adapted to the Tag interface. This should be
+ * an instance of SimpleTag in JSP 2.0, but room is left for other kinds of
+ * tags in future spec versions.
+ *
+ * @return the tag that is being adapted
+ */
+ public JspTag getAdaptee() {
+ return this.simpleTagAdaptee;
+ }
+
+ /**
+ * Must not be called.
+ *
+ * @return always throws UnsupportedOperationException
+ * @throws UnsupportedOperationException
+ * Must not be called
+ * @throws JspException
+ * never thrown
+ */
+ @Override
+ public int doStartTag() throws JspException {
+ throw new UnsupportedOperationException(
+ "Illegal to invoke doStartTag() on TagAdapter wrapper");
+ }
+
+ /**
+ * Must not be called.
+ *
+ * @return always throws UnsupportedOperationException
+ * @throws UnsupportedOperationException
+ * Must not be called
+ * @throws JspException
+ * never thrown
+ */
+ @Override
+ public int doEndTag() throws JspException {
+ throw new UnsupportedOperationException(
+ "Illegal to invoke doEndTag() on TagAdapter wrapper");
+ }
+
+ /**
+ * Must not be called.
+ *
+ * @throws UnsupportedOperationException
+ * Must not be called
+ */
+ @Override
+ public void release() {
+ throw new UnsupportedOperationException(
+ "Illegal to invoke release() on TagAdapter wrapper");
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagAttributeInfo.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagAttributeInfo.java
new file mode 100644
index 0000000..3888de2
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagAttributeInfo.java
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.servlet.jsp.tagext;
+
+/**
+ * Information on the attributes of a Tag, available at translation time. This
+ * class is instantiated from the Tag Library Descriptor file (TLD).
+ *
+ * <p>
+ * Only the information needed to generate code is included here. Other
+ * information like SCHEMA for validation belongs elsewhere.
+ */
+
+public class TagAttributeInfo {
+ /**
+ * "id" is wired in to be ID. There is no real benefit in having it be
+ * something else IDREFs are not handled any differently.
+ */
+
+ public static final String ID = "id";
+
+ /**
+ * Constructor for TagAttributeInfo. This class is to be instantiated only
+ * from the TagLibrary code under request from some JSP code that is parsing
+ * a TLD (Tag Library Descriptor).
+ *
+ * @param name
+ * The name of the attribute.
+ * @param required
+ * If this attribute is required in tag instances.
+ * @param type
+ * The name of the type of the attribute.
+ * @param reqTime
+ * Whether this attribute holds a request-time Attribute.
+ */
+
+ public TagAttributeInfo(String name, boolean required, String type,
+ boolean reqTime) {
+ this(name, required, type, reqTime, false);
+ }
+
+ /**
+ * JSP 2.0 Constructor for TagAttributeInfo. This class is to be
+ * instantiated only from the TagLibrary code under request from some JSP
+ * code that is parsing a TLD (Tag Library Descriptor).
+ *
+ * @param name
+ * The name of the attribute.
+ * @param required
+ * If this attribute is required in tag instances.
+ * @param type
+ * The name of the type of the attribute.
+ * @param reqTime
+ * Whether this attribute holds a request-time Attribute.
+ * @param fragment
+ * Whether this attribute is of type JspFragment
+ *
+ * @since 2.0
+ */
+
+ public TagAttributeInfo(String name, boolean required, String type,
+ boolean reqTime, boolean fragment) {
+ this(name, required, type, reqTime, fragment, null, false, false, null, null);
+ }
+
+ /**
+ * @since JSP 2.1
+ */
+ public TagAttributeInfo(String name, boolean required, String type,
+ boolean reqTime, boolean fragment, String description,
+ boolean deferredValue, boolean deferredMethod,
+ String expectedTypeName, String methodSignature) {
+ this.name = name;
+ this.required = required;
+ this.type = type;
+ this.reqTime = reqTime;
+ this.fragment = fragment;
+ this.description = description;
+ this.deferredValue = deferredValue;
+ this.deferredMethod = deferredMethod;
+ this.expectedTypeName = expectedTypeName;
+ this.methodSignature = methodSignature;
+ }
+
+ /**
+ * The name of this attribute.
+ *
+ * @return the name of the attribute
+ */
+
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * The type (as a String) of this attribute.
+ *
+ * @return the type of the attribute
+ */
+
+ public String getTypeName() {
+ return type;
+ }
+
+ /**
+ * Whether this attribute can hold a request-time value.
+ *
+ * @return if the attribute can hold a request-time value.
+ */
+
+ public boolean canBeRequestTime() {
+ return reqTime;
+ }
+
+ /**
+ * Whether this attribute is required.
+ *
+ * @return if the attribute is required.
+ */
+ public boolean isRequired() {
+ return required;
+ }
+
+ /**
+ * Convenience static method that goes through an array of TagAttributeInfo
+ * objects and looks for "id".
+ *
+ * @param a
+ * An array of TagAttributeInfo
+ * @return The TagAttributeInfo reference with name "id"
+ */
+ public static TagAttributeInfo getIdAttribute(TagAttributeInfo a[]) {
+ for (int i = 0; i < a.length; i++) {
+ if (a[i].getName().equals(ID)) {
+ return a[i];
+ }
+ }
+ return null; // no such attribute
+ }
+
+ /**
+ * Whether this attribute is of type JspFragment.
+ *
+ * @return if the attribute is of type JspFragment
+ *
+ * @since 2.0
+ */
+ public boolean isFragment() {
+ return fragment;
+ }
+
+ /**
+ * Returns a String representation of this TagAttributeInfo, suitable for
+ * debugging purposes.
+ *
+ * @return a String representation of this TagAttributeInfo
+ */
+ @Override
+ public String toString() {
+ StringBuilder b = new StringBuilder(64);
+ b.append("name = " + name + " ");
+ b.append("type = " + type + " ");
+ b.append("reqTime = " + reqTime + " ");
+ b.append("required = " + required + " ");
+ b.append("fragment = " + fragment + " ");
+ b.append("deferredValue = " + deferredValue + " ");
+ b.append("expectedTypeName = " + expectedTypeName + " ");
+ b.append("deferredMethod = " + deferredMethod + " ");
+ b.append("methodSignature = " + methodSignature);
+ return b.toString();
+ }
+
+ /*
+ * private fields
+ */
+ private final String name;
+
+ private final String type;
+
+ private final boolean reqTime;
+
+ private final boolean required;
+
+ /*
+ * private fields for JSP 2.0
+ */
+ private final boolean fragment;
+
+ /*
+ * private fields for JSP 2.1
+ */
+ private final String description;
+
+ private final boolean deferredValue;
+
+ private final boolean deferredMethod;
+
+ private final String expectedTypeName;
+
+ private final String methodSignature;
+
+ public boolean isDeferredMethod() {
+ return deferredMethod;
+ }
+
+ public boolean isDeferredValue() {
+ return deferredValue;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public String getExpectedTypeName() {
+ return expectedTypeName;
+ }
+
+ public String getMethodSignature() {
+ return methodSignature;
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagData.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagData.java
new file mode 100644
index 0000000..72908a4
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagData.java
@@ -0,0 +1,153 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.servlet.jsp.tagext;
+
+import java.util.Hashtable;
+
+/**
+ * The (translation-time only) attribute/value information for a tag instance.
+ *
+ * <p>
+ * TagData is only used as an argument to the isValid, validate, and
+ * getVariableInfo methods of TagExtraInfo, which are invoked at
+ * translation time.
+ */
+
+public class TagData implements Cloneable {
+
+ /**
+ * Distinguished value for an attribute to indicate its value
+ * is a request-time expression (which is not yet available because
+ * TagData instances are used at translation-time).
+ */
+
+ public static final Object REQUEST_TIME_VALUE = new Object();
+
+
+ /**
+ * Constructor for TagData.
+ *
+ * <p>
+ * A typical constructor may be
+ * <pre>
+ * static final Object[][] att = {{"connection", "conn0"}, {"id", "query0"}};
+ * static final TagData td = new TagData(att);
+ * </pre>
+ *
+ * All values must be Strings except for those holding the
+ * distinguished object REQUEST_TIME_VALUE.
+
+ * @param atts the static attribute and values. May be null.
+ */
+ public TagData(Object[] atts[]) {
+ if (atts == null) {
+ attributes = new Hashtable<String, Object>();
+ } else {
+ attributes = new Hashtable<String, Object>(atts.length);
+ }
+
+ if (atts != null) {
+ for (int i = 0; i < atts.length; i++) {
+ attributes.put((String) atts[i][0], atts[i][1]);
+ }
+ }
+ }
+
+ /**
+ * Constructor for a TagData.
+ *
+ * If you already have the attributes in a hashtable, use this
+ * constructor.
+ *
+ * @param attrs A hashtable to get the values from.
+ */
+ public TagData(Hashtable<String, Object> attrs) {
+ this.attributes = attrs;
+ }
+
+ /**
+ * The value of the tag's id attribute.
+ *
+ * @return the value of the tag's id attribute, or null if no such
+ * attribute was specified.
+ */
+
+ public String getId() {
+ return getAttributeString(TagAttributeInfo.ID);
+ }
+
+ /**
+ * The value of the attribute.
+ * If a static value is specified for an attribute that accepts a
+ * request-time attribute expression then that static value is returned,
+ * even if the value is provided in the body of a <jsp:attribute> action.
+ * The distinguished object REQUEST_TIME_VALUE is only returned if
+ * the value is specified as a request-time attribute expression
+ * or via the &lt;jsp:attribute&gt; action with a body that contains
+ * dynamic content (scriptlets, scripting expressions, EL expressions,
+ * standard actions, or custom actions). Returns null if the attribute
+ * is not set.
+ *
+ * @param attName the name of the attribute
+ * @return the attribute's value
+ */
+
+ public Object getAttribute(String attName) {
+ return attributes.get(attName);
+ }
+
+ /**
+ * Set the value of an attribute.
+ *
+ * @param attName the name of the attribute
+ * @param value the value.
+ */
+ public void setAttribute(String attName,
+ Object value) {
+ attributes.put(attName, value);
+ }
+
+ /**
+ * Get the value for a given attribute.
+ *
+ * @param attName the name of the attribute
+ * @return the attribute value string
+ * @throws ClassCastException if attribute value is not a String
+ */
+
+ public String getAttributeString(String attName) {
+ Object o = attributes.get(attName);
+ if (o == null) {
+ return null;
+ }
+ return (String) o;
+ }
+
+ /**
+ * Enumerates the attributes.
+ *
+ *@return An enumeration of the attributes in a TagData
+ */
+ public java.util.Enumeration<String> getAttributes() {
+ return attributes.keys();
+ }
+
+ // private data
+
+ private final Hashtable<String, Object> attributes; // the tagname/value map
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagExtraInfo.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagExtraInfo.java
new file mode 100644
index 0000000..b6c298a
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagExtraInfo.java
@@ -0,0 +1,145 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package javax.servlet.jsp.tagext;
+
+/**
+ * Optional class provided by the tag library author to describe additional
+ * translation-time information not described in the TLD.
+ * The TagExtraInfo class is mentioned in the Tag Library Descriptor file (TLD).
+ *
+ * <p>
+ * This class can be used:
+ * <ul>
+ * <li> to indicate that the tag defines scripting variables
+ * <li> to perform translation-time validation of the tag attributes.
+ * </ul>
+ *
+ * <p>
+ * It is the responsibility of the JSP translator that the initial value
+ * to be returned by calls to getTagInfo() corresponds to a TagInfo
+ * object for the tag being translated. If an explicit call to
+ * setTagInfo() is done, then the object passed will be returned in
+ * subsequent calls to getTagInfo().
+ *
+ * <p>
+ * The only way to affect the value returned by getTagInfo()
+ * is through a setTagInfo() call, and thus, TagExtraInfo.setTagInfo() is
+ * to be called by the JSP translator, with a TagInfo object that
+ * corresponds to the tag being translated. The call should happen before
+ * any invocation on validate() and before any invocation on
+ * getVariableInfo().
+ *
+ * <p>
+ * <tt>NOTE:</tt> It is a (translation time) error for a tag definition
+ * in a TLD with one or more variable subelements to have an associated
+ * TagExtraInfo implementation that returns a VariableInfo array with
+ * one or more elements from a call to getVariableInfo().
+ */
+
+public abstract class TagExtraInfo {
+
+ /**
+ * Sole constructor. (For invocation by subclass constructors,
+ * typically implicit.)
+ */
+ public TagExtraInfo() {
+ // NOOP by default
+ }
+
+ /**
+ * information on scripting variables defined by the tag associated with
+ * this TagExtraInfo instance.
+ * Request-time attributes are indicated as such in the TagData parameter.
+ *
+ * @param data The TagData instance.
+ * @return An array of VariableInfo data, or null or a zero length array
+ * if no scripting variables are to be defined.
+ */
+ public VariableInfo[] getVariableInfo(TagData data) {
+ return ZERO_VARIABLE_INFO;
+ }
+
+ /**
+ * Translation-time validation of the attributes.
+ * Request-time attributes are indicated as such in the TagData parameter.
+ * Note that the preferred way to do validation is with the validate()
+ * method, since it can return more detailed information.
+ *
+ * @param data The TagData instance.
+ * @return Whether this tag instance is valid.
+ * @see TagExtraInfo#validate
+ */
+
+ public boolean isValid(TagData data) {
+ return true;
+ }
+
+ /**
+ * Translation-time validation of the attributes.
+ * Request-time attributes are indicated as such in the TagData parameter.
+ * Because of the higher quality validation messages possible,
+ * this is the preferred way to do validation (although isValid()
+ * still works).
+ *
+ * <p>JSP 2.0 and higher containers call validate() instead of isValid().
+ * The default implementation of this method is to call isValid(). If
+ * isValid() returns false, a generic ValidationMessage[] is returned
+ * indicating isValid() returned false.</p>
+ *
+ * @param data The TagData instance.
+ * @return A null object, or zero length array if no errors, an
+ * array of ValidationMessages otherwise.
+ * @since 2.0
+ */
+ public ValidationMessage[] validate( TagData data ) {
+ ValidationMessage[] result = null;
+
+ if( !isValid( data ) ) {
+ result = new ValidationMessage[] {
+ new ValidationMessage( data.getId(), "isValid() == false" ) };
+ }
+
+ return result;
+ }
+
+ /**
+ * Set the TagInfo for this class.
+ *
+ * @param tagInfo The TagInfo this instance is extending
+ */
+ public final void setTagInfo(TagInfo tagInfo) {
+ this.tagInfo = tagInfo;
+ }
+
+ /**
+ * Get the TagInfo for this class.
+ *
+ * @return the taginfo instance this instance is extending
+ */
+ public final TagInfo getTagInfo() {
+ return tagInfo;
+ }
+
+ // private data
+ private TagInfo tagInfo;
+
+ // zero length VariableInfo array
+ private static final VariableInfo[] ZERO_VARIABLE_INFO = { };
+}
+
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagFileInfo.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagFileInfo.java
new file mode 100644
index 0000000..e825c91
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagFileInfo.java
@@ -0,0 +1,86 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package javax.servlet.jsp.tagext;
+
+/**
+ * Tag information for a tag file in a Tag Library;
+ * This class is instantiated from the Tag Library Descriptor file (TLD)
+ * and is available only at translation time.
+ *
+ * @since 2.0
+ */
+public class TagFileInfo {
+
+ /**
+ * Constructor for TagFileInfo from data in the JSP 2.0 format for TLD.
+ * This class is to be instantiated only from the TagLibrary code
+ * under request from some JSP code that is parsing a
+ * TLD (Tag Library Descriptor).
+ *
+ * Note that, since TagLibraryInfo reflects both TLD information
+ * and taglib directive information, a TagFileInfo instance is
+ * dependent on a taglib directive. This is probably a
+ * design error, which may be fixed in the future.
+ *
+ * @param name The unique action name of this tag
+ * @param path Where to find the .tag file implementing this
+ * action, relative to the location of the TLD file.
+ * @param tagInfo The detailed information about this tag, as parsed
+ * from the directives in the tag file.
+ */
+ public TagFileInfo( String name, String path, TagInfo tagInfo ) {
+ this.name = name;
+ this.path = path;
+ this.tagInfo = tagInfo;
+ }
+
+ /**
+ * The unique action name of this tag.
+ *
+ * @return The (short) name of the tag.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Where to find the .tag file implementing this action.
+ *
+ * @return The path of the tag file, relative to the TLD, or "." if
+ * the tag file was defined in an implicit tag file.
+ */
+ public String getPath() {
+ return path;
+ }
+
+ /**
+ * Returns information about this tag, parsed from the directives
+ * in the tag file.
+ *
+ * @return a TagInfo object containing information about this tag
+ */
+ public TagInfo getTagInfo() {
+ return tagInfo;
+ }
+
+ // private fields for 2.0 info
+ private final String name;
+ private final String path;
+ private final TagInfo tagInfo;
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagInfo.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagInfo.java
new file mode 100644
index 0000000..fcafa2b
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagInfo.java
@@ -0,0 +1,447 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package javax.servlet.jsp.tagext;
+
+/**
+ * Tag information for a tag in a Tag Library;
+ * This class is instantiated from the Tag Library Descriptor file (TLD)
+ * and is available only at translation time.
+ *
+ *
+*/
+
+public class TagInfo {
+
+ /**
+ * Static constant for getBodyContent() when it is JSP.
+ */
+
+ public static final String BODY_CONTENT_JSP = "JSP";
+
+ /**
+ * Static constant for getBodyContent() when it is Tag dependent.
+ */
+
+ public static final String BODY_CONTENT_TAG_DEPENDENT = "tagdependent";
+
+
+ /**
+ * Static constant for getBodyContent() when it is empty.
+ */
+
+ public static final String BODY_CONTENT_EMPTY = "empty";
+
+ /**
+ * Static constant for getBodyContent() when it is scriptless.
+ *
+ * @since 2.0
+ */
+ public static final String BODY_CONTENT_SCRIPTLESS = "scriptless";
+
+ /**
+ * Constructor for TagInfo from data in the JSP 1.1 format for TLD.
+ * This class is to be instantiated only from the TagLibrary code
+ * under request from some JSP code that is parsing a
+ * TLD (Tag Library Descriptor).
+ *
+ * Note that, since TagLibibraryInfo reflects both TLD information
+ * and taglib directive information, a TagInfo instance is
+ * dependent on a taglib directive. This is probably a
+ * design error, which may be fixed in the future.
+ *
+ * @param tagName The name of this tag
+ * @param tagClassName The name of the tag handler class
+ * @param bodycontent Information on the body content of these tags
+ * @param infoString The (optional) string information for this tag
+ * @param taglib The instance of the tag library that contains us.
+ * @param tagExtraInfo The instance providing extra Tag info. May be null
+ * @param attributeInfo An array of AttributeInfo data from descriptor.
+ * May be null;
+ *
+ */
+ public TagInfo(String tagName,
+ String tagClassName,
+ String bodycontent,
+ String infoString,
+ TagLibraryInfo taglib,
+ TagExtraInfo tagExtraInfo,
+ TagAttributeInfo[] attributeInfo) {
+ this.tagName = tagName;
+ this.tagClassName = tagClassName;
+ this.bodyContent = bodycontent;
+ this.infoString = infoString;
+ this.tagLibrary = taglib;
+ this.tagExtraInfo = tagExtraInfo;
+ this.attributeInfo = attributeInfo;
+
+ if (tagExtraInfo != null)
+ tagExtraInfo.setTagInfo(this);
+ }
+
+ /**
+ * Constructor for TagInfo from data in the JSP 1.2 format for TLD.
+ * This class is to be instantiated only from the TagLibrary code
+ * under request from some JSP code that is parsing a
+ * TLD (Tag Library Descriptor).
+ *
+ * Note that, since TagLibibraryInfo reflects both TLD information
+ * and taglib directive information, a TagInfo instance is
+ * dependent on a taglib directive. This is probably a
+ * design error, which may be fixed in the future.
+ *
+ * @param tagName The name of this tag
+ * @param tagClassName The name of the tag handler class
+ * @param bodycontent Information on the body content of these tags
+ * @param infoString The (optional) string information for this tag
+ * @param taglib The instance of the tag library that contains us.
+ * @param tagExtraInfo The instance providing extra Tag info. May be null
+ * @param attributeInfo An array of AttributeInfo data from descriptor.
+ * May be null;
+ * @param displayName A short name to be displayed by tools
+ * @param smallIcon Path to a small icon to be displayed by tools
+ * @param largeIcon Path to a large icon to be displayed by tools
+ * @param tvi An array of a TagVariableInfo (or null)
+ */
+ public TagInfo(String tagName,
+ String tagClassName,
+ String bodycontent,
+ String infoString,
+ TagLibraryInfo taglib,
+ TagExtraInfo tagExtraInfo,
+ TagAttributeInfo[] attributeInfo,
+ String displayName,
+ String smallIcon,
+ String largeIcon,
+ TagVariableInfo[] tvi) {
+ this.tagName = tagName;
+ this.tagClassName = tagClassName;
+ this.bodyContent = bodycontent;
+ this.infoString = infoString;
+ this.tagLibrary = taglib;
+ this.tagExtraInfo = tagExtraInfo;
+ this.attributeInfo = attributeInfo;
+ this.displayName = displayName;
+ this.smallIcon = smallIcon;
+ this.largeIcon = largeIcon;
+ this.tagVariableInfo = tvi;
+
+ if (tagExtraInfo != null)
+ tagExtraInfo.setTagInfo(this);
+ }
+
+ /**
+ * Constructor for TagInfo from data in the JSP 2.0 format for TLD.
+ * This class is to be instantiated only from the TagLibrary code
+ * under request from some JSP code that is parsing a
+ * TLD (Tag Library Descriptor).
+ *
+ * Note that, since TagLibibraryInfo reflects both TLD information
+ * and taglib directive information, a TagInfo instance is
+ * dependent on a taglib directive. This is probably a
+ * design error, which may be fixed in the future.
+ *
+ * @param tagName The name of this tag
+ * @param tagClassName The name of the tag handler class
+ * @param bodycontent Information on the body content of these tags
+ * @param infoString The (optional) string information for this tag
+ * @param taglib The instance of the tag library that contains us.
+ * @param tagExtraInfo The instance providing extra Tag info. May be null
+ * @param attributeInfo An array of AttributeInfo data from descriptor.
+ * May be null;
+ * @param displayName A short name to be displayed by tools
+ * @param smallIcon Path to a small icon to be displayed by tools
+ * @param largeIcon Path to a large icon to be displayed by tools
+ * @param tvi An array of a TagVariableInfo (or null)
+ * @param dynamicAttributes True if supports dynamic attributes
+ *
+ * @since 2.0
+ */
+ public TagInfo(String tagName,
+ String tagClassName,
+ String bodycontent,
+ String infoString,
+ TagLibraryInfo taglib,
+ TagExtraInfo tagExtraInfo,
+ TagAttributeInfo[] attributeInfo,
+ String displayName,
+ String smallIcon,
+ String largeIcon,
+ TagVariableInfo[] tvi,
+ boolean dynamicAttributes) {
+ this.tagName = tagName;
+ this.tagClassName = tagClassName;
+ this.bodyContent = bodycontent;
+ this.infoString = infoString;
+ this.tagLibrary = taglib;
+ this.tagExtraInfo = tagExtraInfo;
+ this.attributeInfo = attributeInfo;
+ this.displayName = displayName;
+ this.smallIcon = smallIcon;
+ this.largeIcon = largeIcon;
+ this.tagVariableInfo = tvi;
+ this.dynamicAttributes = dynamicAttributes;
+
+ if (tagExtraInfo != null)
+ tagExtraInfo.setTagInfo(this);
+ }
+
+ /**
+ * The name of the Tag.
+ *
+ * @return The (short) name of the tag.
+ */
+
+ public String getTagName() {
+ return tagName;
+ }
+
+ /**
+ * Attribute information (in the TLD) on this tag.
+ * The return is an array describing the attributes of this tag, as
+ * indicated in the TLD.
+ *
+ * @return The array of TagAttributeInfo for this tag, or a
+ * zero-length array if the tag has no attributes.
+ */
+
+ public TagAttributeInfo[] getAttributes() {
+ return attributeInfo;
+ }
+
+ /**
+ * Information on the scripting objects created by this tag at runtime.
+ * This is a convenience method on the associated TagExtraInfo class.
+ *
+ * @param data TagData describing this action.
+ * @return if a TagExtraInfo object is associated with this TagInfo, the
+ * result of getTagExtraInfo().getVariableInfo( data ), otherwise
+ * null.
+ */
+ public VariableInfo[] getVariableInfo(TagData data) {
+ VariableInfo[] result = null;
+ TagExtraInfo tei = getTagExtraInfo();
+ if (tei != null) {
+ result = tei.getVariableInfo( data );
+ }
+ return result;
+ }
+
+ /**
+ * Translation-time validation of the attributes.
+ * This is a convenience method on the associated TagExtraInfo class.
+ *
+ * @param data The translation-time TagData instance.
+ * @return Whether the data is valid.
+ */
+ public boolean isValid(TagData data) {
+ TagExtraInfo tei = getTagExtraInfo();
+ if (tei == null) {
+ return true;
+ }
+ return tei.isValid(data);
+ }
+
+ /**
+ * Translation-time validation of the attributes.
+ * This is a convenience method on the associated TagExtraInfo class.
+ *
+ * @param data The translation-time TagData instance.
+ * @return A null object, or zero length array if no errors, an
+ * array of ValidationMessages otherwise.
+ * @since 2.0
+ */
+ public ValidationMessage[] validate( TagData data ) {
+ TagExtraInfo tei = getTagExtraInfo();
+ if( tei == null ) {
+ return null;
+ }
+ return tei.validate( data );
+ }
+
+ /**
+ * Set the instance for extra tag information.
+ *
+ * @param tei the TagExtraInfo instance
+ */
+ public void setTagExtraInfo(TagExtraInfo tei) {
+ tagExtraInfo = tei;
+ }
+
+
+ /**
+ * The instance (if any) for extra tag information.
+ *
+ * @return The TagExtraInfo instance, if any.
+ */
+ public TagExtraInfo getTagExtraInfo() {
+ return tagExtraInfo;
+ }
+
+
+ /**
+ * Name of the class that provides the handler for this tag.
+ *
+ * @return The name of the tag handler class.
+ */
+
+ public String getTagClassName() {
+ return tagClassName;
+ }
+
+
+ /**
+ * The bodycontent information for this tag.
+ * If the bodycontent is not defined for this
+ * tag, the default of JSP will be returned.
+ *
+ * @return the body content string.
+ */
+
+ public String getBodyContent() {
+ return bodyContent;
+ }
+
+
+ /**
+ * The information string for the tag.
+ *
+ * @return the info string, or null if
+ * not defined
+ */
+
+ public String getInfoString() {
+ return infoString;
+ }
+
+
+ /**
+ * Set the TagLibraryInfo property.
+ *
+ * Note that a TagLibraryInfo element is dependent
+ * not just on the TLD information but also on the
+ * specific taglib instance used. This means that
+ * a fair amount of work needs to be done to construct
+ * and initialize TagLib objects.
+ *
+ * If used carefully, this setter can be used to avoid having to
+ * create new TagInfo elements for each taglib directive.
+ *
+ * @param tl the TagLibraryInfo to assign
+ */
+
+ public void setTagLibrary(TagLibraryInfo tl) {
+ tagLibrary = tl;
+ }
+
+ /**
+ * The instance of TabLibraryInfo we belong to.
+ *
+ * @return the tag library instance we belong to
+ */
+
+ public TagLibraryInfo getTagLibrary() {
+ return tagLibrary;
+ }
+
+
+ // ============== JSP 2.0 TLD Information ========
+
+
+ /**
+ * Get the displayName.
+ *
+ * @return A short name to be displayed by tools,
+ * or null if not defined
+ */
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ /**
+ * Get the path to the small icon.
+ *
+ * @return Path to a small icon to be displayed by tools,
+ * or null if not defined
+ */
+
+ public String getSmallIcon() {
+ return smallIcon;
+ }
+
+ /**
+ * Get the path to the large icon.
+ *
+ * @return Path to a large icon to be displayed by tools,
+ * or null if not defined
+ */
+
+ public String getLargeIcon() {
+ return largeIcon;
+ }
+
+ /**
+ * Get TagVariableInfo objects associated with this TagInfo.
+ *
+ * @return Array of TagVariableInfo objects corresponding to
+ * variables declared by this tag, or a zero length
+ * array if no variables have been declared
+ */
+
+ public TagVariableInfo[] getTagVariableInfos() {
+ return tagVariableInfo;
+ }
+
+
+ // ============== JSP 2.0 TLD Information ========
+
+ /**
+ * Get dynamicAttributes associated with this TagInfo.
+ *
+ * @return True if tag handler supports dynamic attributes
+ * @since 2.0
+ */
+ public boolean hasDynamicAttributes() {
+ return dynamicAttributes;
+ }
+
+ /*
+ * private fields for 1.1 info
+ */
+ private String tagName; // the name of the tag
+ private String tagClassName;
+ private String bodyContent;
+ private String infoString;
+ private TagLibraryInfo tagLibrary;
+ private TagExtraInfo tagExtraInfo; // instance of TagExtraInfo
+ private TagAttributeInfo[] attributeInfo;
+
+ /*
+ * private fields for 1.2 info
+ */
+ private String displayName;
+ private String smallIcon;
+ private String largeIcon;
+ private TagVariableInfo[] tagVariableInfo;
+
+ /*
+ * Additional private fields for 2.0 info
+ */
+ private boolean dynamicAttributes;
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagLibraryInfo.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagLibraryInfo.java
new file mode 100644
index 0000000..ac9720d
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagLibraryInfo.java
@@ -0,0 +1,287 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.jsp.tagext;
+
+
+/**
+ * Translation-time information associated with a taglib directive, and its
+ * underlying TLD file. Most of the information is directly from the TLD, except
+ * for the prefix and the uri values used in the taglib directive
+ */
+public abstract class TagLibraryInfo {
+
+ /**
+ * Constructor. This will invoke the constructors for TagInfo, and
+ * TagAttributeInfo after parsing the TLD file.
+ *
+ * @param prefix
+ * the prefix actually used by the taglib directive
+ * @param uri
+ * the URI actually used by the taglib directive
+ */
+ protected TagLibraryInfo(String prefix, String uri) {
+ this.prefix = prefix;
+ this.uri = uri;
+ }
+
+ // ==== methods accessing taglib information =======
+
+ /**
+ * The value of the uri attribute from the taglib directive for this
+ * library.
+ *
+ * @return the value of the uri attribute
+ */
+ public String getURI() {
+ return uri;
+ }
+
+ /**
+ * The prefix assigned to this taglib from the taglib directive
+ *
+ * @return the prefix assigned to this taglib from the taglib directive
+ */
+ public String getPrefixString() {
+ return prefix;
+ }
+
+ // ==== methods using the TLD data =======
+
+ /**
+ * The preferred short name (prefix) as indicated in the TLD. This may be
+ * used by authoring tools as the preferred prefix to use when creating an
+ * taglib directive for this library.
+ *
+ * @return the preferred short name for the library
+ */
+ public String getShortName() {
+ return shortname;
+ }
+
+ /**
+ * The "reliable" URN indicated in the TLD (the uri element). This may be
+ * used by authoring tools as a global identifier to use when creating a
+ * taglib directive for this library.
+ *
+ * @return a reliable URN to a TLD like this
+ */
+ public String getReliableURN() {
+ return urn;
+ }
+
+ /**
+ * Information (documentation) for this TLD.
+ *
+ * @return the info string for this tag lib
+ */
+ public String getInfoString() {
+ return info;
+ }
+
+ /**
+ * A string describing the required version of the JSP container.
+ *
+ * @return the (minimal) required version of the JSP container.
+ * @see javax.servlet.jsp.JspEngineInfo
+ */
+ public String getRequiredVersion() {
+ return jspversion;
+ }
+
+ /**
+ * An array describing the tags that are defined in this tag library.
+ *
+ * @return the TagInfo objects corresponding to the tags defined by this tag
+ * library, or a zero length array if this tag library defines no
+ * tags
+ */
+ public TagInfo[] getTags() {
+ return tags;
+ }
+
+ /**
+ * An array describing the tag files that are defined in this tag library.
+ *
+ * @return the TagFileInfo objects corresponding to the tag files defined by
+ * this tag library, or a zero length array if this tag library
+ * defines no tags files
+ * @since 2.0
+ */
+ public TagFileInfo[] getTagFiles() {
+ return tagFiles;
+ }
+
+ /**
+ * Get the TagInfo for a given tag name, looking through all the tags in
+ * this tag library.
+ *
+ * @param shortname
+ * The short name (no prefix) of the tag
+ * @return the TagInfo for the tag with the specified short name, or null if
+ * no such tag is found
+ */
+ public TagInfo getTag(String shortname) {
+ TagInfo tags[] = getTags();
+
+ if (tags == null || tags.length == 0 || shortname == null) {
+ return null;
+ }
+
+ for (int i = 0; i < tags.length; i++) {
+ if (shortname.equals(tags[i].getTagName())) {
+ return tags[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get the TagFileInfo for a given tag name, looking through all the tag
+ * files in this tag library.
+ *
+ * @param shortname
+ * The short name (no prefix) of the tag
+ * @return the TagFileInfo for the specified Tag file, or null if no Tag
+ * file is found
+ * @since 2.0
+ */
+ public TagFileInfo getTagFile(String shortname) {
+ TagFileInfo tagFiles[] = getTagFiles();
+
+ if (tagFiles == null || tagFiles.length == 0) {
+ return null;
+ }
+
+ for (int i = 0; i < tagFiles.length; i++) {
+ if (tagFiles[i].getName().equals(shortname)) {
+ return tagFiles[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * An array describing the functions that are defined in this tag library.
+ *
+ * @return the functions defined in this tag library, or a zero length array
+ * if the tag library defines no functions.
+ * @since 2.0
+ */
+ public FunctionInfo[] getFunctions() {
+ return functions;
+ }
+
+ /**
+ * Get the FunctionInfo for a given function name, looking through all the
+ * functions in this tag library.
+ *
+ * @param name
+ * The name (no prefix) of the function
+ * @return the FunctionInfo for the function with the given name, or null if
+ * no such function exists
+ * @since 2.0
+ */
+ public FunctionInfo getFunction(String name) {
+
+ if (functions == null || functions.length == 0) {
+ System.err.println("No functions");
+ return null;
+ }
+
+ for (int i = 0; i < functions.length; i++) {
+ if (functions[i].getName().equals(name)) {
+ return functions[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns an array of TagLibraryInfo objects representing the entire set of
+ * tag libraries (including this TagLibraryInfo) imported by taglib
+ * directives in the translation unit that references this TagLibraryInfo.
+ * If a tag library is imported more than once and bound to different
+ * prefixes, only the TagLibraryInfo bound to the first prefix must be
+ * included in the returned array.
+ *
+ * @return Array of TagLibraryInfo objects representing the entire set of
+ * tag libraries (including this TagLibraryInfo) imported by taglib
+ * directives in the translation unit that references this
+ * TagLibraryInfo.
+ * @since 2.1
+ */
+ public abstract javax.servlet.jsp.tagext.TagLibraryInfo[] getTagLibraryInfos();
+
+ // Protected fields
+
+ /**
+ * The prefix assigned to this taglib from the taglib directive.
+ */
+ protected String prefix;
+
+ /**
+ * The value of the uri attribute from the taglib directive for this
+ * library.
+ */
+ protected String uri;
+
+ /**
+ * An array describing the tags that are defined in this tag library.
+ */
+ protected TagInfo[] tags;
+
+ /**
+ * An array describing the tag files that are defined in this tag library.
+ *
+ * @since 2.0
+ */
+ protected TagFileInfo[] tagFiles;
+
+ /**
+ * An array describing the functions that are defined in this tag library.
+ *
+ * @since 2.0
+ */
+ protected FunctionInfo[] functions;
+
+ // Tag Library Data
+
+ /**
+ * The version of the tag library.
+ */
+ protected String tlibversion; // required
+
+ /**
+ * The version of the JSP specification this tag library is written to.
+ */
+ protected String jspversion; // required
+
+ /**
+ * The preferred short name (prefix) as indicated in the TLD.
+ */
+ protected String shortname; // required
+
+ /**
+ * The "reliable" URN indicated in the TLD.
+ */
+ protected String urn; // required
+
+ /**
+ * Information (documentation) for this TLD.
+ */
+ protected String info; // optional
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagLibraryValidator.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagLibraryValidator.java
new file mode 100644
index 0000000..632c89b
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagLibraryValidator.java
@@ -0,0 +1,144 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package javax.servlet.jsp.tagext;
+
+import java.util.Map;
+
+/**
+ * Translation-time validator class for a JSP page.
+ * A validator operates on the XML view associated with the JSP page.
+ *
+ * <p>
+ * The TLD file associates a TagLibraryValidator class and some init
+ * arguments with a tag library.
+ *
+ * <p>
+ * The JSP container is responsible for locating an appropriate
+ * instance of the appropriate subclass by
+ *
+ * <ul>
+ * <li> new a fresh instance, or reuse an available one
+ * <li> invoke the setInitParams(Map) method on the instance
+ * </ul>
+ *
+ * once initialized, the validate(String, String, PageData) method will
+ * be invoked, where the first two arguments are the prefix
+ * and uri for this tag library in the XML View. The prefix is intended
+ * to make it easier to produce an error message. However, it is not
+ * always accurate. In the case where a single URI is mapped to more
+ * than one prefix in the XML view, the prefix of the first URI is provided.
+ * Therefore, to provide high quality error messages in cases where the
+ * tag elements themselves are checked, the prefix parameter should be
+ * ignored and the actual prefix of the element should be used instead.
+ * TagLibraryValidators should always use the uri to identify elements
+ * as beloning to the tag library, not the prefix.
+ *
+ * <p>
+ * A TagLibraryValidator instance
+ * may create auxiliary objects internally to perform
+ * the validation (e.g. an XSchema validator) and may reuse it for all
+ * the pages in a given translation run.
+ *
+ * <p>
+ * The JSP container is not guaranteed to serialize invocations of
+ * validate() method, and TagLibraryValidators should perform any
+ * synchronization they may require.
+ *
+ * <p>
+ * As of JSP 2.0, a JSP container must provide a jsp:id attribute to
+ * provide higher quality validation errors.
+ * The container will track the JSP pages
+ * as passed to the container, and will assign to each element
+ * a unique "id", which is passed as the value of the jsp:id
+ * attribute. Each XML element in the XML view available will
+ * be extended with this attribute. The TagLibraryValidator
+ * can then use the attribute in one or more ValidationMessage
+ * objects. The container then, in turn, can use these
+ * values to provide more precise information on the location
+ * of an error.
+ *
+ * <p>
+ * The actual prefix of the <code>id</code> attribute may or may not be
+ * <code>jsp</code> but it will always map to the namespace
+ * <code>http://java.sun.com/JSP/Page</code>. A TagLibraryValidator
+ * implementation must rely on the uri, not the prefix, of the <code>id</code>
+ * attribute.
+ */
+
+public abstract class TagLibraryValidator {
+
+ /**
+ * Sole constructor. (For invocation by subclass constructors,
+ * typically implicit.)
+ */
+ public TagLibraryValidator() {
+ // NOOP by default
+ }
+
+ /**
+ * Set the init data in the TLD for this validator.
+ * Parameter names are keys, and parameter values are the values.
+ *
+ * @param map A Map describing the init parameters
+ */
+ public void setInitParameters(Map<String, Object> map) {
+ initParameters = map;
+ }
+
+
+ /**
+ * Get the init parameters data as an immutable Map.
+ * Parameter names are keys, and parameter values are the values.
+ *
+ * @return The init parameters as an immutable map.
+ */
+ public Map<String, Object> getInitParameters() {
+ return initParameters;
+ }
+
+ /**
+ * Validate a JSP page.
+ * This will get invoked once per unique tag library URI in the
+ * XML view. This method will return null if the page is valid; otherwise
+ * the method should return an array of ValidationMessage objects.
+ * An array of length zero is also interpreted as no errors.
+ *
+ * @param prefix the first prefix with which the tag library is
+ * associated, in the XML view. Note that some tags may use
+ * a different prefix if the namespace is redefined.
+ * @param uri the tag library's unique identifier
+ * @param page the JspData page object
+ * @return A null object, or zero length array if no errors, an array
+ * of ValidationMessages otherwise.
+ */
+ public ValidationMessage[] validate(String prefix, String uri,
+ PageData page) {
+ return null;
+ }
+
+ /**
+ * Release any data kept by this instance for validation purposes.
+ */
+ public void release() {
+ initParameters = null;
+ }
+
+ // Private data
+ private Map<String, Object> initParameters;
+
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagSupport.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagSupport.java
new file mode 100644
index 0000000..4355e71
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagSupport.java
@@ -0,0 +1,291 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.servlet.jsp.tagext;
+
+import java.io.Serializable;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+
+/**
+ * A base class for defining new tag handlers implementing Tag.
+ *
+ * <p> The TagSupport class is a utility class intended to be used as
+ * the base class for new tag handlers. The TagSupport class
+ * implements the Tag and IterationTag interfaces and adds additional
+ * convenience methods including getter methods for the properties in
+ * Tag. TagSupport has one static method that is included to
+ * facilitate coordination among cooperating tags.
+ *
+ * <p> Many tag handlers will extend TagSupport and only redefine a
+ * few methods.
+ */
+public class TagSupport implements IterationTag, Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Find the instance of a given class type that is closest to a given
+ * instance.
+ * This method uses the getParent method from the Tag
+ * interface.
+ * This method is used for coordination among cooperating tags.
+ *
+ * <p>
+ * The current version of the specification only provides one formal
+ * way of indicating the observable type of a tag handler: its
+ * tag handler implementation class, described in the tag-class
+ * subelement of the tag element. This is extended in an
+ * informal manner by allowing the tag library author to
+ * indicate in the description subelement an observable type.
+ * The type should be a subtype of the tag handler implementation
+ * class or void.
+ * This additional constraint can be exploited by a
+ * specialized container that knows about that specific tag library,
+ * as in the case of the JSP standard tag library.
+ *
+ * <p>
+ * When a tag library author provides information on the
+ * observable type of a tag handler, client programmatic code
+ * should adhere to that constraint. Specifically, the Class
+ * passed to findAncestorWithClass should be a subtype of the
+ * observable type.
+ *
+ *
+ * @param from The instance from where to start looking.
+ * @param klass The subclass of Tag or interface to be matched
+ * @return the nearest ancestor that implements the interface
+ * or is an instance of the class specified
+ */
+ public static final Tag findAncestorWithClass(Tag from,
+ // TCK signature test fails with generics
+ @SuppressWarnings("rawtypes")
+ Class klass) {
+ boolean isInterface = false;
+
+ if (from == null ||
+ klass == null ||
+ (!Tag.class.isAssignableFrom(klass) &&
+ !(isInterface = klass.isInterface()))) {
+ return null;
+ }
+
+ for (;;) {
+ Tag tag = from.getParent();
+
+ if (tag == null) {
+ return null;
+ }
+
+ if ((isInterface && klass.isInstance(tag)) ||
+ ((Class<?>)klass).isAssignableFrom(tag.getClass())) {
+ return tag;
+ }
+ from = tag;
+ }
+ }
+
+ /**
+ * Default constructor, all subclasses are required to define only
+ * a public constructor with the same signature, and to call the
+ * superclass constructor.
+ *
+ * This constructor is called by the code generated by the JSP
+ * translator.
+ */
+ public TagSupport() {
+ // NOOP by default
+ }
+
+ /**
+ * Default processing of the start tag, returning SKIP_BODY.
+ *
+ * @return SKIP_BODY
+ * @throws JspException if an error occurs while processing this tag
+ *
+ * @see Tag#doStartTag()
+ */
+ @Override
+ public int doStartTag() throws JspException {
+ return SKIP_BODY;
+ }
+
+ /**
+ * Default processing of the end tag returning EVAL_PAGE.
+ *
+ * @return EVAL_PAGE
+ * @throws JspException if an error occurs while processing this tag
+ *
+ * @see Tag#doEndTag()
+ */
+ @Override
+ public int doEndTag() throws JspException {
+ return EVAL_PAGE;
+ }
+
+
+ /**
+ * Default processing for a body.
+ *
+ * @return SKIP_BODY
+ * @throws JspException if an error occurs while processing this tag
+ *
+ * @see IterationTag#doAfterBody()
+ */
+ @Override
+ public int doAfterBody() throws JspException {
+ return SKIP_BODY;
+ }
+
+ // Actions related to body evaluation
+
+
+ /**
+ * Release state.
+ *
+ * @see Tag#release()
+ */
+ @Override
+ public void release() {
+ parent = null;
+ id = null;
+ if( values != null ) {
+ values.clear();
+ }
+ values = null;
+ }
+
+ /**
+ * Set the nesting tag of this tag.
+ *
+ * @param t The parent Tag.
+ * @see Tag#setParent(Tag)
+ */
+ @Override
+ public void setParent(Tag t) {
+ parent = t;
+ }
+
+ /**
+ * The Tag instance most closely enclosing this tag instance.
+ * @see Tag#getParent()
+ *
+ * @return the parent tag instance or null
+ */
+ @Override
+ public Tag getParent() {
+ return parent;
+ }
+
+ /**
+ * Set the id attribute for this tag.
+ *
+ * @param id The String for the id.
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * The value of the id attribute of this tag; or null.
+ *
+ * @return the value of the id attribute, or null
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Set the page context.
+ *
+ * @param pageContext The PageContext.
+ * @see Tag#setPageContext
+ */
+ @Override
+ public void setPageContext(PageContext pageContext) {
+ this.pageContext = pageContext;
+ }
+
+ /**
+ * Associate a value with a String key.
+ *
+ * @param k The key String.
+ * @param o The value to associate.
+ */
+ public void setValue(String k, Object o) {
+ if (values == null) {
+ values = new Hashtable<String, Object>();
+ }
+ values.put(k, o);
+ }
+
+ /**
+ * Get a the value associated with a key.
+ *
+ * @param k The string key.
+ * @return The value associated with the key, or null.
+ */
+ public Object getValue(String k) {
+ if (values == null) {
+ return null;
+ }
+ return values.get(k);
+ }
+
+ /**
+ * Remove a value associated with a key.
+ *
+ * @param k The string key.
+ */
+ public void removeValue(String k) {
+ if (values != null) {
+ values.remove(k);
+ }
+ }
+
+ /**
+ * Enumerate the keys for the values kept by this tag handler.
+ *
+ * @return An enumeration of all the keys for the values set,
+ * or null or an empty Enumeration if no values have been set.
+ */
+ public Enumeration<String> getValues() {
+ if (values == null) {
+ return null;
+ }
+ return values.keys();
+ }
+
+ // private fields
+
+ private Tag parent;
+ private Hashtable<String, Object> values;
+ /**
+ * The value of the id attribute of this tag; or null.
+ */
+ protected String id;
+
+ // protected fields
+
+ /**
+ * The PageContext.
+ */
+ protected transient PageContext pageContext;
+}
+
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagVariableInfo.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagVariableInfo.java
new file mode 100644
index 0000000..87a7540
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TagVariableInfo.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.jsp.tagext;
+
+/**
+ * Variable information for a tag in a Tag Library; This class is instantiated
+ * from the Tag Library Descriptor file (TLD) and is available only at
+ * translation time. This object should be immutable. This information is only
+ * available in JSP 1.2 format TLDs or above.
+ */
+public class TagVariableInfo {
+
+ /**
+ * Constructor for TagVariableInfo.
+ *
+ * @param nameGiven
+ * value of &lt;name-given&gt;
+ * @param nameFromAttribute
+ * value of &lt;name-from-attribute&gt;
+ * @param className
+ * value of &lt;variable-class&gt;
+ * @param declare
+ * value of &lt;declare&gt;
+ * @param scope
+ * value of &lt;scope&gt;
+ */
+ public TagVariableInfo(String nameGiven, String nameFromAttribute,
+ String className, boolean declare, int scope) {
+ this.nameGiven = nameGiven;
+ this.nameFromAttribute = nameFromAttribute;
+ this.className = className;
+ this.declare = declare;
+ this.scope = scope;
+ }
+
+ /**
+ * The body of the &lt;name-given&gt; element.
+ *
+ * @return The variable name as a constant
+ */
+ public String getNameGiven() {
+ return nameGiven;
+ }
+
+ /**
+ * The body of the &lt;name-from-attribute&gt; element. This is the name of
+ * an attribute whose (translation-time) value will give the name of the
+ * variable. One of &lt;name-given&gt; or &lt;name-from-attribute&gt; is
+ * required.
+ *
+ * @return The attribute whose value defines the variable name
+ */
+ public String getNameFromAttribute() {
+ return nameFromAttribute;
+ }
+
+ /**
+ * The body of the &lt;variable-class&gt; element.
+ *
+ * @return The name of the class of the variable or 'java.lang.String' if
+ * not defined in the TLD.
+ */
+ public String getClassName() {
+ return className;
+ }
+
+ /**
+ * The body of the &lt;declare&gt; element.
+ *
+ * @return Whether the variable is to be declared or not. If not defined in
+ * the TLD, 'true' will be returned.
+ */
+ public boolean getDeclare() {
+ return declare;
+ }
+
+ /**
+ * The body of the &lt;scope&gt; element.
+ *
+ * @return The scope to give the variable. NESTED scope will be returned if
+ * not defined in the TLD.
+ */
+ public int getScope() {
+ return scope;
+ }
+
+ /*
+ * private fields
+ */
+ private final String nameGiven; // <name-given>
+ private final String nameFromAttribute; // <name-from-attribute>
+ private final String className; // <class>
+ private final boolean declare; // <declare>
+ private final int scope; // <scope>
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TryCatchFinally.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TryCatchFinally.java
new file mode 100644
index 0000000..64621f0
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/TryCatchFinally.java
@@ -0,0 +1,99 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+package javax.servlet.jsp.tagext;
+
+
+
+/**
+ * The auxiliary interface of a Tag, IterationTag or BodyTag tag
+ * handler that wants additional hooks for managing resources.
+ *
+ * <p>This interface provides two new methods: doCatch(Throwable)
+ * and doFinally(). The prototypical invocation is as follows:
+ *
+ * <pre>
+ * h = get a Tag(); // get a tag handler, perhaps from pool
+ *
+ * h.setPageContext(pc); // initialize as desired
+ * h.setParent(null);
+ * h.setFoo("foo");
+ *
+ * // tag invocation protocol; see Tag.java
+ * try {
+ * doStartTag()...
+ * ....
+ * doEndTag()...
+ * } catch (Throwable t) {
+ * // react to exceptional condition
+ * h.doCatch(t);
+ * } finally {
+ * // restore data invariants and release per-invocation resources
+ * h.doFinally();
+ * }
+ *
+ * ... other invocations perhaps with some new setters
+ * ...
+ * h.release(); // release long-term resources
+ * </pre>
+ */
+
+public interface TryCatchFinally {
+
+ /**
+ * Invoked if a Throwable occurs while evaluating the BODY
+ * inside a tag or in any of the following methods:
+ * Tag.doStartTag(), Tag.doEndTag(),
+ * IterationTag.doAfterBody() and BodyTag.doInitBody().
+ *
+ * <p>This method is not invoked if the Throwable occurs during
+ * one of the setter methods.
+ *
+ * <p>This method may throw an exception (the same or a new one)
+ * that will be propagated further up the nest chain. If an exception
+ * is thrown, doFinally() will be invoked.
+ *
+ * <p>This method is intended to be used to respond to an exceptional
+ * condition.
+ *
+ * @param t The throwable exception navigating through this tag.
+ * @throws Throwable if the exception is to be rethrown further up
+ * the nest chain.
+ */
+
+ void doCatch(Throwable t) throws Throwable;
+
+ /**
+ * Invoked in all cases after doEndTag() for any class implementing
+ * Tag, IterationTag or BodyTag. This method is invoked even if
+ * an exception has occurred in the BODY of the tag,
+ * or in any of the following methods:
+ * Tag.doStartTag(), Tag.doEndTag(),
+ * IterationTag.doAfterBody() and BodyTag.doInitBody().
+ *
+ * <p>This method is not invoked if the Throwable occurs during
+ * one of the setter methods.
+ *
+ * <p>This method should not throw an Exception.
+ *
+ * <p>This method is intended to maintain per-invocation data
+ * integrity and resource management actions.
+ */
+
+ void doFinally();
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/ValidationMessage.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/ValidationMessage.java
new file mode 100644
index 0000000..9859074
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/ValidationMessage.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.jsp.tagext;
+
+/**
+ * A validation message from either TagLibraryValidator or TagExtraInfo.
+ * <p>
+ * As of JSP 2.0, a JSP container must support a jsp:id attribute to provide
+ * higher quality validation errors. The container will track the JSP pages as
+ * passed to the container, and will assign to each element a unique "id", which
+ * is passed as the value of the jsp:id attribute. Each XML element in the XML
+ * view available will be extended with this attribute. The TagLibraryValidator
+ * can then use the attribute in one or more ValidationMessage objects. The
+ * container then, in turn, can use these values to provide more precise
+ * information on the location of an error.
+ * <p>
+ * The actual prefix of the <code>id</code> attribute may or may not be
+ * <code>jsp</code> but it will always map to the namespace
+ * <code>http://java.sun.com/JSP/Page</code>. A TagLibraryValidator
+ * implementation must rely on the uri, not the prefix, of the <code>id</code>
+ * attribute.
+ */
+public class ValidationMessage {
+
+ /**
+ * Create a ValidationMessage. The message String should be non-null. The
+ * value of id may be null, if the message is not specific to any XML
+ * element, or if no jsp:id attributes were passed on. If non-null, the
+ * value of id must be the value of a jsp:id attribute for the PageData
+ * passed into the validate() method.
+ *
+ * @param id
+ * Either null, or the value of a jsp:id attribute.
+ * @param message
+ * A localized validation message.
+ */
+ public ValidationMessage(String id, String message) {
+ this.id = id;
+ this.message = message;
+ }
+
+ /**
+ * Get the jsp:id. Null means that there is no information available.
+ *
+ * @return The jsp:id information.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Get the localized validation message.
+ *
+ * @return A validation message
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ // Private data
+ private final String id;
+ private final String message;
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/VariableInfo.java b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/VariableInfo.java
new file mode 100644
index 0000000..d35303d
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/VariableInfo.java
@@ -0,0 +1,257 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.jsp.tagext;
+
+/**
+ * Information on the scripting variables that are created/modified by a tag (at
+ * run-time). This information is provided by TagExtraInfo classes and it is
+ * used by the translation phase of JSP.
+ * <p>
+ * Scripting variables generated by a custom action have an associated scope of
+ * either AT_BEGIN, NESTED, or AT_END.
+ * <p>
+ * The class name (VariableInfo.getClassName) in the returned objects is used to
+ * determine the types of the scripting variables. Note that because scripting
+ * variables are assigned their values from scoped attributes which cannot be of
+ * primitive types, &quot;boxed&quot; types such as
+ * <code>java.lang.Integer</code> must be used instead of primitives.
+ * <p>
+ * The class name may be a Fully Qualified Class Name, or a short class name.
+ * <p>
+ * If a Fully Qualified Class Name is provided, it should refer to a class that
+ * should be in the CLASSPATH for the Web Application (see Servlet 2.4
+ * specification - essentially it is WEB-INF/lib and WEB-INF/classes). Failure
+ * to be so will lead to a translation-time error.
+ * <p>
+ * If a short class name is given in the VariableInfo objects, then the class
+ * name must be that of a public class in the context of the import directives
+ * of the page where the custom action appears. The class must also be in the
+ * CLASSPATH for the Web Application (see Servlet 2.4 specification -
+ * essentially it is WEB-INF/lib and WEB-INF/classes). Failure to be so will
+ * lead to a translation-time error.
+ * <p>
+ * <B>Usage Comments</B>
+ * <p>
+ * Frequently a fully qualified class name will refer to a class that is known
+ * to the tag library and thus, delivered in the same JAR file as the tag
+ * handlers. In most other remaining cases it will refer to a class that is in
+ * the platform on which the JSP processor is built (like J2EE). Using fully
+ * qualified class names in this manner makes the usage relatively resistant to
+ * configuration errors.
+ * <p>
+ * A short name is usually generated by the tag library based on some attributes
+ * passed through from the custom action user (the author), and it is thus less
+ * robust: for instance a missing import directive in the referring JSP page
+ * will lead to an invalid short name class and a translation error.
+ * <p>
+ * <B>Synchronization Protocol</B>
+ * <p>
+ * The result of the invocation on getVariableInfo is an array of VariableInfo
+ * objects. Each such object describes a scripting variable by providing its
+ * name, its type, whether the variable is new or not, and what its scope is.
+ * Scope is best described through a picture:
+ * <p>
+ * <IMG src="doc-files/VariableInfo-1.gif"
+ * alt="NESTED, AT_BEGIN and AT_END Variable Scopes"/>
+ * <p>
+ * The JSP 2.0 specification defines the interpretation of 3 values:
+ * <ul>
+ * <li>NESTED, if the scripting variable is available between the start tag and
+ * the end tag of the action that defines it.
+ * <li>AT_BEGIN, if the scripting variable is available from the start tag of
+ * the action that defines it until the end of the scope.
+ * <li>AT_END, if the scripting variable is available after the end tag of the
+ * action that defines it until the end of the scope.
+ * </ul>
+ * The scope value for a variable implies what methods may affect its value and
+ * thus where synchronization is needed as illustrated by the table below.
+ * <b>Note:</b> the synchronization of the variable(s) will occur <em>after</em>
+ * the respective method has been called. <blockquote>
+ * <table cellpadding="2" cellspacing="2" border="0" width="55%" * bgcolor="#999999" summary="Variable Synchronization Points">
+ * <tbody>
+ * <tr align="center">
+ * <td valign="top" colspan="6" bgcolor="#999999"><u><b>Variable Synchronization
+ * Points</b></u><br>
+ * </td>
+ * </tr>
+ * <tr>
+ * <th valign="top" bgcolor="#c0c0c0">&nbsp;</th>
+ * <th valign="top" bgcolor="#c0c0c0" align="center">doStartTag()</th>
+ * <th valign="top" bgcolor="#c0c0c0" align="center">doInitBody()</th>
+ * <th valign="top" bgcolor="#c0c0c0" align="center">doAfterBody()</th>
+ * <th valign="top" bgcolor="#c0c0c0" align="center">doEndTag()</th>
+ * <th valign="top" bgcolor="#c0c0c0" align="center">doTag()</th>
+ * </tr>
+ * <tr>
+ * <td valign="top" bgcolor="#c0c0c0"><b>Tag<br>
+ * </b></td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN, NESTED<br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN, AT_END<br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td valign="top" bgcolor="#c0c0c0"><b>IterationTag<br>
+ * </b></td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN, NESTED<br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN, NESTED<br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN, AT_END<br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td valign="top" bgcolor="#c0c0c0"><b>BodyTag<br>
+ * </b></td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN,
+ * NESTED<sup>1</sup><br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN,
+ * NESTED<sup>1</sup><br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN, NESTED<br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN, AT_END<br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * </tr>
+ * <tr>
+ * <td valign="top" bgcolor="#c0c0c0"><b>SimpleTag<br>
+ * </b></td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff"><br>
+ * </td>
+ * <td valign="top" align="center" bgcolor="#ffffff">AT_BEGIN, AT_END<br>
+ * </td>
+ * </tr>
+ * </tbody>
+ * </table>
+ * <sup>1</sup> Called after <code>doStartTag()</code> if
+ * <code>EVAL_BODY_INCLUDE</code> is returned, or after
+ * <code>doInitBody()</code> otherwise. </blockquote>
+ * <p>
+ * <B>Variable Information in the TLD</B>
+ * <p>
+ * Scripting variable information can also be encoded directly for most cases
+ * into the Tag Library Descriptor using the &lt;variable&gt; subelement of the
+ * &lt;tag&gt; element. See the JSP specification.
+ */
+public class VariableInfo {
+
+ /**
+ * Scope information that scripting variable is visible only within the
+ * start/end tags.
+ */
+ public static final int NESTED = 0;
+
+ /**
+ * Scope information that scripting variable is visible after start tag.
+ */
+ public static final int AT_BEGIN = 1;
+
+ /**
+ * Scope information that scripting variable is visible after end tag.
+ */
+ public static final int AT_END = 2;
+
+ /**
+ * Constructor These objects can be created (at translation time) by the
+ * TagExtraInfo instances.
+ *
+ * @param varName
+ * The name of the scripting variable
+ * @param className
+ * The type of this variable
+ * @param declare
+ * If true, it is a new variable (in some languages this will
+ * require a declaration)
+ * @param scope
+ * Indication on the lexical scope of the variable
+ */
+ public VariableInfo(String varName, String className, boolean declare,
+ int scope) {
+ this.varName = varName;
+ this.className = className;
+ this.declare = declare;
+ this.scope = scope;
+ }
+
+ // Accessor methods
+
+ /**
+ * Returns the name of the scripting variable.
+ *
+ * @return the name of the scripting variable
+ */
+ public String getVarName() {
+ return varName;
+ }
+
+ /**
+ * Returns the type of this variable.
+ *
+ * @return the type of this variable
+ */
+ public String getClassName() {
+ return className;
+ }
+
+ /**
+ * Returns whether this is a new variable. If so, in some languages this
+ * will require a declaration.
+ *
+ * @return whether this is a new variable.
+ */
+ public boolean getDeclare() {
+ return declare;
+ }
+
+ /**
+ * Returns the lexical scope of the variable.
+ *
+ * @return the lexical scope of the variable, either AT_BEGIN, AT_END, or
+ * NESTED.
+ * @see #AT_BEGIN
+ * @see #AT_END
+ * @see #NESTED
+ */
+ public int getScope() {
+ return scope;
+ }
+
+ // == private data
+ private final String varName;
+ private final String className;
+ private final boolean declare;
+ private final int scope;
+}
diff --git a/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/package.html b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/package.html
new file mode 100644
index 0000000..62c5e89
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/javax/servlet/jsp/tagext/package.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+</head>
+<body bgcolor="white">
+
+Classes and interfaces for the definition of JavaServer Pages Tag Libraries.
+
+<p>
+The JavaServer Pages(tm) (JSP) 2.0 specification provides a portable
+mechanism for the description of tag libraries.
+<p>
+A JSP tag library contains
+<ul>
+<li>A Tag Library Descriptor</li>
+<li>A number of Tag Files or Tag handler classes defining
+ request-time behavior</li>
+<li>Additional classes and resources used at runtime</li>
+<li>Possibly some additional classes to provide extra translation
+ information</li>
+</ul>
+<p>
+The JSP 2.0 specification and the reference implementation both contain
+simple and moderately complex examples of actions defined using this
+mechanism. These are available at JSP's web site, at
+<a href="http://java.sun.com/products/jsp">http://java.sun.com/products/jsp</a>.
+Some readers may want to consult those to get a quick feel for how
+the mechanisms work together.
+
+</body>
+</html>
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/AccessLog.java b/bundles/org.apache.tomcat/src/org/apache/catalina/AccessLog.java
new file mode 100644
index 0000000..9e9a418
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/AccessLog.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina;
+
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+
+
+/**
+ * Intended for use by a {@link Valve} to indicate that the {@link Valve}
+ * provides access logging. It is used by the Tomcat internals to identify a
+ * Valve that logs access requests so requests that are rejected
+ * earlier in the processing chain can still be added to the access log.
+ * Implementations of this interface should be robust against the provided
+ * {@link Request} and {@link Response} objects being null, having null
+ * attributes or any other 'oddness' that may result from attempting to log
+ * a request that was almost certainly rejected because it was mal-formed.
+ */
+public interface AccessLog {
+
+ /**
+ * Name of request attribute used to override the remote address recorded by
+ * the AccessLog.
+ */
+ public static final String REMOTE_ADDR_ATTRIBUTE =
+ "org.apache.catalina.AccessLog.RemoteAddr";
+
+ /**
+ * Name of request attribute used to override remote host name recorded by
+ * the AccessLog.
+ */
+ public static final String REMOTE_HOST_ATTRIBUTE =
+ "org.apache.catalina.AccessLog.RemoteHost";
+
+ /**
+ * Name of request attribute used to override the protocol recorded by the
+ * AccessLog.
+ */
+ public static final String PROTOCOL_ATTRIBUTE =
+ "org.apache.catalina.AccessLog.Protocol";
+
+ /**
+ * Name of request attribute used to override the server port recorded by
+ * the AccessLog.
+ */
+ public static final String SERVER_PORT_ATTRIBUTE =
+ "org.apache.catalina.AccessLog.ServerPort";
+
+
+ /**
+ * Add the request/response to the access log using the specified processing
+ * time.
+ *
+ * @param request Request (associated with the response) to log
+ * @param response Response (associated with the request) to log
+ * @param time Time taken to process the request/response in
+ * milliseconds (use 0 if not known)
+ */
+ public void log(Request request, Response response, long time);
+
+ /**
+ * Should this valve set request attributes for IP address, Hostname,
+ * protocol and port used for the request? This are typically used in
+ * conjunction with the {@link org.apache.catalina.valves.AccessLogValve}
+ * which will otherwise log the original values.
+ * Default is <code>true</code>.
+ *
+ * The attributes set are:
+ * <ul>
+ * <li>org.apache.catalina.RemoteAddr</li>
+ * <li>org.apache.catalina.RemoteHost</li>
+ * <li>org.apache.catalina.Protocol</li>
+ * <li>org.apache.catalina.ServerPost</li>
+ * </ul>
+ *
+ * @param requestAttributesEnabled <code>true</code> causes the attributes
+ * to be set, <code>false</code> disables
+ * the setting of the attributes.
+ */
+ public void setRequestAttributesEnabled(boolean requestAttributesEnabled);
+
+ /**
+ * @see #setRequestAttributesEnabled(boolean)
+ * @return <code>true</code> if the attributes will be logged, otherwise
+ * <code>false</code>
+ */
+ public boolean getRequestAttributesEnabled();
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Authenticator.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Authenticator.java
new file mode 100644
index 0000000..fb52cee
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Authenticator.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.deploy.LoginConfig;
+
+
+/**
+ * An <b>Authenticator</b> is a component (usually a Valve or Container) that
+ * provides some sort of authentication service.
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: Authenticator.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public interface Authenticator {
+
+ /**
+ * Authenticate the user making this request, based on the specified
+ * login configuration. Return <code>true</code> if any specified
+ * constraint has been satisfied, or <code>false</code> if we have
+ * created a response challenge already.
+ *
+ * @param request Request we are processing
+ * @param response Response we are populating
+ * @param config Login configuration describing how authentication
+ * should be performed
+ *
+ * @exception IOException if an input/output error occurs
+ */
+ public boolean authenticate(Request request, HttpServletResponse response,
+ LoginConfig config) throws IOException;
+
+ public void login(String userName, String password, Request request)
+ throws ServletException;
+
+ public void logout(Request request) throws ServletException;
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/CatalinaFactory.java b/bundles/org.apache.tomcat/src/org/apache/catalina/CatalinaFactory.java
new file mode 100644
index 0000000..412c1b4
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/CatalinaFactory.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina;
+
+import org.apache.catalina.core.StandardPipeline;
+
+/**
+ * Factory class used whenever a default implementation of a component is
+ * required. It provides both class names (for the digester) and objects for
+ * other components. The current implementation is as simple as possible. If
+ * there is demand it can be extended to support alternative factories and/or
+ * alternative defaults.
+ *
+ * TODO: Create the other standard components via this factory
+ */
+public class CatalinaFactory {
+
+ private static CatalinaFactory factory = new CatalinaFactory();
+
+ public static CatalinaFactory getFactory() {
+ return factory;
+ }
+
+ private CatalinaFactory() {
+ // Hide the default constructor
+ }
+
+ public String getDefaultPipelineClassName() {
+ return StandardPipeline.class.getName();
+ }
+
+ public Pipeline createPipeline(Container container) {
+ Pipeline pipeline = new StandardPipeline();
+ pipeline.setContainer(container);
+ return pipeline;
+ }
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Cluster.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Cluster.java
new file mode 100644
index 0000000..0b66977
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Cluster.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina;
+
+/**
+ * A <b>Cluster</b> works as a Cluster client/server for the local host
+ * Different Cluster implementations can be used to support different
+ * ways to communicate within the Cluster. A Cluster implementation is
+ * responsible for setting up a way to communicate within the Cluster
+ * and also supply "ClientApplications" with <code>ClusterSender</code>
+ * used when sending information in the Cluster and
+ * <code>ClusterInfo</code> used for receiving information in the Cluster.
+ *
+ * @author Bip Thelin
+ * @author Remy Maucherat
+ * @author Filip Hanik
+ * @version $Id: Cluster.java,v 1.1 2011/06/28 21:08:20 rherrmann Exp $
+ */
+
+public interface Cluster {
+
+ // ------------------------------------------------------------- Properties
+
+ /**
+ * Return descriptive information about this Cluster implementation and
+ * the corresponding version number, in the format
+ * <code>&lt;description&gt;/&lt;version&gt;</code>.
+ */
+ public String getInfo();
+
+ /**
+ * Return the name of the cluster that this Server is currently
+ * configured to operate within.
+ *
+ * @return The name of the cluster associated with this server
+ */
+ public String getClusterName();
+
+ /**
+ * Set the name of the cluster to join, if no cluster with
+ * this name is present create one.
+ *
+ * @param clusterName The clustername to join
+ */
+ public void setClusterName(String clusterName);
+
+ /**
+ * Set the Container associated with our Cluster
+ *
+ * @param container The Container to use
+ */
+ public void setContainer(Container container);
+
+ /**
+ * Get the Container associated with our Cluster
+ *
+ * @return The Container associated with our Cluster
+ */
+ public Container getContainer();
+
+ /**
+ * Set the protocol parameters.
+ *
+ * @param protocol The protocol used by the cluster
+ * @deprecated
+ */
+ @Deprecated
+ public void setProtocol(String protocol);
+
+ /**
+ * Get the protocol used by the cluster.
+ *
+ * @return The protocol
+ * @deprecated
+ */
+ @Deprecated
+ public String getProtocol();
+
+ // --------------------------------------------------------- Public Methods
+
+ /**
+ * Create a new manager which will use this cluster to replicate its
+ * sessions.
+ *
+ * @param name Name (key) of the application with which the manager is
+ * associated
+ */
+ public Manager createManager(String name);
+
+ /**
+ * Register a manager with the cluster. If the cluster is not responsible
+ * for creating a manager, then the container will at least notify the
+ * cluster that this manager is participating in the cluster.
+ * @param manager Manager
+ */
+ public void registerManager(Manager manager);
+
+ /**
+ * Removes a manager from the cluster
+ * @param manager Manager
+ */
+ public void removeManager(Manager manager);
+
+ // --------------------------------------------------------- Cluster Wide Deployments
+
+
+ /**
+ * Execute a periodic task, such as reloading, etc. This method will be
+ * invoked inside the classloading context of this container. Unexpected
+ * throwables will be caught and logged.
+ */
+ public void backgroundProcess();
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Contained.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Contained.java
new file mode 100644
index 0000000..de62e13
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Contained.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+
+/**
+ * <p>Decoupling interface which specifies that an implementing class is
+ * associated with at most one <strong>Container</strong> instance.</p>
+ *
+ * @author Craig R. McClanahan
+ * @author Peter Donald
+ * @version $Id: Contained.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public interface Contained {
+
+
+ //-------------------------------------------------------------- Properties
+
+
+ /**
+ * Return the <code>Container</code> with which this instance is associated
+ * (if any); otherwise return <code>null</code>.
+ */
+ public Container getContainer();
+
+
+ /**
+ * Set the <code>Container</code> with which this instance is associated.
+ *
+ * @param container The Container instance with which this instance is to
+ * be associated, or <code>null</code> to disassociate this instance
+ * from any Container
+ */
+ public void setContainer(Container container);
+
+
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Container.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Container.java
new file mode 100644
index 0000000..16cb7d1
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Container.java
@@ -0,0 +1,479 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+
+import java.beans.PropertyChangeListener;
+import java.io.IOException;
+
+import javax.management.ObjectName;
+import javax.naming.directory.DirContext;
+import javax.servlet.ServletException;
+
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+import org.apache.juli.logging.Log;
+
+
+/**
+ * A <b>Container</b> is an object that can execute requests received from
+ * a client, and return responses based on those requests. A Container may
+ * optionally support a pipeline of Valves that process the request in an
+ * order configured at runtime, by implementing the <b>Pipeline</b> interface
+ * as well.
+ * <p>
+ * Containers will exist at several conceptual levels within Catalina. The
+ * following examples represent common cases:
+ * <ul>
+ * <li><b>Engine</b> - Representation of the entire Catalina servlet engine,
+ * most likely containing one or more subcontainers that are either Host
+ * or Context implementations, or other custom groups.
+ * <li><b>Host</b> - Representation of a virtual host containing a number
+ * of Contexts.
+ * <li><b>Context</b> - Representation of a single ServletContext, which will
+ * typically contain one or more Wrappers for the supported servlets.
+ * <li><b>Wrapper</b> - Representation of an individual servlet definition
+ * (which may support multiple servlet instances if the servlet itself
+ * implements SingleThreadModel).
+ * </ul>
+ * A given deployment of Catalina need not include Containers at all of the
+ * levels described above. For example, an administration application
+ * embedded within a network device (such as a router) might only contain
+ * a single Context and a few Wrappers, or even a single Wrapper if the
+ * application is relatively small. Therefore, Container implementations
+ * need to be designed so that they will operate correctly in the absence
+ * of parent Containers in a given deployment.
+ * <p>
+ * A Container may also be associated with a number of support components
+ * that provide functionality which might be shared (by attaching it to a
+ * parent Container) or individually customized. The following support
+ * components are currently recognized:
+ * <ul>
+ * <li><b>Loader</b> - Class loader to use for integrating new Java classes
+ * for this Container into the JVM in which Catalina is running.
+ * <li><b>Logger</b> - Implementation of the <code>log()</code> method
+ * signatures of the <code>ServletContext</code> interface.
+ * <li><b>Manager</b> - Manager for the pool of Sessions associated with
+ * this Container.
+ * <li><b>Realm</b> - Read-only interface to a security domain, for
+ * authenticating user identities and their corresponding roles.
+ * <li><b>Resources</b> - JNDI directory context enabling access to static
+ * resources, enabling custom linkages to existing server components when
+ * Catalina is embedded in a larger server.
+ * </ul>
+ *
+ * @author Craig R. McClanahan
+ * @author Remy Maucherat
+ * @version $Id: Container.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public interface Container extends Lifecycle {
+
+
+ // ----------------------------------------------------- Manifest Constants
+
+
+ /**
+ * The ContainerEvent event type sent when a child container is added
+ * by <code>addChild()</code>.
+ */
+ public static final String ADD_CHILD_EVENT = "addChild";
+
+
+ /**
+ * The ContainerEvent event type sent when a Mapper is added
+ * by <code>addMapper()</code>.
+ */
+ public static final String ADD_MAPPER_EVENT = "addMapper";
+
+
+ /**
+ * The ContainerEvent event type sent when a valve is added
+ * by <code>addValve()</code>, if this Container supports pipelines.
+ */
+ public static final String ADD_VALVE_EVENT = "addValve";
+
+
+ /**
+ * The ContainerEvent event type sent when a child container is removed
+ * by <code>removeChild()</code>.
+ */
+ public static final String REMOVE_CHILD_EVENT = "removeChild";
+
+
+ /**
+ * The ContainerEvent event type sent when a Mapper is removed
+ * by <code>removeMapper()</code>.
+ */
+ public static final String REMOVE_MAPPER_EVENT = "removeMapper";
+
+
+ /**
+ * The ContainerEvent event type sent when a valve is removed
+ * by <code>removeValve()</code>, if this Container supports pipelines.
+ */
+ public static final String REMOVE_VALVE_EVENT = "removeValve";
+
+
+ // ------------------------------------------------------------- Properties
+
+
+ /**
+ * Return descriptive information about this Container implementation and
+ * the corresponding version number, in the format
+ * <code>&lt;description&gt;/&lt;version&gt;</code>.
+ */
+ public String getInfo();
+
+
+ /**
+ * Return the Loader with which this Container is associated. If there is
+ * no associated Loader, return the Loader associated with our parent
+ * Container (if any); otherwise, return <code>null</code>.
+ */
+ public Loader getLoader();
+
+
+ /**
+ * Set the Loader with which this Container is associated.
+ *
+ * @param loader The newly associated loader
+ */
+ public void setLoader(Loader loader);
+
+
+ /**
+ * Return the Logger with which this Container is associated. If there is
+ * no associated Logger, return the Logger associated with our parent
+ * Container (if any); otherwise return <code>null</code>.
+ */
+ public Log getLogger();
+
+
+ /**
+ * Return the Manager with which this Container is associated. If there is
+ * no associated Manager, return the Manager associated with our parent
+ * Container (if any); otherwise return <code>null</code>.
+ */
+ public Manager getManager();
+
+
+ /**
+ * Set the Manager with which this Container is associated.
+ *
+ * @param manager The newly associated Manager
+ */
+ public void setManager(Manager manager);
+
+
+ /**
+ * Return an object which may be utilized for mapping to this component.
+ */
+ public Object getMappingObject();
+
+
+ /**
+ * Return the JMX name associated with this container.
+ */
+ public ObjectName getObjectName();
+
+ /**
+ * Return the Pipeline object that manages the Valves associated with
+ * this Container.
+ */
+ public Pipeline getPipeline();
+
+
+ /**
+ * Return the Cluster with which this Container is associated. If there is
+ * no associated Cluster, return the Cluster associated with our parent
+ * Container (if any); otherwise return <code>null</code>.
+ */
+ public Cluster getCluster();
+
+
+ /**
+ * Set the Cluster with which this Container is associated.
+ *
+ * @param cluster the Cluster with which this Container is associated.
+ */
+ public void setCluster(Cluster cluster);
+
+
+ /**
+ * Get the delay between the invocation of the backgroundProcess method on
+ * this container and its children. Child containers will not be invoked
+ * if their delay value is not negative (which would mean they are using
+ * their own thread). Setting this to a positive value will cause
+ * a thread to be spawn. After waiting the specified amount of time,
+ * the thread will invoke the executePeriodic method on this container
+ * and all its children.
+ */
+ public int getBackgroundProcessorDelay();
+
+
+ /**
+ * Set the delay between the invocation of the execute method on this
+ * container and its children.
+ *
+ * @param delay The delay in seconds between the invocation of
+ * backgroundProcess methods
+ */
+ public void setBackgroundProcessorDelay(int delay);
+
+
+ /**
+ * Return a name string (suitable for use by humans) that describes this
+ * Container. Within the set of child containers belonging to a particular
+ * parent, Container names must be unique.
+ */
+ public String getName();
+
+
+ /**
+ * Set a name string (suitable for use by humans) that describes this
+ * Container. Within the set of child containers belonging to a particular
+ * parent, Container names must be unique.
+ *
+ * @param name New name of this container
+ *
+ * @exception IllegalStateException if this Container has already been
+ * added to the children of a parent Container (after which the name
+ * may not be changed)
+ */
+ public void setName(String name);
+
+
+ /**
+ * Return the Container for which this Container is a child, if there is
+ * one. If there is no defined parent, return <code>null</code>.
+ */
+ public Container getParent();
+
+
+ /**
+ * Set the parent Container to which this Container is being added as a
+ * child. This Container may refuse to become attached to the specified
+ * Container by throwing an exception.
+ *
+ * @param container Container to which this Container is being added
+ * as a child
+ *
+ * @exception IllegalArgumentException if this Container refuses to become
+ * attached to the specified Container
+ */
+ public void setParent(Container container);
+
+
+ /**
+ * Return the parent class loader for this component. If not set, return
+ * {@link #getParent()} {@link #getParentClassLoader()}. If no parent has
+ * been set, return the system class loader.
+ */
+ public ClassLoader getParentClassLoader();
+
+
+ /**
+ * Set the parent class loader for this component. For {@link Context}s
+ * this call is meaningful only <strong>before</strong> a Loader has
+ * been configured, and the specified value (if non-null) should be
+ * passed as an argument to the class loader constructor.
+ *
+ * @param parent The new parent class loader
+ */
+ public void setParentClassLoader(ClassLoader parent);
+
+
+ /**
+ * Return the Realm with which this Container is associated. If there is
+ * no associated Realm, return the Realm associated with our parent
+ * Container (if any); otherwise return <code>null</code>.
+ */
+ public Realm getRealm();
+
+
+ /**
+ * Set the Realm with which this Container is associated.
+ *
+ * @param realm The newly associated Realm
+ */
+ public void setRealm(Realm realm);
+
+
+ /**
+ * Return the Resources with which this Container is associated. If there
+ * is no associated Resources object, return the Resources associated with
+ * our parent Container (if any); otherwise return <code>null</code>.
+ */
+ public DirContext getResources();
+
+
+ /**
+ * Set the Resources object with which this Container is associated.
+ *
+ * @param resources The newly associated Resources
+ */
+ public void setResources(DirContext resources);
+
+
+ // --------------------------------------------------------- Public Methods
+
+
+ /**
+ * Execute a periodic task, such as reloading, etc. This method will be
+ * invoked inside the classloading context of this container. Unexpected
+ * throwables will be caught and logged.
+ */
+ public void backgroundProcess();
+
+
+ /**
+ * Add a new child Container to those associated with this Container,
+ * if supported. Prior to adding this Container to the set of children,
+ * the child's <code>setParent()</code> method must be called, with this
+ * Container as an argument. This method may thrown an
+ * <code>IllegalArgumentException</code> if this Container chooses not
+ * to be attached to the specified Container, in which case it is not added
+ *
+ * @param child New child Container to be added
+ *
+ * @exception IllegalArgumentException if this exception is thrown by
+ * the <code>setParent()</code> method of the child Container
+ * @exception IllegalArgumentException if the new child does not have
+ * a name unique from that of existing children of this Container
+ * @exception IllegalStateException if this Container does not support
+ * child Containers
+ */
+ public void addChild(Container child);
+
+
+ /**
+ * Add a container event listener to this component.
+ *
+ * @param listener The listener to add
+ */
+ public void addContainerListener(ContainerListener listener);
+
+
+ /**
+ * Add a property change listener to this component.
+ *
+ * @param listener The listener to add
+ */
+ public void addPropertyChangeListener(PropertyChangeListener listener);
+
+
+ /**
+ * Return the child Container, associated with this Container, with
+ * the specified name (if any); otherwise, return <code>null</code>
+ *
+ * @param name Name of the child Container to be retrieved
+ */
+ public Container findChild(String name);
+
+
+ /**
+ * Return the set of children Containers associated with this Container.
+ * If this Container has no children, a zero-length array is returned.
+ */
+ public Container[] findChildren();
+
+
+ /**
+ * Return the set of container listeners associated with this Container.
+ * If this Container has no registered container listeners, a zero-length
+ * array is returned.
+ */
+ public ContainerListener[] findContainerListeners();
+
+
+ /**
+ * Process the specified Request, and generate the corresponding Response,
+ * according to the design of this particular Container.
+ *
+ * @param request Request to be processed
+ * @param response Response to be produced
+ *
+ * @exception IOException if an input/output error occurred while
+ * processing
+ * @exception ServletException if a ServletException was thrown
+ * while processing this request
+ */
+ public void invoke(Request request, Response response)
+ throws IOException, ServletException;
+
+
+ /**
+ * Remove an existing child Container from association with this parent
+ * Container.
+ *
+ * @param child Existing child Container to be removed
+ */
+ public void removeChild(Container child);
+
+
+ /**
+ * Remove a container event listener from this component.
+ *
+ * @param listener The listener to remove
+ */
+ public void removeContainerListener(ContainerListener listener);
+
+
+ /**
+ * Remove a property change listener from this component.
+ *
+ * @param listener The listener to remove
+ */
+ public void removePropertyChangeListener(PropertyChangeListener listener);
+
+
+ /**
+ * Notify all container event listeners that a particular event has
+ * occurred for this Container. The default implementation performs
+ * this notification synchronously using the calling thread.
+ *
+ * @param type Event type
+ * @param data Event data
+ */
+ public void fireContainerEvent(String type, Object data);
+
+
+ /**
+ * Log a request/response that was destined for this container but has been
+ * handled earlier in the processing chain so that the request/response
+ * still appears in the correct access logs.
+ * @param request Request (associated with the response) to log
+ * @param response Response (associated with the request) to log
+ * @param time Time taken to process the request/response in
+ * milliseconds (use 0 if not known)
+ * @param useDefault Flag that indicates that the request/response should
+ * be logged in the engine's default access log
+ */
+ public void logAccess(Request request, Response response, long time,
+ boolean useDefault);
+
+
+ /**
+ * Identify the AccessLog to use to log a request/response that was destined
+ * for this container but was handled earlier in the processing chain so
+ * that the request/response still appears in the correct access logs.
+ */
+ public AccessLog getAccessLog();
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/ContainerEvent.java b/bundles/org.apache.tomcat/src/org/apache/catalina/ContainerEvent.java
new file mode 100644
index 0000000..b8a2b19
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/ContainerEvent.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+
+import java.util.EventObject;
+
+
+/**
+ * General event for notifying listeners of significant changes on a Container.
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: ContainerEvent.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public final class ContainerEvent extends EventObject {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The event data associated with this event.
+ */
+ private Object data = null;
+
+
+ /**
+ * The event type this instance represents.
+ */
+ private String type = null;
+
+
+ /**
+ * Construct a new ContainerEvent with the specified parameters.
+ *
+ * @param container Container on which this event occurred
+ * @param type Event type
+ * @param data Event data
+ */
+ public ContainerEvent(Container container, String type, Object data) {
+
+ super(container);
+ this.type = type;
+ this.data = data;
+
+ }
+
+
+ /**
+ * Return the event data of this event.
+ */
+ public Object getData() {
+
+ return (this.data);
+
+ }
+
+
+ /**
+ * Return the Container on which this event occurred.
+ */
+ public Container getContainer() {
+
+ return (Container) getSource();
+
+ }
+
+
+ /**
+ * Return the event type of this event.
+ */
+ public String getType() {
+
+ return (this.type);
+
+ }
+
+
+ /**
+ * Return a string representation of this event.
+ */
+ @Override
+ public String toString() {
+
+ return ("ContainerEvent['" + getContainer() + "','" +
+ getType() + "','" + getData() + "']");
+
+ }
+
+
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/ContainerListener.java b/bundles/org.apache.tomcat/src/org/apache/catalina/ContainerListener.java
new file mode 100644
index 0000000..0798fb8
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/ContainerListener.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+
+/**
+ * Interface defining a listener for significant Container generated events.
+ * Note that "container start" and "container stop" events are normally
+ * LifecycleEvents, not ContainerEvents.
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: ContainerListener.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public interface ContainerListener {
+
+
+ /**
+ * Acknowledge the occurrence of the specified event.
+ *
+ * @param event ContainerEvent that has occurred
+ */
+ public void containerEvent(ContainerEvent event);
+
+
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/ContainerServlet.java b/bundles/org.apache.tomcat/src/org/apache/catalina/ContainerServlet.java
new file mode 100644
index 0000000..32cb442
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/ContainerServlet.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+
+/**
+ * A <b>ContainerServlet</b> is a servlet that has access to Catalina
+ * internal functionality, and is loaded from the Catalina class loader
+ * instead of the web application class loader. The property setter
+ * methods must be called by the container whenever a new instance of
+ * this servlet is put into service.
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: ContainerServlet.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public interface ContainerServlet {
+
+
+ // ------------------------------------------------------------- Properties
+
+
+ /**
+ * Return the Wrapper with which this Servlet is associated.
+ */
+ public Wrapper getWrapper();
+
+
+ /**
+ * Set the Wrapper with which this Servlet is associated.
+ *
+ * @param wrapper The new associated Wrapper
+ */
+ public void setWrapper(Wrapper wrapper);
+
+
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Context.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Context.java
new file mode 100644
index 0000000..3eb460e
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Context.java
@@ -0,0 +1,1366 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+
+import java.net.URL;
+import java.util.Set;
+
+import javax.servlet.ServletContainerInitializer;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletSecurityElement;
+import javax.servlet.descriptor.JspConfigDescriptor;
+
+import org.apache.catalina.core.ApplicationServletRegistration;
+import org.apache.catalina.deploy.ApplicationParameter;
+import org.apache.catalina.deploy.ErrorPage;
+import org.apache.catalina.deploy.FilterDef;
+import org.apache.catalina.deploy.FilterMap;
+import org.apache.catalina.deploy.LoginConfig;
+import org.apache.catalina.deploy.NamingResources;
+import org.apache.catalina.deploy.SecurityConstraint;
+import org.apache.catalina.util.CharsetMapper;
+import org.apache.tomcat.JarScanner;
+import org.apache.tomcat.util.http.mapper.Mapper;
+
+
+/**
+ * A <b>Context</b> is a Container that represents a servlet context, and
+ * therefore an individual web application, in the Catalina servlet engine.
+ * It is therefore useful in almost every deployment of Catalina (even if a
+ * Connector attached to a web server (such as Apache) uses the web server's
+ * facilities to identify the appropriate Wrapper to handle this request.
+ * It also provides a convenient mechanism to use Interceptors that see
+ * every request processed by this particular web application.
+ * <p>
+ * The parent Container attached to a Context is generally a Host, but may
+ * be some other implementation, or may be omitted if it is not necessary.
+ * <p>
+ * The child containers attached to a Context are generally implementations
+ * of Wrapper (representing individual servlet definitions).
+ * <p>
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: Context.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public interface Context extends Container {
+
+
+ // ----------------------------------------------------- Manifest Constants
+
+
+ /**
+ * The LifecycleEvent type sent when a context is reloaded.
+ */
+ public static final String RELOAD_EVENT = "reload";
+
+ /**
+ * Container event for adding a welcome file.
+ */
+ public static final String ADD_WELCOME_FILE_EVENT = "addWelcomeFile";
+
+ /**
+ * Container event for removing a wrapper.
+ */
+ public static final String REMOVE_WELCOME_FILE_EVENT = "removeWelcomeFile";
+
+ /**
+ * Container event for clearing welcome files.
+ */
+ public static final String CLEAR_WELCOME_FILES_EVENT = "clearWelcomeFiles";
+
+ // ------------------------------------------------------------- Properties
+
+ /**
+ * Returns <code>true</code> if requests mapped to servlets without
+ * "multipart config" to parse multipart/form-data requests anyway.
+ *
+ * @return <code>true</code> if requests mapped to servlets without
+ * "multipart config" to parse multipart/form-data requests,
+ * <code>false</code> otherwise.
+ */
+ public boolean getAllowCasualMultipartParsing();
+
+
+ /**
+ * Set to <code>true</code> to allow requests mapped to servlets that
+ * do not explicitly declare @MultipartConfig or have
+ * &lt;multipart-config&gt; specified in web.xml to parse
+ * multipart/form-data requests.
+ *
+ * @param allowCasualMultipartParsing <code>true</code> to allow such
+ * casual parsing, <code>false</code> otherwise.
+ */
+ public void setAllowCasualMultipartParsing(boolean allowCasualMultipartParsing);
+
+
+ /**
+ * Return the set of initialized application event listener objects,
+ * in the order they were specified in the web application deployment
+ * descriptor, for this application.
+ *
+ * @exception IllegalStateException if this method is called before
+ * this application has started, or after it has been stopped
+ */
+ public Object[] getApplicationEventListeners();
+
+
+ /**
+ * Store the set of initialized application event listener objects,
+ * in the order they were specified in the web application deployment
+ * descriptor, for this application.
+ *
+ * @param listeners The set of instantiated listener objects.
+ */
+ public void setApplicationEventListeners(Object listeners[]);
+
+
+ /**
+ * Return the set of initialized application lifecycle listener objects,
+ * in the order they were specified in the web application deployment
+ * descriptor, for this application.
+ *
+ * @exception IllegalStateException if this method is called before
+ * this application has started, or after it has been stopped
+ */
+ public Object[] getApplicationLifecycleListeners();
+
+
+ /**
+ * Store the set of initialized application lifecycle listener objects,
+ * in the order they were specified in the web application deployment
+ * descriptor, for this application.
+ *
+ * @param listeners The set of instantiated listener objects.
+ */
+ public void setApplicationLifecycleListeners(Object listeners[]);
+
+
+ /**
+ * Return the application available flag for this Context.
+ */
+ public boolean getAvailable();
+
+
+ /**
+ * Return the Locale to character set mapper for this Context.
+ */
+ public CharsetMapper getCharsetMapper();
+
+
+ /**
+ * Set the Locale to character set mapper for this Context.
+ *
+ * @param mapper The new mapper
+ */
+ public void setCharsetMapper(CharsetMapper mapper);
+
+
+ /**
+ * Return the URL of the XML descriptor for this context.
+ */
+ public URL getConfigFile();
+
+
+ /**
+ * Set the URL of the XML descriptor for this context.
+ *
+ * @param configFile The URL of the XML descriptor for this context.
+ */
+ public void setConfigFile(URL configFile);
+
+
+ /**
+ * Return the "correctly configured" flag for this Context.
+ */
+ public boolean getConfigured();
+
+
+ /**
+ * Set the "correctly configured" flag for this Context. This can be
+ * set to false by startup listeners that detect a fatal configuration
+ * error to avoid the application from being made available.
+ *
+ * @param configured The new correctly configured flag
+ */
+ public void setConfigured(boolean configured);
+
+
+ /**
+ * Return the "use cookies for session ids" flag.
+ */
+ public boolean getCookies();
+
+
+ /**
+ * Set the "use cookies for session ids" flag.
+ *
+ * @param cookies The new flag
+ */
+ public void setCookies(boolean cookies);
+
+
+ /**
+ * Gets the name to use for session cookies. Overrides any setting that
+ * may be specified by the application.
+ *
+ * @return The value of the default session cookie name or null if not
+ * specified
+ */
+ public String getSessionCookieName();
+
+
+ /**
+ * Sets the name to use for session cookies. Overrides any setting that
+ * may be specified by the application.
+ *
+ * @param sessionCookieName The name to use
+ */
+ public void setSessionCookieName(String sessionCookieName);
+
+
+ /**
+ * Gets the value of the use HttpOnly cookies for session cookies flag.
+ *
+ * @return <code>true</code> if the HttpOnly flag should be set on session
+ * cookies
+ */
+ public boolean getUseHttpOnly();
+
+
+ /**
+ * Sets the use HttpOnly cookies for session cookies flag.
+ *
+ * @param useHttpOnly Set to <code>true</code> to use HttpOnly cookies
+ * for session cookies
+ */
+ public void setUseHttpOnly(boolean useHttpOnly);
+
+
+ /**
+ * Gets the domain to use for session cookies. Overrides any setting that
+ * may be specified by the application.
+ *
+ * @return The value of the default session cookie domain or null if not
+ * specified
+ */
+ public String getSessionCookieDomain();
+
+
+ /**
+ * Sets the domain to use for session cookies. Overrides any setting that
+ * may be specified by the application.
+ *
+ * @param sessionCookieDomain The domain to use
+ */
+ public void setSessionCookieDomain(String sessionCookieDomain);
+
+
+ /**
+ * Gets the path to use for session cookies. Overrides any setting that
+ * may be specified by the application.
+ *
+ * @return The value of the default session cookie path or null if not
+ * specified
+ */
+ public String getSessionCookiePath();
+
+
+ /**
+ * Sets the path to use for session cookies. Overrides any setting that
+ * may be specified by the application.
+ *
+ * @param sessionCookiePath The path to use
+ */
+ public void setSessionCookiePath(String sessionCookiePath);
+
+
+ /**
+ * Return the "allow crossing servlet contexts" flag.
+ */
+ public boolean getCrossContext();
+
+
+ /**
+ * Return the alternate Deployment Descriptor name.
+ */
+ public String getAltDDName();
+
+
+ /**
+ * Set an alternate Deployment Descriptor name.
+ */
+ public void setAltDDName(String altDDName) ;
+
+
+ /**
+ * Set the "allow crossing servlet contexts" flag.
+ *
+ * @param crossContext The new cross contexts flag
+ */
+ public void setCrossContext(boolean crossContext);
+
+
+ /**
+ * Return the display name of this web application.
+ */
+ public String getDisplayName();
+
+
+ /**
+ * Set the display name of this web application.
+ *
+ * @param displayName The new display name
+ */
+ public void setDisplayName(String displayName);
+
+
+ /**
+ * Return the distributable flag for this web application.
+ */
+ public boolean getDistributable();
+
+
+ /**
+ * Set the distributable flag for this web application.
+ *
+ * @param distributable The new distributable flag
+ */
+ public void setDistributable(boolean distributable);
+
+
+ /**
+ * Return the document root for this Context. This can be an absolute
+ * pathname, a relative pathname, or a URL.
+ */
+ public String getDocBase();
+
+
+ /**
+ * Set the document root for this Context. This can be an absolute
+ * pathname, a relative pathname, or a URL.
+ *
+ * @param docBase The new document root
+ */
+ public void setDocBase(String docBase);
+
+
+ /**
+ * Return the URL encoded context path, using UTF-8.
+ */
+ public String getEncodedPath();
+
+
+ /**
+ * Return the boolean on the annotations parsing.
+ */
+ public boolean getIgnoreAnnotations();
+
+
+ /**
+ * Set the boolean on the annotations parsing for this web
+ * application.
+ *
+ * @param ignoreAnnotations The boolean on the annotations parsing
+ */
+ public void setIgnoreAnnotations(boolean ignoreAnnotations);
+
+
+ /**
+ * Return the login configuration descriptor for this web application.
+ */
+ public LoginConfig getLoginConfig();
+
+
+ /**
+ * Set the login configuration descriptor for this web application.
+ *
+ * @param config The new login configuration
+ */
+ public void setLoginConfig(LoginConfig config);
+
+
+ /**
+ * Get the request dispatcher mapper.
+ */
+ public Mapper getMapper();
+
+
+ /**
+ * Return the naming resources associated with this web application.
+ */
+ public NamingResources getNamingResources();
+
+
+ /**
+ * Set the naming resources for this web application.
+ *
+ * @param namingResources The new naming resources
+ */
+ public void setNamingResources(NamingResources namingResources);
+
+
+ /**
+ * Return the context path for this web application.
+ */
+ public String getPath();
+
+
+ /**
+ * Set the context path for this web application.
+ *
+ * @param path The new context path
+ */
+ public void setPath(String path);
+
+
+ /**
+ * Return the public identifier of the deployment descriptor DTD that is
+ * currently being parsed.
+ */
+ public String getPublicId();
+
+
+ /**
+ * Set the public identifier of the deployment descriptor DTD that is
+ * currently being parsed.
+ *
+ * @param publicId The public identifier
+ */
+ public void setPublicId(String publicId);
+
+
+ /**
+ * Return the reloadable flag for this web application.
+ */
+ public boolean getReloadable();
+
+
+ /**
+ * Set the reloadable flag for this web application.
+ *
+ * @param reloadable The new reloadable flag
+ */
+ public void setReloadable(boolean reloadable);
+
+
+ /**
+ * Return the override flag for this web application.
+ */
+ public boolean getOverride();
+
+
+ /**
+ * Set the override flag for this web application.
+ *
+ * @param override The new override flag
+ */
+ public void setOverride(boolean override);
+
+
+ /**
+ * Return the privileged flag for this web application.
+ */
+ public boolean getPrivileged();
+
+
+ /**
+ * Set the privileged flag for this web application.
+ *
+ * @param privileged The new privileged flag
+ */
+ public void setPrivileged(boolean privileged);
+
+
+ /**
+ * Return the servlet context for which this Context is a facade.
+ */
+ public ServletContext getServletContext();
+
+
+ /**
+ * Return the default session timeout (in minutes) for this
+ * web application.
+ */
+ public int getSessionTimeout();
+
+
+ /**
+ * Set the default session timeout (in minutes) for this
+ * web application.
+ *
+ * @param timeout The new default session timeout
+ */
+ public void setSessionTimeout(int timeout);
+
+
+ /**
+ * Returns <code>true</code> if remaining request data will be read
+ * (swallowed) even the request violates a data size constraint.
+ *
+ * @return <code>true</code> if data will be swallowed (default),
+ * <code>false</code> otherwise.
+ */
+ public boolean getSwallowAbortedUploads();
+
+
+ /**
+ * Set to <code>false</code> to disable request data swallowing
+ * after an upload was aborted due to size constraints.
+ *
+ * @param swallowAbortedUploads <code>false</code> to disable
+ * swallowing, <code>true</code> otherwise (default).
+ */
+ public void setSwallowAbortedUploads(boolean swallowAbortedUploads);
+
+ /**
+ * Return the value of the swallowOutput flag.
+ */
+ public boolean getSwallowOutput();
+
+
+ /**
+ * Set the value of the swallowOutput flag. If set to true, the system.out
+ * and system.err will be redirected to the logger during a servlet
+ * execution.
+ *
+ * @param swallowOutput The new value
+ */
+ public void setSwallowOutput(boolean swallowOutput);
+
+
+ /**
+ * Return the Java class name of the Wrapper implementation used
+ * for servlets registered in this Context.
+ */
+ public String getWrapperClass();
+
+
+ /**
+ * Set the Java class name of the Wrapper implementation used
+ * for servlets registered in this Context.
+ *
+ * @param wrapperClass The new wrapper class
+ */
+ public void setWrapperClass(String wrapperClass);
+
+
+ /**
+ * Get the server.xml <context> attribute's xmlNamespaceAware.
+ * @return true if namespace awareness is enabled.
+ *
+ */
+ public boolean getXmlNamespaceAware();
+
+
+ /**
+ * Get the server.xml <context> attribute's xmlValidation.
+ * @return true if validation is enabled.
+ *
+ */
+ public boolean getXmlValidation();
+
+
+ /**
+ * Set the validation feature of the XML parser used when
+ * parsing xml instances.
+ * @param xmlValidation true to enable xml instance validation
+ */
+ public void setXmlValidation(boolean xmlValidation);
+
+
+ /**
+ * Set the namespace aware feature of the XML parser used when
+ * parsing xml instances.
+ * @param xmlNamespaceAware true to enable namespace awareness
+ */
+ public void setXmlNamespaceAware(boolean xmlNamespaceAware);
+ /**
+ * Get the server.xml <context> attribute's xmlValidation.
+ * @return true if validation is enabled.
+ */
+
+
+ /**
+ * Set the validation feature of the XML parser used when
+ * parsing tlds files.
+ * @param tldValidation true to enable xml instance validation
+ */
+ public void setTldValidation(boolean tldValidation);
+
+
+ /**
+ * Get the server.xml <context> attribute's webXmlValidation.
+ * @return true if validation is enabled.
+ *
+ */
+ public boolean getTldValidation();
+
+
+ /**
+ * Get the server.xml &lt;host&gt; attribute's xmlNamespaceAware.
+ * @return true if namespace awareness is enabled.
+ */
+ public boolean getTldNamespaceAware();
+
+
+ /**
+ * Set the namespace aware feature of the XML parser used when
+ * parsing xml instances.
+ * @param tldNamespaceAware true to enable namespace awareness
+ */
+ public void setTldNamespaceAware(boolean tldNamespaceAware);
+
+ /**
+ * Get the Jar Scanner to be used to scan for JAR resources for this
+ * context.
+ * @return The Jar Scanner configured for this context.
+ */
+ public JarScanner getJarScanner();
+
+ /**
+ * Set the Jar Scanner to be used to scan for JAR resources for this
+ * context.
+ * @param jarScanner The Jar Scanner to be used for this context.
+ */
+ public void setJarScanner(JarScanner jarScanner);
+
+ /**
+ * Obtain the {@link Authenticator} that is used by this context or
+ * <code>null</code> if none is used.
+ */
+ public Authenticator getAuthenticator();
+
+ /**
+ * Set whether or not the effective web.xml for this context should be
+ * logged on context start.
+ */
+ public void setLogEffectiveWebXml(boolean logEffectiveWebXml);
+
+ /**
+ * Should the effective web.xml for this context be logged on context start?
+ */
+ public boolean getLogEffectiveWebXml();
+
+ // --------------------------------------------------------- Public Methods
+
+
+ /**
+ * Add a new Listener class name to the set of Listeners
+ * configured for this application.
+ *
+ * @param listener Java class name of a listener class
+ */
+ public void addApplicationListener(String listener);
+
+
+ /**
+ * Add a new application parameter for this application.
+ *
+ * @param parameter The new application parameter
+ */
+ public void addApplicationParameter(ApplicationParameter parameter);
+
+
+ /**
+ * Add a security constraint to the set for this web application.
+ */
+ public void addConstraint(SecurityConstraint constraint);
+
+
+ /**
+ * Add an error page for the specified error or Java exception.
+ *
+ * @param errorPage The error page definition to be added
+ */
+ public void addErrorPage(ErrorPage errorPage);
+
+
+ /**
+ * Add a filter definition to this Context.
+ *
+ * @param filterDef The filter definition to be added
+ */
+ public void addFilterDef(FilterDef filterDef);
+
+
+ /**
+ * Add a filter mapping to this Context.
+ *
+ * @param filterMap The filter mapping to be added
+ */
+ public void addFilterMap(FilterMap filterMap);
+
+ /**
+ * Add a filter mapping to this Context before the mappings defined in the
+ * deployment descriptor but after any other mappings added via this method.
+ *
+ * @param filterMap The filter mapping to be added
+ *
+ * @exception IllegalArgumentException if the specified filter name
+ * does not match an existing filter definition, or the filter mapping
+ * is malformed
+ */
+ public void addFilterMapBefore(FilterMap filterMap);
+
+ /**
+ * Add the classname of an InstanceListener to be added to each
+ * Wrapper appended to this Context.
+ *
+ * @param listener Java class name of an InstanceListener class
+ */
+ public void addInstanceListener(String listener);
+
+
+ /**
+ * Add a Locale Encoding Mapping (see Sec 5.4 of Servlet spec 2.4)
+ *
+ * @param locale locale to map an encoding for
+ * @param encoding encoding to be used for a give locale
+ */
+ public void addLocaleEncodingMappingParameter(String locale, String encoding);
+
+
+ /**
+ * Add a new MIME mapping, replacing any existing mapping for
+ * the specified extension.
+ *
+ * @param extension Filename extension being mapped
+ * @param mimeType Corresponding MIME type
+ */
+ public void addMimeMapping(String extension, String mimeType);
+
+
+ /**
+ * Add a new context initialization parameter, replacing any existing
+ * value for the specified name.
+ *
+ * @param name Name of the new parameter
+ * @param value Value of the new parameter
+ */
+ public void addParameter(String name, String value);
+
+
+ /**
+ * Add a security role reference for this web application.
+ *
+ * @param role Security role used in the application
+ * @param link Actual security role to check for
+ */
+ public void addRoleMapping(String role, String link);
+
+
+ /**
+ * Add a new security role for this web application.
+ *
+ * @param role New security role
+ */
+ public void addSecurityRole(String role);
+
+
+ /**
+ * Add a new servlet mapping, replacing any existing mapping for
+ * the specified pattern.
+ *
+ * @param pattern URL pattern to be mapped
+ * @param name Name of the corresponding servlet to execute
+ */
+ public void addServletMapping(String pattern, String name);
+
+
+ /**
+ * Add a new servlet mapping, replacing any existing mapping for
+ * the specified pattern.
+ *
+ * @param pattern URL pattern to be mapped
+ * @param name Name of the corresponding servlet to execute
+ * @param jspWildcard true if name identifies the JspServlet
+ * and pattern contains a wildcard; false otherwise
+ */
+ public void addServletMapping(String pattern, String name,
+ boolean jspWildcard);
+
+
+ /**
+ * Add a resource which will be watched for reloading by the host auto
+ * deployer. Note: this will not be used in embedded mode.
+ *
+ * @param name Path to the resource, relative to docBase
+ */
+ public void addWatchedResource(String name);
+
+
+ /**
+ * Add a new welcome file to the set recognized by this Context.
+ *
+ * @param name New welcome file name
+ */
+ public void addWelcomeFile(String name);
+
+
+ /**
+ * Add the classname of a LifecycleListener to be added to each
+ * Wrapper appended to this Context.
+ *
+ * @param listener Java class name of a LifecycleListener class
+ */
+ public void addWrapperLifecycle(String listener);
+
+
+ /**
+ * Add the classname of a ContainerListener to be added to each
+ * Wrapper appended to this Context.
+ *
+ * @param listener Java class name of a ContainerListener class
+ */
+ public void addWrapperListener(String listener);
+
+
+ /**
+ * Factory method to create and return a new Wrapper instance, of
+ * the Java implementation class appropriate for this Context
+ * implementation. The constructor of the instantiated Wrapper
+ * will have been called, but no properties will have been set.
+ */
+ public Wrapper createWrapper();
+
+
+ /**
+ * Return the set of application listener class names configured
+ * for this application.
+ */
+ public String[] findApplicationListeners();
+
+
+ /**
+ * Return the set of application parameters for this application.
+ */
+ public ApplicationParameter[] findApplicationParameters();
+
+
+ /**
+ * Return the set of security constraints for this web application.
+ * If there are none, a zero-length array is returned.
+ */
+ public SecurityConstraint[] findConstraints();
+
+
+ /**
+ * Return the error page entry for the specified HTTP error code,
+ * if any; otherwise return <code>null</code>.
+ *
+ * @param errorCode Error code to look up
+ */
+ public ErrorPage findErrorPage(int errorCode);
+
+
+ /**
+ * Return the error page entry for the specified Java exception type,
+ * if any; otherwise return <code>null</code>.
+ *
+ * @param exceptionType Exception type to look up
+ */
+ public ErrorPage findErrorPage(String exceptionType);
+
+
+
+ /**
+ * Return the set of defined error pages for all specified error codes
+ * and exception types.
+ */
+ public ErrorPage[] findErrorPages();
+
+
+ /**
+ * Return the filter definition for the specified filter name, if any;
+ * otherwise return <code>null</code>.
+ *
+ * @param filterName Filter name to look up
+ */
+ public FilterDef findFilterDef(String filterName);
+
+
+ /**
+ * Return the set of defined filters for this Context.
+ */
+ public FilterDef[] findFilterDefs();
+
+
+ /**
+ * Return the set of filter mappings for this Context.
+ */
+ public FilterMap[] findFilterMaps();
+
+
+ /**
+ * Return the set of InstanceListener classes that will be added to
+ * newly created Wrappers automatically.
+ */
+ public String[] findInstanceListeners();
+
+
+ /**
+ * Return the MIME type to which the specified extension is mapped,
+ * if any; otherwise return <code>null</code>.
+ *
+ * @param extension Extension to map to a MIME type
+ */
+ public String findMimeMapping(String extension);
+
+
+ /**
+ * Return the extensions for which MIME mappings are defined. If there
+ * are none, a zero-length array is returned.
+ */
+ public String[] findMimeMappings();
+
+
+ /**
+ * Return the value for the specified context initialization
+ * parameter name, if any; otherwise return <code>null</code>.
+ *
+ * @param name Name of the parameter to return
+ */
+ public String findParameter(String name);
+
+
+ /**
+ * Return the names of all defined context initialization parameters
+ * for this Context. If no parameters are defined, a zero-length
+ * array is returned.
+ */
+ public String[] findParameters();
+
+
+ /**
+ * For the given security role (as used by an application), return the
+ * corresponding role name (as defined by the underlying Realm) if there
+ * is one. Otherwise, return the specified role unchanged.
+ *
+ * @param role Security role to map
+ */
+ public String findRoleMapping(String role);
+
+
+ /**
+ * Return <code>true</code> if the specified security role is defined
+ * for this application; otherwise return <code>false</code>.
+ *
+ * @param role Security role to verify
+ */
+ public boolean findSecurityRole(String role);
+
+
+ /**
+ * Return the security roles defined for this application. If none
+ * have been defined, a zero-length array is returned.
+ */
+ public String[] findSecurityRoles();
+
+
+ /**
+ * Return the servlet name mapped by the specified pattern (if any);
+ * otherwise return <code>null</code>.
+ *
+ * @param pattern Pattern for which a mapping is requested
+ */
+ public String findServletMapping(String pattern);
+
+
+ /**
+ * Return the patterns of all defined servlet mappings for this
+ * Context. If no mappings are defined, a zero-length array is returned.
+ */
+ public String[] findServletMappings();
+
+
+ /**
+ * Return the context-relative URI of the error page for the specified
+ * HTTP status code, if any; otherwise return <code>null</code>.
+ *
+ * @param status HTTP status code to look up
+ */
+ public String findStatusPage(int status);
+
+
+ /**
+ * Return the set of HTTP status codes for which error pages have
+ * been specified. If none are specified, a zero-length array
+ * is returned.
+ */
+ public int[] findStatusPages();
+
+
+ /**
+ * Return the set of watched resources for this Context. If none are
+ * defined, a zero length array will be returned.
+ */
+ public String[] findWatchedResources();
+
+
+ /**
+ * Return <code>true</code> if the specified welcome file is defined
+ * for this Context; otherwise return <code>false</code>.
+ *
+ * @param name Welcome file to verify
+ */
+ public boolean findWelcomeFile(String name);
+
+
+ /**
+ * Return the set of welcome files defined for this Context. If none are
+ * defined, a zero-length array is returned.
+ */
+ public String[] findWelcomeFiles();
+
+
+ /**
+ * Return the set of LifecycleListener classes that will be added to
+ * newly created Wrappers automatically.
+ */
+ public String[] findWrapperLifecycles();
+
+
+ /**
+ * Return the set of ContainerListener classes that will be added to
+ * newly created Wrappers automatically.
+ */
+ public String[] findWrapperListeners();
+
+
+ /**
+ * Notify all {@link javax.servlet.ServletRequestListener}s that a request
+ * has started.
+ * @return <code>true</code> if the listeners fire successfully, else
+ * <code>false</code>
+ */
+ public boolean fireRequestInitEvent(ServletRequest request);
+
+ /**
+ * Notify all {@link javax.servlet.ServletRequestListener}s that a request
+ * has ended.
+ * @return <code>true</code> if the listeners fire successfully, else
+ * <code>false</code>
+ */
+ public boolean fireRequestDestroyEvent(ServletRequest request);
+
+ /**
+ * Reload this web application, if reloading is supported.
+ *
+ * @exception IllegalStateException if the <code>reloadable</code>
+ * property is set to <code>false</code>.
+ */
+ public void reload();
+
+
+ /**
+ * Remove the specified application listener class from the set of
+ * listeners for this application.
+ *
+ * @param listener Java class name of the listener to be removed
+ */
+ public void removeApplicationListener(String listener);
+
+
+ /**
+ * Remove the application parameter with the specified name from
+ * the set for this application.
+ *
+ * @param name Name of the application parameter to remove
+ */
+ public void removeApplicationParameter(String name);
+
+
+ /**
+ * Remove the specified security constraint from this web application.
+ *
+ * @param constraint Constraint to be removed
+ */
+ public void removeConstraint(SecurityConstraint constraint);
+
+
+ /**
+ * Remove the error page for the specified error code or
+ * Java language exception, if it exists; otherwise, no action is taken.
+ *
+ * @param errorPage The error page definition to be removed
+ */
+ public void removeErrorPage(ErrorPage errorPage);
+
+
+ /**
+ * Remove the specified filter definition from this Context, if it exists;
+ * otherwise, no action is taken.
+ *
+ * @param filterDef Filter definition to be removed
+ */
+ public void removeFilterDef(FilterDef filterDef);
+
+
+ /**
+ * Remove a filter mapping from this Context.
+ *
+ * @param filterMap The filter mapping to be removed
+ */
+ public void removeFilterMap(FilterMap filterMap);
+
+
+ /**
+ * Remove a class name from the set of InstanceListener classes that
+ * will be added to newly created Wrappers.
+ *
+ * @param listener Class name of an InstanceListener class to be removed
+ */
+ public void removeInstanceListener(String listener);
+
+
+ /**
+ * Remove the MIME mapping for the specified extension, if it exists;
+ * otherwise, no action is taken.
+ *
+ * @param extension Extension to remove the mapping for
+ */
+ public void removeMimeMapping(String extension);
+
+
+ /**
+ * Remove the context initialization parameter with the specified
+ * name, if it exists; otherwise, no action is taken.
+ *
+ * @param name Name of the parameter to remove
+ */
+ public void removeParameter(String name);
+
+
+ /**
+ * Remove any security role reference for the specified name
+ *
+ * @param role Security role (as used in the application) to remove
+ */
+ public void removeRoleMapping(String role);
+
+
+ /**
+ * Remove any security role with the specified name.
+ *
+ * @param role Security role to remove
+ */
+ public void removeSecurityRole(String role);
+
+
+ /**
+ * Remove any servlet mapping for the specified pattern, if it exists;
+ * otherwise, no action is taken.
+ *
+ * @param pattern URL pattern of the mapping to remove
+ */
+ public void removeServletMapping(String pattern);
+
+
+ /**
+ * Remove the specified watched resource name from the list associated
+ * with this Context.
+ *
+ * @param name Name of the watched resource to be removed
+ */
+ public void removeWatchedResource(String name);
+
+
+ /**
+ * Remove the specified welcome file name from the list recognized
+ * by this Context.
+ *
+ * @param name Name of the welcome file to be removed
+ */
+ public void removeWelcomeFile(String name);
+
+
+ /**
+ * Remove a class name from the set of LifecycleListener classes that
+ * will be added to newly created Wrappers.
+ *
+ * @param listener Class name of a LifecycleListener class to be removed
+ */
+ public void removeWrapperLifecycle(String listener);
+
+
+ /**
+ * Remove a class name from the set of ContainerListener classes that
+ * will be added to newly created Wrappers.
+ *
+ * @param listener Class name of a ContainerListener class to be removed
+ */
+ public void removeWrapperListener(String listener);
+
+
+ /**
+ * Return the real path for a given virtual path, if possible; otherwise
+ * return <code>null</code>.
+ *
+ * @param path The path to the desired resource
+ */
+ public String getRealPath(String path);
+
+
+ /**
+ * Return the effective major version of the Servlet spec used by this
+ * context.
+ */
+ public int getEffectiveMajorVersion();
+
+
+ /**
+ * Set the effective major version of the Servlet spec used by this
+ * context.
+ */
+ public void setEffectiveMajorVersion(int major);
+
+
+ /**
+ * Return the effective minor version of the Servlet spec used by this
+ * context.
+ */
+ public int getEffectiveMinorVersion();
+
+
+ /**
+ * Set the effective minor version of the Servlet spec used by this
+ * context.
+ */
+ public void setEffectiveMinorVersion(int minor);
+
+
+ /**
+ * Obtain the JSP configuration for this context.
+ */
+ public JspConfigDescriptor getJspConfigDescriptor();
+
+
+ /**
+ * Add a URL for a JAR that contains static resources in a
+ * META-INF/resources directory that should be included in the static
+ * resources for this context.
+ */
+ public void addResourceJarUrl(URL url);
+
+
+ /**
+ * Add a ServletContainerInitializer instance to this web application.
+ *
+ * @param sci The instance to add
+ * @param classes The classes in which the initializer expressed an
+ * interest
+ */
+ public void addServletContainerInitializer(
+ ServletContainerInitializer sci, Set<Class<?>> classes);
+
+ /**
+ * Is this Context paused whilst it is reloaded?
+ */
+ public boolean getPaused();
+
+
+ /**
+ * Is this context using version 2.2 of the Servlet spec?
+ */
+ boolean isServlet22();
+
+ /**
+ * Notification that servlet security has been dynamically set in a
+ * {@link javax.servlet.ServletRegistration.Dynamic}
+ * @param registration servlet security was modified for
+ * @param servletSecurityElement new security constraints for this servlet
+ * @return urls currently mapped to this registration that are already
+ * present in web.xml
+ */
+ Set<String> addServletSecurity(ApplicationServletRegistration registration,
+ ServletSecurityElement servletSecurityElement);
+
+ /**
+ * Sets the (comma separated) list of Servlets that expect a resource to be
+ * present. Used to ensure that welcome files associated with Servlets that
+ * expect a resource to be present are not mapped when there is no resource.
+ */
+ public void setResourceOnlyServlets(String resourceOnlyServlets);
+
+ /**
+ * Obtains the list of Servlets that expect a resource to be present.
+ *
+ * @return A comma separated list of Servlet names as used in web.xml
+ */
+ public String getResourceOnlyServlets();
+
+ /**
+ * Checks the named Servlet to see if it expects a resource to be present.
+ *
+ * @param servletName Name of the Servlet (as per web.xml) to check
+ * @return <code>true</code> if the Servlet expects a resource,
+ * otherwise <code>false</code>
+ */
+ public boolean isResourceOnlyServlet(String servletName);
+
+ /**
+ * Return the base name to use for WARs, directories or context.xml files
+ * for this context.
+ */
+ public String getBaseName();
+
+ /**
+ * Set the version of this web application - used to differentiate
+ * different versions of the same web application when using parallel
+ * deployment.
+ */
+ public void setWebappVersion(String webappVersion);
+
+ /**
+ * Set the version of this web application - used to differentiate
+ * different versions of the same web application when using parallel
+ * deployment. If not specified, defaults to the empty string.
+ */
+ public String getWebappVersion();
+
+ /**
+ * Configure whether or not requests listeners will be fired on forwards for
+ * this Context.
+ */
+ public void setFireRequestListenersOnForwards(boolean enable);
+
+ /**
+ * Determine whether or not requests listeners will be fired on forwards for
+ * this Context.
+ */
+ public boolean getFireRequestListenersOnForwards();
+
+ /**
+ * Configures if a user presents authentication credentials, whether the
+ * context will process them when the request is for a non-protected
+ * resource.
+ */
+ public void setPreemptiveAuthentication(boolean enable);
+
+ /**
+ * Determines if a user presents authentication credentials, will the
+ * context will process them when the request is for a non-protected
+ * resource.
+ */
+ public boolean getPreemptiveAuthentication();
+}
+
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/DistributedManager.java b/bundles/org.apache.tomcat/src/org/apache/catalina/DistributedManager.java
new file mode 100644
index 0000000..2d042c6
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/DistributedManager.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina;
+
+import java.util.Set;
+
+/**
+ * Interface implemented by session managers that do not keep a complete copy
+ * of all sessions on the local node but do know where every session is. The
+ * BackupManager is an example of such a Manager. Sessions can be primary
+ * (master copy on this node), backup (backup copy on this node) or proxy (only
+ * the session ID on this node). The identity of the primary and backup nodes
+ * are known for all sessions, including proxy sessions.
+ */
+public interface DistributedManager {
+
+ /**
+ * Returns the total session count for primary, backup and proxy.
+ *
+ * @return The total session count across the cluster.
+ */
+ public int getActiveSessionsFull();
+
+ /**
+ * Returns the list of all sessions IDS (primary, backup and proxy).
+ *
+ * @return The complete set of sessions IDs across the cluster.
+ */
+ public Set<String> getSessionIdsFull();
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Engine.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Engine.java
new file mode 100644
index 0000000..06fcbc1
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Engine.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+/**
+ * An <b>Engine</b> is a Container that represents the entire Catalina servlet
+ * engine. It is useful in the following types of scenarios:
+ * <ul>
+ * <li>You wish to use Interceptors that see every single request processed
+ * by the entire engine.
+ * <li>You wish to run Catalina in with a standalone HTTP connector, but still
+ * want support for multiple virtual hosts.
+ * </ul>
+ * In general, you would not use an Engine when deploying Catalina connected
+ * to a web server (such as Apache), because the Connector will have
+ * utilized the web server's facilities to determine which Context (or
+ * perhaps even which Wrapper) should be utilized to process this request.
+ * <p>
+ * The child containers attached to an Engine are generally implementations
+ * of Host (representing a virtual host) or Context (representing individual
+ * an individual servlet context), depending upon the Engine implementation.
+ * <p>
+ * If used, an Engine is always the top level Container in a Catalina
+ * hierarchy. Therefore, the implementation's <code>setParent()</code> method
+ * should throw <code>IllegalArgumentException</code>.
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: Engine.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public interface Engine extends Container {
+
+
+ // ------------------------------------------------------------- Properties
+
+
+ /**
+ * Return the default hostname for this Engine.
+ */
+ public String getDefaultHost();
+
+
+ /**
+ * Set the default hostname for this Engine.
+ *
+ * @param defaultHost The new default host
+ */
+ public void setDefaultHost(String defaultHost);
+
+
+ /**
+ * Retrieve the JvmRouteId for this engine.
+ */
+ public String getJvmRoute();
+
+
+ /**
+ * Set the JvmRouteId for this engine.
+ *
+ * @param jvmRouteId the (new) JVM Route ID. Each Engine within a cluster
+ * must have a unique JVM Route ID.
+ */
+ public void setJvmRoute(String jvmRouteId);
+
+
+ /**
+ * Return the <code>Service</code> with which we are associated (if any).
+ */
+ public Service getService();
+
+
+ /**
+ * Set the <code>Service</code> with which we are associated (if any).
+ *
+ * @param service The service that owns this Engine
+ */
+ public void setService(Service service);
+
+
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Executor.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Executor.java
new file mode 100644
index 0000000..6ce8755
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Executor.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina;
+
+import java.util.concurrent.TimeUnit;
+
+
+public interface Executor extends java.util.concurrent.Executor, Lifecycle {
+ public String getName();
+
+ /**
+ * Executes the given command at some time in the future. The command
+ * may execute in a new thread, in a pooled thread, or in the calling
+ * thread, at the discretion of the <tt>Executor</tt> implementation.
+ * If no threads are available, it will be added to the work queue.
+ * If the work queue is full, the system will wait for the specified
+ * time until it throws a RejectedExecutionException
+ *
+ * @param command the runnable task
+ * @throws org.apache.catalina.util.RejectedExecutionException if this task
+ * cannot be accepted for execution - the queue is full
+ * @throws NullPointerException if command or unit is null
+ */
+ void execute(Runnable command, long timeout, TimeUnit unit);
+} \ No newline at end of file
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Globals.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Globals.java
new file mode 100644
index 0000000..735f643
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Globals.java
@@ -0,0 +1,197 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+
+/**
+ * Global constants that are applicable to multiple packages within Catalina.
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: Globals.java,v 1.1 2011/06/28 21:08:20 rherrmann Exp $
+ */
+
+public final class Globals {
+
+ /**
+ * The servlet context attribute under which we store the alternate
+ * deployment descriptor for this web application
+ */
+ public static final String ALT_DD_ATTR =
+ "org.apache.catalina.deploy.alt_dd";
+
+
+ /**
+ * The request attribute under which we store the array of X509Certificate
+ * objects representing the certificate chain presented by our client,
+ * if any.
+ */
+ public static final String CERTIFICATES_ATTR =
+ "javax.servlet.request.X509Certificate";
+
+
+ /**
+ * The request attribute under which we store the name of the cipher suite
+ * being used on an SSL connection (as an object of type
+ * java.lang.String).
+ */
+ public static final String CIPHER_SUITE_ATTR =
+ "javax.servlet.request.cipher_suite";
+
+
+ /**
+ * Request dispatcher state.
+ */
+ public static final String DISPATCHER_TYPE_ATTR =
+ "org.apache.catalina.core.DISPATCHER_TYPE";
+
+
+ /**
+ * Request dispatcher path.
+ */
+ public static final String DISPATCHER_REQUEST_PATH_ATTR =
+ "org.apache.catalina.core.DISPATCHER_REQUEST_PATH";
+
+
+ /**
+ * The JNDI directory context which is associated with the context. This
+ * context can be used to manipulate static files.
+ */
+ public static final String RESOURCES_ATTR =
+ "org.apache.catalina.resources";
+
+
+ /**
+ * The servlet context attribute under which we store the class path
+ * for our application class loader (as an object of type String),
+ * delimited with the appropriate path delimiter for this platform.
+ */
+ public static final String CLASS_PATH_ATTR =
+ "org.apache.catalina.jsp_classpath";
+
+
+ /**
+ * The request attribute under which we store the key size being used for
+ * this SSL connection (as an object of type java.lang.Integer).
+ */
+ public static final String KEY_SIZE_ATTR =
+ "javax.servlet.request.key_size";
+
+
+ /**
+ * The request attribute under which we store the session id being used
+ * for this SSL connection (as an object of type java.lang.String).
+ */
+ public static final String SSL_SESSION_ID_ATTR =
+ "javax.servlet.request.ssl_session";
+
+
+ /**
+ * The request attribute key for the session manager.
+ * This one is a Tomcat extension to the Servlet spec.
+ */
+ public static final String SSL_SESSION_MGR_ATTR =
+ "javax.servlet.request.ssl_session_mgr";
+
+
+ /**
+ * The servlet context attribute under which the managed bean Registry
+ * will be stored for privileged contexts (if enabled).
+ */
+ public static final String MBEAN_REGISTRY_ATTR =
+ "org.apache.catalina.Registry";
+
+
+ /**
+ * The servlet context attribute under which the MBeanServer will be stored
+ * for privileged contexts (if enabled).
+ */
+ public static final String MBEAN_SERVER_ATTR =
+ "org.apache.catalina.MBeanServer";
+
+
+ /**
+ * The request attribute under which we store the servlet name on a
+ * named dispatcher request.
+ */
+ public static final String NAMED_DISPATCHER_ATTR =
+ "org.apache.catalina.NAMED";
+
+
+ /**
+ * The servlet context attribute under which we store a flag used
+ * to mark this request as having been processed by the SSIServlet.
+ * We do this because of the pathInfo mangling happening when using
+ * the CGIServlet in conjunction with the SSI servlet. (value stored
+ * as an object of type String)
+ */
+ public static final String SSI_FLAG_ATTR =
+ "org.apache.catalina.ssi.SSIServlet";
+
+
+ /**
+ * The subject under which the AccessControlContext is running.
+ */
+ public static final String SUBJECT_ATTR =
+ "javax.security.auth.subject";
+
+
+ public static final String GSS_CREDENTIAL_ATTR =
+ "org.apache.catalina.realm.GSS_CREDENTIAL";
+
+
+ /**
+ * The master flag which controls strict servlet specification
+ * compliance.
+ */
+ public static final boolean STRICT_SERVLET_COMPLIANCE =
+ Boolean.valueOf(System.getProperty("org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "false")).booleanValue();
+
+
+ /**
+ * Has security been turned on?
+ */
+ public static final boolean IS_SECURITY_ENABLED =
+ (System.getSecurityManager() != null);
+
+ /**
+ *
+ */
+ public static final String ASYNC_SUPPORTED_ATTR =
+ "org.apache.catalina.ASYNC_SUPPORTED";
+
+
+ /**
+ * Default domain for MBeans if none can be determined
+ */
+ public static final String DEFAULT_MBEAN_DOMAIN = "Catalina";
+
+
+ /**
+ * Name of the system property containing
+ * the tomcat product installation path
+ */
+ public static final String CATALINA_HOME_PROP = "catalina.home";
+
+
+ /**
+ * Name of the system property containing
+ * the tomcat instance installation path
+ */
+ public static final String CATALINA_BASE_PROP = "catalina.base";
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Group.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Group.java
new file mode 100644
index 0000000..5c33c10
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Group.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+
+import java.security.Principal;
+import java.util.Iterator;
+
+
+/**
+ * <p>Abstract representation of a group of {@link User}s in a
+ * {@link UserDatabase}. Each user that is a member of this group
+ * inherits the {@link Role}s assigned to the group.</p>
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: Group.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ * @since 4.1
+ */
+
+public interface Group extends Principal {
+
+
+ // ------------------------------------------------------------- Properties
+
+
+ /**
+ * Return the description of this group.
+ */
+ public String getDescription();
+
+
+ /**
+ * Set the description of this group.
+ *
+ * @param description The new description
+ */
+ public void setDescription(String description);
+
+
+ /**
+ * Return the group name of this group, which must be unique
+ * within the scope of a {@link UserDatabase}.
+ */
+ public String getGroupname();
+
+
+ /**
+ * Set the group name of this group, which must be unique
+ * within the scope of a {@link UserDatabase}.
+ *
+ * @param groupname The new group name
+ */
+ public void setGroupname(String groupname);
+
+
+ /**
+ * Return the set of {@link Role}s assigned specifically to this group.
+ */
+ public Iterator<Role> getRoles();
+
+
+ /**
+ * Return the {@link UserDatabase} within which this Group is defined.
+ */
+ public UserDatabase getUserDatabase();
+
+
+ /**
+ * Return the set of {@link User}s that are members of this group.
+ */
+ public Iterator<User> getUsers();
+
+
+ // --------------------------------------------------------- Public Methods
+
+
+ /**
+ * Add a new {@link Role} to those assigned specifically to this group.
+ *
+ * @param role The new role
+ */
+ public void addRole(Role role);
+
+
+ /**
+ * Is this group specifically assigned the specified {@link Role}?
+ *
+ * @param role The role to check
+ */
+ public boolean isInRole(Role role);
+
+
+ /**
+ * Remove a {@link Role} from those assigned to this group.
+ *
+ * @param role The old role
+ */
+ public void removeRole(Role role);
+
+
+ /**
+ * Remove all {@link Role}s from those assigned to this group.
+ */
+ public void removeRoles();
+
+
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/Host.java b/bundles/org.apache.tomcat/src/org/apache/catalina/Host.java
new file mode 100644
index 0000000..015e71f
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/Host.java
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina;
+
+import java.util.regex.Pattern;
+
+
+/**
+ * A <b>Host</b> is a Container that represents a virtual host in the
+ * Catalina servlet engine. It is useful in the following types of scenarios:
+ * <ul>
+ * <li>You wish to use Interceptors that see every single request processed
+ * by this particular virtual host.
+ * <li>You wish to run Catalina in with a standalone HTTP connector, but still
+ * want support for multiple virtual hosts.
+ * </ul>
+ * In general, you would not use a Host when deploying Catalina connected
+ * to a web server (such as Apache), because the Connector will have
+ * utilized the web server's facilities to determine which Context (or
+ * perhaps even which Wrapper) should be utilized to process this request.
+ * <p>
+ * The parent Container attached to a Host is generally an Engine, but may
+ * be some other implementation, or may be omitted if it is not necessary.
+ * <p>
+ * The child containers attached to a Host are generally implementations
+ * of Context (representing an individual servlet context).
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: Host.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public interface Host extends Container {
+
+
+ // ----------------------------------------------------- Manifest Constants
+
+
+ /**
+ * The ContainerEvent event type sent when a new alias is added
+ * by <code>addAlias()</code>.
+ */
+ public static final String ADD_ALIAS_EVENT = "addAlias";
+
+
+ /**
+ * The ContainerEvent event type sent when an old alias is removed
+ * by <code>removeAlias()</code>.
+ */
+ public static final String REMOVE_ALIAS_EVENT = "removeAlias";
+
+
+ // ------------------------------------------------------------- Properties
+
+
+ /**
+ * Return the XML root for this Host. This can be an absolute
+ * pathname, a relative pathname, or a URL.
+ * If null, defaults to
+ * ${catalina.base}/conf/&lt;engine name&gt;/&lt;host name&gt; directory
+ */
+ public String getXmlBase();
+
+ /**
+ * Set the Xml root for this Host. This can be an absolute
+ * pathname, a relative pathname, or a URL.
+ * If null, defaults to
+ * ${catalina.base}/conf/&lt;engine name&gt;/&lt;host name&gt; directory
+ * @param xmlBase The new XML root
+ */
+ public void setXmlBase(String xmlBase);
+
+ /**
+ * Return the application root for this Host. This can be an absolute
+ * pathname, a relative pathname, or a URL.
+ */
+ public String getAppBase();
+
+
+ /**
+ * Set the application root for this Host. This can be an absolute
+ * pathname, a relative pathname, or a URL.
+ *
+ * @param appBase The new application root
+ */
+ public void setAppBase(String appBase);
+
+
+ /**
+ * Return the value of the auto deploy flag. If true, it indicates that
+ * this host's child webapps should be discovered and automatically
+ * deployed dynamically.
+ */
+ public boolean getAutoDeploy();
+
+
+ /**
+ * Set the auto deploy flag value for this host.
+ *
+ * @param autoDeploy The new auto deploy flag
+ */
+ public void setAutoDeploy(boolean autoDeploy);
+
+
+ /**
+ * Return the Java class name of the context configuration class
+ * for new web applications.
+ */
+ public String getConfigClass();
+
+
+ /**
+ * Set the Java class name of the context configuration class
+ * for new web applications.
+ *
+ * @param configClass The new context configuration class
+ */
+ public void setConfigClass(String configClass);
+
+
+ /**
+ * Return the value of the deploy on startup flag. If true, it indicates
+ * that this host's child webapps should be discovered and automatically
+ * deployed.
+ */
+ public boolean getDeployOnStartup();
+
+
+ /**
+ * Set the deploy on startup flag value for this host.
+ *
+ * @param deployOnStartup The new deploy on startup flag
+ */
+ public void setDeployOnStartup(boolean deployOnStartup);
+
+
+ /**
+ * Return the regular expression that defines the files and directories in
+ * the host's appBase that will be ignored by the automatic deployment
+ * process.
+ */
+ public String getDeployIgnore();
+
+
+ /**
+ * Return the compiled regular expression that defines the files and
+ * directories in the host's appBase that will be ignored by the automatic
+ * deployment process.
+ */
+ public Pattern getDeployIgnorePattern();
+
+
+ /**
+ * Set the regular expression that defines the files and directories in
+ * the host's appBase that will be ignored by the automatic deployment
+ * process.
+ */
+ public void setDeployIgnore(String deployIgnore);
+
+
+ // --------------------------------------------------------- Public Methods
+
+
+ /**
+ * Add an alias name that should be mapped to this same Host.
+ *
+ * @param alias The alias to be added
+ */
+ public void addAlias(String alias);
+
+
+ /**
+ * Return the set of alias names for this Host. If none are defined,
+ * a zero length array is returned.
+ */
+ public String[] findAliases();
+
+
+ /**
+ * Remove the specified alias name from the aliases for this Host.
+ *
+ * @param alias Alias name to be removed
+ */
+ public void removeAlias(String alias);
+
+ /**
+ * Returns true if the Host will attempt to create directories for appBase and xmlBase
+ * unless they already exist.
+ * @return true if the Host will attempt to create directories
+ */
+ public boolean getCreateDirs();
+ /**
+ * Set to true if the Host should attempt to create directories for xmlBase and appBase upon startup
+ * @param createDirs
+ */
+ public void setCreateDirs(boolean createDirs);
+
+}
diff --git a/bundles/org.apache.tomcat/src/org/apache/catalina/InstanceEvent.java b/bundles/org.apache.tomcat/src/org/apache/catalina/InstanceEvent.java
new file mode 100644
index 0000000..ffbb31b
--- /dev/null
+++ b/bundles/org.apache.tomcat/src/org/apache/catalina/InstanceEvent.java
@@ -0,0 +1,434 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.catalina;
+
+
+import java.util.EventObject;
+
+import javax.servlet.Filter;
+import javax.servlet.Servlet;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+
+/**
+ * General event for notifying listeners of significant events related to
+ * a specific instance of a Servlet, or a specific instance of a Filter,
+ * as opposed to the Wrapper component that manages it.
+ *
+ * @author Craig R. McClanahan
+ * @version $Id: InstanceEvent.java,v 1.1 2011/06/28 21:08:21 rherrmann Exp $
+ */
+
+public final class InstanceEvent extends EventObject {
+
+ private static final long serialVersionUID = 1L;
+
+
+ /**
+ * The event indicating that the <code>init()</code> method is about
+ * to be called for this instance.
+ */
+ public static final String BEFORE_INIT_EVENT = "beforeInit";
+
+
+ /**
+ * The event indicating that the <code>init()</code> method has returned.
+ */
+ public static final String AFTER_INIT_EVENT = "afterInit";
+
+
+ /**
+ * The event indicating that the <code>service()</code> method is about
+ * to be called on a servlet. The <code>servlet</code> property contains
+ * the servlet being called, and the <code>request</code> and
+ * <code>response</code> properties contain the current request and
+ * response being processed.
+ */
+ public static final String BEFORE_SERVICE_EVENT = "beforeService";
+
+
+ /**
+ * The event indicating that the <code>service()</code> method has
+ * returned. The <code>servlet</code> property contains the servlet
+ * that was called, and the <code>request</code> and
+ * <code>response</code> properties contain the current request and
+ * response being processed.
+ */
+ public static final String AFTER_SERVICE_EVENT = "afterService";
+
+
+ /**
+ * The event indicating that the <code>destroy</code> method is about
+ * to be called for this instance.
+ */
+ public static final String BEFORE_DESTROY_EVENT = "beforeDestroy";
+
+
+ /**
+ * The event indicating that the <code>destroy()</code> method has
+ * returned.
+ */
+ public static final String AFTER_DESTROY_EVENT = "afterDestroy";
+
+
+ /**
+ * The event indicating that the <code>service()</code> method of a
+ * servlet accessed via a request dispatcher is about to be called.
+ * The <code>servlet</code> property contains a reference to the
+ * dispatched-to servlet instance, and the <code>request</code> and
+ * <code>response</code> properties contain the current request and
+ * response being processed. The <code>wrapper</code> property will
+ * contain a reference to the dispatched-to Wrapper.
+ */
+ public static final String BEFORE_DISPATCH_EVENT = "beforeDispatch";
+
+
+ /**
+ * The event indicating that the <code>service()</code> method of a
+ * servlet accessed via a request dispatcher has returned. The
+ * <code>servlet</code> property contains a reference to the
+ * dispatched-to servlet instance, and the <code>request</code> and
+ * <code>response</code> properties contain the current request and
+ * response being processed. The <code>wrapper</code> property will
+ * contain a reference to the dispatched-to Wrapper.
+ */
+ public static final String AFTER_DISPATCH_EVENT = "afterDispatch";
+
+
+ /**
+ * The event indicating that the <code>doFilter()</code> method of a
+ * Filter is about to be called. The <code>filter</code> property
+ * contains a reference to the relevant filter instance, and the
+ * <code>request</code> and <code>response</code> properties contain
+ * the current request and response being processed.
+ */
+ public static final String BEFORE_FILTER_EVENT = "beforeFilter";
+
+
+ /**
+ * The event indicating that the <code>doFilter()</code> method of a
+ * Filter has returned. The <code>filter</code> property contains
+ * a reference to the relevant filter instance, and the
+ * <code>request</code> and <code>response</code> properties contain
+ * the current request and response being processed.
+ */
+ public static final String AFTER_FILTER_EVENT = "afterFilter";
+
+
+ // ----------------------------------------------------------- Constructors
+
+
+ /**
+ * Construct a new InstanceEvent with the specified parameters. This
+ * constructor is used for filter lifecycle events.
+ *
+ * @param wrapper Wrapper managing this servlet instance
+ * @param filter Filter instance for which this event occurred
+ * @param type Event type (required)
+ */
+ public InstanceEvent(Wrapper wrapper, Filter filter, String type) {
+
+ super(wrapper);
+ this.filter = filter;
+ this.servlet = null;
+ this.type = type;
+
+ }
+
+
+ /**
+ * Construct a new InstanceEvent with the specified parameters. This
+ * constructor is used for filter lifecycle events.
+ *
+ * @param wrapper Wrapper managing this servlet instance
+ * @param filter Filter instance for which this event occurred
+ * @param type Event type (required)
+ * @param exception Exception that occurred
+ */
+ public InstanceEvent(Wrapper wrapper, Filter filter, String type,
+ Throwable exception) {
+
+ super(wrapper);
+ this.filter = filter;
+ this.servlet = null;
+ this.type = type;
+ this.exception = exception;
+
+ }
+
+
+ /**
+ * Construct a new InstanceEvent with the specified parameters. This
+ * constructor is used for filter processing events.
+ *
+ * @param wrapper Wrapper managing this servlet instance
+ * @param filter Filter instance for which this event occurred
+ * @param type Event type (required)
+ * @param request Servlet request we are processing
+ * @param response Servlet response we are processing
+ */
+ public InstanceEvent(Wrapper wrapper, Filter filter, String type,
+ ServletRequest request, ServletResponse response) {
+
+ super(wrapper);
+ this.filter = filter;
+ this.servlet = null;
+ this.type = type;
+ this.request = request;
+ this.response = response;
+
+ }
+
+
+ /**
+ * Construct a new InstanceEvent with the specified parameters. This
+ * constructor is used for filter processing events.
+ *
+ * @param wrapper Wrapper managing this servlet instance
+ * @param filter Filter instance for which this event occurred
+ * @param type Event type (required)
+ * @param request Servlet request we are processing
+ * @param response Servlet response we are processing
+ * @param exception Exception that occurred
+ */
+ public InstanceEvent(Wrapper wrapper, Filter filter, String type,
+ ServletRequest request, ServletResponse response,
+ Throwable exception) {
+
+ super(wrapper);
+ this.filter = filter;
+ this.servlet = null;
+ this.type = type;
+ this.request = request;
+ this.response = response;
+ this.exception = exception;
+
+ }
+
+
+ /**
+ * Construct a new InstanceEvent with the specified parameters. This
+ * constructor is used for processing servlet lifecycle events.
+ *
+ * @param wrapper Wrapper managing this servlet instance
+ * @param servlet Servlet instance for which this event occurred
+ * @param type Event type (required)
+ */
+ public InstanceEvent(Wrapper wrapp