Build a login page using MySQL, Java, HTML and CSS
P粉244730625
2023-09-01 13:24:50
<p>I have created a table containing the login details and written a program in Java to process the information, but I don't know how to link the HTML's front-end file to the Java file. </p>
Do you use Spring? Spring Boot? JavaEE? I recommend using Spring Boot.
Spring Boot will automatically add static web resources located in any of the following directories:
So you can create a
public/
directory under theresources/
directory and put the static content there. They can then be accessed via http://localhost:3000/koo.htm. (Assumeserver.port
is 3000)You can customize these directories using
spring.resources.static-locations
inapplication.properties
.You can continue reading: https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot