Update of /cvsroot/jwebunit/jWebUnit/testcases
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4385/testcases

Added Files:
        params.jsp 
Log Message:
Added JSP for asserting submitted request parameters. Used that to fix the 
checkboxes test to validate submitted form.

--- NEW FILE: params.jsp ---
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
</head>
<body>
<p>Parameters are:</p>
<p>
<%
        /* Prints POST and GET parameters as name=value1[,value2...] separated 
with spaces */
        java.util.Enumeration params = request.getParameterNames();
        for (; params.hasMoreElements() ;) {
        String p = params.nextElement().toString();
                String[] v = request.getParameterValues(p);
                out.write(" " + p + "=");
                int n = v.length;
                if (n > 0) {
                        out.write(v[0]);
                        for (int i = 1; i < n; i++) {
                                out.write("," + v[i]); 
                        }
                }
    }
        out.write(" ");
%>
</p>
</body>
</html>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to