0% found this document useful (0 votes)
17 views50 pages

Beginning JSP JSF and Tomcat 2nd Edition Java Web Development Giulio Zambon Instant Download

The document is a promotional material for the book 'Beginning JSP JSF and Tomcat 2nd Edition' by Giulio Zambon, which covers Java web development. It includes links to download the book and other related titles, along with details such as ISBN, file size, and publication year. The content outlines various chapters focusing on JSP, JSF, Tomcat, and web application development techniques.

Uploaded by

aqdxjxcnem4047
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views50 pages

Beginning JSP JSF and Tomcat 2nd Edition Java Web Development Giulio Zambon Instant Download

The document is a promotional material for the book 'Beginning JSP JSF and Tomcat 2nd Edition' by Giulio Zambon, which covers Java web development. It includes links to download the book and other related titles, along with details such as ISBN, file size, and publication year. The content outlines various chapters focusing on JSP, JSF, Tomcat, and web application development techniques.

Uploaded by

aqdxjxcnem4047
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Beginning JSP JSF and Tomcat 2nd Edition Java Web

Development Giulio Zambon - PDF Download (2025)

https://ebookultra.com/download/beginning-jsp-jsf-and-tomcat-2nd-
edition-java-web-development-giulio-zambon/

Visit ebookultra.com today to download the complete set of


ebooks or textbooks
We have selected some products that you may be interested in
Click the link to download now or visit ebookultra.com
for more options!.

Beginning JSP Jsf and Tomcat Web Development 1st Edition


Giulio Zambon

https://ebookultra.com/download/beginning-jsp-jsf-and-tomcat-web-
development-1st-edition-giulio-zambon/

Beginning Android Web Apps Development 1st ed. Edition Jon


Westfall

https://ebookultra.com/download/beginning-android-web-apps-
development-1st-ed-edition-jon-westfall/

Secure Java For Web Application Development 1st Edition


Abhay Bhargav

https://ebookultra.com/download/secure-java-for-web-application-
development-1st-edition-abhay-bhargav/

EJB JSP Java on the edge Lou Marco

https://ebookultra.com/download/ejb-jsp-java-on-the-edge-lou-marco/
Beginning Java Game Programming 2nd Edition Jonathan S.
Harbour

https://ebookultra.com/download/beginning-java-game-programming-2nd-
edition-jonathan-s-harbour/

Java for the Web with Servlets JSP and EJB A Developer s
Guide to J2EE Solutions First Edition. Edition Budi
Kurniawan
https://ebookultra.com/download/java-for-the-web-with-servlets-jsp-
and-ejb-a-developer-s-guide-to-j2ee-solutions-first-edition-edition-
budi-kurniawan/

XML Programming Web Applications and Web Services With JSP


and ASP 1st Edition Alexander Nakhimovsky

https://ebookultra.com/download/xml-programming-web-applications-and-
web-services-with-jsp-and-asp-1st-edition-alexander-nakhimovsky/

Beginning Joomla Web Site Development Wrox Programmer to


Programmer 1st Edition Cory Webb

https://ebookultra.com/download/beginning-joomla-web-site-development-
wrox-programmer-to-programmer-1st-edition-cory-webb/

Ivor Horton s Beginning Java Horton

https://ebookultra.com/download/ivor-horton-s-beginning-java-horton/
Beginning JSP JSF and Tomcat 2nd Edition Java Web
Development Giulio Zambon Digital Instant Download
Author(s): Giulio Zambon
ISBN(s): 9781430246237, 1430246235
File Details: PDF, 10.90 MB
Year: 2012
Language: english
Beginning JSP, JSF and
Tomcat
Java Web Development

„„„

Giulio Zambon

www.it-ebooks.info
Beginning JSP, JSF and Tomcat
Copyright © 2012 by Giulio Zambon
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting,
reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter
developed. Exempted from this legal reservation are brief excerpts in connection with reviews or scholarly analysis or
material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use
by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of
the Copyright Law of the Publisher's location, in its current version, and permission for use must always be obtained
from Springer. Permissions for use may be obtained through RightsLink at the Copyright Clearance Center. Violations
are liable to prosecution under the respective Copyright Law.
ISBN 978-1-4302-4623-7
ISBN 978-1-4302-4624-4 (eBook)
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every
occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion
and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary
rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither
the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may
be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
President and Publisher: Paul Manning
Lead Editor: Steve Anglin
Developmental Editor: Douglas Pundick, Ralph Moore
Technical Reviewer: Boris Minkin, Manuel Joran Elera
Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Louise Corrigan, Morgan Ertel, Jonathan
Gennick, Jonathan Hassell, Robert Hutchinson, Michelle Lowman, James Markham, Matthew Moodie, Jeff
Olson, Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, Gwenan Spearing, Matt
Wade, Tom Welsh
Coordinating Editors: Katie Sullivan
Copy Editor: Michael Sandlin
Compositor: Bytheway Publishing Services
Indexer: SPi Global
Artist: SPi Global
Cover Designer: Anna Ishchenko
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit
www.springeronline.com.
For information on translations, please e-mail rights@apress.com, or visit www.apress.com.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook
Licensing web page at www.apress.com/bulk-sales.
Any source code or other supplementary materials referenced by the author in this text is available to readers at
www.apress.com. For detailed information about how to locate your book’s source code, go to www.apress.com/source-
code.

ii

www.it-ebooks.info
Contents at a Glance

„ About the Author.................................................................................................. xiv


„ About the Technical Reviewers ............................................................................ xv
„ Chapter 1: Introducing JSP and Tomcat .................................................................1
„ Chapter 2: JSP Elements.......................................................................................19
„ Chapter 3: JSP Application Architectures ............................................................49
„ Chapter 4: JSP in Action .......................................................................................79
„ Chapter 5: XML and JSP .....................................................................................121
„ Chapter 6: Databases..........................................................................................159
„ Chapter 7: JavaServer Faces 2.2 ........................................................................189
„ Chapter 8: JSF and eshop ...................................................................................231
„ Chapter 9: Tomcat...............................................................................................259
„ Chapter 10: eshop* .............................................................................................281
„ Appendix A: The Web Page .................................................................................317
„ Appendix B: SQL Practical Introduction..............................................................379
„ Appendix C: Abbreviations and Acronyms..........................................................405
„ Index ...................................................................................................................409

iii

www.it-ebooks.info
Contents

„ About the Author.................................................................................................. xiv


„ About the Technical Reviewers ............................................................................ xv
„ Chapter 1: Introducing JSP and Tomcat .................................................................1
Installing Java....................................................................................................................3
Java Test .................................................................................................................................................. 5
Installing Tomcat ...............................................................................................................6
Simple Tomcat Test.................................................................................................................................. 8
What Is JSP?......................................................................................................................9
Viewing a JSP Page................................................................................................................................ 10
Hello World! .....................................................................................................................12
Listing the HTML-Request Parameters............................................................................16
Summary .........................................................................................................................17
„ Chapter 2: JSP Elements.......................................................................................19
Introduction .....................................................................................................................19
Scripting Elements and Java ...........................................................................................20
Scriptlets ................................................................................................................................................ 20
Expressions ............................................................................................................................................ 20
Declarations............................................................................................................................................ 21
Data Types and Variables ....................................................................................................................... 21
Objects and Arrays ................................................................................................................................. 23
Operators, Assignments, and Comparisons ........................................................................................... 24

iv

www.it-ebooks.info
„ #/.4%.43

Selections ............................................................................................................................................... 25
Iterations ................................................................................................................................................ 26
Implicit Objects................................................................................................................27
The application Object....................................................................................................................... 27
The config Object ................................................................................................................................. 30
The exception Object........................................................................................................................... 31
The out Object ....................................................................................................................................... 32
The pageContext Object....................................................................................................................... 34
The request Object............................................................................................................................... 34
The response Object............................................................................................................................. 43
The session Object............................................................................................................................... 43
Directive Elements...........................................................................................................44
The page Directive ................................................................................................................................. 44
The include Directive ........................................................................................................................... 47
The taglib Directive ............................................................................................................................. 47

