Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Setting up basic server problem

Am Mittwoch, 20. April 2016, 10:49:08 CEST schrieb Jan Bartel:
> Hi,
> 
> You don't say how you are enabling your special server.xml file? Can you
> post your full run line? And the output of --list-config and --list-modules?
> 
> Also, you seem to have a bit of a mish-mash between jetty modules and
> rolling-your-own xml files.  For example, if you have all those other
> modules enabled, why don't you also just enable the http module, and set
> the jetty.http.port property to what you want in start.ini? In addition,
> are you sure you want to replace the handler structure set up in jetty.xml?
> You could instead add a handler to the ContextHandlerCollection.
> 
> That said, I tested a setup similar to yours (but using http module :))
> placing your server.xml file onto the start line like so:  java -jar
> ../start.jar etc/server.xml  and I was able to deploy a very simple webapp
> and access it at "/". So I suspect the answer lies somewhere in the
> configuration and enablement of your server.xml file that you haven't shown
> us.
> 
> regards
> Jan

Hi, 

Thanks for your help, I was able to find the problem myself (of course after 
asking the experts -.-" ): Using some static {} block in my webapp I noticed 
that the servlet's classes are not loaded using my own xml. So I added an 
entry to the web.xml file (jersey...scanning.recursive -> true) (the webapp 
contains a jersey servlet) and then my own server.xml worked as intended. 
So for some reason the jetty deploy module loads the classes inside the 
servlet, whereas simply declaring the servlet inside a WebAppContext does not 
load it. 
And you're probably right that my config is a bit of a mess at the moment, I 
first have to find out how to build a clean config for it. 
However, thanks for your support. 

Best regards, 
dairyman


Back to the top