Posts

Dispatcher Servlet, View Resolver and Handler mapping

Image
  Control Flow of SpringBootMVC ============================ 1. Programmer deploys SpringMVC/SpringBootMVC application in webserver or webapps 2. Deployment activities takes place which involves IOC container creation,DispatcherServlet registration with ServletContainer Pre-Instantiation of Singleton scope spring beans like Controller class,handlermapping,viewResolvers,Service class,DAO class etc. In the mean time necessary dependancy injection also takes place 3. Browser gives request to deployed springmvc application 4. The frontcontroller(DispatcherServlet) traps the request and applies the common system services on the request like logging,auditing,tracking etc,... 5. DispatcherServlet hands over the request to HandlerMapping component to map incoming request with handler method of handler/controller class and gets RequestMapping object from HandlerMapping component having Controller class bean id and HandlerMethod signature(it uses lot of reflection api code internally) 6. Dis...

Difference between SQL and NoSQL

Image
 

Eclipse debugging

Image
 Eclipse Debugging ================= Debugging is a process of getting step by step by execution in an application to find out problem/bugs and fix them as needed. Terminologies associated with Debugging a. Bugs => Problem/defect/mistake in the app/program/project[some abnormality in the application execution] Debug = > De + bug [Rectifiying the bug by identifying and Analyzing the bug] The tools or programm or software that can be used for debugging is called "Debugger"/Debugging tool To debug java code we have two tools a. JDB(Supplied by jdk tools with jdk installation) => available inside <java_home>\bin directory as jdb.exe => it is CUI tool and not so popular(Not industry standard) b. IDE supplied Debugger => Eclipse/Intelij/EclipseLink and etc ... IDE supplied Debuggers => These are GUI and they are user friendly => These are industry standard Where Debugging is required in the company? a. To find,analyze and fix logic problems/errors b. if u...

Access Specifiers in java

  4 types of Specifiers/Modifiers 1. Public: Highest scope, will be accessed within the same class, outside class same package, outside package but child class, outside package no relation ship. 2. Protected: Next Highest scope, will be accessed within the same class, outside class same package, outside package but child class. 3 . Default: will be accessed within the same class, outside class same package. 4. Private: Least scope. will be accessed only within the same class UML( unified modeling language) Public -> + Protected -> # default -> ~ Private -> -

Difference between Technology and Framework

Technology is built on top of language where as framework is built on top of technology. 

Session Tracking

 At the time of processing the later request, if we want to get the data of previous request, then we need to go for "session tracking." Every server side technology should support session tracking because the protocol used is http and it is 'stateless' in nature.

ServletConfig

 This object is used to store the configuration details of a particular servlet like logical name of the servlet, initialization parameters and so on... Using servlet config we will get to know the complete view of a particular servlet. Servlet Config will be instantiated during the initialization of the Servlet.  Loading => static block  instantiation  => public zero arguments constructors  initialization => public void init (ServletConfig config) throws SE Request Processing => public void doXXXX(HSR request, HSR response) throws SE, IOE De Instantiation =>  public void destroy() Servlet Config object is specific to a particular servlet. Servlet Config object will be destroyed just before the Servlet Deinstantiation. We can add only parameters data inside the config object. In web.xml <init-params> will be placed under servlet class level as it is specific to particular servlet and the data present in one servlet config object cannot ...