File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes invoking mailto: URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "invoking mailto: URL" Watch "invoking mailto: URL" New topic

invoking mailto: URL

Rob Loft

Joined: Mar 02, 2001
Posts: 5
i am using a choice box in my html page - each choice should pop-up the users default email and set a new message to the specified account.
i have named my SELECT form choicebox. i use the ServletRequest getParameter() to retrieve the selected value - then i use SerletResponse sendRedirect(String url) to redirect to the mail client - ie
but nothing happens - any ideas pls?
karl koch
Ranch Hand

Joined: May 25, 2001
Posts: 388
i cant offer you a clean explanation why i doesnt work. but what about a dirty workaround :-) ?
ou could send a redirect to some page which opens the eMail link by JavaScript. you can pass the eMail address as parameter or create the page as a JSP ??!!
have fun..
Rob Loft

Joined: Mar 02, 2001
Posts: 5
chrs - do you have any tips on the javascript side as i am very new to it? how would i pop up the clients default mail on their screen?
Rob Loft

Joined: Mar 02, 2001
Posts: 5
not a problem - sorted it with cool bit of javascript!
It is sorta covered in the JavaRanch Style Guide.
subject: invoking mailto: URL