Categories: Servlet

RequestDispatcher Interface

<div dir&equals;"ltr" style&equals;"text-align&colon; justify&semi;">&NewLine;<div dir&equals;"ltr" style&equals;"text-align&colon; justify&semi;">In this tutorial you will learn how to use <b><i>forward&lpar;&rpar;<&sol;i><&sol;b> method of <b><i>RequestDispatcher <&sol;i><&sol;b>in Servlet<br &sol;>&NewLine;<i><b>forward&lpar;&rpar; <&sol;b><&sol;i>method of <i><b>RequestDispatcher <&sol;b><&sol;i>forwards the request made by the client by the the resource &lpar;any of them servlet &comma; jsp&comma; html&comma; etc&period;&rpar; on the server without including the content of the requested resource&period;<i><b>syntax &colon;<&sol;b><&sol;i><&sol;p>&NewLine;<pre class&equals;"highlight">void forward&lpar;request&comma; response&rpar; throws ServletException&comma; IOException &NewLine;<&sol;pre>&NewLine;<h2><i><b>RequestDispacher <&sol;b><&sol;i><&sol;h2>&NewLine;<p>The <i><b>RequestDispacher <&sol;b><&sol;i>interface provides the facility of dispatching the request to another resource it may be html&comma; servlet or jsp&period;This interface can also be used to include the content of another resource also&period; It is one of the way of servlet collaboration&period;<&sol;p>&NewLine;<p>There are two methods defined in the <i><b>RequestDispatcher <&sol;b><&sol;i>interface&period;<&sol;p>&NewLine;<h2><b>Methods of <i>RequestDispatcher <&sol;i>interface<&sol;b><&sol;h2>&NewLine;<p>The <i><b>RequestDispatcher <&sol;b><&sol;i>interface provides two methods&period; They are&colon;<&sol;p>&NewLine;<ol style&equals;"text-align&colon; left&semi;">&NewLine;<li><i><b>public void forward&lpar;ServletRequest request&comma;ServletResponse response&rpar;throws ServletException&comma;java&period;io&period;IOException&colon;<&sol;b><&sol;i>Forwards a request from a servlet to another resource &lpar;servlet&comma; JSP file&comma; or HTML file&rpar; on the server&period;&NewLine;<div style&equals;"background-color&colon; &num;f2f9fc&semi; border&colon; 1px solid &num;c9e6f2&semi; border-radius&colon; 3px&semi; padding&colon; 16px&semi; line-height&colon; 1&period;45&semi;"><span style&equals;"color&colon; red&semi; font-size&colon; x-large&semi; text-align&colon; center&semi;"><b>Popular Tutorials<&sol;b><&sol;span><&sol;p>&NewLine;<ul style&equals;"text-align&colon; left&semi;">&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-tutorial&sol;"><em><strong>Spring Tutorial<&sol;strong> <&sol;em><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-web-mvc-framework-chapter-38&sol;"><strong><em>Spring MVC Web Tutorial <&sol;em><&sol;strong><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;introduction-to-spring-boot-a-spring-boot-complete-guide&sol;"><strong>Spring Boot Tutorial<&sol;strong> <&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-security-take-baby-step-to-secure&sol;"><em>Spring Security Tutorial<&sol;em><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-aop-tutorial-with-example-aspect-advice-pointcut-joinpoint&sol;"><em>Spring AOP Tutorial<&sol;em><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;using-spring-jdbc-framework-chapter-32&sol;"><em>Spring JDBC Tutorial<&sol;em><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-hateoas-hypermedia-driven-restful-web-service&sol;"><em><strong>Spring HATEOAS <&sol;strong><&sol;em><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;microservices-with-spring-boot&sol;"><em><strong>Microservices with Spring Boot<&sol;strong><&sol;em><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;jax-rs-web-service-tutorial&sol;"><strong><em>REST Webservice<&sol;em> <&sol;strong><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;core-java-baby-step-to-be-best-java-ian&sol;"><em><strong>Core Java <&sol;strong><&sol;em><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;hibernate-3-on-baby-steps&sol;"><em><strong>Hibernate Tutorial<&sol;strong><&sol;em><&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;spring-batch-process-with-example&sol;"><strong><em>Spring Batch<&sol;em> <&sol;strong><&sol;a><&sol;b><&sol;li>&NewLine;<&sol;ul>&NewLine;<&sol;div>&NewLine;<p>HttpSession interface<&sol;p>&NewLine;<div class&equals;"separator" style&equals;"clear&colon; both&semi; text-align&colon; center&semi;"><img src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2013&sol;12&sol;forward&period;jpg" border&equals;"0" &sol;><&sol;div>&NewLine;<p>As you see in the above figure&comma; response of second servlet is sent to the client&period; Response of the first servlet is not displayed to the user&period;<&sol;li>&NewLine;<li><i><b>public void include&lpar;ServletRequest request&comma;ServletResponse response&rpar;throws ServletException&comma;java&period;io&period;IOException&colon;<&sol;b><&sol;i>Includes the content of a resource &lpar;servlet&comma; JSP page&comma; or HTML file&rpar; in the response&period;&NewLine;<div class&equals;"separator" style&equals;"clear&colon; both&semi; text-align&colon; center&semi;"><img src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2013&sol;12&sol;RequestDispatcherInclude&period;jpg" border&equals;"0" &sol;><&sol;div>&NewLine;<p>As you can see in the above figure&comma; response of second servlet is included in the response of the first servlet that is being sent to the client&period;<&sol;li>&NewLine;<&sol;ol>&NewLine;<h2><b>Getting the object of <i>RequestDispatcher<&sol;i><&sol;b><&sol;h2>&NewLine;<p>The <i><b>getRequestDispatcher&lpar;&rpar; <&sol;b><&sol;i>method of <i><b>ServletRequest <&sol;b><&sol;i>interface returns the object of <b><i>RequestDispatcher<&sol;i><&sol;b>&period;<&sol;p>&NewLine;<p><i><b>Syntax of getRequestDispatcher method&colon;<&sol;b><&sol;i><&sol;p>&NewLine;<pre class&equals;"highlight">public RequestDispatcher getRequestDispatcher&lpar;String resource&rpar;&semi; &NewLine;<&sol;pre>&NewLine;<h3><b>Example of using getRequestDispatcher method<&sol;b><&sol;h3>&NewLine;<pre class&equals;"highlight">RequestDispatcher rd&equals;request&period;getRequestDispatcher&lpar;"&sol;welcomeServlet"&rpar;&semi; &NewLine; &sol;&sol;welcomeServlet is the url-pattern of the second servlet &NewLine; rd&period;forward&lpar;request&comma; response&rpar;&semi;&sol;&sol;method may be include or forward &NewLine;<&sol;pre>&NewLine;<h3><b>Example of RequestDispatcher interface<&sol;b><&sol;h3>&NewLine;<p>In this example&comma; we are validating the password entered by the user&period; If password is servlet&comma; it will forward the request to the <i><b>WelcomeServlet<&sol;b><&sol;i>&comma; otherwise will show an error message&colon; sorry username or password error&excl;&period; In this program&comma; we are checking for hard coded information&period; But you can check it to the database also that we will see in the development chapter&period;<&sol;p>&NewLine;<p><i><b>1&period; &colon;login&period;html file<&sol;b><&sol;i><i><b> <&sol;b><&sol;i>for getting input from the user&period;<&sol;p>&NewLine;<pre class&equals;"highlight">&lt&semi;&excl;DOCTYPE html PUBLIC "-&sol;&sol;W3C&sol;&sol;DTD HTML 4&period;01 Transitional&sol;&sol;EN" "http&colon;&sol;&sol;www&period;w3&period;org&sol;TR&sol;html4&sol;loose&period;dtd"&gt&semi; &NewLine;&lt&semi;html&gt&semi; &NewLine;&lt&semi;head&gt&semi; &NewLine;&lt&semi;meta http-equiv&equals;"Content-Type" content&equals;"text&sol;html&semi; charset&equals;ISO-8859-1"&gt&semi; &NewLine;&lt&semi;title&gt&semi;Login Page&lt&semi;&sol;title&gt&semi; &NewLine;&lt&semi;&sol;head&gt&semi; &NewLine;&lt&semi;body&gt&semi; &NewLine;&lt&semi;form method&equals;"get" action&equals;"loginServlet"&gt&semi; &NewLine;&lt&semi;p&gt&semi;Enter your info in the following text boxes&lt&semi;&sol;p&gt&semi; &NewLine;Enter your name &lt&semi;input type&equals;"text" name&equals;"text1"&sol;&gt&semi;&lt&semi;br&gt&semi; &NewLine;Enter your password &lt&semi;input type&equals;"password" name&equals;"text2"&sol;&gt&semi;&lt&semi;br&gt&semi; &NewLine;&lt&semi;input type&equals;"submit" value&equals;"submit"&sol;&gt&semi; &NewLine;&lt&semi;&sol;form&gt&semi; &NewLine;&lt&semi;&sol;body&gt&semi; &NewLine;&lt&semi;&sol;html&gt&semi; &NewLine;<&sol;pre>&NewLine;<p><b>2&period; LoginServlet&period;java file&colon;<&sol;b> a servlet class for processing the response&period; If password is servlet&comma; it will forward the request to the welcome servlet&period;<&sol;p>&NewLine;<pre class&equals;"highlight">import java&period;io&period;&ast;&semi; &NewLine;import javax&period;servlet&period;&ast;&semi; &NewLine;import javax&period;servlet&period;http&period;&ast;&semi; &NewLine; &NewLine; &NewLine;public class LoginSevlet extends HttpServlet &lbrace; &NewLine; &NewLine;public void doPost&lpar;HttpServletRequest request&comma; HttpServletResponse response&rpar; &NewLine; throws ServletException&comma; IOException &lbrace; &NewLine; &NewLine; response&period;setContentType&lpar;"text&sol;html"&rpar;&semi; &NewLine; PrintWriter out &equals; response&period;getWriter&lpar;&rpar;&semi; &NewLine; &NewLine; String userName&equals;request&period;getParameter&lpar;"userName"&rpar;&semi; &NewLine; String userPass&equals;request&period;getParameter&lpar;"userPass"&rpar;&semi; &NewLine; &NewLine; if&lpar;userPass&period;equals&lpar;"sweety"&rpar;&rpar;&lbrace; &NewLine; RequestDispatcher rd&equals;request&period;getRequestDispatcher&lpar;"welcomeServlet"&rpar;&semi; &NewLine; rd&period;forward&lpar;request&comma; response&rpar;&semi; &NewLine; &rcub; &NewLine; else&lbrace; &NewLine; out&period;print&lpar;"Sorry User Name or Password Error&excl;"&rpar;&semi; &NewLine; RequestDispatcher rd&equals;request&period;getRequestDispatcher&lpar;"&sol;login&period;html"&rpar;&semi; &NewLine; rd&period;include&lpar;request&comma; response&rpar;&semi; &NewLine; &NewLine; &rcub; &NewLine; &rcub; &NewLine; &NewLine;&rcub; &NewLine;<&sol;pre>&NewLine;<p><b>3&period; WelcomeServlet&period;java file&colon; <&sol;b>a servlet class for displaying the welcome message&period;<&sol;p>&NewLine;<pre class&equals;"highlight">import java&period;io&period;&ast;&semi; &NewLine;import javax&period;servlet&period;&ast;&semi; &NewLine;import javax&period;servlet&period;http&period;&ast;&semi; &NewLine; &NewLine;public class WelcomeServlet extends HttpServlet &lbrace; &NewLine; &NewLine; public void doPost&lpar;HttpServletRequest request&comma; HttpServletResponse response&rpar; &NewLine; throws ServletException&comma; IOException &lbrace; &NewLine; &NewLine; response&period;setContentType&lpar;"text&sol;html"&rpar;&semi; &NewLine; PrintWriter out &equals; response&period;getWriter&lpar;&rpar;&semi; &NewLine; &NewLine; String userName&equals;request&period;getParameter&lpar;"userName"&rpar;&semi; &NewLine; out&period;print&lpar;"Welcome "&plus;userName&rpar;&semi; &NewLine; &rcub; &NewLine; &NewLine;&rcub; &NewLine;<&sol;pre>&NewLine;<p><b><i>4&period; web&period;xml file&colon;<&sol;i> a deployment descriptor file that contains the information about the servlet&period;<&sol;b><&sol;p>&NewLine;<pre class&equals;"highlight">&lt&semi;&quest;xml version&equals;"1&period;0" encoding&equals;"UTF-8"&quest;&gt&semi; &NewLine;&lt&semi;web-app id&equals;"WebApp&lowbar;ID" version&equals;"2&period;4" xmlns&equals;"http&colon;&sol;&sol;java&period;sun&period;com&sol;xml&sol;ns&sol;j2ee" xmlns&colon;xsi&equals;"http&colon;&sol;&sol;www&period;w3&period;org&sol;2001&sol;XMLSchema-instance" xsi&colon;schemaLocation&equals;"http&colon;&sol;&sol;java&period;sun&period;com&sol;xml&sol;ns&sol;j2ee http&colon;&sol;&sol;java&period;sun&period;com&sol;xml&sol;ns&sol;j2ee&sol;web-app&lowbar;2&lowbar;4&period;xsd"&gt&semi; &NewLine;&lt&semi;display-name&gt&semi;servletRequestDispatcher&lt&semi;&sol;display-name&gt&semi; &NewLine;&lt&semi;servlet&gt&semi; &NewLine; &lt&semi;servlet-name&gt&semi;loginServlet&lt&semi;&sol;servlet-name&gt&semi; &NewLine; &lt&semi;servlet-class&gt&semi;LoginServlet&lt&semi;&sol;servlet-class&gt&semi; &NewLine; &lt&semi;&sol;servlet&gt&semi; &NewLine; &lt&semi;servlet&gt&semi; &NewLine; &lt&semi;servlet-name&gt&semi;welcomeServlet&lt&semi;&sol;servlet-name&gt&semi; &NewLine; &lt&semi;servlet-class&gt&semi;WelcomeServlet&lt&semi;&sol;servlet-class&gt&semi; &NewLine; &lt&semi;&sol;servlet&gt&semi; &NewLine; &NewLine; &NewLine; &lt&semi;servlet-mapping&gt&semi; &NewLine; &lt&semi;servlet-name&gt&semi;loginServlet&lt&semi;&sol;servlet-name&gt&semi; &NewLine; &lt&semi;url-pattern&gt&semi;&sol;loginServlet&lt&semi;&sol;url-pattern&gt&semi; &NewLine; &lt&semi;&sol;servlet-mapping&gt&semi; &NewLine; &lt&semi;servlet-mapping&gt&semi; &NewLine; &lt&semi;servlet-name&gt&semi;welcomeServlet&lt&semi;&sol;servlet-name&gt&semi; &NewLine; &lt&semi;url-pattern&gt&semi;&sol;welcomeServlet&lt&semi;&sol;url-pattern&gt&semi; &NewLine; &lt&semi;&sol;servlet-mapping&gt&semi; &NewLine; &NewLine; &lt&semi;welcome-file-list&gt&semi; &NewLine; &lt&semi;welcome-file&gt&semi;login&period;html&lt&semi;&sol;welcome-file&gt&semi; &NewLine; &lt&semi;&sol;welcome-file-list&gt&semi; &NewLine; &NewLine;&lt&semi;&sol;web-app&gt&semi; &NewLine;<&sol;pre>&NewLine;<div class&equals;"separator" style&equals;"clear&colon; both&semi; text-align&colon; center&semi;"><img src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2013&sol;12&sol;requestdispatcher&period;jpg" border&equals;"0" &sol;><&sol;div>&NewLine;<p>Now let us start tomcat server using C&colon;Program Files &lpar;x86&rpar;Apache Software FoundationTomcat 7&period;0binstartup&period;bat &lpar;on windows&rpar; or &sol;bin&sol;startup&period;sh &lpar;on Linux&sol;Solaris etc&period;&rpar; and finally type <i><b>http&colon;&sol;&sol;localhost&colon;8080&sol;login&period;html<&sol;b><&sol;i> in browser&&num;8217&semi;s address box&period; If everything goes fine&comma; you would get following result&colon;<&sol;p>&NewLine;<div class&equals;"separator" style&equals;"clear&colon; both&semi; text-align&colon; center&semi;"><img src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2013&sol;12&sol;111-4&period;png" border&equals;"0" &sol;><&sol;div>&NewLine;<p><b>With wrong password it request dispatched to again login form&period;<&sol;b><&sol;p>&NewLine;<div class&equals;"separator" style&equals;"clear&colon; both&semi; text-align&colon; center&semi;"><img src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2013&sol;12&sol;111-5&period;png" border&equals;"0" &sol;><&sol;div>&NewLine;<p><b>With right user name and password&period;<&sol;b><&sol;p>&NewLine;<div class&equals;"separator" style&equals;"clear&colon; both&semi; text-align&colon; center&semi;"><img src&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-content&sol;uploads&sol;2013&sol;12&sol;111-6&period;png" border&equals;"0" &sol;><&sol;div>&NewLine;<&sol;div>&NewLine;<div style&equals;"background-color&colon; pink&semi; border-width&colon; thin&semi; text-align&colon; center&semi;"><b>&lt&semi;&lt&semi;<a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;httpresponse-servlet&sol;">Previous<&sol;a> &lt&semi;&lt&semi;   &vert;&vert; <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;java-servlets-overview&sol;">Index <&sol;a>&vert;&vert;   &gt&semi;&gt&semi;<a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;httpsession-interface&sol;" target&equals;"&lowbar;blank" rel&equals;"noopener">Next<&sol;a> &gt&semi;&gt&semi;<&sol;b><&sol;div>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<div style&equals;"background-color&colon; &num;f2f9fc&semi; border&colon; 1px solid &num;c9e6f2&semi; border-radius&colon; 3px&semi; padding&colon; 16px&semi; line-height&colon; 1&period;45&semi;"><b>Servlet Related Posts<&sol;b><&sol;p>&NewLine;<ol style&equals;"text-align&colon; left&semi;">&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;java-servlets-overview&sol;">Java Servlets Overview<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;servlet-life-cycle&sol;">Servlet Life Cycle<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;hello-world-example-in-servlet-interface&sol;">Servlet Example<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;difference-between-servletconfig-and-cervletcontext-in-java-servlet&sol; "> Difference between ServletConfig and ServletContext<br &sol;>&NewLine;<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;difference-between-genericservlet-and&sol;"> Difference between GenericServlet and HttpServlet<br &sol;>&NewLine;<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;what-is-web-application-servlet&sol;">What is web application&quest;<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;advantages-of-servlets-over-cgi&sol;">Advantages of Servlets over CGI<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;difference-between-genericservlet-and&sol;">GenericServlet Example<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;requestdispatcher-interface&sol;">RequestDispatcher Example<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;servletconfig-interface&sol;">ServletConfig<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;servletcontext-interface&sol;">ServletContext <&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;servlet-filters&sol;">Servlet Filter Example<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;servlets-database-access&sol;">Database Access Example using Sevlet<&sol;a><&sol;b><&sol;li>&NewLine;<li><b><a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;servlet-upload-file-example&sol;">File Uploading Example using Servlet<&sol;a><&sol;b><&sol;li>&NewLine;<&sol;ol>&NewLine;<&sol;div>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<&sol;div>&NewLine;<div class&equals;"wp-post-navigation"> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <div class&equals;"wp-post-navigation-pre"> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;httpresponse-servlet&sol;">Previous<&sol;a> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <&sol;div> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <div class&equals;"wp-post-navigation-next"> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <a href&equals;"https&colon;&sol;&sol;dineshonjava&period;com&sol;httpsession-interface&sol;">Next<&sol;a> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab; <&sol;div> &NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;<&sol;div>&NewLine;<script type&equals;"text&sol;javascript">&NewLine;jQuery&lpar;document&rpar;&period;ready&lpar;function&lpar;&dollar;&rpar; &lbrace;&NewLine; &dollar;&period;post&lpar;'https&colon;&sol;&sol;dineshonjava&period;com&sol;wp-admin&sol;admin-ajax&period;php'&comma; &lbrace;action&colon; 'mts&lowbar;view&lowbar;count'&comma; id&colon; '264'&rcub;&rpar;&semi;&NewLine;&rcub;&rpar;&semi;&NewLine;<&sol;script>

