Configuration question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Configuration question

Matthew Clark-4
Configuration question

Greetings,

Im relatively new at Swazoo, so please pardon the neophyte question.

Im running the HTTPServerTest routines.  From a workspace I doIt:

        (Delay forMilliseconds: 100) wait.

        ObjectMemory compactingGC.

        server := HTTPServer new.

        server ip: 'localhost'; port: 8123.

        server start.

        stream := (SocketAccessor newTCPclientToHost: 'localhost' port: 8123)

                                readAppendStream

I can inspect the values of server and stream and both look ok.

If I then inspect:

server isServing

I get true value returned, which would suggest that the HTTPServer is running In the directory where I launched VW, I have a file index.html, which I expect to be read by my web browser If I try to navigate my browser to http://localhost:8123, however, I get an HTTP 404 Error.  Perhaps Im laboring under a misconception, but I thought the root of the http server would be where I launched VW.  Is this correct?  If not, how do I determine/set the folder where html files are found?

Thanks,

Matthew C. Clark, Ph.D.

Principle Software Engineer

Tandel Systems, LLC

MS-892

13350 US HWY 19 North

Clearwater, FL 33764-7290

(o) 727-539-3855

(f) 727- 539-4480

Reply | Threaded
Open this post in threaded view
|

Re: Configuration question

Janko Mivšek
Hi Matthew,

Welcome to Swazoo world :)

It seems that you forgot to add any resource, specially a FileResource
to serve static HTML files.

You can add them manually or (for start) simply read them from
configuration file sites.cnf:

SiteRegistry configureFrom: 'sites.cnf'

Have a nice time
Janko

Matthew Clark wrote:

> Greetings,
>
> I'm relatively new at Swazoo, so please pardon the neophyte question.
>
> I'm running the HTTPServerTest routines. From a workspace I doIt:
>
> (Delay forMilliseconds: 100) wait.
>
> ObjectMemory compactingGC.
>
> server := HTTPServer new.
>
> server ip: 'localhost'; port: 8123.
>
> server start.
>
> stream := (SocketAccessor newTCPclientToHost: 'localhost' port: 8123)
>
> readAppendStream
>
> I can inspect the values of server and stream and both look ok.
>
> If I then inspect:
>
> server isServing
>
> I get 'true' value returned, which would suggest that the HTTPServer
> is running. In the directory where I launched VW, I have a file
> index.html, which I expect to be read by my web browser. If I try to
> navigate my browser to _http://localhost:8123_, however, I get an HTTP
> 404 Error. Perhaps I'm laboring under a misconception, but I thought
> the 'root' of the http server would be where I launched VW. Is this
> correct? If not, how do I determine/set the folder where html files
> are found?
>
> Thanks,
>
> Matthew C. Clark, Ph.D.
>
> Principle Software Engineer
>
> *Tandel Systems**, LLC*
>
> MS-892
>
> 13350 US HWY 19 North
>
> Clearwater, FL 33764-7290
>
> (o) 727-539-3855
>
> (f) 727- 539-4480
>




Reply | Threaded
Open this post in threaded view
|

RE: Configuration question

Matthew Clark-4
In reply to this post by Matthew Clark-4
Thanks for the response, Janko.  It's clear I don't have a clue about
what I'm doing ;-)  I see the sites.cnf file, but don't really get what
many of the settings do, aside from SiteIdentifier.  I don't want to
bother you guys with tons of simple questions, is there some sort of
primer/tutorial about how to use this?  I'm a quick study...

Matthew C. Clark, Ph.D.
Principle Software Engineer
Tandel Systems, LLC
MS-892
13350 US HWY 19 North
Clearwater, FL 33764-7290
(o) 727-539-3855
(f) 727- 539-4480


> -----Original Message-----
> From: Janko Mivsek [mailto:[hidden email]]
> Sent: Wednesday, June 26, 2002 4:02 PM
> To: Matthew Clark; [hidden email]
> Subject: Re: [Swazoo-devel] Configuration question
>
> Hi Matthew,
>
> Welcome to Swazoo world :)
>
> It seems that you forgot to add any resource, specially a FileResource
> to serve static HTML files.
>
> You can add them manually or (for start) simply read them from
> configuration file sites.cnf:
>
> SiteRegistry configureFrom: 'sites.cnf'
>
> Have a nice time
> Janko



Reply | Threaded
Open this post in threaded view
|

Re: Configuration question

Janko Mivšek
Mattehew, sorry, not tutorial yet. But if you have a bit time, you are
welcome to put down a word or two, specially because you are new and not
"burried" into details yet. You are certanly in better position to write
a simple tutorial as we as developers are. Others will understand your
tutorial much better ;)

Janko

Matthew Clark wrote:

