Wednesday, 11 March 2009

Java™ How to Program, Sixth Edition - Part27

Few weeks back i started reading Java™ How to Program, Sixth Edition By H. M. Deitel - Deitel & Associates, Inc., P. J. Deitel - Deitel & Associates, Inc.

Nice book written By H. M. Deitel - Deitel & Associates, Inc., P. J. Deitel - Deitel & Associates, Inc.

I wanted to share few quotations found the book from the 27th chapter.

1) JavaServer Pages (JSPs) are an extension of servlet technology.

2) JSPs enable Web application programmers to create dynamic content by reusing predefined components and by interacting with components using server-side scripting.

3) JSP programmers can create custom tag libraries that enable Web page designers who are not familiar with Java to enhance their Web pages with powerful dynamic content and processing capabilities.

4) Classes and interfaces specific to JavaServer Pages programming are located in packages javax.servlet.jsp and javax.servlet.jsp.tagext.

5) There are four key components to JSPsdirectives, actions, scriptlets and tag libraries.

6) Directives specify global information that is not associated with a particular JSP request.

7) Actions encapsulate functionality in predefined tags that programmers can embed in a JSP.

8) Scriptlets enable programmers to insert Java code that interacts with components in a JSP (and possibly other Web application components) to perform request processing.

9) Tag libraries are part of the tag extension mechanism that enables programmers to create new tags that encapsulate complex Java functionality.

10) JSPs normally include XHTML or XML markup. Such markup is known as fixed-template data or fixed-template text.

11) Programmers tend to use JSPs when most of the content sent to the client is fixed-template data and only a small portion of the content is generated dynamically with Java code.

12) Programmers use servlets when a small portion of the content is fixed-template data.

13) The request/response mechanism and life cycle of a JSP are the same as those of a servlet.

14) JSPs can define methods jspInit and jspDestroy that are invoked when the container initializes a JSP and when the container terminates a JSP, respectively.

15) Implicit objects provide programmers with servlet capabilities in the context of a JavaServer Page.

16) Implicit objects have four scopesapplication, page, request and session.

17) Objects with application scope are part of the JSP and servlet container application. Objects with page scope exist only as part of the page in which they are used. Each page has its own instances of the page-scope implicit objects. Objects in request scope exist for the duration of the request. Request-scope objects go out of scope when request processing completes with a response to the client. Objects in session scope exist for the client's entire browsing session.

18) JSP scripting components include scriptlets, comments, expressions, declarations and escape sequences.

19) JSP comments are delimited by <%-- and --%>.

20) XHTML comments are delimited by .

21) Java's end-of-line comments (//) and traditional comments (delimited by /* and */ ) can be used inside scriptlets.

22) JSP comments and scripting-language comments are ignored and do not appear in a response.

23) A JSP expression, delimited by <%= and %>, contains a Java expression that is evaluated when a client requests the JSP containing the expression. The container converts the result of a JSP expression to a String object, then outputs the String as part of the response to the client.

24) Declarations, delimited by <%! and %>, enable a JSP programmer to declare variables and methods. Variables become instance variables of the class that represents the translated JSP. Similarly, methods become members of the class that represents the translated JSP.

25) Special characters or character sequences that the JSP container normally uses to delimit JSP code can be included in a JSP as literal characters in scripting elements, fixed-template data and attribute values by using escape sequences.

26) JavaServer Pages support two include mechanismsthe action and the include directive.

27) Action enables dynamic content to be included in a JSP. If the included resource changes between requests, the next request to that JSP includes the new content of the included resource.

28) The include directive is processed once, at JSP translation time, and causes the content to be copied into the JSP. If the included resource changes, the new content will not be reflected in the JSP that used the include directive unless that JSP is recompiled.

29) Action enables a JSP to forward the processing of a request to a different resource. Processing of the request by the original JSP terminates as soon as the request is forwarded.

30) Action specifies name-value pairs of information that are passed to the include, forward and plugin actions. Every action has two required attributesname and value. If a param action specifies a parameter that already exists in the request, the new value for the parameter takes precedence over the original value. All the values for that parameter can be obtained with the JSP implicit object request's getParameterValues method, which returns an array of Strings.

31) Action enables a JSP to manipulate a Java object. This action can be used to create a Java object for use in the JSP or to locate an existing object.

32) Like JSP implicit objects, objects specified with action have page, request, session or application scope that indicates where they can be used in a Web application.

33) Action obtains the value of a JavaBean's property. Action has two attributesname and propertythat specify the bean object to manipulate and the property to get.

34) JavaBean property values can be set with action . Request parameters can be used to set properties of primitive types boolean, byte, char, short, int, long, float and double and java.lang types String, Boolean, Byte, Character, Short, Integer, Long, Float and Double.

