• 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

sending to email using JSP

 
Ranch Hand
Posts: 1021
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear experts,

I got the following sample code by googling...






My question is what is uri="/blx.tld" ?

I can't figure it out.....and hope somebody who is experienced here can tell me what is this uri about? Can I just follow this code and the message will be sent to my designated email if I change the email address to my email address?
 
Sheriff
Posts: 7135
1360
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

tangara goh wrote:My question is what is uri="/blx.tld" ?


It is the URI for a JSP Tag Library Descriptor. Have a look at this tutorial for more details.

tangara goh wrote:Can I just follow this code and the message will be sent to my designated email if I change the email address to my email address?


No. You should not even try that.
JSP pages are to be used as viewer components - you should never use it for any other purposes, data processing, mail sending, or whatever. Basically, there should not be any java code inside a JSP.
You should choose a servlet for handling the request coming from the client, and use some business components (at least, a separate java class) for the mail sending purpose. After the mail has sent, the Servlet can dispatch the request to a JSP which shows a message stating that the mail has sent.

For the business logic of sending emails, you may use some API/Framework - Javamail is one of such API.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic