Home arrow Java & J2EE arrow Page 4 - Introduction to JavaServer Faces Part 2

Console Message - Java

We continue with part two of Chapter 2 of Introduction JavaServer Faces Programming, by Budi Kurniawan (McGraw-Hill/Osborne, ISBN 0-07-222983-7, 2004). This section deals with the ActionListener and Component Tree, as well as validation and navigation for your JSP pages.  This chapter prepares you for the next chapters by introducing the JSF Application Programming Interface (API) and the Application Configuration file.

TABLE OF CONTENTS:
  1. Introduction to JavaServer Faces Part 2
  2. The Action Listener
  3. Continuing With the navigateComponent Tree
  4. Console Message
  5. And the Message
  6. Authoring the JSP Page for the Validator Example
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 23
March 15, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

And, in the console, you will see the following message:

Model Object Created
getFirstNumber:0
getSecondNumber: 0
getResult: 0
getPhaseId called

Viewing the source, you can see the following HTML tags:

 
<html>
<head>
<title>Add 2 numbers</title>
</head>
<body>
<form method="post"
action
="/JSFCh02a/faces/adder.jsp;jsessionid=
1EF862DDA5B0B99F69E73A32F417552B"
>
<br/>First Number:
<input type="text" name="firstNumber"
id
="firstNumber" value="0"/>
<br/>Second Number:
<input type="text" name="secondNumber"
id
="secondNumber" value="0"/>
<br/>Result:
0
<br/>
<input type="submit" name="submitButton"
value
="  Add  "/>
</form>
</body>
</html>

JSF application

Figure 6 Running the application

JSF results

Figure 7 The result of the addition

Now, type two numbers into the input boxes and click the Add button. You can see the browser now displays the result of the addition, as shown in Figure 7.

Buy this book now!Remember: This is part one of the second chapter of JavaServer Faces Programming, by Budi Kurniawan (McGraw-Hill/Osborne, ISBN 0-07-222983). Stay tuned for more helpful chapters from McGraw-Hill/Osborne.
Buy this book!



 
 
>>> More Java & J2EE Articles          >>> More By McGraw-Hill/Osborne
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

JAVA & J2EE ARTICLES

- More Java Bugs Lead to More Attacks
- Oracle's Java One Brings News, Surprises
- Oracle Patches Java Runtime Environment
- Apple Syncs Java Update with Oracle
- Spring 3.1 Java Development Framework Compat...
- Jelastic Java PaaS Availability and Pricing ...
- NetBeans 7.1 Released, Supports JavaFX 2
- SolarWinds Releases Newest Version of Java M...
- Free Monitoring Tool for Java Apps on Heroku
- Heroku Adds JCloud Platform Support, Java 7 ...
- Java SE 8 Speculation in Full Swing
- Java SE 7 Now Available
- New JVM Language and Java Reporting Tool
- Java 7 Release Update and New Eclipse Toolkit
- The Best Java Netbeans IDE Plugins

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: