Skip to content

Commit

Permalink
Add ServiceLoader entry to META-INF for EL
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Jan 27, 2020
1 parent 13e1117 commit ef13eb8
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,8 @@
<!-- Jasper EL Implementation JAR File -->
<jarIt jarfile="${jasper-el.jar}"
filesDir="${tomcat.classes}"
filesId="files.jasper-el" />
filesId="files.jasper-el"
meta-inf="${tomcat.manifests}/jasper-el.jar"/>

<!-- Re-packaged Apache Commons DBCP 2-->
<jarIt jarfile="${tomcat-dbcp.jar}"
Expand Down
16 changes: 16 additions & 0 deletions res/META-INF/jasper-el.jar/services/javax.el.ExpressionFactory
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Licensed to the Apache Software Foundation (ASF) under one or more

This comment has been minimized.

Copy link
@maneumann

maneumann Feb 25, 2020

Given this, some jsps cannot be compiled anymore with 8.5.51:
[WARNING] org.apache.jasper.JasperException: javax.el.ELException: Unable to find ExpressionFactory of type: # Licensed to the Apache Software Foundation (ASF) under one or more

It seems as if the comment is not ignored.

This comment has been minimized.

Copy link
@markt-asf

markt-asf Feb 25, 2020

Author Contributor

That looks like you have a broken EL API that isn't doing the service loading correctly. The Tomcat users mailing list is the place to seek help if you are seeing this error on Tomcat.

# 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.

org.apache.el.ExpressionFactoryImpl
26 changes: 26 additions & 0 deletions res/META-INF/jasper-el.jar/web-fragment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<web-fragment xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-fragment_4_0.xsd"
version="4.0"
metadata-complete="true">
<name>org_apache_jasper_el</name>
<distributable/>
</web-fragment>
5 changes: 5 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@
<code>ExpressionFactory</code> implementations with
<code>ServiceLoader</code>. (markt)
</fix>
<add>
Add a <code>META-INF/services</code> entry to jasper-el.jar so that the
Expression Language implementation can be discovered via the services
API. (markt)
</add>
</changelog>
</subsection>
<subsection name="Cluster">
Expand Down

0 comments on commit ef13eb8

Please sign in to comment.