How do I embedd Jetty to server static pages

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I embedd Jetty to server static pages

Ikonne, Ike

Hi all,

 

I have always embedded Jetty to services a servlets with WAR files using the WebapplicationContext, now,

I would like to embed Jetty just to server static pages from a particular location without a War file, does anyone

have an idea of what I must have to do to achieve this.  I have looked at the documentation but it is not

quite obvious to me.

 

Thanks,

 

Ike

 

Reply | Threaded
Open this post in threaded view
|

RE: How do I embedd Jetty to server static pages

Ikonne, Ike

Hi all,

 

I think I may have found the solution to my question, instead of creating org.mortbay.jetty.server, create

org.mortbay.http.HttpServer. Please correct me if I am following the wrong path.

 

Ike

 

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Ikonne, Ike
Sent: Tuesday, August 16, 2005 12:22 PM
To: [hidden email]
Subject: [Jetty-support] How do I embedd Jetty to server static pages

 

Hi all,

 

I have always embedded Jetty to services a servlets with WAR files using the WebapplicationContext, now,

I would like to embed Jetty just to server static pages from a particular location without a War file, does anyone

have an idea of what I must have to do to achieve this.  I have looked at the documentation but it is not

quite obvious to me.

 

Thanks,

 

Ike

 

Reply | Threaded
Open this post in threaded view
|

Re: How do I embedd Jetty to server static pages

Kent Johnson
In reply to this post by Ikonne, Ike
Ikonne, Ike wrote:
> I would like to embed Jetty just to server static pages from a
> particular location without a War file, does anyone
>
> have an idea of what I must have to do to achieve this.  I have looked
> at the documentation but it is not
>
> quite obvious to me.

You need to create a context, add a ResourceHandler to the context and set the resource base of the context. See the 'Resource Handler' section on this page:
http://jetty.mortbay.org/jetty/tut/HttpServer.html#Handlers

Kent



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

RE: How do I embedd Jetty to server static pages

Ikonne, Ike
In reply to this post by Ikonne, Ike
Hi Kent,

Thanks, this is exactly all the information that I am looking for.

Ike


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Kent
Johnson
Sent: Tuesday, August 16, 2005 1:21 PM
To: [hidden email]
Subject: Re: [Jetty-support] How do I embedd Jetty to server static
pages

Ikonne, Ike wrote:
> I would like to embed Jetty just to server static pages from a
> particular location without a War file, does anyone
>
> have an idea of what I must have to do to achieve this.  I have looked

> at the documentation but it is not
>
> quite obvious to me.

You need to create a context, add a ResourceHandler to the context and
set the resource base of the context. See the 'Resource Handler' section
on this page:
http://jetty.mortbay.org/jetty/tut/HttpServer.html#Handlers

Kent



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support