View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Questions on Web Newspaper Milestone

See Spring 2000 Project Milestones


The turnin instructions say to turn in the source code electronically
by midnight, but it also says to turn in the source code as a hardcopy
to Guzdial's office by 4:30 p.m. Obviously, changes will probably
be made to the source code between 4:30 p.m. and midnight, so what is
the point of turning in the hardcopy at 4:30 p.m? Do we just turnin
the rest of the stuff as a hard copy (UML, CRC, html example, etc), or
do we need to turn in the final hardcopy of the source at 4:30 p.m.?

Matt Flagg

If you're using the EmbeddedServerAction class to serve files can you
embed a Morphic interface into HTML. If so, how? If not, what can you use, besides forms, to make an interface?
Charles West

Just forms, that's it. The embedded Smalltalk must return strings which are useful in an HTML form. Mark Guzdial

I modify ServerAction class so that
a.) defaultFile returns 'index.html'
b.) serverDirectory returns 'E:\ipub\webroot\'

E:\ipub\webroot\ contains my normal web site, and I would expect PWS to serve these pages when I execute:
PWS link: 'default' to: (ServerAction new).
PWS serveOnPort: 8080 loggingTo: 'weblog.txt'.


Alas! When I http to http://localhost:8080/index.html, the browser stalls and an error message is written to weblog ("a Socket[connected]: Error: getData timeout"). I'm using WindowsNT.

Anyone else encounter this? The request never makes it to ServerAction's #process: method. Is it necessary, by some bizarre chance, that "PWS initialize" or "Socket initializeNetwork" need to be executed prior to serving?
Stephen Bennett
NT should be able to find this fine. PWS initialize should already be done, but it's safe to repeat it. Try typing in your IP instead of localhost – it may be that that's not being processed correctly. What's your browser? Are you trying to serve to the same machine as the client? How about when you try from a different machine. Mark Guzdial
I doubt those factors should affect anything... the computer doesn't care how you get a socket connection. However, I did try your advice: no results. I am working now on tracing what happens when a connection is made.
Stephen Bennett

update: The exact same code works when executed on a linux box (albeit I get "page not found" errors because I haven't bothered to change the serverDirectory in ServerAction). On my NT box, the code seems to get hung up while executing
Socket waitForDataUntil:
. I'm hesitant to say this (because most of the time, programming mistakes are my fault, not that of the underlying system), but I think there is a problem with Squeak's network kernel. Will test on lab NT boxes.
Stephen Bennett
update: Apparently it works on the lab NT boxes, so I suppose something is foobar with my own box. If anyone runs into similar issues, let me know.
Stephen Bennett

I am runnnig NT4 SP5 Workstation, and I am having the exact same problem. Let me know if you find a fix!

Gary Herndon

Stephen, I know that you doubt that any of those factors matter. But I built the PWS and have been dealing with it for two years. These factors DO matter! Did you try to access the server running on your NT from another machine as client?
Mark Guzdial

Mark: You are correct in identifying my doubt. Doubting something, however, is not the same as disproving it, so I tried all of your suggestions. No dice.
Gary: I'm running sp5 also... The lab computers are running sp6a and they don't have this problem. Maybe we should download sp6a.
Stephen Bennett
Nope, that didn't work either. !@#!@$ Squeak, windows, etc.
Stephen Bennett



I am a little confused about the specifics of this milestone.
Is this interpretation correct?

The user opens a web browser and goes to the URL http://mycomputers.ip.edu:8080/newspaper. This page presents the user with two options, (i) to generate a newspaper or (ii) to deselect news sources and then generate a newspaper. For this milestone, the deselecting of news sources doesn't need to be functional. If the user chooses to generate a paper, the server responds by visiting all of the news source websites, generating a HTML newspaper, and then sending this HTML paper to the browser so that it can be viewed online.

j
m

The "mycomputers.ip.edu" means YOUR machine's IP address or name. The rest of it seems correct. Mark Guzdial

Ok, so I'm trying to get the PWS to serve simple files right now. I've downloaded the server.tar from Mark's acct, and have filed it in. After changing my serverDirectory, I type in

PWS link:'default' to: ServerAction new.
PWS serveOnPort:9000 loggingTo: 'log.txt'

I then try to access 'http://128.61.36.54:9000/index.html' from my local web browser. An index.html file exists there. I've tried different ports, and I've tried using r36h54.res.gatech.edu:9000 instead of my IP as well. The browser just sits there and spins. It says web site found, waiting for reply, and then just sits. I'm on a Win98 box. Any help?
Thanks,
David Jaggie


I have the same symptoms on my NT4 SP5 Workstation box.
Gary Herndon

You don't need the server.tar file to get the base PWS working. Why don't you insert some statements to show: to the Transcript when a request comes in? It may be that the request is never getting to Squeak. Mark Guzdial

It is possible that you have multiple listening sockets, somehow. Once you start a listening queue in Squeak, it never dies until explicitly killed. You can type the following to explicitly kill all listening queues. Then restart the server and see how it goes: ConnectionQueue allSubInstances do: [ :q | q destroy ] -Lex Spoon

We (Squeak Times) are confused about whether or not a final '/' is required (after .../newspaper in the url) to be entered by the user to access the web interface. We currently haven't found a way to make the page accessible unless a '/' is appended to the url. Is this allowed?

Think back to how PWS interprets URLs. If you have 'newspaper' as an action in the PWS actions table, then that action will be sent process: with the URL, even without the final /. Mark Guzdial

We (Squeak Times again) would like to know if there are any other "widgets" that we can use in our interface's forms besides checkboxes, drop-down-list-boxes (), and text fields. We'd love to be able to, say, have something like a PluggableButtonMorph that changes color when clicked on. Unfortunately, html doesn't appear to have anything like this (it's a very static language). Help!! Alternatively, creating images and imagemaps for every button click is ridiculous. Of course, a javascript interface would be the easy way, but this appears to be prohibited (is it really?) Also, must our interface be perfectly usable from Scamper and WebTVs? If so, does someone have access for us to use a WebTV to test our interface? On that note, should our interface be fully compatible with ALL browsers??? Who is our audience, and what kinds of browsers do they use?

