Please find comments below for your questions:
(1) Is Webdynpro plays role like Servlets and JSP for middle ware programming?
Not Exactly, Web Dynpro ABAP is the SAP standard UI technology for developing Web applications in the ABAP environment. It consists of a runtime environment and a graphical development environment with special Web Dynpro tools that are integrated in the ABAP Workbench.It enables you to build business applications, which means that you can’t change the look and feel with embedded HTML or Java Script.
(2) IS UI5 is replacement of Webdynpro.
No, UI5 is a JavaScript UI Library.
UI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice. It’s based on JavaScript, using JQuery as its foundation and follows web standards. It eases your development with a client-side HTML5 rendering library including a rich set of controls and supports data binding to different models (JSON, XML and OData)
With respect to END user you may quite true. But for a developer WebDynpro and UI5 are two different UI technologies.
(3) or UI5 is only a like front end programming like HTML,CSS,JAVASCRIPT etc.
Yes, Its a JavaScript UI framework/library along with that it supports data binding to your different data models as mentioned above.
solved SAP UI5 vs web dynpro [closed]