Summary .........................................................................................................................47
„ Chapter 3: JSP Application Architectures ............................................................49
The Model 1 Architecture ................................................................................................49
The Model 2 Architecture ................................................................................................50
The E-bookshop Home Page .................................................................................................................. 52
The E-bookshop Servlet ......................................................................................................................... 54
More on E-bookshop .............................................................................................................................. 57
E-bookshop’s Folder Structure............................................................................................................... 60
Eclipse .............................................................................................................................63
Creating a New Web Project................................................................................................................... 67
Importing a WAR file............................................................................................................................... 69
Eclipse Occasional Bugs......................................................................................................................... 70

www.it-ebooks.info
„ #/.4%.43

A Better Online Bookshop................................................................................................70


Objects and Operations .......................................................................................................................... 71
The Customer Interface .......................................................................................................................... 72
The E-shop Architecture ..................................................................................................73
The Model............................................................................................................................................... 73
The Controller ......................................................................................................................................... 74
The View ................................................................................................................................................. 76
Summary .........................................................................................................................77
„ Chapter 4: JSP in Action .......................................................................................79
JSP Standard Actions ......................................................................................................79
Actions: forward, include, and param .................................................................................................... 79
Action: useBean...................................................................................................................................... 82
Actions: setProperty and getProperty..................................................................................................... 84
Action: text ............................................................................................................................................. 87
Actions: element, attribute, and body..................................................................................................... 87
Actions: plugin, params, and fallback .................................................................................................... 88
Comments and Escape Characters..................................................................................90
JSP’s Tag Extension Mechanism.....................................................................................90
Bodyless Custom Actions ....................................................................................................................... 91
Bodied Custom Actions........................................................................................................................... 95
Tag Files ................................................................................................................................................. 98
JSTL and EL ...................................................................................................................103
JSP Expression Language .................................................................................................................... 103
JSP Standard Tag Library ..................................................................................................................... 107
The Core Library ................................................................................................................................... 109
The i18n Library: Writing Multi-Lingual Applications ........................................................................... 112
Summary .......................................................................................................................119

vi

www.it-ebooks.info
„ #/.4%.43

„ Chapter 5: XML and JSP .....................................................................................121


The XML Document........................................................................................................122
Defining Your Own XML Documents ..............................................................................123
XML DTDs ............................................................................................................................................. 124
XML Schemas....................................................................................................................................... 124
Validation.............................................................................................................................................. 132
JSTL-XML and XSL ........................................................................................................139
XPath .................................................................................................................................................... 139
An XPath Example ................................................................................................................................ 143
x:parse.................................................................................................................................................. 145
XSLT: Transformation from One XML Format to Another...................................................................... 146
XSLT: Transformation from XML to HTML ............................................................................................ 147
XSL Transformation: Browser Side vs. Server Side.............................................................................. 148
x:transform and x:param ...................................................................................................................... 152
JSP in XML Syntax.........................................................................................................153
Summary .......................................................................................................................157
„ Chapter 6: Databases..........................................................................................159
MySQL............................................................................................................................159
MySQL Test........................................................................................................................................... 161
MySQL/Tomcat Test ............................................................................................................................. 165
Database Basics ............................................................................................................168
SQL Scripts ....................................................................................................................170
Java API .........................................................................................................................171
Connecting to the Database ................................................................................................................. 172
Accessing Data..................................................................................................................................... 173
Transactions ......................................................................................................................................... 176
DB Access in E-shop......................................................................................................176

vii

www.it-ebooks.info
„ #/.4%.43

What about the XML Syntax?.........................................................................................180


Possible Alternatives to MySQL .....................................................................................184
Summary .......................................................................................................................187
„ Chapter 7: JavaServer Faces 2.2 ........................................................................189
The simplef Application .................................................................................................189
An Alternative to <managed-bean>..................................................................................................... 195
The simplefx and simpleh Applications .........................................................................195
The JSF Life Cycle .........................................................................................................197
Event Handling...................................................................................................................................... 199
The JSF Tag Libraries ....................................................................................................199
The html Library .................................................................................................................................. 200
The core Library .................................................................................................................................. 205
The facelet Library ............................................................................................................................ 215
The composite Library........................................................................................................................ 224
Summary .......................................................................................................................229
„ Chapter 8: JSF and eshop ...................................................................................231
eshopf............................................................................................................................231
The Top Menu....................................................................................................................................... 232
The Left Menu (part 1) .......................................................................................................................... 233
The Shop Manager ............................................................................................................................... 235
The Left Menu (part 2) .......................................................................................................................... 236
The Checkout Page............................................................................................................................... 237
web.xml ................................................................................................................................................ 238
Using and Creating Converters ......................................................................................240
Writing the Converter in Java ............................................................................................................... 241
Registering the Converter with the Application.................................................................................... 243
Using the Converter .............................................................................................................................. 243

viii

www.it-ebooks.info
„ #/.4%.43

Using and Creating Validators .......................................................................................243


Built-In Validators ................................................................................................................................. 244
Application-Level Validation ................................................................................................................. 245
Custom Validators................................................................................................................................. 246
Validation Methods in Backing Beans .................................................................................................. 247
Creating Custom Components .......................................................................................248
Component ........................................................................................................................................... 249
Renderer............................................................................................................................................... 251
Tag........................................................................................................................................................ 253
Inline Renderer ..................................................................................................................................... 256
faces-config.xml............................................................................................................257
Summary .......................................................................................................................257
„ Chapter 9: Tomcat...............................................................................................259
Tomcat’s Architecture and server.xml...........................................................................259
Context ................................................................................................................................................. 260
Connector ............................................................................................................................................. 261
Host ...................................................................................................................................................... 261
Engine................................................................................................................................................... 262
Service.................................................................................................................................................. 262
Server ................................................................................................................................................... 262
Listener................................................................................................................................................. 263
Global Naming Resources .................................................................................................................... 263
Realm ................................................................................................................................................... 263
Cluster .................................................................................................................................................. 263
Valve ..................................................................................................................................................... 264
Loader and Manager............................................................................................................................. 264
Directory Structure ........................................................................................................264
conf....................................................................................................................................................... 265

ix

www.it-ebooks.info
„ #/.4%.43

lib.......................................................................................................................................................... 265
logs....................................................................................................................................................... 266
webapps ............................................................................................................................................... 266
work ..................................................................................................................................................... 266
Logging the Requests ....................................................................................................267
Tomcat on Port 80 .........................................................................................................269
Creating a Virtual Host...................................................................................................269
HTTPS ............................................................................................................................271
Application Deployment.................................................................................................276
Summary .......................................................................................................................279
„ Chapter 10: eshop* .............................................................................................281
The eshop Application ...................................................................................................281
What Happens When the Application Starts ......................................................................................... 283
Handling Requests for Book Selection and Book Search ..................................................................... 286
Displaying the Book Details.................................................................................................................. 287
Managing the Shopping Cart ................................................................................................................ 288
Accepting an Order............................................................................................................................... 289
Providing the Payment Details.............................................................................................................. 299
The eshopx Application..................................................................................................300
Style Sheet ........................................................................................................................................... 301
web.xml ................................................................................................................................................ 302
JSP Documents .................................................................................................................................... 303
Custom Tags and TLD........................................................................................................................... 306
The eshopf Application ..................................................................................................308
web.xml and context.xml ..................................................................................................................... 309
Style Sheet ........................................................................................................................................... 310
JSP Documents .................................................................................................................................... 312

www.it-ebooks.info
„ #/.4%.43

Java Modules ....................................................................................................................................... 313


