Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is jsp used at client side?

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

like image 543
sachin Avatar asked Oct 19 '22 20:10

sachin


1 Answers

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.

like image 138
gurvinder372 Avatar answered Oct 23 '22 11:10

gurvinder372