Answer the question
In order to leave comments, you need to log in
How to connect javascript with JPA?
Hello. Help, please, deal with the problem.
I am writing a web application. Described database entities and operations on them using JPA.
I am writing a frontend. Tell me how to connect a javascript script that reads information
<div id="main">
<aside class="leftAside">
<h2>For registration on this site</h2>
<p>You should fill all fields bellow
</aside>
<section>
<article>
<h1>Registration</h1>
<div class="text-article">
<form method="POST" action="registration">
<p>
<label for="login">Login </label>
<input type="text" name="login" id="login"/>
</p>
<p>
<label for="email">E-Mail</label>
<input type="email" name="email" id="email"/>
</p>
<p>
<label for="password">Password</label>
<input type="password" name="password" id="password"/>
<label for="password2">Repeat password</label>
<input type="password" name="password2" id="password2"/>
</p>
<p>
<label for="name">Name</label>
<input type="text" name="name" id="name"/>
</p>
<p>
<label for="secondName">Second name</label>
<input type="text" name="login" id="secondName"/>
</p>
<p>
<label for="birthdayDate">Birthday date</label>
<input type="text" name="name" id="birthdayDate"/>
</p>
<p>
<label for="adress">Adress</label>
<input type="text" name="login" id="adress"/>
</p>
<p>
<button type="submit">SignUp</button>
</p>
</form>
</div>
</article>
</section>
</div>
public void addClient(String name, String secondName,
String birthdayData, String passport,
String adress, String eMail,
String password) {
Client client = new Client(name, secondName, birthdayData,
passport, adress, eMail, password);
if (!isUserExist(eMail))
MainDAO.addEntetyToBase(client);
else System.out.println("User " + eMail + " already exists");
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question