Posts

Struts

Image
Index Introduction to Struts Framework Architecture of Struts Model View Controller Struts with Database Connectivity Struts Struts is a java based open-sourced framework that helps in developing a web application in J2EE. It extends the java servlet API and promotes the model, view, controller (MVC) architecture. This makes the web applications developed in standard technologies like JSP, java beans, and XML more maintainable, extensible and flexible. Struts help developers to create flexible, maintainable, and secure web applications in java. As mentioned above, the framework is based on the MVC architecture, where each component takes care of different aspects of the application. It uses and extends the Java Servlet API to encourage developers adopting MVC architecture. Struts framework provides three key components: A request handler provided by the application developer is used to be mapped to a particular URI. A response handler is used to transfer the control to another resource...

Java Server Pages - JSP

Image
  Index Java Server Page JSP Architecture Life Cycle of JSP JSP syntax basics Directives Declarations Scripting Standard actions Custom tag libraries Implicit objects Object scope. Session Management JSP JSP or Java Server Pages is a technology that is used to create web application just like servlet technology. A JSP page consists of HTML tags and JSP tags. The JSP pages are easier to maintain than servlet because we can separate designing and development. JSP Architecture Firstly Client sends an http request to the server. As with a normal page, your browser sends an http request to the web browser. For e.g. authentication windows where you enter user id and password in the system and click the submit button, the client thus sends this information to the server to check whether it is valid or not. Web server recognizes the request made by the client that is it for a JSP page or any other HTML extension page. If the request made by the client is for a JSP page, then the Web server...

Servlet

Image
  Index Servlet The Life cycle of Servlet Java Servlet Development kit Servlet API Handling HTTP Requests Handling HTTP Responses Using Cookies Session tracking Security issues Servlet A Servlet is a java programming language class that is used to extend the capabilities of servers that host applications accessed by means of a request response programming mode. Although servlets can respond to any type of request they are commonly used to extend the applications hosted by web servers. Servlets is a technology which is used to create a web application. It is an API that provides many interfaces and classes including documentation. Servlet Life Cycle The entire life cycle of a servlet is managed by the servlet container which uses the javax.servlet.servlet interface to understand the servlets object and manage it. Loading a Servlet class: A Servlet class is loaded when first request for the servlet is received by the web container. Servlets Instance creation: After the Servlet ...