Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

sending to email using JSP

 
Ranch Hand
Posts: 873
  • 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: 6914
1314
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.
 
Destroy anything that stands in your way. Except this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic