W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1996

Re: An example for PostableResource wanted

From: Mark I. Lubin <mil@phys.physics.ucf.edu>
Date: Sun, 7 Jul 1996 23:54:13 -0500
Message-Id: <9607080454.AA00558@cmt.ucf.edu>
To: abaird@w3.org
Cc: www-jigsaw@w3.org

This form 

<STRONG>Please take a minute and complete the form about Jigsaw</STRONG>    
  <FORM METHOD="POST" ACTION="http://cmt.physics.ucf.edu:9999/User/survey">                
 Name: <INPUT NAME="name" SIZE=50><BR>
  Email Address: <INPUT NAME="email" SIZE=50><BR>
  <INPUT NAME="subject" TYPE="hidden" VALUE="COMMENTS"><P>
  Type whatever you wish about Jigsaw:<P>             
  <TEXTAREA NAME="content" ROWS=10 COLS=60></TEXTAREA> </P><P>
  Do you like Jigsaw?<P>
  <INPUT TYPE="radio" NAME="attitude" VALUE="Yes">Yes<BR>
  <INPUT TYPE="radio" NAME="attitude" VALUE="No">No<BR>
  <INPUT TYPE="submit" VALUE="send this survey">  
  <INPUT TYPE="reset"  VALUE="clear form and start over"> <BR>

and this code JigsawSurvey.java:

package w3c.jigsaw.contrib;

import java.util.*;

import w3c.jigsaw.http.*;
import w3c.jigsaw.forms.*;
import w3c.jigsaw.html.*;

public class JigsawSurvey extends PostableResource {

	public Reply handle(Request request, URLDecoder data) 
		throws HTTPException
    HtmlGenerator g = new HtmlGenerator("Jigsaw survey"); // set title
    g.append("<h1>The data you entered</h1>");
    g.append("<li>your name: ", data.getValue("name"));
    g.append("<li>your email: ", data.getValue("email"));
    g.append("<li>your comments: ", data.getValue("content"));
    g.append("<li>you attitude to Jigsaw: ", data.getValue("attitude"));
    // Add as many append as you want
    Reply reply = request.makeReply(HTTP.OK);
    return reply;

	public JigsawSurvey() {	


work together very nicely.
Thank you.
Received on Monday, 8 July 1996 00:53:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:29 UTC