Loading ...
Sorry, an error occurred while loading the content.

serving a website from the filesystem

Expand Messages
  • russellgum
    I have been thrashing around in the Frontier settings trying to serve web pages from files in addition to serving them via main responder. I m sure this is
    Message 1 of 8 , Oct 18, 2008
    • 0 Attachment
      I have been thrashing around in the Frontier settings trying to serve web pages from files in
      addition to serving them via main responder. I'm sure this is simple but the Server Settings
      where I can set up a domain path and object have me confused. After several attempts I still
      cannot get Frontier to serve up a webpage from a file. Even http://127.0.0.2/home.html
      gives me a server not responding error.

      I am using http://10.0.1.4:8080/app1080/ to serve up the default page for app1080MrWs in
      my mainresponder websites root.

      What do I need to do to serve up a file at a location like Big
      Mac:Library:WebServer:Documents:Webfarm:www:akafarm:maps:map.svg

      TIA

      Russ
    • Bill Kearney
      Using 127.0.0.2 would certainly NOT work. Localhost is 127.0.0.1
      Message 2 of 8 , Oct 18, 2008
      • 0 Attachment
        Using 127.0.0.2 would certainly NOT work. Localhost is 127.0.0.1

        ----- Original Message -----

        >I have been thrashing around in the Frontier settings trying to serve web
        >pages from files in
        > addition to serving them via main responder. I'm sure this is simple but
        > the Server Settings
        > where I can set up a domain path and object have me confused. After
        > several attempts I still
        > cannot get Frontier to serve up a webpage from a file. Even
        > http://127.0.0.2/home.html
        > gives me a server not responding error.
        >
        > I am using http://10.0.1.4:8080/app1080/ to serve up the default page for
        > app1080MrWs in
        > my mainresponder websites root.
        >
        > What do I need to do to serve up a file at a location like Big
        > Mac:Library:WebServer:Documents:Webfarm:www:akafarm:maps:map.svg
      • russellgum
        On the Preferences Server Settings The following is listed under the heading, Domains on this server 127.0.0.2: / :Guest Databases:www:attachments: folder I
        Message 3 of 8 , Oct 18, 2008
        • 0 Attachment
          On the Preferences>Server Settings The following is listed under the heading, Domains on
          this server

          127.0.0.2:
          / :Guest Databases:www:attachments: folder

          I think this is some sort of a default setup. But it does not work. It gives a server not
          responding error.

          ttp://127.0.0.1:8080/app1080/ does serve up the main responder website, but I need to
          figure out how to serve up a webpage from the file system.


          --- In frontierkernel@yahoogroups.com, "Bill Kearney" <ml2_yahoo@...> wrote:
          >
          > Using 127.0.0.2 would certainly NOT work. Localhost is 127.0.0.1
          >
          > ----- Original Message -----
          >
          > >I have been thrashing around in the Frontier settings trying to serve web
          > >pages from files in
          > > addition to serving them via main responder. I'm sure this is simple but
          > > the Server Settings
          > > where I can set up a domain path and object have me confused. After
          > > several attempts I still
          > > cannot get Frontier to serve up a webpage from a file. Even
          > > http://127.0.0.2/home.html
          > > gives me a server not responding error.
          > >
          > > I am using http://10.0.1.4:8080/app1080/ to serve up the default page for
          > > app1080MrWs in
          > > my mainresponder websites root.
          > >
          > > What do I need to do to serve up a file at a location like Big
          > > Mac:Library:WebServer:Documents:Webfarm:www:akafarm:maps:map.svg
          >
        • creecode
          Have you tried adding a filespec entry to a table in your website that points to the file you want to serve?
          Message 4 of 8 , Oct 19, 2008
          • 0 Attachment
            Have you tried adding a filespec entry to a table in your website that
            points to the file you want to serve?

            --- In frontierkernel@yahoogroups.com, "russellgum" <russgum@...> wrote:
            > I need to
            > figure out how to serve up a webpage from the file system.
          • russellgum
            This worked for simple files (jpeg or simple html files). However, as usual, what I am doing is more complicated. I am using iWeb to develop my website
            Message 5 of 8 , Oct 20, 2008
            • 0 Attachment
              This worked for simple files (jpeg or simple html files). However, as usual, what I am
              doing is more complicated. I am using iWeb to develop my website template. Then I use
              Frontier to update the images and web forms by replacing them in the filesystem with
              Frontier generated content. These files are then served with Apache from my webserver.
              When a client uses a form to modify their data a Frontier script in mainResponder website
              is called and the changes are made in the database and an updated set of files written to
              the iWeb site folder. This works just fine.

              Then I added an interactive svg file with an ajax script to one of the iweb pages. This
              created a security problem as the iWeb page was being served via Apache and the svg ajax
              was trying to use Frontier on a different port.

              If I try to serve the iWeb page from Frontier via a filespec the page is not rendered
              correctly, due to the way iWeb uses xml and javascript in their web pages. (At least I think
              that is the problem) I get an error of (Can't process the request because there is no object
              named "". ) The page works fine in Safari if I open the file directly from Safari.

              Is there a way to make a Frontier script an executable file that could be called directly via
              Apache and still be able to use the Frontier filesystem to store data?

              Any other suggestions on solving this problem? My current workaround is to link to the
              svg page stored in a mainresponder website. This works but I would like to be able to use
              the svg directly inside of my iWeb pages.





              --- In frontierkernel@yahoogroups.com, "creecode" <creecode@...> wrote:
              >
              > Have you tried adding a filespec entry to a table in your website that
              > points to the file you want to serve?
              >
              > --- In frontierkernel@yahoogroups.com, "russellgum" <russgum@> wrote:
              > > I need to
              > > figure out how to serve up a webpage from the file system.
              >
            • David Gewirtz
              I m not sure I fully understand what you re trying to do, but for Is there a way to make a Frontier script an executable file that could be called directly
              Message 6 of 8 , Oct 22, 2008
              • 0 Attachment
                I'm not sure I fully understand what you're trying to do, but for "Is
                there a way to make a Frontier script an executable file that could be
                called directly via Apache and still be able to use the Frontier
                filesystem to store data?" maybe you could try some form of RESTful query.

                When I need a PHP or Python process to get or put data into a Frontier
                ODB, I often use a variant of a REST call (OK, I just send parameters
                to a particular URL and extract them and process them), but it works
                pretty much the same. Performance has been surprisingly good.

                -- David


                --- In frontierkernel@yahoogroups.com, "russellgum" <russgum@...> wrote:
                >
                > This worked for simple files (jpeg or simple html files). However,
                as usual, what I am
                > doing is more complicated. I am using iWeb to develop my website
                template. Then I use
                > Frontier to update the images and web forms by replacing them in the
                filesystem with
                > Frontier generated content. These files are then served with Apache
                from my webserver.
                > When a client uses a form to modify their data a Frontier script in
                mainResponder website
                > is called and the changes are made in the database and an updated
                set of files written to
                > the iWeb site folder. This works just fine.
                >
                > Then I added an interactive svg file with an ajax script to one of
                the iweb pages. This
                > created a security problem as the iWeb page was being served via
                Apache and the svg ajax
                > was trying to use Frontier on a different port.
                >
                > If I try to serve the iWeb page from Frontier via a filespec the
                page is not rendered
                > correctly, due to the way iWeb uses xml and javascript in their web
                pages. (At least I think
                > that is the problem) I get an error of (Can't process the request
                because there is no object
                > named "". ) The page works fine in Safari if I open the file
                directly from Safari.
                >
                > Is there a way to make a Frontier script an executable file that
                could be called directly via
                > Apache and still be able to use the Frontier filesystem to store data?
                >
                > Any other suggestions on solving this problem? My current workaround
                is to link to the
                > svg page stored in a mainresponder website. This works but I would
                like to be able to use
                > the svg directly inside of my iWeb pages.
                >
                >
                >
                >
                >
                > --- In frontierkernel@yahoogroups.com, "creecode" <creecode@> wrote:
                > >
                > > Have you tried adding a filespec entry to a table in your website that
                > > points to the file you want to serve?
                > >
                > > --- In frontierkernel@yahoogroups.com, "russellgum" <russgum@> wrote:
                > > > I need to
                > > > figure out how to serve up a webpage from the file system.
                > >
                >
              • russellgum
                I guess that I could call a ruby or python process from my ajax inside of svg code and then have the ruby or python process pass the info on to my Frontier
                Message 7 of 8 , Oct 22, 2008
                • 0 Attachment
                  I guess that I could call a ruby or python process from my ajax inside of svg code and
                  then have the ruby or python process pass the info on to my Frontier script for processing.
                  This would remove the problem of having my ajax call go to a different port than the
                  webpage the svg is served on. I think this could work. Maybe it is time I learned Ruby. I
                  guess if I were really clever i could have Frontier send info back to ruby and then back to
                  the web page via ajax.

                  I am not so sure that this would be simpler than just using ruby and an sql database to do
                  what I need to do.

                  Here is what I am trying to do. I have a farm management system for large commercial
                  farms. (Think 10,000 acres, 15 sq. miles or so.) I have developed a GIS database system in
                  Frontier that uses field maps produced by frontier scripts as svg files. These svg pages are
                  interactive in that they display field information in response to mouse overs and can also
                  be used to input activities (fertilization for example) by clicking on a set of fields and then
                  using ajax to submit the fields selected list, to a Frontier script which then returns the
                  appropriate web form to enter the details for the activity. (type of fertilizer, rate and
                  method of application). If I serve the svg page directly from Frontier everything works fine.
                  If I serve the svg file from Apache that sends the ajax request to Frontier on a different
                  port I get a security error.

                  Serving the svg files directly from Frontier is not a major problem except for the fact that I
                  have been using iWeb to give my system better looking web pages, and Frontier does not
                  serve these pages. (At least not in my initial attempts)

                  Still diggin

                  Russ

                  --- In frontierkernel@yahoogroups.com, "David Gewirtz" <david@...> wrote:
                  >
                  > I'm not sure I fully understand what you're trying to do, but for "Is
                  > there a way to make a Frontier script an executable file that could be
                  > called directly via Apache and still be able to use the Frontier
                  > filesystem to store data?" maybe you could try some form of RESTful query.
                  >
                  > When I need a PHP or Python process to get or put data into a Frontier
                  > ODB, I often use a variant of a REST call (OK, I just send parameters
                  > to a particular URL and extract them and process them), but it works
                  > pretty much the same. Performance has been surprisingly good.
                  >
                  > -- David
                  >
                  >
                  > --- In frontierkernel@yahoogroups.com, "russellgum" <russgum@> wrote:
                  > >
                  > > This worked for simple files (jpeg or simple html files). However,
                  > as usual, what I am
                  > > doing is more complicated. I am using iWeb to develop my website
                  > template. Then I use
                  > > Frontier to update the images and web forms by replacing them in the
                  > filesystem with
                  > > Frontier generated content. These files are then served with Apache
                  > from my webserver.
                  > > When a client uses a form to modify their data a Frontier script in
                  > mainResponder website
                  > > is called and the changes are made in the database and an updated
                  > set of files written to
                  > > the iWeb site folder. This works just fine.
                  > >
                  > > Then I added an interactive svg file with an ajax script to one of
                  > the iweb pages. This
                  > > created a security problem as the iWeb page was being served via
                  > Apache and the svg ajax
                  > > was trying to use Frontier on a different port.
                  > >
                  > > If I try to serve the iWeb page from Frontier via a filespec the
                  > page is not rendered
                  > > correctly, due to the way iWeb uses xml and javascript in their web
                  > pages. (At least I think
                  > > that is the problem) I get an error of (Can't process the request
                  > because there is no object
                  > > named "". ) The page works fine in Safari if I open the file
                  > directly from Safari.
                  > >
                  > > Is there a way to make a Frontier script an executable file that
                  > could be called directly via
                  > > Apache and still be able to use the Frontier filesystem to store data?
                  > >
                  > > Any other suggestions on solving this problem? My current workaround
                  > is to link to the
                  > > svg page stored in a mainresponder website. This works but I would
                  > like to be able to use
                  > > the svg directly inside of my iWeb pages.
                  > >
                  > >
                  > >
                  > >
                  > >
                  > > --- In frontierkernel@yahoogroups.com, "creecode" <creecode@> wrote:
                  > > >
                  > > > Have you tried adding a filespec entry to a table in your website that
                  > > > points to the file you want to serve?
                  > > >
                  > > > --- In frontierkernel@yahoogroups.com, "russellgum" <russgum@> wrote:
                  > > > > I need to
                  > > > > figure out how to serve up a webpage from the file system.
                  > > >
                  > >
                  >
                • Scott S. Lawton
                  ... If it s important for Apache to be the front-end, then surely there s some way for it to invoke Frontier? Though I can t say I ve tried it. With Python, I
                  Message 8 of 8 , Oct 22, 2008
                  • 0 Attachment
                    > I guess that I could call a ruby or python process from my ajax
                    > inside of svg code and
                    > then have the ruby or python process pass the info on to my
                    > Frontier script for processing.
                    > This would remove the problem of having my ajax call go to a
                    > different port than the
                    > webpage the svg is served on.
                    >
                    If it's important for Apache to be the front-end, then surely there's
                    some way for it to invoke Frontier? Though I can't say I've tried it.

                    With Python, I assume you would create a tiny script that was invoked
                    by mod_python and just sent an HTTP request to Frontier? That should
                    work.

                    (Obviously lots of people like Ruby, though Python is closer to
                    Usertalk.)

                    > I am not so sure that this would be simpler than just using ruby
                    > and an sql database to do
                    > what I need to do.
                    >
                    Depends on how much code you have in Frontier.

                    In any case: why not have Frontier as the front end? It can call
                    back to Apache if appropriate. Unless your site gets huge traffic,
                    it should be plenty fast enough.

                    As for the original issue: it should be "easy"* to serve files from
                    the file system if you're willing to either:

                    - spend some quality time single-stepping through mainresponder to
                    find the problem and/or add a tiny bit of custom code

                    - replacing mainresponder with something simpler (like my simple
                    responder; see http://frontierkernel.org/download) ... though that
                    only works if you don't want the fancy stuff that mainresponder gives
                    you (glossaries and such)

                    Years ago I made extensive changes to mainresponder before throwing
                    it out and starting over.

                    * easy = very little code, though may take awhile to find the right
                    place to flip a switch or add some code

                    Cheers,

                    Scott
                  Your message has been successfully submitted and would be delivered to recipients shortly.