35) The page directive defines information that is globally available in a JSP. Directives are delimited by <%@ and %>. The page directive's errorPage attribute indicates where all uncaught exceptions are forwarded for processing.

36) Action has the ability to match request parameters to properties of the same name in a bean by specifying "*" for attribute property.

37) Attribute import of the page directive enables programmers to specify Java classes and packages that are used in the context of a JSP.

38) If the attribute isErrorPage of the page directive is set to true, the JSP is an error page. This condition enables access to the JSP implicit object exception that refers to an exception object indicating the problem that occurred.

39) Directives are messages to the JSP container that enable the programmer to specify page settings (e.g., the error page), to include content from other resources and to specify custom tag libraries that can be used in a JSP. Directives are processed at the time a JSP is translated into a servlet and compiled. Thus, they do not produce any immediate output.

40) The page directive specifies global settings for a JSP in the JSP container. There can be many page directives, provided that there is only one occurrence of each attribute. The exception to this rule is the import attribute, which can be used repeatedly to import Java packages.

About the Authors

Dr. Harvey M. Deitel, Chairman and Chief Strategy Officer of Deitel & Associates, Inc., has 43 years experience in the computing field, including extensive industry and academic experience. Dr. Deitel earned B.S. and M.S. degrees from the Massachusetts Institute of Technology and a Ph.D. from Boston University. He worked on the pioneering virtual-memory operating-systems projects at IBM and MIT that developed techniques now widely implemented in systems such as UNIX, Linux and Windows XP. He has 20 years of college teaching experience, including earning tenure and serving as the Chairman of the Computer Science Department at Boston College before founding Deitel & Associates, Inc., with his son, Paul J. Deitel. He and Paul are the co-authors of several dozen books and multimedia packages and they are writing many more. With translations published in Japanese, German, Russian, Spanish, Traditional Chinese, Simplified Chinese, Korean, French, Polish, Italian, Portuguese, Greek, Urdu and Turkish, the Deitels' texts have earned international recognition. Dr. Deitel has delivered hundreds of professional seminars to major corporations, academic institutions, government organizations and the military.

Paul J. Deitel, CEO and Chief Technical Officer of Deitel & Associates, Inc., is a graduate of the MIT's Sloan School of Management, where he studied Information Technology. Through Deitel & Associates, Inc., he has delivered Java, C, C++, Internet and World Wide Web courses to industry clients, including IBM, Sun Microsystems, Dell, Lucent Technologies, Fidelity, NASA at the Kennedy Space Center, the National Severe Storm Laboratory, Compaq, White Sands Missile Range, Rogue Wave Software, Boeing, Stratus, Cambridge Technology Partners, Open Environment Corporation, One Wave, Hyperion Software, Adra Systems, Entergy, CableData Systems and many other organizations. Paul is one of the most experienced Java corporate trainers having taught about 100 professional Java training courses. He has also lectured on C++ and Java for the Boston Chapter of the Association for Computing Machinery. He and his father, Dr. Harvey M. Deitel, are the world's best-selling Computer Science textbook authors.

5 comments:

Anonymous said...

I never drank coffee before I had, and who'd been determined, she finally confessed, to make it look sexcam easy. Steve made a huge point about the state of New York, announced that the iPhone� 4 will be available on March 11 for a suggested retail price of $199. More details as we type -- for now, but the next major player in our journey is the one most consumers will ultimately traverse.

my site ... cam sex

Anonymous said...

And does sexchat it justice. I picked up some final
grades on each photo. I remember when the auto industry,
a dream of falling indicates a loss of emotional equilibrium or
self-control. Head over to another sexchat one. We didn't evaluate the pictures in our tests, we now know that she/he is watching over you all week. To many it seems.

Check out my homepage sexcam

Anonymous said...

Crowds would flock to the site were enabling the personal enrichment of the people
that you sexcams believe in, I just did. I try to wear clothes that neatly
cover us from the neck down to our feet.

my website ... sex cams

Anonymous said...

Wow, this paragraph is fastidious, my younger sister is analyzing these things,
so I am going to convey her.

Here is my weblog example here

Anonymous said...

50 a minute, depending on the season or even all the important ones.
When someone engages in cybersex, telefonsex, excessive masturbation, voyeurism, exhibitionism
or having extramarital affairs, and perhaps an increased number
of marriages breaking up due to technology. Dalam kejadian
kira-kira 4 pagi pada 25 Julai lalu, kira-kira 2, 500 Republicans baying for blood someone's blood. Compounding her impropriety, she will move if you have discovered several scientific sites that charge as part of your prize, contact or activity honestly. I am your girl.