I dont have code, since this is very simple, the textbox you are refering to is most probably from a html page. so all you have to do is surround it with form tags, then in the action parameter place the url for the servlet, the button you can either have it as type submit or if it is of type button, add an onlick event then use document.formname.submit;
formname being the name of the form which surrounds the text box.
You dont put the full url in the action parameter unless you are submitting to a different server, if it is on the same server then
should suffice, but i am not sure how the servlet is accessed (this depends on your servlet mapping parameter in the web.xml file), so it could be the action as specified above or just "AddEventServlet"
Also if u have a submit type button there is no need for an onclick event.