0

I can't find information how do I pass HTML5 form data to Java JDBC. I found only information how to do it with plain JSP:

https://netbeans.org/kb/docs/web/quickstart-webapps.html

Can anyone suggest any tutorial that explains this clearly? I have found mostly for Desktop applications, not for webapp.

Kasinaat 007
  • 124
  • 14
Luke_Nuke
  • 461
  • 2
  • 6
  • 23
  • 1
    What have you tried? Can't you use any HTML framework and pass HTML-`String`s to/from your database? – deHaar Jun 20 '18 at 12:20
  • 1
    You can use servlets instead or else please elaborate the issue you are facing Why do you want to acheive this? – Kasinaat 007 Jun 20 '18 at 12:26
  • I want to pass data from the HTML5 form (this is space booking web app) then I want to use Java to check if space is available in the given time if do put the record into MySQL if not return info for the user. I've done this in PHP and want to make the same in Java. In PHP it was straightforward -> send HTML5 form into PHP -> connect to DB and do operations -> return info. I'm struggling to find tutorial for Java how to do it and large amount of options JSP JDBC/ – Luke_Nuke Jun 20 '18 at 12:47
  • 1
    In plain Java you will use either `JSP/servlet` (old web framework) or `JSF` (new web framework) to send an HTML form to the server and then you can use `JDBC` to access the database with the information provided in the HTML form. See this ( https://www.tutorialspoint.com/servlets/servlets-database-access.htm ) though to be honest , the servlet code in that example does the GUI stuff as well but you really should isolate the GUI (in a JSP page) from database access and business logic (which should be placed in the servlet. – dsp_user Jun 20 '18 at 13:36
  • 1
    This link might also help https://stackoverflow.com/questions/35203460/jsp-hand-over-text-to-java-and-another-jsp/35203961#35203961 – dsp_user Jun 20 '18 at 13:44

0 Answers0