Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Running more than one webapp using jetty-maven-plugin?

Changing my web.xml files to specify the same realm name fixed the
problem. Before, they had different realm names, only one of which
corresponded the LoginService name -- this worked fine for previous
version of Jetty, but broke in Jetty 8.1.7.

Before figuring out this simpler fix -- I had worked around the problem
by adding a new WebAppContext and LoginService to my jetty.xml -- This
worked OK, although I couldn't figure out a way to specify this in the
jetty-maven-plugin configuration in the pom.xml, so I needed to use an
external jetty.xml configuration file.

<Ref id="Contexts">
  <Call name="addHandler">
    <New class="org.eclipse.jetty.webapp.WebAppContext">
     <Set name="contextPath">/my-app</Set>
     <Get name="securityHandler">
      <Set name="loginService">
       <New class="">
        <Set name="name">My App</Set>

But, the solution you provided is much simpler anyways, so I'll use
that. Thanks!

- Aaron

-----Original Message-----
From: jetty-users-bounces@xxxxxxxxxxx
[mailto:jetty-users-bounces@xxxxxxxxxxx] On Behalf Of Jan Bartel
Sent: Thursday, October 11, 2012 7:17 PM
To: JETTY user mailing list
Subject: [SPAM] Re: [jetty-users] Running more than one webapp using
Importance: Low


I can't see in that plugin configuration where you are configuring the
loginservice? Do you have one configured at all? Do you have a realm
name in the web.xml of any of the webapps?

The algorithm for finding a suitable LoginService did change in the bug
you pointed out, but if you had a realm name configured and a
loginservice configured already, then the change shouldn't have affected
you, so I'm slightly puzzled.

You can always define the loginservices you want in the plugin config
(see the page
under Configuring the Container heading). Here's an example from the

          <!-- useTestScope>true</useTestScope -->
              <name>Test Realm</name>


Back to the top