Often servlets need external resources such as property files, folders, database drivers etc, for request processing. Hard coding these resources into the Servlets creates maintenance problem because if their name, value or location is changed, the Servlets need to be modified. To facilitate the use of external resources in servlets in such a way that […]
Read complete post
As before starting a journey, we prepare an itinerary which states where we will go and how we will reach there. Similarly we should have a clear roadmap stating our objective and plan of action i.e. what we are going to do and how we will do it. The following diagram represents the roadmap of […]
Read complete post
In the last post, you were told that more than one servlet can participate in the processing of a request. In such a case participating servlets may need to share their processing result with each other. Attributes facilitate this sharing of intermediate state of servlets during request processing. Differences between attributes and parameters: Following analogy […]
Read complete post
Before we move on the the RequestDispatcher, lets take an analogy to understand request processing. A servlet as you know is a web application component which processes request and generates dynamic contents. In real life any party which does the same can be taken as servlet. In Tech Mentro, we have receptionists who receive customer […]
Read complete post
Have you ever thought how a request is mapped to doGet() and doPost() methods that we define in our Servlet classes. The Servlet interface which defines the life cycle of servlets provides service() method for request processing. The server doesn’t know doGet() and doPost() methods. It simply invokes service() method whenever a request is received […]
Read complete post
Understanding java web application deployment Deployment is the process of uploading a web application on a web server in such a format that it can be managed and executed by the server. Servlet API, defines standard formats for packaging and distributing java web applications. A Java web application can be deployed in the following two […]
Read complete post
When you learned programming chances are that the first meaningful program you wrote was to add two numbers. To continue the convention, we will be doing the same in our first java web application. Usually requests are submitted to web applications from a browser which supports HTML interface hence to receive two numbers from the […]
Read complete post