Summary .......................................................................................................................315
„ Appendix A: The Web Page .................................................................................317
The WWW Network ........................................................................................................317
URLs, Hosts, and Paths..................................................................................................320
XHTML vs HTML.............................................................................................................322
XHTML/HTML Elements .................................................................................................324
HTML5............................................................................................................................327
HTML Documents...........................................................................................................329
Standard Attributes........................................................................................................331
Core Attributes...................................................................................................................................... 331
Language Attributes ............................................................................................................................. 332
Keyboard Attributes.............................................................................................................................. 333
Event Attributes .............................................................................................................333
Object Event Attributes......................................................................................................................... 333
Form Event Attributes........................................................................................................................... 334
Keyboard Event Attributes .................................................................................................................... 334
Mouse Event Attributes ........................................................................................................................ 335
Tables ............................................................................................................................335
Table Structure..................................................................................................................................... 337
Table Width........................................................................................................................................... 337
Table Borders ....................................................................................................................................... 337
Row and Cell Alignment ....................................................................................................................... 339
Columns................................................................................................................................................ 342
Column Groups ..................................................................................................................................... 343
Table Header, Body, and Footer ........................................................................................................... 344
Input Forms....................................................................................................................345

xi

www.it-ebooks.info
„ #/.4%.43

Buttons and Images.............................................................................................................................. 348


Lists ...............................................................................................................................350
Image Maps ...................................................................................................................351
Splitting an Image with a Table............................................................................................................ 351
Using an Image Map with a Table or a List .......................................................................................... 353
Using an Image Map with Areas........................................................................................................... 356
The Bottom Line ................................................................................................................................... 357
Cascading Style Sheets .................................................................................................357
Style Syntax.......................................................................................................................................... 358
Placing Styles ....................................................................................................................................... 359
HTML Elements div and span ............................................................................................................... 360
Using a Style Sheet to Implement Tabs.........................................................................361
JavaScript......................................................................................................................364
Placing JavaScript Inside a Web Page ................................................................................................. 364
Responding to Events ........................................................................................................................... 365
Checking and Correcting Dates ............................................................................................................ 365
Animation: Ticker Tape......................................................................................................................... 370
Animation: Bouncing Balls.................................................................................................................... 373
„ Appendix B: SQL Practical Introduction..............................................................379
SQL Terminology............................................................................................................379
Transactions ..................................................................................................................380
Conventions ...................................................................................................................382
Statements ....................................................................................................................382
The WHERE Condition ........................................................................................................................... 384
Data Types............................................................................................................................................ 385
SELECT ................................................................................................................................................. 388
CREATE DATABASE............................................................................................................................... 394

xii

www.it-ebooks.info
„ #/.4%.43

CREATE TABLE...................................................................................................................................... 395


CREATE INDEX ...................................................................................................................................... 397
CREATE VIEW ........................................................................................................................................ 398
INSERT.................................................................................................................................................. 398
DROP..................................................................................................................................................... 399
DELETE ................................................................................................................................................. 399
ALTER TABLE ........................................................................................................................................ 399
UPDATE................................................................................................................................................. 400
SET TRANSACTION and START TRANSACTION...................................................................................... 400
COMMIT and ROLLBACK ....................................................................................................................... 401
Reserved SQL Keywords................................................................................................401
„ Appendix C: Abbreviations and Acronyms..........................................................405
„ Index ...................................................................................................................409

xiii

www.it-ebooks.info
About the Author

Giulio Zambon’s first love was physics, but he decided to dedicate himself to
software development more than 30 years ago: back when computers were still
made of transistors and core memories, programs were punched on cards, and
Fortran only had arithmetic IFs. Over the years, he learned a dozen computer
languages and worked with all sorts of operating systems. His specific interests
were in telecom and real-time systems, and he managed several projects to their
successful completion.
In 2001 Giulio founded his own company offering computer telephony
integration (CTI) services, and he used JSP and Tomcat exclusively to develop the
web side of the service platform. Back in Australia after many years in Europe, he
now dedicates himself to writing software to generate and solve numeric puzzles.
His web site, http://zambon.com.au/, is written in JSP on his dedicated server, which, unsurprisingly,
runs Tomcat!

xiv

www.it-ebooks.info
About the Technical Reviewers

Boris Minkin is a senior technical architect at a major financial corporation. He


has more than 20 years of experience working in various areas of information
technology and financial services. Boris obtained his master’s degree in
information systems at Stevens Institute of Technology, New Jersey. His
professional interests are in Internet technology, service-oriented architecture,
enterprise application architecture, multi-platform distributed applications,
cloud, distributed caching, Java, grid, and high performance computing. You can
contact Boris at bm@panix.com.

Manuel Jordan Elera is an autodidactic developer and researcher who enjoys


learning new technologies for his own experiments and creating new
integrations. Manuel won the 2010 Springy Award-Community Champion. In his
limited free time, he reads the Bible and composes music on his guitar. Manuel is
a senior member in the Spring Community Forums known as dr_pompeii and a
technical reviewer for important books about Spring Source projects, all
published by Apress. Read more and contact him through his blog at
http://manueljordan.wordpress.com and follow him on his Twitter account,
@dr_pompei.

xv

www.it-ebooks.info
CHAPTER 1

„„„

Introducing JSP and Tomcat

Interactivity is what makes the Web really useful. By interacting with a remote server, you can find the
information you need, keep in touch with your friends, or purchase something online. And every time
you type something into a web form, an application “out there” interprets your request and prepares a
web page to respond.
To understand JSP, you first need to have a clear idea of what happens when you ask your browser
to view a web page, either by typing a URL into the address field of your browser or by clicking on a
hyperlink. Figure 1-1 shows you how it works.

Figure 1-1. Viewing a plain HTML page

The following steps show what happens when you request your browser to view a static web page:
1. When you type an address such as http://www.website.com/path
/whatever.html into the address field, your browser first resolves
www.website.com (i.e., the name of the web server) into the corresponding
Internet Protocol (IP) address, usually by asking the Domain Name Server
provided by your Internet Service Provider (ISP). Then your browser sends an
HTTP request to the newly found IP address to receive the content of the file
identified by /path/whatever.html.

1
G. Zambon, Beginning JSP, JSF and Tomcat
© Giulio Zambon 2012
www.it-ebooks.info
CHAPTER 1 INTRODUCING JSP AND TOMCAT

2. In reply, the web server sends an HTTP response containing a plain-text HTML
page. Images and other non-textual components, such as sound and video
clips, only appear in the page as references.
3. Your browser receives the response, interprets the HTML code contained in
the page, requests the non-textual components from the server, and displays
the lot.
JavaServer Pages (JSP) is a technology that helps you create such dynamically generated pages by
converting script files into executable Java modules; JavaServer Faces (JSF) is a package that facilitates
interactivity with the page viewers; and Tomcat is an application that can execute your code and act as a
web server for your dynamic pages.
Everything you need to develop JSP/JSF web applications is available for free download from the
Internet; but to install all the necessary packages and tools and obtain an integrated development
environment, you need to proceed with care. There is nothing more annoying than having to deal with
incorrectly installed software. When something doesn't work, the problem will always be difficult to find.
In this chapter, I'll introduce you to Java servlets and JSP, and I’ll show you how they work together
within Tomcat to generate dynamic web pages. But, first of all, I will guide you through the installation
of Java and Tomcat: there wouldn’t be much point in looking at code you can’t execute on your PC,
would there?
You’ll have to install more packages as you progress. Do these installations correctly, and you will
never need to second guess yourself. In total, you will need at least 300MB of disk space for Java and
Tomcat alone and twice as much space to install the Eclipse development environment.
To run all the examples contained in this book, I used a PC with a 2.6GHz AMD Athlon 64x2
(nothing fancy, nowadays) with 1GB of memory and running Windows Vista SP2. Before performing any
installation, I reformatted the hard disk and re-installed the OS from the original DVD. I don’t suggest
for a moment that you do the same! I did it for two opposite but equally important reasons: first, I didn't
want existing stuff to interfere with the latest packages needed for web development; second, I didn’t
want to rely on anything already installed. I wanted to be sure to give you the full list of what you need.
At the time of this writing, the latest versions of all the packages you will need to install are:
Java: 1.7.0 update 3 (installation explained in this chapter)
Tomcat web server: 7.0.26 (installation also explained in this chapter)
Eclipse development environment: Indigo 3.7.2 (installation explained in Chapter 2)
MySQL database: 5.5.21.0 (installation explained in Chapter 6)
MySQL Java database connector (JDBC): 5.1.18 (installation also explained in Chapter 6)
JavaServer Faces: 2.1.7 (installation explained in Chapter 7)
I included Eclipse on the list because an integrated development environment is extremely useful
for developing software. And MySQL is listed because any non-trivial web application is likely to need
handling data.
Of course, after this book is published, there will most likely be newer releases of all the
aforementioned packages. Nevertheless, you should be able to adapt my instructions to install the latest
versions without any problem.
One last recommendation: to be sure that everything will work correctly, please follow the
installation instructions to the letter. It will save you endless headaches.
‘Nuff said. Here we go.

