I have having problems with the relatively trival <bean:cookie> tag. Here 
is what I have:

  <bean:cookie id="phonecookie" name="checkout_phone" />
  <input type="text" name="phone" value="<bean:write name="phonecookie"/>" />

The value I get in the form is:
javax.servlet.http.Cookie@72428d

Very strange. I tested to see if my cookie was set properly:

<%  Cookie cookies[] = request.getCookies();
       String phonecookie = "nothing";
       for (int i=0; i < cookies.length; i++) {
        if (cookies[i].getName().equalsIgnoreCase("checkout_phone"))
          phonecookie = cookies[i].getValue();
       }
%>

<input type="text" name="phone" value="<%=phonecookie%>" />

And I obtained the proper value.

Thanks for any help.

-allen-

Reply via email to