Home | Contact Us | Log In | Help
HOME NEW LISTING MOST POPULAR HIGHEST RATED SCRIPTS ADD SCRIPT DOWNLOADS FORUM
Tutorials
  ASP.Net & C#
  ASP
  Perl and PHP
  Java Scripts
  C and C++
  Ajax Tutorials
  J2ee, J2Me, Java
  Python & Ruby Rail
  Crystal Report
  Sap
  CGI
  XML
  Cold Fusion & CFML
  HTML, DHTML & CSS
  Dreamweaver
  FLASH
  Photoshop/Web Designing
  Tools & Utilities
  Oracle/D2K
  Sql Server
  MySql
  Domain Name Registration
  Remotely Hosting
  Web/Server Application
  Hotel Marketing
  Internet and Law
   Search Engine Optimization/SEO
E-Commerce
Interview Questions
Previous< 7 8 9 10 11 12 13 14 15 16 17 > Next
J2EE, J2ME, JAVA 12
Distributed Multitiered Applications
The J2EE platform uses a distributed multitiered application model for enterprise applications. Application logic is divided into components according to function, and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multitiered J2EE environment to which the application component belongs. Figure 1-1 shows two multitiered J2EE applications divided into the tiers described in the following list. The J2EE application parts shown in Figure 1-1 are presented in J2EE Components.
JSP Advantages
Separation of static from dynamic content: With servlets, the logic for generation of the dynamic content is an intrinsic part of the servlet itself, and is closely tied to the static presentation templates responsible for the user interface. Thus, even minor changes made to the UI typically result in the recompilation of the servlet. This tight coupling of presentation and content results in brittle, inflexible applications. However, with JSP, the logic to generate the dynamic content is kept separate from the static presentation templates by encapsulating it within external JavaBeans components. These are then created and used by the JSP page using special tags and scriptlets. When a page designer makes any changes to the presentation template, the JSP page is automatically recompiled and reloaded into the web server by the JSP engine.
Fundamentals of Java Servlets

The Java Developer Connection (JDC) presents a Short Course on the Fundamentals of Java Servlets written by Java Software licensee, the MageLang Institute. A leading provider of Java technology training, MageLang has contributed regularly to the JDC since 1996.

The MageLang Institute, since its founding in 1995, has been dedicated to promoting the growth of the Java technology community by providing excellent education and acting as an independent resource. To find out more about MageLang's Java technology training, visit the MageLang web site.

Simple JSP page

The sample page you'll be creating adds 2 + 2 and displays the result in the browser.

JSP pages are created by putting a add.jsp file in the document directory. The JSP page is a mixture of HTML and Java code. Resin's JSP engine compiles the .jsp file into a Java servlet and then runs the servlet to produce the output.

Resin's web server stores its pages in a directory named doc. On this machine it's /var/www/hosts/www.caucho.com/webapps/ROOT/

Create the text file doc/test/add.jsp (/var/www/hosts/www.caucho.com/webapps/ROOT/test/add.jsp) with your favorite text editor: notepad, emacs, vi, or whatever. It should contain the following text:

Parse Errors

Errors happen. There's a reason the patron saint of programmers is St. Murphy. Here we'll just explain Resin's error reporting to simplify tracking down errors.

There are three types of bugs you'll find in JSP code: parse errors, runtime exceptions, and functional errors.

Parse errors are easy, like grammatical errors. In the example, we've forgotten to add the second `2

Previous< 7 8 9 10 11 12 13 14 15 16 17 > Next
  Copyright 2000-2006 © SoloScript.com, All rights reserved.