search

Home  >  Q&A  >  body text

Build a login page using MySQL, Java, HTML and CSS

<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>
P粉244730625P粉244730625480 days ago656

reply all(1)I'll reply

  • P粉593649715

    P粉5936497152023-09-02 12:05:27

    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:

    /META-INF/resources/
    /resources/
    /static/
    /public/

    So you can create a public/ directory under the resources/ directory and put the static content there. They can then be accessed via http://localhost:3000/koo.htm. (Assume server.port is 3000)

    You can customize these directories using spring.resources.static-locations in application.properties.

    You can continue reading: https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot

    reply
    0
  • Cancelreply