简体   繁体   中英

How do you specify the security domain for a war under JBoss 7?

This line in my jboss-web.xml:

<security-domain>java:/jaas/flockingfun</security-domain>

produces this error:

Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,19] Message: Unexpected element 'security-domain' encountered at org.jboss.as.metadata.parser.util.MetaDataElementParser.unexpectedElement(MetaDataElementParser.java:109) at org.jboss.as.metadata.parser.jbossweb.JBossWebMetaDataParser.parse(JBossWebMetaDataParser.java:128) at org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.processDeployment(JBossWebParsingDeploymentProcessor.java:60) ... 14 more

Any ideas what I should be specifying? Thanks in advance.

Since I stumbled upon this question recently, and it didn't help as the JBoss 7 nowadays does support security domains, here is how:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
   <security-domain>flockingfun</security-domain>
</jboss-web>

There's no need to prefix it with java:/jaas .

JBoss AS7尚不支持安全域。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM