Taglibs - correct location of TLD files packaged in JARs
by Tomas Hofman
Hi folks,
we have an issue [0] where a web app with JAR packaged taglib is migrated from
Tomcat to Wildfly/EAP and the two servers are resolving tablib location
differently.
The taglib file in the JAR is located in
META-INF/resources/WEB-INF/tlds/hi.tld.
It's added to the taglib map explicitly via <taglib> element in
web-fragment.xml (in the same JAR):
<taglib>
<taglib-uri>/HiTag</taglib-uri>
<taglib-location>/WEB-INF/tlds/hi.tld</taglib-location>
</taglib>
This works in Tomcat, which takes *META-INF/resources/* as the root for
resolving <taglib-location>, and doesn't work in Wildfly, which takes
*META-INF/* as the root.
The functionality is described by JSP SPEC section 7.3 (I don't want to quote
any parts here, because I would have to quote all of it) [1]. After going
through it I think our interpretation is the correct one, though Apache think
the contrary [2].
However, would it hurt if we added META-INF/resources/ as another root to allow
both options?
[0] The issue: https://issues.jboss.org/browse/JBEAP-14757
[1] JSP spec: http://download.oracle.com/otndocs/jcp/jsp-2_3-mrel2-eval-spec/
[2] I wrote to Apache mailing list and Jeremy Boynes replied:
"""
Here’s how I read the spec.
JSP 7.3.3 talks about a “taglib map” using elements in the deployment
descriptor per your example. Per JSP 7.3.2 the URI is mapped to a context
relative path interpreted relative to the root of the web application.
Resources contained in a web fragment jar are located in its
/META-INF/resources directory. Tomcat/Jasper are synthesizing the effective web
application from the resources in the fragments, then resolving the URI in the
taglib map against that merged application. I think that’s a correct
interpretation of the spec.
JSP 7.3.1 refers to implicit map entries found by scanning the web
application’s jars from WEB-INF/lib.
"""
http://mail-archives.apache.org/mod_mbox/tomcat-taglibs-user/201805.mbox/...
--
Tomas Hofman
Software Engineer, JBoss SET
Red Hat
5 years, 10 months
Is there any change in module concepts between jboss and wildfly
by wildflyuser
1) Is there any change in module concepts between jboss and wildfly ?
2) In jobss we have folder as <JBossHome>/modules in wildfly
<wildfly_home_9.0.2>modules/system/layers/base. Is there any difference ?
3) As part of upgrade if we reuse/copy folder from <JBossHome>/modules to
<wildfly_home_9.0.2>modules/
so that my deployed application should consider only modules from
<wildfly_home_9.0.2>modules/ and it should not consider
<wildfly_home_9.0.2>modules/system/layers/base
Which will make the upgrade easier to proceed step by step.
--
Sent from: http://wildfly-development.1055759.n5.nabble.com/
5 years, 10 months
Patching generation facility broken with WildFly 13?
by Guillaume Smet
Hi,
For some time now, we build WildFly patches for Hibernate Validator.
With 11 and 12, everything was OK, but I just tried to upgrade to WildFly
13 and the patch-gen-maven-plugin fails with the following error in the
patchgen.log:
java.io.IOException: org.jboss.modules.ModuleNotFoundException:
org.jboss.modules:main
at
org.jboss.as.patching.generator.DistributionProcessor.process(DistributionProcessor.java:106)
at
org.jboss.as.patching.generator.Distribution.create(Distribution.java:68)
at
org.jboss.as.patching.generator.PatchGenerator.process(PatchGenerator.java:129)
at
org.jboss.as.patching.generator.PatchGenerator.main(PatchGenerator.java:73)
Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.modules:main
at org.jboss.modules.Module.addPaths(Module.java:1116)
at org.jboss.modules.Module.link(Module.java:1472)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1500)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:226)
at
org.jboss.as.patching.generator.DistributionProcessor.process(DistributionProcessor.java:93)
... 3 more
My branch is here: https://github.com/gsmet/hibernate-validator/tree/HV-1622
. A simple mvn clean install fails with the above error. If you drop the
latest commit and go back to build WF 11 and 12, everything is fine.
I use the latest patch-gen-maven-plugin with the latest wildfly-core
(5.0.0.Final) so the latest wildfly-patching.
Note that we usually support 2 versions of WF so I would like to keep
supporting WF 12 too.
Any thoughts?
Thanks!
--
Guillaume
5 years, 10 months
How to set an authorized identity to EltyronSecurity Context
by Alessio Soldano
As suggested by Darran, I'm forwarding the message below to the list on
behalf of Jim.
The classes Jim is referring to are at
https://github.com/wildfly/wildfly/tree/master/webservices/server-integra...
---------- Forwarded message ----------
From: Jim Ma <ema(a)redhat.com>
Date: Wed, May 30, 2018 at 9:03 AM
Subject: Set an authorized identity to EltyronSecurity Context
To: Darran Lofthouse <darran.lofthouse(a)redhat.com>
Cc: Alessio Soldano <asoldano(a)redhat.com>
Hi Darran,
We are helping look at a customer issue which requires propagate the
authenticated subject from webservice subsystem to
ejb subystem. With old security domain , we can do this with creating a
subject :
@Override
public void pushSubjectContext(final Subject subject, final Principal
principal, final Object credential) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
SecurityContext securityContext =
SecurityContextAssociation.getSecurityContext();
if (securityContext == null) {
securityContext = createSecurityContext(getSecur
ityDomain());
setSecurityContextOnAssociation(securityContext);
}
securityContext.getUtil().createSubjectInfo(principal, credential, subject);
return null;
}
});
}
After Elytron, what is the equivalent thing to do this then ejb can
retrieve this security without check this twice ?
Thanks,
Jim
--
Alessio Soldano
Associate Manager
Red Hat
<https://www.redhat.com>
<https://red.ht/sig>
5 years, 10 months
Galleon roadmap
by Peter Palaga
Hi Alexey,
These are questions from a layered product PoV (WildFly Camel in my case):
(1) Is it still safe to rely on the traditional feature packs?
(2) When will the time come that we'll have to switch to Galleon?
Thanks,
-- Peter
5 years, 10 months