I'd like it to work from Scamper. Mark Guzdial

I have found www.stars.com to be an ultra-helpful reference on all things HTML, including forms, and compatability/compliance issues.
Stephen Bennett



I'm having the exact same problem as some of the others listed above. I'm running Windows 98 and I'm trying to access the webserver from a different computer (my roomate's to be exact). I've tried accessing it via my IP address and the local host name, both yield the same results: Netscape just sits there with the message at the bottom of the screen saying "Connect: Host 128.61.51.63 contacted. Waiting for reply...". I know that the request is getting to Squeak because an entry is made in the log file every time I try to access the server. Each line in the log file reads "
Error: this should not happen
a Socket[connected]: Error: getData timeout". Any help would be appreciated.

I just asked on the PWS mailing list (pws@cc.gatech.edu, join by sending "subscribe pws" to majordomo@cc.gatech.edu) – there are several people running Win98 and Win95 with PWS on a stock Squeak 2.7 image with no problems. Mark Guzdial

Could this be a Resnet issue then? I took my image with me to the lab today and it worked fine. Then I came back to my W98 box and it just sat there doing the usual. This is one of the few differences that has not been brought up. It's kind of hard to believe I can get it to run universally if I can't get it to run on my own box.
David Jaggie

Same problem on Windows 95...

Ummm...How are we supposed to turn in a hard copy of our code during class time on a day when there are no CS2340 classes??? At just what time should we have e-mailed the code to our TA??? (March 24 == Friday) Matthew Wolenetz

Yup, I just noted this, too. Let's do the at-Mark's-door-by-4:30 schtick again... Mark Guzdial

Do we have to download any images for the web interface to the server and then serve them from there. Or could we just pass the url of the image on the original website, say some image on cnn.com, to the browser. That way it would be a little faster since you wouldn't have to transfer the image twice. Anthony Gelsomini

Discussed in class. Yes, just pass on the URL of the image on the original website and let them serve it. Mark Guzdial

I remember it being mentioned in class that it was perfectly fine to just pass the URL of the image on the original website to the browser. Roger Norris


I still would like someone to post what to do about the following error:
a Socket[connected]: Error: getData timeout

I've already tried the things mentioned above.

If it really is a timeout, you could try increasing the timeout value.... Ideal would be to fix the code so that it doesn't use timeouts :) but that may be too much trouble for one project. Increasing the timeout, though, should be easy. It's especially easy if you get the error in a pink notifier, because you can pop into a debugger and figure out what, exactly, was timing out. Of course, if the whole thing happens within 2 seconds, then it's probably not a timeout.... -Lex Spoon

