Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > A specific sort of WEBrick configuration

Reply
Thread Tools

A specific sort of WEBrick configuration

 
 
Lloyd Zusman
Guest
Posts: n/a
 
      01-02-2005
I'm trying to configure WEBrick to create a server that will behave in
the following way. I have made a number of false starts, and before I
dive in and try again, I'm wondering if anyone has created a setup that
they can describe which has each and every one of the following
characteristics:

- One WEBrick instance answers queries for a number of different
virtual hosts that are listening on the same IP address.

- For each virtual host, WEBrick can serve up different content.

- This content is organized in subdirectories whose names are based in
some way on the virtual hostnames. Within each of these
subdirectories is contained the site-specific ruby code which controls
the appearance and functionality of each of these individual sites.

- Session management is easily available and selectable, such that any
individual sites that want session management simply have to request
it via some sort of configuration; and any sites which don't want
session management don't have to use it and can disable it.

I have found examples which show how to manage sessions (for example,
using tofu), and other examples which show how to handle the virtual
hosts. However, I have yet to see how to have all of these features
in a single WEBrick instance.

If someone could point me to an example of how all of this can be done
within a single instantiation of WEBrick, I would be quite grateful.

Thanks in advance.

--
Lloyd Zusman
http://www.velocityreviews.com/forums/(E-Mail Removed)
God bless you.



 
Reply With Quote
 
 
 
 
Eric Hodel
Guest
Posts: n/a
 
      01-04-2005
--Apple-Mail-39--136449176
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

On 02 Jan 2005, at 09:01, Lloyd Zusman wrote:

> I'm trying to configure WEBrick to create a server that will behave in
> the following way. I have made a number of false starts, and before I
> dive in and try again, I'm wondering if anyone has created a setup that
> they can describe which has each and every one of the following
> characteristics:
>
> - One WEBrick instance answers queries for a number of different
> virtual hosts that are listening on the same IP address.
>
> - For each virtual host, WEBrick can serve up different content.
>
> - This content is organized in subdirectories whose names are based in
> some way on the virtual hostnames. Within each of these
> subdirectories is contained the site-specific ruby code which
> controls
> the appearance and functionality of each of these individual sites.
>
> - Session management is easily available and selectable, such that any
> individual sites that want session management simply have to request
> it via some sort of configuration; and any sites which don't want
> session management don't have to use it and can disable it.
>
> I have found examples which show how to manage sessions (for example,
> using tofu), and other examples which show how to handle the virtual
> hosts. However, I have yet to see how to have all of these features
> in a single WEBrick instance.
>
> If someone could point me to an example of how all of this can be done
> within a single instantiation of WEBrick, I would be quite grateful.


Sounds like you want to use inheritance or mixins to get what you want.
Each part of your composite Servlet can be implemented separately,
then layered into the functionality you want.

--
Eric Hodel - (E-Mail Removed) - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

--Apple-Mail-39--136449176
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFB2wNeMypVHHlsnwQRAtF/AJsGeAUlXHnGA3TKS4HvIsud/RERggCgko4n
NbYfxAg2ZW1pzY2xwYtOYDU=
=arX1
-----END PGP SIGNATURE-----

--Apple-Mail-39--136449176--


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WEBrick: Has anyone used WEBrick::Session? Lloyd Zusman Ruby 2 02-21-2013 06:49 PM
WEBrick::Daemon and WEBrick Aaron Smith Ruby 2 03-18-2007 03:47 AM
redirect traffic on specific ip to specific interface mimiseh Cisco 3 06-05-2005 09:14 PM
REPOST: A specific sort of WEBrick configuration Lloyd Zusman Ruby 0 01-22-2005 04:08 PM
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. Navin ASP General 1 09-09-2003 07:16 AM



Advertisments