www.it-ebooks.info
CHAPTER 1 INTRODUCING JSP AND TOMCAT

Installing Java
Nothing runs without Java, and you need two different Java packages: one is the runtime environment
(JRE), which lets you execute Java, and the other is the Java Development Kit (JDK), which lets you
compile Java sources into executable classes.
They are downloadable together from Oracle’s web site. Here’s what you need to do:
1. Go to the URL http://www.oracle.com/technetwork/java/javase/downloads
/index.html.
2. Click on the big button marked “Java Download” (the latest version at the time
of writing is 7u3). This will take you to the page “Java SE Development Kit 7
Downloads.”
3. Select “Accept License Agreement” and then click on the link jdk-7u3-
windows-i586.exe.

The actual link might refer to a version other than “7u3,” but you need to
download either “Windows x86 (32-bit)” or “Windows x64 (64-bit),”
according to type of processor of your PC. Although I am using a 64-bit PC, I
have tested all the examples in this book with 32-bit packages because I didn’t
want to test everything twice.
4. Execute the file.
5. Accept the license agreement when requested and install everything.
At this point, you should have the folder C:\Program Files\Java\ with two subfolders: jdk1.7.0_03
and jre7, or the equivalent folders for the version you have downloaded.
In order to be able to compile Java from the command line, you need to add the JDK path to the
PATH environment variable. From the Windows Start menu, select Settings h Control Panel h System.
When the System Properties dialog opens, click on the “Advanced system settings” link that you find
on the left-hand side and then on the Advanced tab. Finally, to reach the dialog that lets you modify the
PATH variable, click on the “Environment Variables” button. You will see the double dialog window
shown in Figure 1-2.

www.it-ebooks.info
CHAPTER 1 INTRODUCING JSP AND TOMCAT

Figure 1-2. The Environment Variables double dialog

You might see a PATH variable on the top dialog, but what you need to do is scroll the bottom dialog
by clicking on its sidebar until you see a variable named Path. Double-click it (or highlight it and click the
“Edit...” button) and insert at the beginning of its value the text “C:\Program Files\Java\jdk1.7.0_03\
bin;”, as shown in Figure 1-3.

Figure 1-3. Update the Path variable

The semicolon at the end of the text is essential because it separates the new path from the existing
ones. Do not insert additional spaces before or after.
Click on the “OK” button to save the changes. Then click this button another couple of times until
the system dialog closes.

www.it-ebooks.info
CHAPTER 1 INTRODUCING JSP AND TOMCAT

Java Test
To test the Java installation, you can use the little application shown in Listing 1-1.

Listing 1-1. Exec_http.java

