• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help w/ Web Form & mail submission

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic