
Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
> On Tue, 23 Oct 2007 19:38:03 -0700, "teser3@hotmail.com"
> <teser3@hotmail.com> wrote, quoted or indirectly quoted someone who
[quoted text clipped - 7 lines]
> render it and send the data, something I suspect most email programs
> would be reluctant to do.
Either you or I misinterpreted what the OP wanted. I understood him
wanting to have a web page with a form, that when he submitted it, an
e-mail was generated from the values in the form.
I didn't reply earlier, because I didn't feel like explaining the
processes of form submission, and how to retrieve the query args from
the request object, and then also connect to the JavaMail API to send
e-mail.
Hopefully, they can look into the JavaMail API themselves, and figure
out what they want to do.

Signature
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
teser3@hotmail.com - 25 Oct 2007 18:11 GMT
Thanks, I am sending form info to people using JavaMail API.
I wanted to use getParameterMap() and Enumeration but it seems to
randomly
place the values in micleaneous order:
First Name: Joe
Last Name: Smith
City: Dallas
State: Texas
ends up looking like this sometimes:
City: Dallas
First Name: Joe
State: Texas
Last Name: Smith
Daniel Pitts - 25 Oct 2007 22:25 GMT
> Thanks, I am sending form info to people using JavaMail API.
>
[quoted text clipped - 12 lines]
> State: Texas
> Last Name: Smith
Form submission doesn't guaranty order of form elements. Neither does
the Map interface. If you know before hand what the value are, then you
can do something like this:
private static final List<String> keys = Arrays.asList("First Name",
"Last Name", "City", "State");
public void printValues(Map<String, String> map) {
for (String key: keys) {
System.out.println(key + ": " + map.get(key));
}
}
HTH.

Signature
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
Lew - 25 Oct 2007 23:07 GMT
teser3@hotmail.com wrote:
>> Thanks, I am sending form info to people using JavaMail API.
>>
>> I wanted to use getParameterMap() and Enumeration but it seems to
>> randomly
>> place the values in micleaneous order:
How are you getting an Enumeration? There is no method in java.util.Map to
return an Enumeration.

Signature
Lew
Roedy Green - 25 Oct 2007 20:21 GMT
On Wed, 24 Oct 2007 09:22:46 -0700, Daniel Pitts
<newsgroup.spamfilter@virtualinfinity.net> wrote, quoted or indirectly
quoted someone who said :
>Either you or I misinterpreted what the OP wanted. I understood him
>wanting to have a web page with a form, that when he submitted it, an
>e-mail was generated from the values in the form.
I thought he wanted to send somebody an email with an embedded form.
The user would enter data and it would be sent to a server.
For email generated from values in a form, see
http://mindprod.com/jgloss/javamail.html

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com