|Re: [jetty-users] Having trouble using Embedded Jetty and WebApplicationInitializer with a WarFile deployment|
On 09/23/2014 12:58 PM, David Kowis wrote:
> I found this thread:
I found a couple more things:
So now I've got an additional commit:
This works, but it only works if I set parentLoaderPriority(true), from
the documentation I'm not exactly clear as to why this works.
The classes I want to load are all in the War file themselves, they
shouldn't be necessary in the classpath that I'm configuring the server
in. There must be something else wrong...
I don't want to include the classes in the launcher project's classpath,
when they should all be in the war file.
I have this working with the servlet launcher mechanism, because I do
want to actaully share some things in a spring context at one level
higher than the war files, so perhaps it's best if I don't try to deploy
lots of war files, and just have the jetties be in my one classpath.
> It gets me part of the way there, but I'm not deploying using a
> directory, I'm deploying using an existing war file.
> Jetty Version: 9.2.3.v20140905
> I tried setting:
> (note this is Scala, but it doesn't really matter in this context)
> val webapp = new WebAppContext()
> I'm not sure how to get it to pick up my WebAppInitializer class. The
> jetty logs indicate that it has tried, but not found anything:
> 12:54:15.653 INFO / - No Spring WebApplicationInitializer types
> detected on classpath
> I'll note that the warfile deploys beautifully in Jetty 9 using
> Its only when I'm trying to do it myself, using this simple embedded
> mechanism that it doesn't work. I'm probably missing something obvious,
> but I can't quite figure it out.
> The project is here: https://github.com/dkowis/valve2
> You can get here with `gradle run` (I'm using gradle 2.x) at the root,
> at commit 9db7cc77f5
> Thanks in advance!
> David Kowis
> PS: sorry for double send if this happened, I sent the other using the
> wrong email address.
> jetty-users mailing list
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
Back to the top