I am working on a project on spring MVC which has the code in the client side in jsp instead of javascript and html. I would really appreciate if you could explain why this is used and not javascript and html. Can this be replaced by javascript and html without loss of functionality
JSP is executed on server side and it renders an HTML page (including embedded javascript and css). So on your browser Javascript and HTML code is executed, not the JSP code.
You can verify the same by using developer tools of your browser, you wont find any JSP code there.
And yes, all your work can be done by Javascript/HTML as well. Just that you will have to use AJAX to get the dynamic data that you need to show of your page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With