问题
Under JBoss 5.1 we used to "stage" values in the web.xml and the jboss-web.xml by using SystemProperties. In the web.xml that looked like this:
<web-app [...]>
[...]
<auth-constraint>
<role-name>${myRole}</role-name>
</auth-constraint>
[...]
<login-config>
<auth-method>${myAuthMethod}</auth-method>
</login-config>
<security-role>
<role-name>${myRole}</role-name>
</security-role>
</web-app>
Additionally we did the same thing for the jboss-web.xml and the security-domain. Not adding the concrete values is crutial because the WAR-modules we did that are generated by our code generator. JBoss 7 does not replace these values any more - which is correct according to the spec but in our case quite uncomfortable.
Any ideas how one could:
- do some kind of replacement at runtime?
- refreign having to replace those values at runtime?
- ... ?
回答1:
See https://issues.jboss.org/browse/AS7-3816.
The fix for system property substitution for ejb-jar.xml is going to JBoss AS 7.1.2.
You can check the source or contact the assignee to ensure that is also going to be also fixed for web.xml. Even if it's not yet, it should be possible to convince Bartosz Baranowski to fix it too.
Update
https://issues.jboss.org/browse/AS7-4479 - we've been heard :)
回答2:
Definitely not my forté, but you might want to look at the migration guide. There also might be some useful information in the authentication documentation.
回答3:
polemoser - according to which specs? Im waiting for issue to be merged into master before fixing any other related.
来源:https://stackoverflow.com/questions/10032095/references-to-systemproperties-in-web-xml-and-jboss-web-xml-works-in-jboss5-but