Dinesh Rajput

Dinesh Rajput is the chief editor of a website Dineshonjava, a technical blog dedicated to the Spring and Java technologies. It has a series of articles related to Java technologies. Dinesh has been a Spring enthusiast since 2008 and is a Pivotal Certified Spring Professional, an author of a book Spring 5 Design Pattern, and a blogger. He has more than 10 years of experience with different aspects of Spring and Java design and development. His core expertise lies in the latest version of Spring Framework, Spring Boot, Spring Security, creating REST APIs, Microservice Architecture, Reactive Pattern, Spring AOP, Design Patterns, Struts, Hibernate, Web Services, Spring Batch, Cassandra, MongoDB, and Web Application Design and Architecture. He is currently working as a technology manager at a leading product and web development company. He worked as a developer and tech lead at the Bennett, Coleman & Co. Ltd and was the first developer in his previous company, Paytm. Dinesh is passionate about the latest Java technologies and loves to write technical blogs related to it. He is a very active member of the Java and Spring community on different forums. When it comes to the Spring Framework and Java, Dinesh tops the list!

Share
Published by
Dinesh Rajput

Recent Posts

Strategy Design Patterns using Lambda

Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…

4 years ago

Decorator Pattern using Lambda

Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…

4 years ago

Delegating pattern using lambda

Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…

4 years ago

Spring Vs Django- Know The Difference Between The Two

Technology has emerged a lot in the last decade, and now we have artificial intelligence;…

4 years ago

TOP 20 MongoDB INTERVIEW QUESTIONS 2022

Managing a database is becoming increasingly complex now due to the vast amount of data…

4 years ago

Scheduler @Scheduled Annotation Spring Boot

Overview In this article, we will explore Spring Scheduler how we could use it by…

4 years ago