[plt-scheme] Re: Newbie question about PLT web application

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Apr 21 20:27:57 EDT 2009

You don't really need the second line.

Jay

On Tue, Apr 21, 2009 at 6:27 PM, gad vatsi <gadva1g at gmail.com> wrote:
> I tried what John mentioned, and got a connection failed error after about
> 10-15 seconds.
> I also included serve/servlet and add #:listen-ip
> #f at the bottom of my application. The documentation also says to change
> the top of my application from
>
>   #lang web-server/insta
>
> to
>
>  (require web-server/servlet)
>  (provide/contract (start (request? . -> . response/c)))
>
> but I'm not sure what the second line is doing, if that is a correct syntax
> or not or if I should change/add something to that line, and it is causing
> an error saying something like (undefined module in responce/c. )
>
> I'm providing the code that I'm using in case anyone has the time to take a
> look and see if there is something I'm doing wrong.
>
> Thanks,
>
> On Tue, Apr 21, 2009 at 7:33 AM, Jay McCarthy <jay.mccarthy at gmail.com>
> wrote:
>>
>> Another thing to do is to switch to serve/servlet and add #:listen-ip
>> #f to the arguments.
>>
>> Jay
>>
>> On Mon, Apr 20, 2009 at 10:02 PM, John Clements
>> <clements at brinckerhoff.org> wrote:
>> >
>> > On Apr 18, 2009, at 10:20 PM, gadva wrote:
>> >
>> >> Thanks for the quick reply,
>> >>
>> >> Sorry If I was unclear with the question, I just haven't had that much
>> >> experience with setting up a web server before, and with networking in
>> >> general so I'm not sure about the right terminology yet.
>> >>
>> >> I guess my question was how to setup the application to serve requests
>> >> to users connecting to my server by typing
>> >> http://serverIP:8000/myapplication.ss.
>> >>
>> >> Because right now when I test it on a browser from within the server
>> >> it runs ok, but when I attempt to connect from a different computer it
>> >> does not work. So by using the code described above (and in the PLT
>> >> Blog Application example from the website) (basically using web-sever/
>> >> insta, serve/servlet) I am running the application on a selected port,
>> >> so when a user connects to my IP adress with the correct port etc
>> >> shouldn't the web server accept a request and respond with the HTML
>> >> page that I define?
>> >
>> > Speaking very generally, yes.
>> >
>> > My guess is that the external requests are not reaching your web server,
>> > either because of a software firewall or because of an external network
>> > firewall.
>> >
>> > One easy test is to try to contact the your PLT web server on the given
>> > port
>> > using a simple telnet client from another machine, e.g.:
>> >
>> > my-other-machine% telnet serverIP 8000
>> >
>> > If it goes through... well, I'd be surprised.  My guess is that it will
>> > fail, but it can fail in two very different ways: most firewalls refuse
>> > to
>> > answer entirely, in order to increase the cost of port scanning.  So if
>> > you
>> > get an immediate "server is not answering" message, then there's
>> > probably no
>> > firewall in place.  If you just get a stalled telnet, then there's
>> > probably
>> > a firewall in place.
>> >
>> > FWIW, there are about 150 things that could be going wrong here; my
>> > confidence that I'm steering you in the right direction is only slightly
>> > higher than 50%.
>> >
>> > All the best,
>> >
>> > John Clements
>> >
>> >
>> >
>> > _________________________________________________
>> >  For list-related administrative tasks:
>> >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>> >
>> >
>>
>>
>>
>> --
>> Jay McCarthy <jay at cs.byu.edu>
>> Assistant Professor / Brigham Young University
>> http://teammccarthy.org/jay
>>
>> "The glory of God is Intelligence" - D&C 93
>
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.