I just got the below message from Andreas Raab (at Disney Imagineering, builds the Windows VMs for Squeak) in response to my queries – Mark Guzdial

From: "Raab, Andreas" 
To: pws@cc.gatech.edu
Subject: RE: [pws] Who's got PWS running on Win98?
Date: Mon, 20 Mar 2000 14:46:49 -0800
Sender: owner-pws@cc.gatech.edu
Reply-To: pws@cc.gatech.edu

Please make sure you are running the latest Win32 VM. There has been an
issue with incorrectly reporting socket status in one of the older VMs that
has been fixed since but it's possible that you've got an older VM that's
affected by this.

  - Andreas

A lot of people including myself have had connection problems... I installed nt4sp6, but that didn't fix it, then Win2000, but that didn't either. What finally fixed it was installing another copy of squeak with new .changes .images, and then filing in the code I needed. (Yes, you loose projects this way, but you gain web services).

Gary Herndon

I thought I had the latest version (all of my files said 2.7), but I downloaded 2.7 again (from a different ftp this time) and everything seems to work now. Thanks.

Roger Norris


You don't have to lose any projects. All I did was redownload Squeak 2.7 and copy the executable over the old one and everything works with the old image in Win98.

Jared Ivey


Holy #@@! That works! Yes!
Now can someone explain why?

David Jaggie

There were some NT-specific (and maybe Win98, too?) bugs that Andreas has been beating on, related to threads and network operation. Sounds like the latest VM squashed them. Mark Guzdial

So the Squeak.exe has a VM in it?
David Jaggie

Squeak.exe IS the VM! Mark Guzdial

Doh! Thought you were talking about the Win32 VM. ::Bashes head with wet noodle:: I have seen the light!
David Jaggie

I asked Andreas what happened in this VM, and here's his reply:
html

From: "Raab, Andreas"
To: pws@cc.gatech.edu
Subject: RE: [pws] Who's got PWS running on Win98?
Date: Tue, 21 Mar 2000 21:16:10 -0800
Sender: owner-pws@cc.gatech.edu
Reply-To: pws@cc.gatech.edu

The answer is simple: One bug less ;-)

Seriously, the issue was an incorrect interpretation of the select()
behavior on my part. Usually this isn't an issue if you run as a client
(e.g., what most people use) but when running a server it becomes noticable.
BTW, the thanks for this go to Michael Rueger since he found the problem and
pointed me to it.

Andreas




If you want to use the EmbeddedServerAction class to serve files, you first have to have a subdirectory in the serverDirectory that can be linked for the HTML files, right? If I create the directory myself in NT this works fine, but what about on the TA's machine? Can I count on the subdirectory "embedded" to be there? I cannot figure out how to create my own directory from Squeak, as of yet. Files, yes. Directories, no. Any help would be appreciated. Thanks.

Andrew Bentley

Re-read the assignment. You can provide us a tar/zip with files to be stored in a server directory. Also, see the AudioNotes case study for how to create a directory. Mark Guzdial
ALRIGHT, I've been in this computer lab for serveral hours and I can't even get PWS to serve up a couple of simple HTML pages.
If I changed my serverDirectory to contain
^ 'C:\Temp' "temp is where the pages reside"

Now I type
PWS link: 'default' to: ServerAction new.
PWS serveOnPort: 8080 loggingTo: 'log.txt'.

ISN'T THAT ALL I HAVE TO DO TO BE ABLE TO ACCESS PAGES IN THE 'C:\Temp' directory?

Now I type "http://manitoba-nt.cc.gatech.edu:8080/steve1.htm" into a few different browesers and I get
"Web Site found, waiting for reply."

I've tried all the obvious things like permissions and changing
'C:\Temp' to be '\Temp' 'c:\temp' 'c:\temp:' 'c:\temp\:' and then tried putting it on my Z drive.

I've read all the comments from the other people with this same problem. Frankly, it is a bunch of horse poo that I can't get this thing working. Anybody should be able to get this running without any problems. How are we supposed to get started if we can't even get the PWS to serve up pages? I go to class, read the book, and go over the lecture slides. From all this information, I should be able to get this thing running. I am follwing the instructions and they do not work.
Michael Emard