/* Exec_http.java - Launches a web page


*
* Usage: Exec_http URL [arg1 [arg2 [...]]]
* where URL is without "http://"
*
*/
import java.io.*;
import java.net.*;
class Exec_http {
public static void main(String[] vargs)
throws java.net.MalformedURLException ,java.io.IOException
{
String dest = "http://";

if (vargs.length <= 0) {
System.out.println("Usage: Exec_http page [args]");
System.exit(1);
}
else {
dest += vargs[0];
for (int k = 1; k < vargs.length; k++) {
dest += ((k == 1) ? "?" : "&") + vargs[k];
}
}
System.out.println(dest);
URL url = new URL(dest);
Object obj = url.getContent();
InputStream resp = (InputStream)obj;
byte[] b = new byte[256];
int n = resp.read(b);
while (n != -1) {
System.out.print(new String(b, 0, n));
n = resp.read(b);
}
}
}
It lets you open a web page from the command line. Note that all the code described in this book is
available for download from the Apress web site (http://www.apress.com/9781430246237). You don't
need to retype it. You can find the examples in folders with the same names as the corresponding
chapters. I will refer to the root directory of the software package associated with this book with the
string %SW_HOME%.
Copy the file %SW_HOME%\01 Getting Started\java\Exec_http.java to a work directory. For
simplicity, I use the desktop: but in my case, this makes sense because I use the computer exclusively to
develop the examples used in this book.

www.it-ebooks.info
Other documents randomly have
different content
expeditions, though I send cheques, I look upon them as a farce, as
if he wanted to be caught and brought home like a missionary!”
“It seems to me you are on the go from morning to night, what
time do you leave yourself for sleeping?”
“Oh, any amount, more than I want.”
“How long did you sleep last night?”
“Oh, I forget. Are you too tired to drive to a farm about a mile
away?”
“Tired! No, dear,” stooping down and kissing her, “but must you
go? Lie down, and let me read to you.”
Anything in the shape of tenderness was just the one stroke too
much for Gwen, she gave a quick dry sob and moved away.
“I can’t stand that sort of thing,” she said, “I told you I had got
maudlin. Treat me as you would a nice orthodox Christian widow,
who wears crêpe and caps and gets just to the proper state of
thinness, pulling herself up, however, just short of scragginess like a
self-respecting creature. And now we must hurry, for I hear the
carriage.”
She turned round as she was leaving the room, and laughed.
“I am altogether losing tone. Do you know that young Will Dyer—
Sir William’s black sheep, whom I have been occupying my spare
moments in being a mother to, and in trying to detach from the devil
—began yesterday to make violent love to me?”
“I don’t wonder!”
“Good gracious me, why?”
“Look at your face! You are a woman now, my good Gwen.”
“And is this the first result? God help us! Is my one pride in life to
become a thorn in my flesh?”
“That’s as you take it! It will, unless you are careful, be a very
considerable thorn in other people’s. Good gracious, child, why even
virtue in women is very much a matter of temperament, and where
the temperament is, there will the opportunities be gathered
together.”
CHAPTER XLIII.

Late one afternoon, two men, looking unspeakably battered, got into
a fly at a small off station and told the man to drive them to Strange
Hall.
“I’ll not show to a soul for a week,” said the first man, who, if one
looked at him microscopically, seemed like the remains of Strange,
“never in all my life have I felt so humiliated. To be held by the leg
by a parcel of niggers for the best part of four months, and at my
age, is too much for any fellow.”
“You were next to off your head most of the time, and then only
for us you’d have escaped long ago,” said Brydon.
“Don’t try to find excuses, it’s too damnable altogether, and to
think after all that those idiots got home months sooner, laden with
ivory!”
“After the week what will you do?” asked the other looking out of
the window. “You’ll show yourself to your people directly you are
presentable, I suppose?”
“Give interviews to reporters probably,” he returned shortly.
Brydon furtively watched the gaunt shattered man, old before his
time, who not so very long before had looked as if he could move
the world.
“Oh, that woman!” he thought savagely.
Almost in spite of himself he had become the keeper of all the
elder man’s secrets, and the office weighed frightfully on him.
By some extraordinary mischance, neither the letters sent at that
time, nor the cablegram, ever reached Strange; they came some
time after the expedition had gone, and in transmission were lost,
and the negligent messengers thought best to entirely deny the
existence of any.
When Strange enquired at the office at Cairo, there was no
account of any cable for him, the clerk who had received it had been
exchanged, and Strange made no very pressing enquiry, for he
hardly expected one, and as a P. and O. boat was starting the next
hour, he took passage on her and went on board—even giving the
reporters the slip.
As a matter of fact, he was so desperately ill at the time that he
was hardly responsible for his actions, or he must have recovered
the record of the cable, and both Brydon and Tolly were too much
occupied in the attempt to get him home alive to think of anything
else. They succeeded as it turned out, but only by the skin of his
teeth.
On the whole, despite certain eccentricities, both Tolly and Brydon
had done better than any other men possibly could have done, their
sentimental devotion to Strange put starch into their rather limp
souls, and their uncomplaining heroism under the most shocking
sufferings was almost pathetic, and then by some special
providence, they had both escaped the second fever that nearly put
an end to Strange.
“What’s that, do you see, in the field there? My eyes are beastly
dim yet,” said Strange, peering out at some object a few fields off.
“I don’t know, it looks like a hump.”
“Driver, just turn into that lane and take the south road.—It’s a
silo! By Jove! Old Hopkins is coming on, and look, all that waste
moor under cultivation! I always said it would grow potatoes.
Seemingly the place is not neglected. Hopkins was always a good
fellow, but I had no idea until now he wasn’t also an ass. I dreamt
frequently of that ensilage scheme, someone else has hatched out
my dream for me. Oh Lord, here’s this shivering on me again!
Where’s the draught?”
“In your breast-pocket.”
“Tell him to wait, I can’t get in like this, ‘there’s a decency to be
observed!’”
The driver waited, revolving in his mind suppositions as to his
remarkable fare, and wondering why “in the devil’s name” the trap
shook as if it had the palsy.
After quite half an hour it stopped and he had orders to go on,
while Strange mopped the cold sweat from his face with a trembling
hand.
“This degrades a fellow!” he muttered. As a rule he pulled himself
well together after these attacks, but this time he got no reaction.
When they reached the door he was almost unconscious.
“Take me quietly to my den,” he muttered, “don’t let the servants
bother me.” Then he fainted dead off.
CHAPTER XLIV.

As he lay in the death-like sleep of exhaustion that followed his


swoon, the change in Strange was terribly evident. He had shrunk to
half his former size, his clothes hung in bags on his limp, thin limbs,
his eyes were sunk into deep hollows, his skin was yellow and
puckered, and his lips were drawn back from his teeth in a way that
told of fever and thirst.
When Brydon, with the help of the panic-stricken servants, had
got him to the sofa, knowing his horror of fuss, he told them to send
at once for the doctor, and then dismissed them with the utmost
speed—and now he stood at the window revolving many things, and
wondering, if Strange grew worse, what would happen, would he
send for his wife, and would she come?
“My God! I wish I did not know quite so much of him,” he
muttered, “I wish he had not, in his ravings, turned himself inside
out in that ghastly way. No man should know so much of another
fellow as I do of him, it is like eavesdropping.”
Strange moaned, and Brydon crept over and covered his feet with
awkward tenderness, then he moved softly through the rooms,
looking at the skins and Oriental stuffs, the colours of which slid into
him, and comforted his soul to some slight extent.
He was vaguely fingering a piece of drapery, when he struck his
foot against the leg of a chair, he looked round breathlessly to see if
he had disturbed Strange. No—he still slept, and Brydon continued
his purposeless inspection, and, drawn by some strange coloured
texture he went towards it, and came face to face with his own
bride-picture.
He staggered back two or three steps in a spasm of terror. He had
learnt a deal too much of that picture in Strange’s ravings, but the
overmastering love for one’s own creation—inherent in God and man
—forced him back to it, and as he looked, all the past died out, right
back to that day when he was sitting in Waring Church, painting,
and wiping great sweat-drops from his face in the ecstasy of
knowing that he had done a great work, and one that would live for
ever.
A sudden indefinable sound from the terrace brought him to
himself.
It was a queer primitive sound; he felt somehow that Strange
should not hear it, and went to the window to find out what it was.
Presently it began again, and ended in a chuckle, then he caught
sight of a flutter of petticoats around the corner, and could
distinguish a murmur of words. Then a distinct squeak startled him,
and suddenly a toddling creature appeared on the terrace, and
making a grab at a flower fell sprawling on its face, and in a fraction
of time was pounced upon by the owner of the white skirts, who
cuddled it to her breast, with anxious care, but as it only kicked and
crowed she lifted her head from her kissing. And there within ten
paces of him was his picture made flesh, but with the sorrow of all
ages upon her face.
He swayed, put his hand to his head, then he dropped like a man
in a dream into a chair, and murmured,
“Oh, God! has the earth opened—has she fallen from Heaven—has
—has——”
He looked again and the flutter of her white dress in the sunlight
gave to his dazed, enchanted eyes, the figure of a new Madonna,
before whom the whole world must kneel and rise up to call her
blessed.
She came on, still murmuring to her baby, she came up to the
French window, and put out her hand to open it—then the madness
fell from Brydon, and the whole truth came with a rush.
He sprang to his feet, cast one perturbed look at Strange, “Kill him
or not, I can’t face it,” he muttered, and fled.
When Gwen got into the room, she sank wearily into a chair, and
throwing off her hat let the baby butt her at his will.
When the smile for her baby flickered off her face, the final
contained anguish of it was awful, but the child gave her little time
to nurse grief. Every moment she had either to rock him, croon little
songs to him or tickle him, if she were silent or passive for a
moment a lusty butt against her breast or a punch from the pink
dimpled fist brought her back to his service.
As she sat—sideways to the window—it was impossible for her to
see Strange, but there was nothing to hide her from him.
The soft murmur of croons and baby-sounds at last half awoke
him, he lay for some moments and let the vague music creep into
his semi-consciousness, then he opened his eyes impatiently and
closed them again—it was only one more dream, he thought—he
was beset with dreams, tortured, shaken by them.
“Oh, God! those drugs,” he muttered.
Again the murmurs broke on his ears, there was a chuckle, a
tender protesting voice, and a sharp little squeal. He shivered and
peered out towards the sounds, his eyes were dimmed from his
great sickness and could only see “men as trees walking.” Gradually
he made out the shapes of a woman and a little child.
“Is it a dream, or death?” he murmured. “Oh! God, spare me! I
am haunted by delusions.”
Another little murmur, and a soft low sob, it was the woman this
time. Again he opened his eyes and through his dreaming saw the
little yellow-headed child laughing around the chair, and inviting the
woman to a game of bo-peep.
“Oh! my baby, my own, own baby,” she broke out, stooping to
him, “do you know what they say—what they din into my ears, little
love, dear baby mine? They say your father is dead, dead, DEAD, dear
one. And must you live, grow up, little manikin, without knowing
what a man he was?—Sweet, must I sing?—Ah! If you only knew
how it hurts!”
The smile flickered back to her face, as she took him on her knee,
and she sang a little song he evidently knew well, for he kicked and
crowed by way of chorus, then he played with his bare toes for a
little—his mother, as she sang, had pulled off his socks to kiss his
feet—and as he played she returned to her sad soliloquy.
“You will have to take all from me on trust, little one, and, of
course, you will think I exaggerate, my own, when I tell you that
your mother had the best man that God yet made or will make, to
love her, to love her.—Ah! what love it was!” she repeated gently.
Then her eyes dreamt, and rested for a moment, all the pain fled,
and her face shone with radiant triumph and her mouth trembled
like a happy child’s.
“Ah! what love!” she said again; but instantly all this was swamped
in a mighty wave of pain—she caught her child and kissed him
rather wildly, whispering, “Baby, she killed this man who loved her—
killed him, baby, because she was unnatural and couldn’t love—she
killed her mother too, and oh! baby, when in her loneliness she
pleads and prays that God may let her love Him, He hides His face
from her, and it is all quite just, baby mine, her mere desert.
“Ah! my own—I can’t sing, I am so tired.”
She put him down gently, and looked before her with sad
unseeing eyes.
Strange struggled to break the spell—to speak—to move—but he
was impotent—paralyzed. A vague horror—full of sickness and
delirium—had him by the throat. He put his hand feebly to his
forehead to brush the sweat away.
“This is more cruel than death,” he muttered.
Meanwhile, the baby—being a young person of an exploring
tendency, and loose on the premises—played havoc with his
opportunities. Having smashed two Venetian glasses and an atom of
old Sèvres, he perceived his father on the sofa, and toddled over to
investigate him—but so softly that no notice was taken till Strange
suddenly found a tiny fist thrust into his mouth, then he started
amazedly and touched the child with quaking awe.
Just then Gwen discovered her loss, ran a few steps forward with
outstretched hands, and saw the two—Humphrey and his child.
“Humphrey—Humphrey!” she cried faintly, tottering towards them
—then she fell at their feet.
To Strange it was still a cruel dream—her falling but part of it.
Between the two, the child stood wondering, then he caught sight of
a diamond on his father’s finger. He seized on the finger and
dragged it to show his mother, but as she took no notice, he
smacked her face soundly with his other hand—and simultaneously
the two awoke, he from his delirium, she from her swoon.
And for one moment the two of them peered at each other
through the fog of a bitter past. Then she sat up slowly, and looked
at his face marvelling above her, and at his hand caught in her
baby’s, and broke into half incoherent wild explainings. But suddenly
the consciousness that words could in no sort of way touch her case,
silenced her; she just sat dumbly on the floor, knowing that she had
done evil in ignorance but that she had come up through great
tribulation into unutterable joy, full of knowledge, and with a soul as
white as Naaman’s skin. And so—as best became her—she simply
held up her face to be kissed, while the baby clutched hold of one of
her fingers and one of his father’s, and in words all his own and
untranslatable, but mightier than those of gods or churches, decreed
that henceforth and for ever those two should be one flesh. Which,
after all, is the especial mission of his kind.

THE END.
NEW NOVEL

BY

Helen Prothero-Lewis

Hooks of Steel

IN 3 VOLS.

Now ready at all Libraries.

CHAPTER IV.

(Reprinted from Hooks of Steel.)


He stopped when he saw us, stopped dead short on the pavement
amidst all the hurrying people. And as he looked at me and D’Arcy,
his face changed and grew drawn and old with sharp, sudden
misery. I had pierced him to the heart; in his face I saw it. Sick and
cold with shame, scarce knowing what I did, I shrank back in the
hansom. Only for a moment, but it was a fatal moment.
“Yes, that’s right, keep back, hide, I’ll protect you!” called out
D’Arcy to me loudly, so loudly Felix could not fail to hear. Then
placing one hand familiarly on my shoulder, he opened the trap-door
again with his cane and shouted—“Off!”
Without an instant’s pause the driver whipped up his horse and
was off as hard as he could go.
I recovered myself when I found I was being borne away from
Felix.
“Stop!” I cried wildly, swinging back the doors in front of me, “let
me get out. I must go back! I must go back to Felix!”
D’Arcy leaned forward and hastily swung the doors together again.
“You can never go back to Felix,” he said, seizing me and holding
me firmly down in my seat. “You will have to stay with me instead.
Felix would not have you now. He has caught you here in London
alone with me; he has found you out.”
Appalled by his words and manner, I turned upon him. His face
was still full of malignant triumph, his small dark eyes burnt as they
gazed into mine, his lips were drawn back from his big white teeth in
a wide grin. It was a full revelation this time. I knew him as he was;
loathsomely, horribly ugly and wicked.
“You are a fiend!” I cried. “I know you now. You arranged it all.
You deliberately took me where you knew Felix would see me. It was
a vile plot. I see it all, and I hate you, I hate you! Do not dare to
touch me. Take your hands off. Let me get out and leave you this
instant.”
But D’Arcy only held me down more tightly. I dashed my hand
upwards through the opening in the roof and called to the driver to
stop. “No use,” said D’Arcy. “The man is in my pay. You may as well
sit quiet, Rosamund. I shall be very kind, you have nothing to fear.”
Nearly frantic, I called to a passer-by to help me. Then D’Arcy
shouted to the driver to let down the glass, and I found myself more
straitly imprisoned than ever. By this time we had left the Strand far
behind us, and were dashing up quiet side streets, but in what
direction I knew not. It was like a horrible nightmare: on and on we
went, and each step took me more hopelessly away from Felix. In
vain did I struggle, in vain did I cry to be set down. The driver took
no notice of my cries, and D’Arcy, still with that horrible grin on his
face, said never another word, only held me back tightly in the
hansom. I cannot say how long that terrible drive lasted. My mind
throughout was a chaos of horror and despair.
At last, after long hours as it seemed to me, the hansom stopped,
and D’Arcy called to the man to open the window. We were in the
middle of a broad path bordered with trees, and all around us was
silent dreary park-land. A drizzle of rain had begun, and beneath the
trees it was already dark with the fast gathering shades of a winter
evening. Here D’Arcy loosened his hold of me, and instantly I got
out. Where to go and what to do next I knew not, so stood
helplessly in the rain. D’Arcy sat looking at me for a moment, as if
thinking, then got out also.
“There is the sovereign,” he said, handing up some money to the
driver. The man took it, glanced at me, and hesitated.
“You can go,” said D’Arcy sharply.
“And leave the young lady in the rain?”
“Did you hear? You can go,” repeated D’Arcy, still more sharply.
The man drove away. I felt too stunned to make any appeal to him.
Besides, of what use? Was it not he who had driven me on and on,
in spite of my cries, until now miles and miles of unknown streets lay
between me and Felix. If I had been in the middle of a wilderness,
and Felix the other side of the world, he could not have felt more
lost to me than he did at that moment.
“Now, Rosamund,” said D’Arcy, turning to me and speaking very
determinedly, “listen to reason and be a sensible girl. You have lost
Felix. You are not so mad, I suppose, as to imagine he will have
anything further to do with you after this. You lead a miserable life
at the castle, and it will be still more miserable to go back there
now, for Felix will never visit you any more. Neither will I come there
after you again. I have had enough of it, I want something better.
So if you go back, you go back to be absolutely alone with a
madman and his keeper. Mark my words: your uncle is not, and
never will be cured. At his best, he’s as mad as a hatter. And he’s
liable to these attacks of violent madness which make him absolutely
dangerous. Matthew keeps it dark, but it is not the first time your
uncle has had to go to the asylum by any means. He’ll break out
again as sure as my name is Leigh, perhaps next time without any
warning. That happened once, so may well happen again. There’s no
method in his madness: a thoroughly unreliable madman, my friend
on the common calls him. So that’s the companion you will go home
to.
“Now I have it in my power to offer you a very happy life. I love
you, and I want you to be my wife. You are just fitted for a London
life, and with your beauty and originality might make a perfect
furore. Now, will you accept what I offer you and marry me? You
have only to say ‘yes,’ and I will take you straight to my sister who
will act as chaperon until we can be married: She is a good-natured
girl, and will be glad to oblige me, for many reasons. Now say, will
you marry me? I’ll be awfully kind to you, Rosamund. After all, you’d
have had a slow time of it with that impecunious Felix.”
I had been listening in a dull, stunned way to this speech, but at
his last words an hysterical passion of anger awoke within me.
“Marry you! Never! I would rather die,” I cried. “I know you at last
for what you are, a wicked, plotting fiend!”
“Now, now! No nonsense,” said D’Arcy angrily. “Remember,
Rosamund, you are very much in my power. You don’t know where
you are, night is coming on, it is raining faster every minute, and
you can’t find your way out of this place, or get a cab, without me.
So give me a kind answer, and let me take you off to my sister’s.
Come, child, don’t be foolish, we can’t stand here an hour, getting
drenched. Be nice, I’ve loved you a long time, and been your most
devoted slave, I am sure. Give me a kiss, and say you’ll come.”
“Never! Keep off! How dare you?” I cried, trembling with mingled
fear and anger.
“You needn’t be so very particular. I’ll be bound you’ve kissed Felix
hundreds of times.”
“Felix! Yes. But you—you!!” Words failed me. I could find none
that would express my detestation of him.
He pressed closer, as if determined to kiss me. Then my passion
grew beyond my control. I seized the cane he was holding in his
hand, and struck him smartly across the face with it. Then I flung
the hateful thing from me amidst the trees.
“There!” I cried. “That is to show you how I loathe and detest you
now. Go and pick up your cane, the cane you used to help you in
your plotting. You have wrecked my life. You have ruined Felix’s. You
have persuaded me to deceive, and dragged me down to misery. Go,
and never let me see your wicked face again.”
D’Arcy made for an instant as if he were going to strike me in
return, but he restrained himself. “All right,” he said, in a voice
trembling with suppressed rage. “All right, young lady. You have
given me my congé, and I’ll take it. I don’t feel so anxious to make
you my wife as I did a moment ago. I’d best not saddle myself with
a vixen. I’ll leave you, to find your way back to the castle. I hope
you will enjoy yourself when you get there.”
Then, without another word, he strode away and left me alone in
that strange place in the rain.
I waited until he had disappeared in the darkness, then turned
and walked in exactly the opposite direction, neither thinking nor
caring where I was going, so dulled was I with misery. But the road
went on, and seemed as if it would never end, and at length I
stopped, chilled, wet, and weary. Then suddenly it occurred to me
that I ought to try and get home; there was just a faint chance that
Felix might go down to ask what it all meant. At the thought that he
might arrive at the castle, find me still absent, and imagine me still
with D’Arcy, I began to burn with fever. I turned, and ne’er through
an arch so hurried the blown tide, as I through the rain and the dark
did hurry then. Thinking it would now be best, I followed the
direction D’Arcy had taken, and after a time came to some big iron
gates. Just as I passed through them a hansom came driving
towards me. My first impulse was to accost the driver, but I pulled
myself up just when about to speak, for by the flickering light of the
gas-lamp on the gate I saw it was the man who had driven me away
from Felix. With my head down I hurried past him.
“Missy! Missy!” called the man as I passed. I made no answer. He
turned and drove after me, walking the horse by my side as I
pressed on in the rain. “Missy! Listen. I’m a poor man with a large
family, and that gent is a well-known fare of mine so I did not like to
go against him. But I didn’t half like the job. It went against my
conscience a bit, it did, seeing you so unwilling inside. After I left
you, when I’d got well away, who should I see but the gent dashing
round a corner in another hansom, with a bad sort of look on him,
and, dashed if I could go on, for thinking of the helpless looking
young thing I left with him in the rain. So back I came again, just to
see what had become of you. And now, Missy, if I can make up to
you by driving you anywhere, say the word and jump in, and there
you shall go.”
So lost and wretched did I feel, and so consuming was my desire
to get home, I could not refuse the offer. The man helped to bring
about my misery, but, if I sent him away now, where should I go,
what should I do, in this great unknown city? I climbed in, feeling
utterly spent.
“Where to?” asked the man, peering down through the now
horribly familiar trap-door.
“Oh, take me home, take me home!” I half moaned in answer.
“Yes, Missy, don’t you fret, I’ll take you home. But where is it?”
“On Wildacre Common.”
“Phew! That’s a long way off. I can’t drive you to Wildacre, but I’ll
drive you to Waterloo, and you’ll get a train there easy that’ll take
you straight to Wildacre.”
He flicked his whip and started. I do not know what streets we
passed through, but again I seemed to drive through miles and
miles of them. The rain poured down upon the pavements, which
shone in murky glossiness beneath the gas-lamps. The people flitted
past like black ghosts, beneath the shade of their dripping umbrellas.
This was the gay city, the city of my dreams. I had envied Felix his
life in this city; I had risked my life’s happiness to spend one day in
it. And, behold! its pleasures had turned to ashes in my mouth, and
its light into horrible murky darkness. It was a miserable city, a
terrible city, a city that made one feel fearfully, utterly alone.
We reached Waterloo at last, and my driver called a porter and
asked him to attend to me. Then he drove off instantly, and not until
afterwards did I remember that he had gone without even asking for
his fare. The porter escorted me to the right platform, but there we
found a train to Wildacre had just gone, and there would be no
other for thirty-five minutes. I sat down in my wet things upon a
bench, and waited with feverish impatience, whilst the clock
overhead lagged through the interminable minutes. Then what
D’Arcy had said came true. Strange horrible men came up and spoke
to me. I sat mute, and answered never a word, and my heart
sickened with longing for Felix. The porter came for me when the
time was up, and put me into the train, and smiled gratefully at me
when I gave him half-a-crown. All through the journey to Wildacre I
sat in a kind of stupor, only waking from it when people got in and
out at the stations, or when a train whizzed past on its way up to
London. Then came the drive up the hill and across the common. It
was very cold on the common. The rain had now ceased to fall, and
the wind cut my face like a knife, but I was too weary to pull up the
cab windows. By the little sunken fence I dismissed the cab, and
walked in the darkness across the lawn to the honeysuckle porch. A
flood of light greeted me as I opened the door, and Anne Gillotson
rushed out of the dining-room looking white and agitated.
“Oh! I am glad to see you safely back again, Miss,” she said. “It is
going on for ten o’clock, and I have been so anxious about you ever
since it became dark. Mr. Felix Gray has been here. He arrived about
nine o’clock, but when he found you were out he did not stay.”
I stood still in the hall, and a deadly sick feeling came over me.
“Did he ask where I was?” I managed to say.
“Yes, Miss. Oh, please don’t look like that,” replied Anne, almost
weeping. “I hope you’ll forgive me, but he was so stern and asked
such sharp questions I was obliged to tell him.”
“You told him——?”
“I told him that you had said you were going to spend the day
with an old schoolfellow who was staying near here.”
“And then?”
“Oh, dear! Miss, I am more vexed than I can say that it should
have happened, for he looked in a dreadful way and went straight
out at the door. I begged him to wait, but he said there would be no
use in waiting. Then he changed his mind and came in again, and
said he’d leave a note for you. I got him pen and paper and he
wrote a short note. ‘Give her this,’ he said, ‘when she returns, if she
ever does return.’ Then he went away. He has not been gone half an
hour, Miss, if you’d only been a little bit earlier you’d have caught
him. My dear, how wet you are, and how white you look; what does
it all mean?”
“Where is the note?” I gasped.
She went into the dining-room and brought it out to me. I tore it
open. There were but two words written on the paper:
“Good-bye, Rosamund.”
This was the end. Upon me had been laid the punishing hand of
God.
CHAPTER V.
Not Ariadne passioning for Theseus’ flight ever felt such grief as
mine was then. Felix must have gone back to town in one of the
trains that whizzed past mine as I made the dreadful journey home.
I had lost my last chance by missing that earlier train at Waterloo.
Thirty-five minutes earlier, and we should not have whizzed past
each other in silent misery, and I might have been saved. If only I
could have seen him! I should have thrown myself upon his bosom,
and clung to him and entreated him. I should have poured out to
him the whole story of my wickedness and my sorrow, have forced
him to believe in my remorse and my love. I would have held him
fast and never let him go. And he who loved me so much, seeing my
misery, seeing my real love, would have been unable to tear himself
away. But now, he had gone, he had said good-bye, and all was
over. I staggered where I stood, and the frightened dressmaker
came over to me and supported me. There was no strength left in
me any more. She led me upstairs, and took off my wet things, and
put me to bed like a baby.
Mute and unresisting I let her do as she would with me. Then she
fetched the charwoman to light my fire, and they whispered
together, and through my chilled stupor I could feel both were full of
deep concern. They brought me some hot drink later on, and I drank
it after they had implored me long, drank it just to be left in peace.
All through the night I lay there, cold, quiet, stupid. There had
come upon me a frost, a killing frost, and dead were the tender
leaves of hope. Sleep fled far away, and left me a watcher of mine
own heart’s sorrow. My bright day was done. I was for the dark; and
no glimpse was given to me, as to Charmian, of the far-off break in
the clouds, and the eastern star.
Never once during the miserable Sunday that followed that
endless night did I leave the house. I feared lest by some chance
Felix might come back and find me again absent. All the day long I
watched from the window, straining my eyes across the wide
common even after light had waned. Vain effort! No dark figure
came towards me, such as I had seen many a time before when
waiting eagerly for Felix.
A second night. Again no sleep came near me. I think I was
touched with madness that second night. Whenever I closed my
eyes I saw the wide dreary common, and far away a dark figure
which came on and on, yet never drew nearer. On the Monday,
although I knew it would be a fruitless watch, I again set myself to
stare out of the window across the common. When the luncheon
hour approached Anne came and forcibly drew me away.
“Miss Gwynne,” she said, “I really must not allow you to go on like
this any longer. You will have a serious illness. Will you not tell me
what is wrong? Do, dear child; in some way I might be able to help.
When we are in trouble we never know from what quarter help may
come. Tell me, tell me, dear!”
“I have lost Felix,” I said, breaking down suddenly into wild sobs.
“I have lost Felix. He has said good-bye to me. He will never come
back to me again.”
“Oh! my dear, I hope it is not so bad as that.”
“Hope! There is no hope. I have been guilty of a base and cruel
sin, and this is my punishment. God is punishing me: there is no
hope when He punishes.”
“Oh, my dear! don’t say that. I think there is more hope than
when man does. Let us try to do something better for you than
staring out of that window. Can’t we go after Mr. Felix? He’s so fond
of you I am sure if he could see your poor changed face he’d forgive
you anything!”
Could there yet be hope? Oh, Eastern Star! are you there, behind
the clouds? My heart beat wildly at the thought.
“Oh, yes! let us do that, let us go at once after Felix,” I cried, a
fever of impatience rising within me, and taking the place of the cold
numbness which had possessed me before.
“Very well,” said Anne, “we will go, but not until you have eaten a
solid luncheon. I will take no step from here until you have done
that.”
I saw by her face she was determined, so followed her into the
dining-room. So deep a horror did I now feel of the great city, I had
not the courage to start off by myself. I forced some solid food down
my throat, the barouche was ordered, and in half an hour we were
on the weary way to London. It was half past two when we reached
Waterloo. Two days ago the place had breathed to me of pleasant
anticipation, now it was full of distressing associations. The bench
against the wall wore a terrible look of familiarity, so did the
loungers who stared at me on the wide platform. The face of the
clock was as the face of an inexorable enemy. “Too late,” it had said
to me when I was striving to hasten away from London, and then it
had lagged through the minutes which lost me Felix. “Too late,” it
said now to my anxious heart, when I was hastening back. It
seemed to me ages before we could get a cab, and again did miles
and miles of streets seem to lie twixt me and my goal.
I flew up the stairs when I reached the house where Felix lodged,
on and on towards the top where he had often said he lived. The
first door I came to I opened. The room within was small and had a
deserted look. A fire was dying in the grate, pieces of brown paper
and lengths of twine lay about on the floor. One who had inhabited it
had been packing there and had gone. Flushing all over with almost
unbearable misery I tore at the bell. The landlady had been
following me upstairs, and entered now with Anne. A stout woman
with a big pale face and dark eyes that looked curiously at me.
“You are too late if you want to see Mr. Gray,” she said. “He has
just left. He gave up these rooms suddenly and has gone abroad to
join a relation; his grandmother, I think he said.”
As she spoke her face seemed to me to change, and to become
enormously big and white like that of my inexorable enemy the
clock. I think I was near swooning at that moment.
“Has he left any address?” asked Anne, divining by instinct the
question I had not strength to put myself.
“None whatever. He made up his mind very suddenly; in fact I
don’t think on Saturday he had any intention of going abroad at all. I
heard nothing of it until Sunday at any rate. All yesterday he was
very busy arranging his affairs, and this morning he paid his bill, and
a week’s rent instead of notice. He took everything away with him
and said he should not be returning. Poor gentleman! He looked
very ill. There was some trouble I am sure, but he was not one to
talk about himself. I’m sorry I can’t give you his address, but he
gave me no hint of where he was going any more than of why he
was going. All I know for certain is that he drove off to catch the
club train, 3 P.M. from Victoria. Perhaps if you drove after him at
once you might be just in time to say good-bye. You are not far from
Victoria Station here.”
Strength came back to me at this suggestion. “Come,” I cried,
seizing hold of Anne’s cloak, and almost dragging her out of the
room. Almost as excited as I, she rushed after me down the stairs,
and a moment later we were tearing along the streets to Victoria.
We wasted five precious minutes by going first to an utterly wrong
part of the station. I was nearly frantic when I discovered this
mistake, and no porter seemed to have time to attend to us. At
length a gentleman took pity on our helplessness, and offered us his
services.
“The club train, for going abroad—I must catch it,” I said
feverishly.
“You are on quite a wrong platform. This is the Brighton and
South Coast line, you want the London, Chatham, and Dover. I
doubt if you’ll catch the club train, but we’ll see. Follow me—this
way.”
We followed quickly where he led but it seemed a long way from
the one line to the other.
“Ah! Just in time! There’s your train!” exclaimed our guide when at
last we reached the right platform.
Yes, there it was, just a little ahead, to the right. I ran wildly
forward, my heart beating almost to suffocation. The others followed
me.
“Oh, by Jove! Hard luck, the train’s off!” exclaimed the stranger-
friend behind me.
My knees trembled beneath me and I came suddenly to a full
stop.
“And there he is!” screamed Anne. “Oh, look Miss, in that saloon
carriage, bending down. Oh, somebody, stop the train!”
Just for an instant, as the train sped by, I caught sight of Felix. A
desolate man in a grey suit sitting by the window with his face
buried in his hands. Oh! why did he not look up and see me standing
there in helpless misery? Only for an instant was I given this last
glimpse of my lover, then I found myself gazing at the back of the
departing train.
“Oh, dear! Oh, dear!” cried Anne, wringing her hands. “How
unfortunate to miss him again and by so little. You are just too late
every time. I never saw such hard luck.”
“No,” I said, feeling quite numb with despair, “not hard luck. It is
the punishing hand, the punishing hand which has kept me back
every time. It is no use to struggle against the punishing hand. Take
me home, Anne, take me home.”
She took me home. Good kind woman, she would not let me
succumb to despair. The whole way back she kept telling me that
Matthew would be with me that evening, and that he would be
surely able to do something, he was so clever. So constantly did she
give me this assurance that at length I began to believe in it a little
myself. A faint hope crept back into my heart. Matthew might yet
save me, Matthew who was so clever, so ingenious, so full of
resource; Matthew who was such an experienced man, who had
such a wonderful talent for knowing the right thing to do in a
difficulty. If anyone in the world could help me, surely Matthew
could. I dwelt upon this thought until it grew and grew in my mind,
and became a conviction that Matthew was to save me. How, I knew
not, unless by following Felix over the world himself, but somehow
he was to save me.
I watched for his coming as a drowning man watches for a spar
which the waves are tossing to his side. Two hours after our return
from London he came, with his master. The barouche drove up gaily
to the door, and the two men got out, both looking radiant. This was
the hour to which two days ago I had so looked forward, and now it
was all I could do to come forward and greet the home-comers at
all, so unbearable was my grief and anxiety.
“Ah! Here she is! Here’s the Valkyrie!” cried my uncle, skipping up
to me, spotless, fresh, and bland as ever. “My dear, I have much
pleasure in shaking hands with you again. It is most pleasant to
return to the castle, and to feel I am once more on my own
property. Not that I haven’t enjoyed my visit immensely. Of course
you know that I’ve been on a pleasant visit, don’t you?”
Here he peered sharply and suspiciously into my face. Matthew
gave me a nudge. I knew what it meant. I was to ignore the lunatic
asylum, and converse with my uncle as if he had simply been away
on a visit. The old insupportable life was beginning again; beginning
again without Felix.

SELECTIONS FROM
MESSRS. HUTCHINSON’S LIST.

BY W. L. REES.
The Life and Times of Sir George Grey, K.C.B. By
W. L. Rees. With Photogravure Portraits. In demy 8vo. buckram gilt,
2 vols. 32/-. and in one vol. 12/-.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like