See https://www.jboss.org/community/docs/DOC-10179. Yes, that is the 4.2 FAQ, but the solution provided works for 5.0 also.
There is also https://www.jboss.org/community/docs/DOC-9531
The 4.2.x readme.html contained information about this, but the 5.0 readme does not have this information. But hardly anyone read the readme so I guess it doesn't matter.
Thank you Peter very much, that solved my problem (and very good point regarding security in the related links).