Java mail function

How can i connect my form to an email using servlets/jsp.

What do u really intend doing? Sending an email from ur form ?
If u intend sending an email from ur form, check these links out

http://www.javacommerce.com/displaypage.jsp?name=javamail.sql&id=18274
http://www.java-samples.com/showtutorial.php?tutorialid=675
http://www.java-tips.org/java-ee-tips/javaserver-pages/sending-email-via-jsp-3.html