A
A
artshelom2017-03-07 08:52:16
Java
artshelom, 2017-03-07 08:52:16

What is the difference between jsp and html?

What is the difference??
And how to add html to Spring mvc project???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Shklyaev, 2017-03-07
@artshelom

in jsp you can write java code, which is compiled later. html is just a markup language. jsp works through servlets. If you just want to write in html, css, javascript, then just specify the index.html main page in the web.xml config.

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
Если есть авторизация то еще плюс это
<login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
      <form-login-page>/login.html</form-login-page>
      <form-error-page>/login.html</form-error-page>
    </form-login-config>
  </login-config>

S
Sergey Gornostaev, 2017-03-07
@sergey-gornostaev

In short, the JSP page code runs on the server and in the process produces an HTML page code that is sent to the client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question