>Thanks for the response, Janko.  It's clear I don't have a clue about
>what I'm doing ;-)  I see the sites.cnf file, but don't really get what
>many of the settings do, aside from SiteIdentifier.  I don't want to
>bother you guys with tons of simple questions, is there some sort of
>primer/tutorial about how to use this?  I'm a quick study...
>
>Matthew C. Clark, Ph.D.
>Principle Software Engineer
>Tandel Systems, LLC
>MS-892
>13350 US HWY 19 North
>Clearwater, FL 33764-7290
>(o) 727-539-3855
>(f) 727- 539-4480
>
>
>  
>
>>-----Original Message-----
>>From: Janko Mivsek [mailto:[hidden email]]
>>Sent: Wednesday, June 26, 2002 4:02 PM
>>To: Matthew Clark; [hidden email]
>>Subject: Re: [Swazoo-devel] Configuration question
>>
>>Hi Matthew,
>>
>>Welcome to Swazoo world :)
>>
>>It seems that you forgot to add any resource, specially a FileResource
>>to serve static HTML files.
>>
>>You can add them manually or (for start) simply read them from
>>configuration file sites.cnf:
>>
>>SiteRegistry configureFrom: 'sites.cnf'
>>
>>Have a nice time
>>Janko
>>    
>>
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by: Jabber Inc.
>Don't miss the IM event of the season | Special offer for OSDN members!
>JabberConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
>_______________________________________________
>Swazoo-devel mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/swazoo-devel
>
>  
>




Reply | Threaded
Open this post in threaded view
|

RE: Configuration question

Matthew Clark-4
In reply to this post by Matthew Clark-4
Janko,

I'll contribute where I can, though I'm not terribly adept at this sort
of thing (you should see my dissertation! ;-)

One thing you could immediately help me with is the contents of
sites.cnf.  The <SiteIdentifier> and <FileResource> tags are fairly self
evident, but I'm at a loss to understand what the <CompositeResource>
and <HelloWorldResource> settings are:

<Site>
 <SiteIdentifier ip: '127.0.0.1' port: 8123 host: 'localhost' >
 <CompositeResource uriPattern: '/'>
  <CompositeResource uriPattern: 'foo'>
   <HelloWorldResource uriPattern: 'Howdy'>
  </CompositeResource>
 </CompositeResource>
 <FileResource uriPattern: '/' filePath: '.'>
</Site>

Matt


> -----Original Message-----
> From: Janko Mivsek [mailto:[hidden email]]
> Sent: Wednesday, June 26, 2002 4:38 PM
> To: Matthew Clark
> Cc: [hidden email]
> Subject: Re: [Swazoo-devel] Configuration question
>
> Mattehew, sorry, not tutorial yet. But if you have a bit time, you are
> welcome to put down a word or two, specially because you are new and
not
> "burried" into details yet. You are certanly in better position to
write
> a simple tutorial as we as developers are. Others will understand your
> tutorial much better ;)
>
> Janko
>
> Matthew Clark wrote:
>
> >Thanks for the response, Janko.  It's clear I don't have a clue about
> >what I'm doing ;-)  I see the sites.cnf file, but don't really get
what
> >many of the settings do, aside from SiteIdentifier.  I don't want to
> >bother you guys with tons of simple questions, is there some sort of
> >primer/tutorial about how to use this?  I'm a quick study...
> >
> >Matthew C. Clark, Ph.D.


> >>-----Original Message-----
> >>From: Janko Mivsek [mailto:[hidden email]]
> >>Sent: Wednesday, June 26, 2002 4:02 PM
> >>To: Matthew Clark; [hidden email]
> >>Subject: Re: [Swazoo-devel] Configuration question
> >>
> >>Hi Matthew,
> >>
> >>Welcome to Swazoo world :)
> >>
> >>It seems that you forgot to add any resource, specially a
FileResource
> >>to serve static HTML files.
> >>
> >>You can add them manually or (for start) simply read them from
> >>configuration file sites.cnf:
> >>
> >>SiteRegistry configureFrom: 'sites.cnf'
> >>
> >>Have a nice time
> >>Janko




Reply | Threaded
Open this post in threaded view
|

RE: Configuration question

Matthew Clark-4
In reply to this post by Matthew Clark-4
Gah.  The config file I was asking about didn't show up properly on the
sourceforge.net forum, I guess the site tried to interpret it as HTML,
so I'm resubmitting.

 Janko,
 
 I'll contribute where I can, though I'm not terribly adept at this sort
of
 thing (you should see my dissertation! ;-)
 
 One thing you could immediately help me with is the contents of
sites.cnf.
 The < SiteIdentifier > and < FileResource > tags are fairly self
evident, but I'm at a loss to understand what the < CompositeResource >
and
 < HelloWorldResource > settings are:
 
 < Site >
  < SiteIdentifier ip: '127.0.0.1' port: 8123 host: 'localhost' >
  < CompositeResource uriPattern: '/' >
   < CompositeResource uriPattern: 'foo' >
    < HelloWorldResource uriPattern: 'Howdy' >
   < /CompositeResource >
  < /CompositeResource >
  < FileResource uriPattern: '/' filePath: '.' >
 < /Site>

Matthew C. Clark, Ph.D.
Principle Software Engineer
Tandel Systems, LLC
MS-892
13350 US HWY 19 North
Clearwater, FL 33764-7290
(o) 727-539-3855
(f) 727- 539-4480