Java Web Application: Using a custom realm

后端 未结 5 1773
迷失自我
迷失自我 2021-02-05 15:05

I\'m writing a java web application which need to perform login through a webservice. Of course, none of the realms supplied with the application server I\'m using (glassfish v2

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 15:43

    You can never deploy a realm from a WAR because the realm is NOT an Application Artifact, it is a Container Artifact (thus the phrase "container based security"). You can configure your app to use a specific realm as provided by the container, but the application can not provide this itself.

    That said, while all of the containers are different, and these realms are NOT portable, simple common sense will reduce the differences to the little bit of glue code necessary to integrate with the container, if you're looking for portability.

提交回复
热议问题