Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Send Form info  RSS feed

 
Joseph Smithern
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Form with 10 fields on it and I need to send an email with all 10 field values.

The form will pass the values to a Servlet which will call a JavaBean class that will get the values and the email (JavaMail located in an email helper class) part will be called in the Servelt to send the JavaBean values. I assume I will also have to use the getMetaData method to get the field names?

I dont have Struts or Sprint on my Tomcat 4.1.27 container.

Is this the right direction where the Email output will be similiar to this:
First Name: Joe
Last Name: Smith
City: Dallas
State: Texas
....
[ October 23, 2007: Message edited by: Joseph Smithern ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Joseph Smithern:
I assume I will also have to use the getMetaData method to get the field names?

getMetaData?

What's that a method of?

What I'd do is to obtain a Map of the request parameters to send to a utility class that woudl handle formatting and sending the mail. The servlet should have no reponsibility beyond marshalling the data and directing the efforts of other classes.
[ October 23, 2007: Message edited by: Bear Bibeault ]
 
Joseph Smithern
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

What I'd do is to obtain a Map of the request parameters to send to a utility class that woudl handle formatting and sending the mail. The servlet should have no reponsibility beyond marshalling the data and directing the efforts of other classes.


Thanks for quick response and providing my direction.

The Servlet marshalling means it will be controlling/telling what classes to call

Sort of like this:

[ October 23, 2007: Message edited by: Joseph Smithern ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!