I FIGURED IT OUT! This is something that should have been yelled in class or in bold print in the book, but I guess I missed it. For some reason, you can only start PWS once when you start squeak. If you screw it up the first time. Stop it, change what you need to and then start it back up, it doesn't work. But if you exit squeak and then come back in and do it right, everything will be ok. That was a huge waste of four hours. I hope this saves somebody else the trouble I went through.

No, you can stop PWS with "PWS stopServer". I did say that in class, in fact, I did it live in class. (You also could have found it by reading the PWS class methods.) The reason why quitting works is that it's built into the shutdown code in Squeak to shutdown PWS if it's still running. Mark Guzdial

I'm not retarded. I have been using "PWS stopServer" and it doesn't seem to be working. I've been carful about it too. I don't know what is going on. Sometimes it works, but sometimes it doesn't. When it doesn't I just quit, start back up and it works. Maybe if you start PWS up, start it up again and then realize you forgot to stopServer you are already foobar from starting it up twice without stoping? The thing is, when I stopServer even after starting it up twice or something, the server does stop, but it won't start back up correctly. Maybe I need to stop before I do my editing. I've been starting up, deciding I want to change something, editing, stoping, then restarting. I'll do some testing, let me know if you are interested in what I figure out, if anything.


Are we allowed to implement our UI using frames?
Stephen Wong

Scamper doesn't support frames. Mark Guzdial


Is the website we have to access written in stone? Can I just make the first website accessed http://myIP:myport/embedded/my.html
instead of http://myIP:myport/my.html ? Or are you looking for more of a PWS application?
David Jaggie

I want a PWS application, at least to start. That way you explore the ideas of servlets. What you link to from that first page is up to you. Mark Guzdial


My group LINUX PROTOCOL MASTERS has used frames in our web design. I have read above that scamper does not support this. Are the TA's going to use IE or netscape? It looks very nice with frames thus the graphical interface is pretty good.

aaron
If they use Netscape 2.02 (which I like to use), will it work? I won't guarantee what client the TA's will use, and I strongly recommend that you serve to the lowest common denominator, i.e., Scamper. My suggestion is to dump the frames. If your UI won't work because the TA's don't use a frame-enabled client, you'll get no sympathy from me. Mark Guzdial


ok i have two questions.
question one: i set the 'default' to EmbeddedServerAction but when i goto http://mycomp:8080/ theres no page, but when i go to http://mycomp:8080/embedded/ it goes to the default. can embeddedserver action only serve pages in the embedded directory? if so is there anyway to change that?

Take a look at the process: method in EmbeddedServerAction. Look carefully at how it assembles the URL. Basically, it just uses the incoming path as-is – the directory name must match the action name. You can easily create a subclass of EmbeddedServerAction that does something different. Mark Guzdial

question two: mark you said that you want us to use a PWS application. does an page with embedded squeak code count as one or do we need to make a class with a process: method to be used to start the site off?

alex

I want http://blahblah:8080/newspaper to work. It's your call how you make it work. Mark Guzdial

ok now this is weird... .i change my process in my action class and i stop and restart the server. now you would expect that when i went back to the site it would pop up the new page but no... ok so i do cntrl-R which reloads the site just incase its checking the cached version and then it hangs! ok i go back and change the port and works wonderfully, so now to check updates i have to switch ports or it'll hang... any ideas why this is happening? any recommendations?

Never heard of that one. What's hanging? Put "Smalltalk beep" into your process: method so that you can hear when it starts, even if it's in the background. (If your platform supports background apps making noises.) You can also tell your client not to cache so that that's not a problem. Mark Guzdial

in this milestone, do we generate the newspaper for ALL the possible news sources or do we generate it for the sources previously selected by the user?

Alex Salazar

The ones selected by the user. Mark Guzdial


well it seems that scamper doesn't support select lists and reset buttons within forms.

Alex Salazar


i decided to do some work from home and now i'm running into some trouble. i start my server and then check my IP address through NetnameResolver and it gives me my network name. someone said it might be becuase i have two ethernet cards and it doesn't know which one to use. basically, i have ADSL running into by box and then i network out its access to the rest of my house's network. if anyone has any ideas please let me know

Alex Salazar

Silly question. We're using a mystring printString in our HTML file to display the news. Is there anyway to do so w/o getting the ' ' around the stories? I've used ( (myString withoutQuoting) printString), but that doesn't seem to work.

David Jaggie

Try (mystring printString) withoutQuoting

Jeff

Nope, doesn't work. Also, I'm getting ' as " in the text as well. Help?

David Jaggie


Link to this Page