Automatic URL and email generation using Java -


i want generate email containing url( specific action subclass in struts 1.3 ).

questions :

  1. how generate email.
  2. how create url calls struts action controller. ?
  3. how hide jsp pages cannot called accidentally malforming url ?
  4. how call hidden jsp page using url described in question 2. ?

how approach problem ?

  1. to generate email, use javamail api... here's example: http://www.java-tips.org/other-api-tips/javamail/how-to-send-an-email-with-a-file-attachment.html
  2. if want user call struts url, hardcode url in email... example: http://server/app/confirmation.do
  3. your jsp files should placed under /web-inf folder no 1 can accidentally browse jsp files web. way user can resource through struts actions (*.do) , action determine jsp files displayed on screen.
  4. there's no need call it. when user clicks on struts link have constructed in #2, struts action gets mapped url automatically handle user request.

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -