Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] unhide some jetty classes

Do this ...

Create your context deployable XML in webapps/ROOT.xml
Put your webapp into a file called webapps/ROOT.war

Enable the --module=deploy

That module will transitively pull in the webapp module and also do the deploy correctly.
It will see that the context name is "ROOT" which is special and means deployment to the "/" contextPath.

Good luck

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts


On Thu, Nov 21, 2013 at 1:43 PM, Peter Ondruška <peter.ondruska+jetty@xxxxxxxx> wrote:
Dear Lothar,

my problem was solved by adding module "webapp" and this configuration:

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Set name="handler">
    <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
      <Set name="handlers">
        <Array type="org.eclipse.jetty.server.Handler">
          <Item>
            <New id="webapp" class="org.eclipse.jetty.webapp.WebAppContext">

              <Set name="contextPath">/</Set>
              <Set name="war"><SystemProperty name="jetty.base" default="." />/webapps/root.war</Set>
              <Set name="serverClasses">
                <Array type="String">
                  <Item>-org.eclipse.jetty.util.ssl.</Item>
                </Array>
              </Set>
            </New>
          </Item>
        </Array>
      </Set>
    </New>
  </Set>
</Configure>

This is fresh 9.1 stable. Probably the docs are not finished yet and therefore the problems.



On 21 November 2013 10:25, Lothar Kimmeringer <job@xxxxxxxxxxxxxx> wrote:
Am 20.11.2013 21:34, schrieb Peter Ondruška:
> I am trying to unhide (http://www.eclipse.org/jetty/documentation/current/jetty-classloading.html#configuring-webapp-classloading) some Jetty classes (org.eclipse.jetty.util.ssl.) but I do something wrong?
>
> My xml is:
>
> <Configure class="org.eclipse.jetty.webapp.WebAppContext">
>   <Call name="addServerClass">
>     <Arg>-org.eclipse.jetty.util.ssl.</Arg>
>   </Call>
> </Configure>

I'm not sure but the name of the method suggests, that this
adds a single class and not a package.

Here is my configuration where I've done it as well:

  <Ref id="Contexts">
    <Call name="addHandler"><Arg>
      <New class="org.eclipse.jetty.webapp.WebAppContext">
        <Set name="contextPath">/</Set>
        <Set name="war">./etc/admin/AdminTools.war</Set>
        <Set name="extractWAR">False</Set>
        <Call name="setServerClasses">
          <Arg><Array type="java.lang.String">
            <Item>dummy.*</Item>
          </Array></Arg>
        </Call>
        <Set name="copyWebInf">True</Set>
      </New>
    </Arg></Call>
  </Ref>

As you can see, I used a wildcard, but you need to try if this
can be used with addServerClass() as well or if you need to
change it the way above.


Regards, Lothar
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top