Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replacement for GlobalWebappConfigBinding #11847

Closed
nbartels opened this issue May 27, 2024 · 3 comments · Fixed by #11859
Closed

replacement for GlobalWebappConfigBinding #11847

nbartels opened this issue May 27, 2024 · 3 comments · Fixed by #11859
Assignees
Labels

Comments

@nbartels
Copy link

Jetty Version
Jetty 12.0.9

Jetty Environment
ee8

Java Version
21

Question
I'm migrating an application from Jetty 9 to 12 and have some xml configurations here. The most seems to work, but I'm stuck on GlobalWebappConfigBinding. I see this is available until jetty 11 and no longer available in Jetty 12.

Can you give me a hint, how I have to replace it in Jetty 12?

here is the xml snippet I try to get to work again:

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Ref refid="DeploymentManager">
    <Call name="addLifeCycleBinding">
      <Arg>
        <New class="org.eclipse.jetty.deploy.bindings.GlobalWebappConfigBinding">
          <Set name="jettyXml"><Property name="jetty.base"/>/etc/another-web.xml</Set>
        </New>
      </Arg>
    </Call>
  </Ref>
</Configure>
@janbartel
Copy link
Contributor

@nbartels I think this type of functionality was accidentally omitted from jetty-12, let me have a look at putting something like it back in.

@janbartel
Copy link
Contributor

@nbartels can I see a (sanitized if ncessary) example of the another-web.xml that you want to apply?

@nbartels
Copy link
Author

@janbartel sure.

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure class="org.eclipse.jetty.ee8.webapp.WebAppContext">
 
   <Set name="throwUnavailableOnStartupException">true</Set>
  
   <Call name="addEventListener">
     <Arg><New class="my.namespace.RequestContextScope"/></Arg>
   </Call>

  <Get id="protected" name="ProtectedTargets"/>
  <Set name="ProtectedTargets">
    <Call class="org.eclipse.jetty.util.ArrayUtil" name="addToArray">
      <Arg><Ref refid="protected"/></Arg>
      <Arg>/my.yaml</Arg>
      <Arg></Arg>
    </Call>
  </Set>

  <Set name="overrideDescriptor"><Property name="jetty.base"/>/etc/override-web.xml</Set>
 
</Configure>

@janbartel janbartel self-assigned this May 31, 2024
janbartel added a commit that referenced this issue Jun 19, 2024
* Issue #11847 implement environment context xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants