I think I have found a bug with the Orion Server talking to a CGI program like
Cold Fusion.  I need this bug fixed before I can pursue its adoption as I think
this is a fairly fundamental problem...  I am running Orion Server 1.3.8 on
Windows 2000, using Sun's JDK 1.3.  I have Cold Fusion Enterprise Server 4.5.1
installed.

Consider the following snippet of jsp code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
     <title>Duplicate Input Bug Test</title>
</head>

<body>
1. Last set of degrees were: <%=request.getParameter("Degrees")%>
<hr>
2. Last set of degrees were: <%
String [] aValues = request.getParameterValues("Degrees");
if (null != aValues)
{
     for (int i = 0; i < aValues.length; i++)
     {
          %><li><%=aValues[i]%><%
     }
}
%>
<hr>
<form action="DupInputTest.jsp">
Check the degrees that you have:
<input type="checkbox" name="Degrees" value="BSC">B.Sc
<input type="checkbox" name="Degrees" value="BA">B.A.
<input type="checkbox" name="Degrees" value="MSC">M.Sc
<input type="checkbox" name="Degrees" value="MA">M.A.
<input type="checkbox" name="Degrees" value="PHD">PhD
<input type="Submit">
</form>
</body>
</html>

This is a classic example of a "check all that applies" form.  In this case, we
have an array of checkbox inputs where the user is supposed to click the degrees
that the user has.  This JSP code functions okay.  If you pick multiple degrees,
then click Submit, notice that the first output (which uses getParameter) only
displays the first degree selection while the second output (which uses
getParameterValues) displays the entire set.

My problem is with the CGI link that must be used for Cold Fusion.  Consider a
similar example in Cold Fusion:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<cfparam name="Degrees" default="">

<html>
<head>
     <title>Duplicate Input Bug Test</title>
</head>

<body>
Last set of degrees were:
<cfoutput>#Degrees#</cfoutput>
<form action="DupInputTest.cfm">
Check the degrees that you have:
<input type="checkbox" name="Degrees" value="BSC">B.Sc
<input type="checkbox" name="Degrees" value="BA">B.A.
<input type="checkbox" name="Degrees" value="MSC">M.Sc
<input type="checkbox" name="Degrees" value="MA">M.A.
<input type="checkbox" name="Degrees" value="PHD">PhD
<input type="Submit">
</form>
</body>
</html>

I have Orion Server configured to send CFM requests to CFML via the CGIServlet:

<servlet auto-reload="false">
     <servlet-name>cfm</servlet-name>
     <servlet-class>com.evermind.server.http.CGIServlet</servlet-class>
     <init-param>
          <param-name>interpreter</param-name>
          <param-value>cfml</param-value>
     </init-param>
</servlet>

<servlet-mapping>
     <servlet-name>cfm</servlet-name>
     <url-pattern>/*.cfm</url-pattern>
</servlet-mapping>


The problem is that the parameters that are sent to CGI look something like:

     Degrees=BSCDegrees=BADegrees=MSCDegrees=MADegrees=PHD

Unfortunately, this can not be correctly parsed!  In Cold Fusion, I only have a
getParameter equivalent (like the first output in the JSP example), not a
getParameterValues equivalent (like the second output in the JSP example).  Even
parsing the above string would be difficult, if not near impossible under all
circumstances.

The default method for a form is to GET (not POST).  Either method produces
similar results.

Using Apache, the parameter being sent to Cold Fusion look something like:

     Degrees=BSC,BA,MSC,MA,PHD

Basically, the web server converts the multiple values into a comma-separated
list.  I need this kind of functionality provided by the CGIServlet.  Anybody
have any idea how this could be done?

Anybody thought about building a ColdFusionServlet that might make this process
a little better?


Thanks for your feedback,


Anthony


******************************************************************************

This e-mail message is intended solely for the use of the addressee. The message
may contain information that is privileged and confidential.  Disclosure to
anyone other than the intended recipient is prohibited. If you are not the
intended recipient, please do not disseminate, distribute or copy this
communication, by e-mail or otherwise. Instead, please notify us immediately by
return e-mail (including the original message with your reply) and then delete
and discard all copies of the message.

We  have taken precautions to minimize the risk of transmitting software viruses
but nevertheless advise you to carry out your own virus checks on any attachment
to  this  message.   We  accept  no  liability  for any loss or damage caused by
software viruses.

******************************************************************************



Reply via email to