1

I would like to create a single .war that contains both a web based FORM login for a web GUI AND BASIC authentication (in this case, for a web service interface.)

 /index.html (unsecured welcome page)
 +---/interactive (folder containing web pages using auth-method=FORM)
 +---/service (servlet mapping for web service using auth-method=BASIC)

I don't see a way to configure such a setup in the web.xml file. It appears that login-config can not appear inside a security-config and that it only allows a single auth-method globally for the .war.

Chris Nava
  • 6,614
  • 3
  • 25
  • 31

1 Answers1

1

The solution was to create two .war submodules and package them in an .ear file.

Chris Nava
  • 6,614
  • 3
  • 25
  • 31
  • Hi, I have the same problem. My application is accesible through a JSF web client and a Jax-RS web service. I want to use form auth for the web app and digest auth for the web service, but I don't want to package my application in two wars within a war. Did you a find another solution in the meantime? – Theo Dec 09 '10 at 14:42
  • No. This solution was good enough for my purposes so I stopped looking. If you do manage to find a better solution please post it and I'll up-vote you. ;-) – Chris Nava Dec 09 '10 at 21:09