.

Wednesday, June 5, 2019

An Overview Of Servlets And JSP Technology Computer Science Essay

An Overview Of Servlets And JSP Technology Computer Science EssayJDBC is a front-end tool for connecting to a server and is equal to ODBC however, JDBC quarter connect only Java thickening and it uses ODBC for the connectivity. JDBC is es movei everyy a low level application programming interface. It is called a low level API since all entropy manipulation, storage and retrieval has to be done by the program itself. Some tools that Provide a higher level of abstraction is expected shortly.The next question is why we choose JDBC, once we have ODBC on hand. We can use the ODBC to connect to all the infobases and ODBC is a proven applied science. Problem for doing this is ODBC gives a C language API, which uses pointer extensively, since Java open JDBC to suit its needs.Jdbc Driver TipesThere atomic number 18 various types of device driver, identified the sun such that individually one has both(prenominal) unique features and facilitates a connection to the database.JDBC drivers fit into of four categoriesThe JDBC-ODBC bridge provides JDBC chafe via most ODBC drivers. Note that somewhat ODBC binary code and in many cases database client code should be loaded on every client machine which uses this diver, so these types of drivers are more suitable in corporate networks, or for the applications in server code that is create verbally in java 3-tier architecture.A local-API partly-java driver change JDBC calls to the client API for DBMS or oracle Sybase Informix DB2.since, the like bridge driver these driver needs binary code be loaded on every client machine.A net protocol all java drivers explain JDBC calls into a DBMS-independent net protocol that transforms to a DBMS protocol through the server. This net server tendernessware is capable to join all java clients to different databases. The clear protocol that is employ depends on the seller. Commonly it is the easiest JDBC alternative. It is like the sellers for this solution whitethorn provi de products that are suitable for the usage of intranet. To support internet access for these products they must need more extra requirements for security, access through firewalls, etc. many vendors are now adding up JDBC driver for their present database middleware products.A native protocol driverJdbc ArchitectureJDBC architecture is as followsJDBC Driver ManagerJDBC DiverJDBC-ODBC BridgeApplicationJDBC Driver ManagerFunction of the driver manager is to find come out of the closet available driver in the system and connect the application to the appropriate database, whenever a connection is requested. However, to champion the driver manager identify different types of drivers, each driver should be registered with the driver manager.JDBC DriverFunction of the JDBC driver is to accept the SQL calls from the application and convert them into native calls to the database,. However, in this process it may take help from some other drivers or even servers, which depends on the type of JDBC driver we are using. It also is possible that the total functionally of the database server could be make into the driver itself.JDBC ODBC BridgeSun soft provides a special JDBC Driver called JDBC-ODBC bridge which can be used to connect any existing database, that is ODBC complaint.Servlet and JSP technology has become the technology of choice for developing online stores, interactive Web applications, and other dynamic Web sites. Why? This chapter gives a high-level overview of the reasons for its popularity. Later chapters particularised expand on programming techniques.A Servlets JobServlet or java programs which run on application servers, acts as middle layer among the requests coming from http Clients or weave weather vane browsers and applications or database on the http server. Their work is to work on the following proletariats.Reading the use full information that is sent by the client.The users generally enter this data in http from a web page. Even the data can also be expected to come from an applet or custom http client program. Chapter 4 discusses how servlet show this data.Reading HTTP requests sent by the browser.This single arrow shows that travelling from the client to the web server, but mainly they are two different types, the data which is entered by the user in a form and the other one is behind-the-scenes HTTP information, both of them are very important. The HTTP information which contain cookies, in the buffs about media and the schemes the browser can understand like compression.Getting the results.This process is needed for ,database to contact, to make an RMI or EJB call, to raise a web service or working on replied data which is in a relational database. But the database may not run on http or return results in html, so that the web browser cannot directly deal with the database. Even if it could, for security reasons, you probably would not want it to.This argument even can apply for other applications, so we need the middle layer to get the arriving data from http stream for the applications to insert the results in the document..Sending the useful data to the clientsThe document can send in different formats like (XML OR HTML), binary (GIF images), or in zip files that is layered on top of other underlying format. Though HTML is a common format, servlet /JSP task is to cover the results of HTML.Send the implicit HTTP response data.This explains about only an arrow leaving from the web middle layer (the servlet or JSP page) to the client. But there are two types of data sent the document alone and last the scenes HTTP information. But these two types can affect the development, by sending the HTTP data to the server or by setting cookies and caching parameter and others.Features of JSPJSP provides an attractive alternative to other dynamic scripting language by offering the following featuresPlatform independenceThe use of adds versatility to a web application by enabling its execution on any computer.Enhanced performanceThe compilation process in JSP produces faster results or output. detachment of logic from displayThe use of JSP permits the HTML-specific static content and a mixture of HTML, Java, and JSP-specific dynamic content to be placed in separate fillies.Ease of judicatureThe use of JSP eliminates the need for high-level technical expertise, thereby helping web developers, content creators, and content managers to work together and develop Java-based applications in less meter and with less effort.Ease of useAll JSP applications run on major web server and operating systems, including Microsoft IIS, Netscape enterprise server, I Planet web server, and apache web server. These applications are available on Windows NT, windows 2000, and solaris7.Competing Products across PlatformsCompeting products include active server pages (ASP), hypertext pre processor(PKP) and Java script.JSP versus ASPASP is the immediate competing technology from Microsoft. The dynamic content of JSP is written in Java, in contrast to that of ASP, which is written using an ASP-specific language, such as VBScript. As a result, complex applications can use the power of Java to result and embed Java components in JSP applications, second, JSP is portable to other operating systems and servers in contrast to the allegiance of ASP to windows NT/2000and IIS.JSP versus PHPPHP is similar to ASP and JSP to a certain extent. PHP is a free, open- source, HTML-embedded, server-side scripting language, with basic HTML knowledge, however, a VBScript programmer can write ASP applications and a Java programmer can create JSP applications, whereas PHP requires learning an entirely new language, second by virtue if the power of Java, JSP has access to an extensive API for networking, database access, and objects distribution.JSP Objects its ScopesIn JSP there are two types of objects. unstated objectsExplicit objectsImplicit objects are mechanically created.Explicit object s are created using actions.Whenever a request has been made for a JSP PAGE, JSP page leave behind create two types of objects. They areImplicit objectsExplicit objectsImplicit objects are automatically created by the JSP web developers can use this objects for their processing.Explicit objects are created thought actions. Scripting code is used to create these explicit objects. Every explicit object has some visible attribute. Scripting elements can access the explicit objects thought scripting-level variables.JSP defines several scopes for JSP objects.Objects ScopesJSP defines several scopes for objects. Scopes are used to indicate the context in which the noggin should be made available.Four types of scopes. They are1. Page2. Request3. Application4. SessionWhile process the request, the JSP page can create and /or the some Java objects.Scopes are used to indicate the context in which the dean should be made available in JSP there are four scopes are available. They arePageIt is the default scopes for all the Java objects. It is used to indicate that the objects are only available on the trustworthy page. Once the response is sent back or the request is forwarded somewhere else all the object reference, which has the page scope, will be released object that containsPage scope is stored in the page meat object of the current page.RequestThe request scope is used to indicate that the objects are only available for the current client request. If the request is forwarded to a resourcefulness in the same runtime, the Object is still available. Once the request is processed, all the object reference, which has the request scope, will be released. Objects that contain request scope will be released. Object references that contain request scope are stored in the request Object.SessionThe session scope indicates that the available to all pages during the life of the current session. All references to the objects shall be released after the associated session end s. References to objects with session scope are stored in the session objects associated with the page activation.ApplicationThe application scope indicates that it is available to all pages that share the same context object references which contain the application scope will be released when the runtime environment reclaims the servlet context objects references that contain the application scope are stored are stored in the application objects associated with the page activation.Directives And ActionsJSP elements can be directives or actions. Directives elements provide global information for the translation phase. Actions elements provide for the request-processing phase. New action can be created from the tag extension mechanism.JSPElements can be directives or actions. Directive elements are used to provide global information, which is not dependent for any specific received by the JSP page. For example directive elements can be used to include the external file inside the JSP PAGE.Action elements provide information, which is dependent on the details of the specific request received by the JSP page.Directive elements provide information for the compilation/translation phase.Action can create some objects and may make available to the scripting element. Action elements follow the syntax of XML elements.JSP contains a tag extension mechanism that enables the addition of new actions. Because of the mechanism JSP can b comfortably portable. Actions can be customized to provide access to the attribute values and to their body. Custom action be nested and their bodies can include scripting elements.ODBCTwo distinct ways to access ODBC data sources with DAO the Microsoft Jet database engine DBC direct Microsoft jet provides a broad range of functionality. It handles many of the details of establishing and managing connection, translating queries into a form acceptable to the server, and managing returned data in some cases, if you want to bypass the micro sof t Jet database engine and use DAO to make calls directly to the ODBC driver manager. This functionality is available through ODBC Direct.The following stairs offer a quick start to accessing ODBC dataUse the ODBC data source manager in the windows control panel to setup your ODBC data source and assign it a dataSource name (DSN)In your Visual Basic code, set an ODBC connect string that references the data source. The connect string is used to establish a connection to the data sourceCreate a new table def object and set its connect string to the value condition in step two.Append the table to the table defs collectionOpen a record-set object on the linked table. This record-set7. Object contains data in your OBDC data source and you can manipulate it using the properties and methods of a record-set object.

No comments:

Post a Comment