Dependencies means how a java bean is dependent on another bean class. That means if we defines any bean reference as a class member to another bean class, then it results in a bean dependent on another. A primitive type or any reference type ( other than a bean reference ) involves no dependencies. Dependencies is only with a bean class references because to inject dependencies we need that bean instance. So this makes the dependency on another...
IOC stands for the Inversion of Container. It is a container used in Spring core Framework. It is responsible for managing the states of the object i.e from its creation till its destruction. Before Spring framework, developer/programmer were responsible for creating and destroying the object, but with the development of Core Spring it is taken care by its Container itself i.e IOC container, but programmer needs to write some configuration in the...
JVM memory deal with the heap memory which is further divided into two different generations. The two different generations ,  1. Young Generation 2. Tenured Generation are implemented in the heap area. These generations are used for keeping track of object's state. Newly object got place in the young generation. As it grows old and at the time of garbage collection, those who are not garbage collected are shifted to the tenure generation,...
Like Javac its a tool a compiler ( APT compiler ) is designed to compiler the source file having the annotations code. It is basically designed for the Annotations( metadata ) which come with the release of Java 5 . Internally APT uses AnnotationProcessor which is an Interface. No use of describing much because its a lot to describe if i start describing it. So basically it was developed to process Annotation based code but later a API was added...
Lambda Expression is one of the most important features come with the release of Java 8 version. It gives the way java can also deal with the functional approach. The aim behind this invention is to keep java in a row with all others functional oriented languages , like JavaScript . Lambda Expression is a concept of an anonymous function ( a function without name ), which wraps with the functional interface with its object creation. Syntax of...
What is SessionID? Many users are interacting with the server and for each user a session is created in the server and it get identified uniquely by the SessionID. At the time of creation of session for each user a unique ID is generated by the Container which keep every user's session different from each other, is called as jsessionid. How SessionID is managed internally? To identify the request uniquely  from a particular...
Cookies is the concept of storing the client's information in the client machine itself but in the form of a file called as Cookies. So it contains all the information sent by the Web server with the response header. previously all the required information of a client is managed, handled, kept and carried by the server itself. Now with the concept of Cookies all get stored in the client browser in the form a file. So in context of session tracking,...
One of the major disadvantage with the URL Rewriting is that passing session data with the URL makes visible to every one who are requesting for the resource. To over come this problem the concept of hidden form field is introduced so that all the required session data can be able to pass to the requested resource without viewing to the user. Hidden field is one of the form element which is used to pass value keeping information abstract to the...
URL Re-writing is a technique by which session data can be handled within the server side only.Client is not responsible for keeping any information regarding session. In this process at every request the required session data is appended to the URL path to make the next request. All session information is retrieved by the web Server as a request parameter. There is a way by which session data get appended to the URL path is by 1. Using Query String Using...
Handling session defines how session should be managed internally. Session is meant for keeping track of user's information which is required further for the next proceeding requests. Scope of a session is alive from its creation till user finishes its consequent requests for a particular task. With the introduction of HttpSession interface session is get destroyed either by calling invalidate() or by setting the timer using setMaxInactiveInterval(int...
1. Introduction to Java Servlet 2. Servlet Life Cycle 3. What is Web Container ? 4. What Happens at Container Start-up 5. ServletContext Interface and its Object 6. ServletConfig Interface and its Object 7. HttpSession Interface and its Object 8. RequestDispatcher Interface and its Object 9. RequestDispatcher with ServletContext object 10. RequestDispatcher with HttpServletRequest object 11. Servlet...
include() is a method defined in the RequestDispatcher interface with ServletRequest and ServletResponse as a parameter. It is same as forward with slight difference of storing the content of both source and target resource to the response object of the source servlet . Only matters is when we are calling include(), accordingly it adds the content to the response buffer and finally displayed to the browser. That means it dispatches the control...
forward() is a method in RequestDispatcher interface which is used to dispatch the control from a servlet to another servlet/jsp. Container is responsible to dispatch the the control by finding the full path internally either with the context or request. But there is no full dispatch of control, after calling forward with the RequestDispatcher() object control will back to the source servlet. If we want to have full dispatch of control then we...
Sevlet Attributes are the functionality given to have communication between servlet to servlet/jsp or jsp to servlet/jsp. Attributes can be used with the request object or session object, both are having different scopes of communication and stability for a web application. These attributes are implemented through two methods i.e setAttribute() and getAttribute(). In servlet we have basically two major scopes of communication i.e request and session....
We can get RequestDispatcher object with HttpServletRequest object by calling getRequestDispatcher(String url) and passing the url as a String paramter but its not mandatory to start with " / " as it was in case of ServletContext . In this case path is taken as relative to the request. Container id responsible to dispatch the control from one servlet/jsp to another jsp/servlet. How container is getting the path internally ? Internally container...
We can get the RequestDispatcher object with the ServletContext simpley by calling getRequestDispatcher(String url) with the ServletContext object which finally returns the RequestDispatcher object. We have two possible options to dispatch the control after getting the object of RequestDispatcher by using include(req,res) and forward(req,res).  We must mention the...
RequestDispatcher is an interface which has two important abstract methods defined. 1. include() 2.  forward() Both the methods are used to delegates the control from one Servlet to another Servlet / JSP or from one JSP to another JSP/Servlet . How to create object of RequestDispatcher ? This can be achieved in two ways:- 1. With HttpServletRequest object : It can be created by calling getRequestDispatcher(String resourceName) method  by...
In servlet we are getting the session Object in terms of HttpSession by calling getSession() method with the HttpServletRequest object. What is a session ? Session is a object which uniquely identifies the active user so that each activity of that user can be traced or identified internally with the session object. here in servlet we are achieving this by creating HttpSession object. Important points regarding HttpSession 1. It is created by...
ServletContext object is common to all the servlet but ServletConfig object is different for all the servlets and must be created at the time of container start-up for every Servlet. ServletConfig object of one servlet is abstract from ServletConfig object of another servlet. Important points regarding ServletConfig object 1. It is once created for every servlet designed in the Application at container start-up. 2. init() life cycle method is...
ServletContext is only a single object to a whole Servlet Application. It is once created and initialized by the web container at the container start-up. A Web application has many Servlet classes and for every servlet there is common object called as ServletContext. So if we have the requirement to have some common service between those servlets then we can be able to provide by initializing ServletContext object with < context-param >...
There are many task happening internally inside the Web-Server. Following are the list of task performed at the container start-up : 1. Reads the web.xml file or Annotations specified on various web components and stores all the required information in the main memory. 2. Container creates the ServletContext object and initialized with ServletContext object parameter specified in the web.xml file. 3. Thread Pool will be created by the container. 4....
After developing Servlet Application we need to deploy and run our application at theWeb-Server. When a Web-server starts it internally starts a web-container which is also termed as servlet container.  What is a web-container ? A web-container is nothing but a simple java program which is used to delegate the incoming request from the browser to the respective...
Life Cycle of Servlet starts when a servlet application get deployed in the web server. Web container is responsible for calling all the life cycle methods. Servlet has following three life cycle methods : 1. init() 2. service() 3. destroy() init() method :  init() is the first method to be called in every servlet application. It is a parametrized method with ServletConfig reference as a parameter. When the servelt application is been deployed...
Servlet is a web technology, which is used to develop web application. It is used to process the HTTP request by the client. Servlet was first introduced by the Sun MicroSystems with released of  version 1.0 in 1997. Now in 2013 its recent release is with version 3.1. First Annotation concept introduced with the release of version 2.5.  Previously CGI ( Common...
Model Scope Controller View Services Data Binding Directives Filters Validation Testing...

Ads 468x60px

.

Ads

.

Featured Posts

Popular Posts

Like Us On FaceBook

Total Pageviews

Online Members

Live Traffic