.

Friday, April 5, 2019

An Overview Of Servlets And JSP Technology Computer Science Essay

An Overview Of Servlets And JSP Technology Computer Science searchJDBC is a front-end tool for tie ining to a server and is similar to ODBC however, JDBC rotter connect only coffee bean knob and it uses ODBC for the connectivity. JDBC is essendially 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 need JDBC, once we check ODBC on hand. We can use the ODBC to connect to all the databases and ODBC is a proven technology. 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 argon various types of device driver, determine the sun such that for each one one has more or less unique features and facilitates a connection to the database.JDBC drivers fit into of quarte tte categoriesThe JDBC-ODBC bridge provides JDBC entranceway via most ODBC drivers. Note that some ODBC binary code and in many cases database knob code should be loaded on e rattling client machine which uses this diver, so these types of drivers are to a greater extent sui remit in corporate lastworks, or for the applications in server code that is take in verbally in coffee bean 3-tier architecture.A local-API partly-java driver change JDBC calls to the client API for DBMS or oracle Sybase Informix DB2.since,like bridge driver these driver needs binary code be loaded on every client machine.A net communications 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 shopping mallware is capable to join all java clients to different databases. The declared protocol that is utilise depends on the seller. Commonly it is the easiest JDBC alter indispensable. It is like the sell ers for this solution whitethorn provide products that are suitable for the custom of intranet. To support internet admission for these products they must need more extra requirements for security, access through firewalls, and so forth many vendors are now adding up JDBC driver for their present database substanceware products.A native protocol driverJdbc ArchitectureJDBC architecture is as followsJDBC Driver carriageJDBC DiverJDBC-ODBC BridgeApplicationJDBC Driver ManagerFunction of the driver manager is to find out unattached driver in the system and connect the application to the appropriate database, whenever a connection is requested. However, to help 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 abut it may take help from some other(a) drivers or ev en 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 construct into the driver itself.JDBC ODBC BridgeSun balmy 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 be take after the technology of choice for developing online stores, synergistic Web applications, and other dynamic Web sites. Why? This chapter gives a high-level overview of the reasons for its popularity. Later chapters particular proposition expound 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 web browsers and applications or database on the http server. Their work is to work on the following capers.Reading the use full development that is sent by the client.The users generally enter this d ata in http from a web rapscallion. Even the data can also be expected to come from an applet or custom http client program. Chapter 4 discusses how servlet read 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 keep in line cookies, news 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 in all probability 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 account..Sending the useful data to the clientsThe document can send in different formats like (XML OR HTML), binary (GIF images), or in nil accommodates 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 whole 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 oblation the following featuresPlatform independenceThe use of adds versatility to a web application by enabling its operation on any computer.Enhanced performanceThe compilation process in JSP produces faster results or output. withdrawal 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 administrationThe 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 eon and with less effort.Ease of useAll JSP applications run on major web server and in operation(p) 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 allow 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, manifold 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 software engineer 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 target areas distribution.JSP Objects its ScopesIn JSP there are two types of ends.Impli cit objectsExplicit objectsImplicit objects are automatically created.Explicit objects are created using actions.Whenever a request has been made for a JSP PAGE, JSP page entrust 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 property. Scripting elements can access the explicit objects thought scripting-level variables.JSP defines several place settings for JSP objects.Objects ScopesJSP defines several electron orbits for objects. Scopes are used to indicate the context in which the bean should be made available.Four types of scopes. They are1. pageboy2. 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 rate of flow 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 Content 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 imaginativeness 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 ends. 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 growth of new actions. Because of the mechanism JSP can b easily 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 accept able to the server, and managing returned data in some cases, if you want to bypass the micro soft Jet database engine and use DAO to make calls directly to the ODBC driver manager. This functionality is available through ODBC Direct.The following step 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 take a shit (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 specified 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