Hi all,
I have written some code that "is supposed" to read in form parameters
and then spit out a new html page with some of the parameters sent back
down (like the cookie concept).
It does the html page fine, but it doesn't ever read in the Parameter
values. I have tested this by initializing the variable to some string
that I could see on the browser output. It never changes from what it
is initialized to. I am using Websphere 2.0 on an As/400.
Here is some of the code:
Thanks!!!!
public void returnPage(HttpServletRequest req, HttpServletResponse
resp)
throws ServletException, IOException
{
doPost (req, resp);
resp.setContentType("text/html");
java.io.PrintWriter out = new
java.io.PrintWriter(resp.getOutputStream());
String values[];
out.println("<html>");
out.println("<head>");
out.println("</head>");
String customerid= " ";
values = req.getParameterValues("Customer_ID"); //Customer_ID
is name of field coming in
if (values !=null) {
customerid= values[0];
}
out.println("<table 0 cellpadding=5 width=525 cellspacing=1
border=1> <tr valign=top>");
out.println("<td width=109> <div align=left>
");
out.println("<p><font face=Arial, Helvetica, sans-serif size=2
color=#0000A0>Customer ID: " + customerid + "<br>");
out.println("</font><font face=Arial, Helvetica, sans-serif
size=2 color=#0000A0></div>");
String company = " ";
values = req.getParameterValues("Company_Name");
if (values !=null) {
company = values[0];
}
out.println("<td width=131><div align=left> <font face=Arial,
Helvetica, sans-serif size=2 color=#0000A0>Company Name: " + company +
"<br>");
out.println("</font></div> </tr>");
out.println("</table>");
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html