Thanks, good to hear I was on the right track.
The second part of my question has to do with how to manage this in Eclipse
during development. I have my java source files in
~/Workspace/MyProject/src
I'd like to keep the static content in
~/Workspace/MyProject/html
During development, I want Jetty to look in the html directory in my project
directory, but when deploying the server, I'd like to move the static content
into the directory where the server is deployed. Is there a "standard" way to
do this without having to change setResourceBase() right before creating the
release build?
Thanks,
Chris
From: [email protected] [mailto:[email protected]]
On Behalf Of bubbleguuum
Sent: Friday, February 01, 2013 12:16 AM
To: JETTY user mailing list
Subject: Re: [jetty-users] setting up Eclipse project for embedded Jetty
On 01/02/2013 06:44, Chris Lauwers wrote:
Apologies for the novice question, but I'm embedding Jetty into my server, and
would like recommendations for what type of Eclipse project setup is best
suited for this purpose. The server will primarily provide REST-based web
services but also needs to serve up some static (HTML/Javascript) content. I
know that if I create a Dynamic Web Content project, Eclipse expects that
static content in a WebContent folder and will automatically move this content
when creating a WAR file, but since I'm embedding Jetty, a Dynamic Web Content
project doesn't seem like the right way to go.
How do I use my Eclipse project setup to manage the HTML content and how do I
make sure it ends up in the right place so the embedded Jetty server will find
it?
Thanks,
Chris
You do not need anything special for embedded Jetty. A regular java project
will do.
For serving static content just use a DefaultServlet, specifying html content
root directory (which can be anywhere) with setResourceBase().
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users