How to (or can i) run a class with main() from a servlet??
i want to take input from a html page and insert data into a database using hibernate.
-i have an annotated class.
-a class having main(), running which inserts the data into the database.
-and a servlet with post method code:
String input_from_html=request.getParameter("input_from_html");
I need to put the data 'input_from_html' to the class with main() and run the class,which should happen once the submit button in the html page is pressed.
Aucun commentaire:
Enregistrer un commentaire