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

Help w/ Web Form & mail submission  RSS feed

 
thomas weaver
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. Let me start out with I am a very novice Java user. I have been given then task of creating a system that will provide my SAP Help Desk with required info to create a ticket. It has to be on the JavaEE platform.

So I need some guidance in the general direction of where I need to go and maybe even some examples or other information that would be helpful. I am on a bit of a time line here.

So far I have been able to piece together a generic idea of what I need but nothing more. I am thinking that I need JavaMail on the back end. On the front end I will need a HTML form. I also have a slight idea i will need a bean sitting in between the two. This is all I have been able to figure out over the last few days. I am running Java App Server 9 and Java EE 5 SDK. I have been able to gain access to the server from a outside, local to the network, machine. Any further configuration I have not done because I do not know what I am doing.

Im sure that some of the info I need is provided in the subject but I assume not all of it will be. Please do not delete this but just move it to the appropriate topic.

Thanks for all your help
---Kamikazipunk
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Close, but here's some more info.

1) Your form will be in a JSP (or HTML if no dynamic elements are required -- but you usually at least need the context path for the form action, so a JSP is more customary). These days, the JSP should contain no Java.

2) The form submits to a servlet for processing. Whether the servlet grabs the submitted information and stuffs it into a bean or not is a matter of design. A bean may not be necessary for simple operations.

3) The servlet either uses JavaMail to send the message, or better yet, delegates the sending of the message to a re-usable class that handles it.

4) The servlet redirects to the next JSP to be displayed (or the page controller for that JSP, if appropriate) presumably with a "Congrats! Your message is on its way" message.

Things can get a lot more complicated (usage of Ajax for example), but that's the straight-forward, canonical pattern that should get you going.
[ December 04, 2008: Message edited by: Bear Bibeault ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!