(SERVLET ERROR
) (string-append ((eval proc )request response httpservlet )) filename = "/home/tim/jetty-4.2.21/webapps/tutorial/text/forms.html" body0 = "#[\n(let ()\n (define (htmldemo rows tgt text)\n {<div style=\"text-align:center; \n back... body = (!#{} "" (let () (define (htmldemo rows tgt text) (!{} "<div style=\"text-align:center; \n ba... proc = (lambda (request response httpservlet) (let ((b (!#{} "" (let () (define (htmldemo rows tgt text) (!... request = /tutorial+/text/forms.html+null GET /tutorial/text/forms.html HTTP/1.1 x-cc-id: ccc04-02 Host: pop... response = HTTP/1.1 200 OK Date: Mon, 23 Nov 2009 06:07:27 GMT Server: Jetty/4.2.21 (Linux/2.4.21-58.ELsmp i3... read-all = (lambda ?? (in)...) doGet = (lambda ?? (request response)...) doPost = (lambda ?? (request response)...) httpservlet = jschemeweb.SchemeServlet@1684e26 ==================================== ((lambda ?? (b)...) (!#{} "" ((lambda ?? ()...) )"\n" )) request = /tutorial+/text/forms.html+null GET /tutorial/text/forms.html HTTP/1.1 x-cc-id: ccc04-02 Host: pop... response = HTTP/1.1 200 OK Date: Mon, 23 Nov 2009 06:07:27 GMT Server: Jetty/4.2.21 (Linux/2.4.21-58.ELsmp i3... httpservlet = jschemeweb.SchemeServlet@1684e26 ==================================== (!#{} "" ((lambda ?? ()...) )"\n" ) request = /tutorial+/text/forms.html+null GET /tutorial/text/forms.html HTTP/1.1 x-cc-id: ccc04-02 Host: pop... response = HTTP/1.1 200 OK Date: Mon, 23 Nov 2009 06:07:27 GMT Server: Jetty/4.2.21 (Linux/2.4.21-58.ELsmp i3... httpservlet = jschemeweb.SchemeServlet@1684e26 ==================================== (webpage text "HTML forms" (!{} "\n<div>\n<h1>\nHTML Forms \n</h1>\n\n<p>\n<a href=\"http://www.w3.org/TR/html4/interact/forms.html\">\nHTML forms \n</a>\nprovide a mechanism for soliciting information from the user and sending\nit to the server. \n\nThere are three main HTML elements for getting input from the user:\n<code> input</code>, <code> select</code>, and <code> textarea</code>. Each of these\nelements must have a <code> name</code> parameter which gives a name to the\ndata that is sent to the server. The server will then use this name\nto determine how to handle the data.\n\n<b>The <code> input</code> element</b><br />\nThe input element has several variants including checkboxes, textfields,\nand file browers. We describe the most common variants below.\nAll of these variants have the following form:\n<xmp class=\"example\">\n\n <input type=TYPE name=\"NAME\" value=\"VALUE\" size=SIZE>\n\n\nObserve that there is no close tag for the input element.\nThe type attribute can have one of the following values:\n text, password, checkbox, radio, submit, reset, file, hidden, image, button.\n

\n\n

\nThe text and password variants create a textfield in which the user can\nenter characters. The initial size is SIZE characters and the textfield\nis initialized with the string of characters in \"VALUE\". The password\nvariant displays asterisks for each character typed by the user.\n

\n\n

\nThe checkbox and radio variants create checkable buttons.\nIf a button is checked, then its \"VALUE\" will be sent to the server.\nSeveral buttons can have the same name, in which case the server will\nreceive several values for that name. The radio variant allows\nthe user to check at most one of the buttons that share the same name.\n

\n\n

\nThe submit variant sends the data to the server when it is pressed\nand the reset variant sets all fields in the form to their\ninitial values.\n

\n\n

\nThe last four are more specialized and won't be discussed in detail here:\n file is used for selecting a file on the users disk,\n hidden is an element that doesn't appear on the webpage (but still\nspecifies a value to be sent to the server), \n image specifies a graphical submit button, and button\nis used for client-side scripting, which we do not discuss here.\n

\n\n\n\n\n\n\n\n\n\n\n
\n\n Your user agent does not support frames or\nis not configured to display frames.\n\n\n" (htmldemo 30 "a" (!#{} "\n\n \n

HTML Form Demo --- the input elements

\n
\n \n \n \n text:
\n password:
\n submit:
\n reset:
\n image:
\n checkboxes:\n
    \n
  • box a
  • \n
  • box b
  • \n
\n radio buttons:\n
    \n
  • radio a
  • \n
  • radio b
  • \n
\n\n
\n\n\n" ))"\n
\n
\n\n\n

\nSubmitting the above form sends an email to the specified unet id, that lists the values\nof all of the parameters. A typical example is shown below:\n\nFrom: cs2a@brandeis.edu\nSubject: SUBJ:demo\nDate: September 22, 2004 8:35:22 AM EDT\nTo: tjhickey@brandeis.edu\n\nThe parameters and values are as follows:\n\nparam:checkb\n \"a\"\n \"b\"\n\nparam:subj\n \"demo\"\n\nparam:unetid\n \"tjhickey\"\n\nparam:imagesubmit.y\n \"31\"\n\nparam:pw\n \"JB007\"\n\nparam:link\n \"../text/forms.html\"\n\nparam:abc\n \"demo\"\n\nparam:rad\n \"a\"\n\nparam:imagesubmit.x\n \"48\"\n\n\n\n\n The textarea element
\nThis element is used for soliciting multiline input from the user,\nit has the form\n\n\n <textarea name=NAME rows=ROWS cols=COLS>\n initial text goes\n here\n </textarea>\n\n\nIn addition to the name, you must specify the size of the\ntextarea in rows and columns. \n\n The select element
\nThe select element is used to provide a fixed list of choices from which the user\nmust choose. It has the form:\n\n\n <select name=NAME size=SIZE multiple>\n <option value=V1> A1</option>\n <option value=V2> A2</option>\n ...\n <option value=Vn> An</option>\n </select>\n\n\nIf the multiple keyword is present in the attribute list of the select\nelement, then the user is allowed to select several of the options simultaenously;\notherwise, the user can only select one. The value attributes in the\n option elements are sent to the server if the item is selected. \nIf there is no value attribute then the text between the option tags\nis sent in its place.\n \n\n

\n\n\n\n\n\n\n
\n\n Your user agent does not support frames or\nis not configured to display frames.\n\n\n" (htmldemo 30 "b" (!#{} "\n\n \n

HTML Form Demo -- textarea and select

\n
\n \n \n \n\n

Demo of select and textarea form elements

\n
\n
\n
\n Choose your majors or minors:\n \n


\n
\n the end!\n
\n\n" ))"\n
\nTry modifying the example above to add a textarea input...\n

\n <textarea name=\"comments\" rows=\"15\" cols=\"80\" style=\"background:rgb(200,200,255)\">\nEnter Comments here:\n </textarea>\n\n\n\n\n\n" )) htmldemo = (lambda ?? (rows tgt text)...) request = /tutorial+/text/forms.html+null GET /tutorial/text/forms.html HTTP/1.1 x-cc-id: ccc04-02 Host: pop... response = HTTP/1.1 200 OK Date: Mon, 23 Nov 2009 06:07:27 GMT Server: Jetty/4.2.21 (Linux/2.4.21-58.ELsmp i3... httpservlet = jschemeweb.SchemeServlet@1684e26 ==================================== SchemeException: ERROR: undefined variable "webpage" ()