Developing Java Servlets 2nd ed Edition James Goodwill download
Developing Java Servlets 2nd ed Edition James Goodwill download
https://ebookname.com/product/developing-java-servlets-2nd-ed-
edition-james-goodwill/
https://ebookname.com/product/developing-story-ideas-2nd-ed-
edition-rabiger/
https://ebookname.com/product/fundamentals-of-project-management-
developing-core-competencies-to-help-outperform-the-
competition-2nd-ed-edition-james-p-lewis/
https://ebookname.com/product/fuel-cell-systems-explained-2nd-
ed-2nd-ed-edition-james-larminie/
https://ebookname.com/product/building-law-encyclopaedia-1st-
edition-david-chappell/
Great Buildings 1st American ed Edition Dk Publishing
https://ebookname.com/product/great-buildings-1st-american-ed-
edition-dk-publishing/
https://ebookname.com/product/the-world-of-
pompeii-2007-routledge-worlds-pedar-foss/
https://ebookname.com/product/deuterocanonical-and-cognate-
literature-yearbook-2007-the-concept-of-celestial-beings-origins-
development-and-reception-1st-edition-reiterer/
https://ebookname.com/product/current-clinical-evidence-in-
ophthalmology-1st-edition-h-w-roberts/
https://ebookname.com/product/surgical-decision-making-6th-
edition-mcintyre-md-facs/
Organizational Behavior 3rd Edition Michael A. Hitt
https://ebookname.com/product/organizational-behavior-3rd-
edition-michael-a-hitt/
™
Developing Java
Servlets
James Goodwill
All rights reserved. No part of this book shall be reproduced, stored in a ACQUISITIONS EDITOR
retrieval system, or transmitted by any means, electronic, mechanical, photo- Carol Ackerman
copying, recording, or otherwise, without written permission from the pub-
DEVELOPMENT EDITOR
lisher. No patent liability is assumed with respect to the use of the information
Tiffany Taylor
contained herein. Although every precaution has been taken in the preparation
of this book, the publisher and author assume no responsibility for errors or MANAGING EDITOR
omissions. Nor is any liability assumed for damages resulting from the use of Matt Purcell
the information contained herein.
PROJECT EDITOR
International Standard Book Number: 0-672-32107-6 Christina Smith
Library of Congress Catalog Card Number: 00-111799
COPY EDITOR
Printed in the United States of America Cynthia Fields
First Printing: June 2001 INDEXER
04 03 02 01 4 3 2 1 Erika Millen
PROOFREADER
Trademarks Benjamin Berg
All terms mentioned in this book that are known to be trademarks or service
marks have been appropriately capitalized. Sams Publishing cannot attest to TECHNICAL EDITOR
the accuracy of this information. Use of a term in this book should not be Rob Tiffany
regarded as affecting the validity of any trademark or service mark.
TEAM COORDINATOR
Warning and Disclaimer Lynne Williams
Every effort has been made to make this book as complete and as accurate as INTERIOR DESIGNER
possible, but no warranty or fitness is implied. The information provided is on Anne Jones
an “as is” basis. The author and the publisher shall have neither liability nor
responsibility to any person or entity with respect to any loss or damages aris- COVER DESIGNER
ing from the information contained in this book. Aren Howell
PAGE LAYOUT
Ayanna Lacey
Heather Hiatt Miller
Stacey Richwine-DeRome
Overview
Contents at a Glance
Introduction 1
1 Web Applications and the Model View Controller (MVC) Design Pattern 7
PART IV Appendixes
A Web Applications and Configuring the Servlet Engine 419
B The javax.servlet Package 429
C The javax.servlet.http Package 461
D The javax.servlet.jsp Package 489
E The javax.servlet.jsp.tagext Package 513
F WML (The Wireless Markup Language) 543
G WMLScript 547
Index 559
Contents
Introduction 1
3 Servlet Basics 25
The Life Cycle of a Servlet ..................................................................26
The init() Method ............................................................................26
The service() Method ......................................................................26
The destroy() Method ......................................................................27
A Basic Servlet ......................................................................................27
The BasicServlet Source ..................................................................27
Dissecting the BasicServlet ..................................................................29
Where Does the BasicServlet Fit into the Servlet Framework? ......29
The Methods Overridden by the BasicServlet ................................30
Summary ................................................................................................31
vi
DEVELOPING JAVA SERVLETS, SECOND EDITION
5 Servlet Sessions 41
What Is Session Tracking? ....................................................................42
Using Hidden Form Fields ....................................................................42
Working with Cookies ..........................................................................46
URL Rewriting ......................................................................................50
Session Tracking with the Servlet API ..................................................51
Summary ................................................................................................58
6 HTTP Tunneling 59
What Is HTTP Tunneling? ....................................................................60
Object Serialization................................................................................60
Creating an HTTP Tunneling Client......................................................66
Creating an HTTP Tunneling Servlet ....................................................71
A Practical HTTP Tunneling Example..................................................73
The OrderStatusApplet ....................................................................74
The OrderStatusServlet ....................................................................80
Pros and Cons of Applet-to-Servlet Communication ............................83
Summary ................................................................................................84
Views....................................................................................................367
Trader Layout ................................................................................367
Index View......................................................................................370
Get Quote View ..............................................................................371
Buy/Sell View ................................................................................372
Controllers............................................................................................375
The GetQuote Service ....................................................................375
The Buy Service ............................................................................377
The Sell Service..............................................................................380
Using the Trader Application ..............................................................382
Summary ..............................................................................................383
PART IV Appendixes
A Web Applications and Configuring the Servlet Engine 419
Web Applications ................................................................................420
The ServletContext in Relation to the Web Application................420
The Directory Structure..................................................................420
Web Application Deployment Descriptors ....................................421
Web Archive (WAR) Files ..................................................................422
Servlet Requirements ..........................................................................422
Apache Tomcat ....................................................................................422
Installing the Tomcat Server ..........................................................422
Adding the DJS Web Application ..................................................424
Building and Installing the BasicServlet........................................426
Summary ..............................................................................................427
Classes..................................................................................................479
The Cookie Class............................................................................479
The HttpServlet Class ....................................................................483
The HttpSessionBindingEvent Class..............................................486
The HttpUtils Class ........................................................................487
G WMLScript 547
Lang Library ........................................................................................548
abort()—The abort Function ..........................................................548
abs()—The abs Function ................................................................548
characterSet()—The characterSet Function ..................................548
exit()—The exit Function ..............................................................548
float()—The float Function ............................................................548
xiv
DEVELOPING JAVA SERVLETS, SECOND EDITION
Index 559
About the Authors
Lead Author
James Goodwill is the co-founder and chief architect at Virtuas Solutions, LLC., located in
Denver, Colorado. He has extensive experience in designing and architecting e-business appli-
cations. James is also the author of Pure JavaServer Pages, which provides a thorough exami-
nation of the JavaServer Pages technology. James is currently leading Virtuas’s efforts in
developing cutting edge tools designed for J2EE e-business acceleration.
You can find the source code and support for this text at the Virtuas Solutions Web site,
http://www.virtuas.com. Select the Publications link.
Contributing Author
Bryan Morgan is an experienced writer and software developer and founder of the Wireless
Developer Network (http://www.wirelessdevnet.com) in 1999. He is a respected voice in the
wireless industry, is a regular contributor to industry publications, and has been a featured
speaker at numerous events. He holds a B.S. in electrical engineering from Clemson University
and lives in Pensacola, FL with his wife Becky and beautiful daughter Emma.
Dedication
To my girls Christy, Abby, and Emma.
Acknowledgments
Before I start thanking those close to home, I need to thank the people who made this book
what it is. They are the people who took my words and molded and shaped them into some-
thing that I hope will help you become an effective Web application developer. I would like to
thank Carol Ackerman, my acquisitions editor, who answered all my questions and resolved
any issues that came up. I would especially like to thank Tiffany Taylor for her excellent edit-
ing. I would like to thank Rob Tiffany for his great technical comments and recommendations.
I would also like to thank Cynthia Fields for her excellent copy-editing. And finally, I would
like to thank Christina Smith for managing the entire project. Each and every person made this
book what it is.
On a closer note, I would first like to thank everyone at my company, Virtuas Solutions, Inc.
for their support while I was completing this text. The entire staff contributed by picking up
my assignments when my plate was too full. In particular I would like to thank those
“UNREAL” people that I worked with on a daily basis including Matthew “Deckard” Filios,
Karen “Blue Bullet” Jackson, Eric “Crazy Mary” Johnson, Jason “Cutt” Nordyke, David
“Busta” Goedecke, Mike “Ivan” Day, Gary “Monica” Goodrum, and especially Aaron “Ronin”
Bandell, for his contribution of Chapters 11 and 12.
Finally, the most important contributors to this book are my wife Christy, and our daughters
Abby and Emma. They supported me throughout the entire book, with complete understand-
ing. They listened to me complain and took care of things when I disappeared into the office.
With their support, I can do anything.
Tell Us What You Think!
As the reader of this book, you are our most important critic and commentator. We value your
opinion and want to know what we’re doing right, what we could do better, what areas you’d
like to see us publish in, and any other words of wisdom you’re willing to pass our way.
As an executive editor for Sams Publishing, I welcome your comments. You can fax, e-mail, or
write me directly to let me know what you did or didn’t like about this book—as well as what
we can do to make our books stronger.
Please note that I cannot help you with technical problems related to the topic of this book,
and that due to the high volume of mail I receive, I might not be able to reply to every
message.
When you write, please be sure to include this book’s title and author’s name as well as your
name and phone or fax number. I will carefully review your comments and share them with the
author and editors who worked on the book.
Fax: 317-581-4770
E-mail: feedback@samspublishing.com
Mail: Michael Stephens
Executive Editor
Sams Publishing
201 West 103rd Street
Indianapolis, IN 46290 USA
Introduction
Structure of This Book
Before you begin reading this book, you might want to take a look at its basic structure. This
will help you outline your reading plan, if you choose not to read it from cover to cover. This
introduction gives you an overview of what each chapter covers.
Appendix G, “WMLScript”
Appendix G describes the libraries and functions used in WMLScript.
Exploring the Variety of Random
Documents with Different Content
Returning to the Valley, he assaulted, with his united force, the
column of Banks, annihilated an entire division of the enemy,
pursued its fugitive remnants to the Potomac, and threatened the
safety of the Federal capital. Alarmed for Washington, Mr. Lincoln
halted McDowell in his plans of coöperation with McClellan, and for
weeks the efforts of the Federal Government were addressed to the
paramount purpose of “catching Jackson.” Eluding the enemy’s
combinations, Jackson turned upon his pursuers, again defeated
Fremont at Cross Keys, and immediately crossing the Shenandoah,
secured his rear, and destroyed the advance of Shields within sight
of its powerless confederate. Resuming the retreat, Jackson paused
at Weyer’s Cave, and awaited the summons of his superiors to enact
his thrilling rôle in the absorbing drama at Richmond. Within the
short period of seventy days, Jackson achieved at Kernstown,
McDowell’s, Front Royal, Winchester, Strasburg, Harrisonburg, Cross
Keys, and Port Republic, eight tactical victories, besides innumerable
successful combats. But he had done more. He had wrought the
incomparable strategic achievement of neutralizing sixty thousand
men with fifteen thousand; he had recalled McDowell, when, with
outstretched arm, McClellan had already planted his right wing,
under Porter, at Hanover Court-house, to receive the advance of the
coöperating column from Fredericksburg.
Meanwhile the lines of Richmond had been the scene of no incident
of special interest until the battle of “Seven Pines,” on the 31st of
May. After his arrival upon the Chickahominy, McClellan had been
steadily fortifying his lines, and wherever an advance was
practicable, preparing approaches to Richmond. His line, extending
over a space of several miles, was accurately described by the
course of the Chickahominy, from the village of Mechanicsville, five
miles north of Richmond, to a point about four miles from the city, in
an easterly direction. Having partially executed his design of bridging
the Chickahominy, McClellan had crossed that stream, and in the last
days of May, his left wing was fortified near the locality designated
the “Seven Pines.” This initiative demonstration by McClellan, which
placed his army astride a variable stream, was sufficiently
provocative of the enterprise of his antagonist. To increase the peril
of the isolated wing of the Federal army, a thunder-storm, occurring
on the night of the 29th of May, had so swollen the Chickahominy as
to render difficult the accession of reënforcements from the main
body.
Such was the situation which invited the Confederate commander to
undertake the destruction of the exposed column of his adversary—a
movement which, if successful, might have resulted in the rout of
the entire left wing of the enemy, opening a way to his rear, and
securing his utter overthrow. Seven Pines was an action, in which
the color of victory was entirely with the Confederates, but it was
the least fruitful engagement fought by the two armies in Virginia.
There was no engagement of the war in which the valor of the
Confederate soldier was more splendidly illustrated, though happily
that quality then did not require so conspicuous a test. However able
in design, it was in execution a signal failure—a series of loose,
indefinite and disjointed movements, wanting in coöperation, and
apparently in able executive management.
President Davis, in company with General Lee, was present during
most of the engagement. Frequently under fire, and in consultation
with his generals in exposed positions, he was conspicuous chiefly
by his efforts to animate the troops, and his presence was greeted
with evidences of the enthusiasm and confidence which it inspired.
The battle of “Seven Pines,” in itself barren of influence upon the
decision of the campaign, was nevertheless attended by an incident
—the painful and disabling wound received by General Johnston, in
all probability decisive of the future history of the Army of Northern
Virginia. Leading to an immediate and positive change of policy, it is
hardly a bold declaration that this incident determined the future of
the war in Virginia.
A disposition has been freely indulged to influence the sentence of
history, by placing President Davis and General Johnston in a sort of
antithetical juxtaposition, as exponents of different theories as to the
proper conduct of the war by the South. In view of the failure of the
Confederacy, it has been ingeniously contended that the result
vindicated the wisdom of General Johnston’s views. But besides its
evident unfairness to Mr. Davis, no criticism could be founded less
upon the intrinsic merits of the case. Overzealous and intemperate
partisans generally evince aptitude in the exaggeration of minor
differences between the leaders, whose interests they profess to
have at heart. Such results are not unfrequent in the lives of
eminent public men. In the case of General Beauregard, the
unhappy effects of officious intermeddling and misrepresentation,
from such sources, between the President and that distinguished
officer, are especially notable.
But the assumption that events have indicated the wisdom of
General Johnston’s views, in their declared antagonism to those of
Mr. Davis, is altogether unsustained. The immediate results of a
change of commanders, and a consequent inauguration of a
different policy[55]—a policy in accordance with Mr. Davis’ own views,
may, with far more reason, be alleged in support of a contrary
theory. The vigorous and aggressive policy adopted and executed by
Lee not only accorded with the wishes of the President, but fulfilled
the long-deferred popular expectation, and agreeably disappointed
the public in Lee’s capacity. For despite the general disappointment
at the absence of decisive achievements by the Army of Northern
Virginia, General Johnston commanded far more of public
confidence, than did General Lee at the period of the latter’s
accession to command.
Nothing could have been more disadvantageous to Lee, than the
contrast so freely indicated between himself and other officers.
Johnston was criticised merely because of the absence of brilliant
and decisive achievements. Lee was assumed to have proven his
incompetency by egregious failure. He was ridiculed as a closet
general. His campaigns were said to exist only on paper—to consist
of slow methodical tactics, and incessant industry with the spade,
and he was pronounced totally deficient in aggressive qualities. A
prominent Richmond editor, criticising his North-western Virginia
campaign, asserted that the unvarying intelligence from Lee was
that he was “hopelessly stuck in the mud,” and an officer was heard
to compare him to a terrapin, needing the application of a hot coal
to his back to compel him to action. But with the lapse of a fortnight
that army, which received the intelligence of Lee’s appointment to
command with misgiving and distrust, began to experience renewed
life and hope. It was not the few additional brigades given to that
army which so soon started it upon its irresistible career of victory. A
mighty hand projected its impetus, and directed its magnificent valor
against those miles of intrenchments which it had seen grow more
and more formidable, itself meanwhile an inactive spectator.
Lee found the army within sight of Richmond; he lifted it from the
mud of the Chickahominy, defeated an enemy intrenched and in
superior force; pursued the panting and disheartened fugitives to the
shelter of their shipping; defeated a second army—then both
together—within hearing of the Federal capital; fought an indecisive
battle upon the enemy’s soil, and reëstablished the Confederate line
upon the frontier. Is it a matter of wonder that the President, the
army, and the people recognized the significance of these results,
and applauded the substitution of the new system and the new
status for the old? A better explanation of so pronounced a contrast
is needed than that the “prejudice” or “injustice” of Davis withheld
from Johnston, five or even ten thousand men, which he gave to
Lee.
Yet there could be no hypothesis more presumptuous, in view of the
abundant testimony of competent military judgment, and none more
palpably untenable, than that which would deny greatness as a
soldier to Johnston. As a consummate master of strategy, in that
sense which contemplates the movements of heavy masses, and
looks to grand ultimate results, Johnston has probably few equals.
His sagacity in the divination of an enemy’s designs is remarkable;
and if he be considered as having marked deficiencies, they must be
counted as a lack of Jackson’s audacity, of Lee’s confident calculation
and executive perfection. The South regards Lee as beyond criticism.
Jefferson Davis is accustomed to say “the world has rarely produced
a man to be compared with Lee.” Yet in mere intellectuality, it is at
least questionable whether Johnston had his superior among the
Southern leaders.
But it often happens that qualities, however great, are not those
which the occasion demands. That marvelous union of qualities in
Lee, which has placed him almost above parallel, probably made him
alone adequate to the hazardous posture of affairs at Richmond in
the summer of 1862. The result, at least, made evident to the world,
the wisdom of the President, in that choice, which was at first
declared the undeserved reward of an incompetent favorite.
Whatever may be alleged to the contrary, President Davis at all
times, to the full extent of his power, aided General Johnston in the
consummation of his designs. To assert that, upon any occasion, he
either interposed obstacles to Johnston’s success, or denied him any
means in his power to confer, is to question that personal fidelity of
Jefferson Davis, which his bitterest enemy should be ashamed to
deny. Few Southern men, at least, have yet attained that measure of
malignity, or that hardihood of mendacity.
General Lee was not dilatory in his preparations to gratify that
longing aspiration which the President, on his own behalf, and in the
name of the country, briefly expressed, that “something should be
done.” Lee had a carte blanche, but frequent and anxious were the
consultations between the President and himself. The world now
knows what followed those days and nights of anxious conference,
in which were weighed the chances of success, the cost of victory,
and the possibilities of defeat. The plan executed by General Lee
was one of the most hazardous ever attempted in war, but it was not
less brilliant than bold, and at least one precedent had been
furnished by the great master of the art of war at Austerlitz. Its
perils were obvious, but the sublime confidence of Lee in the
success of his combinations went far to secure its own justification.
During the week of engagements which followed, the President was
constantly with the army and fully advised of its movements.[56] The
cordial recognition of this advisory relation between himself and Lee,
is indicated by the natural pride, and becoming sense of justice, with
which the latter, in the report of his operations against McClellan,
mentions the approving presence of the President, during the
execution of his plans. This noble harmony between Davis and Lee,
equally creditable to each, was never interrupted by one single
moment of discord. It was never marred by dictation on one side, or
complaint on the other. Unlike other commanders, Lee never
complained of want of means, or of opportunity for the execution of
his plans. Satisfied that the Government was extending all the aid in
its power, he used, to the best advantage, the means at hand and
created his opportunities. Lee never charged the President with
improper interference with the army, but freely counseled with his
constitutional commander-in-chief, whom he knew to be worthy of
the trust conferred by the country in the control of its armies.
President Davis fully comprehended and respected the jealous
functions of military command, and in the exercise of that trust no
one would have more quickly resented unauthorized official
interference. A soldier himself, he recognized freedom of action as
the privilege of the commander; as a statesman, he rendered that
cordial coöperation, which is the duty of government.
When Lee had driven McClellan from his position along the
Chickahominy, he had raised the siege of Richmond. The retreat of
McClellan to the James River, conducted with such admirable skill,
and aided by good fortune, placed the Federal army in a position
where, secure itself, another offensive movement against the
Confederate capital might, in time, be undertaken. Confederate
strategy, however, soon relieved Richmond from the apprehension of
attack, and in less than two months from the termination of the
pursuit of McClellan, Lee, by a series of masterly strokes, demolished
the armies under Pope, united for the defense of Washington, and
was preparing an invasion of Maryland.
An almost magical change in the fortunes of the Confederacy was
wrought by these active and brilliant operations, embracing so short
a period, and marked by results of such magnitude.
Not only were the two main armies of the enemy defeated, but the
entire Federal campaign in the East had been entirely disconcerted.
Richmond was saved, Washington menaced, and McClellan forced
back to the initial point of his campaign. Western Virginia, the
Carolina coast, and other localities, for months past in Federal
occupation, were almost divested of troops to swell the hosts
gathering for the rescue of Washington, and to meet the dreaded
advance, northward, of Lee’s invincible columns. From the heart of
Virginia the cloud of war was again lifted to the Potomac frontier;
the munificent harvests of the valley counties, of Fauquier, Loudon,
and the fertile contiguous territory, were again in Confederate
possession, and a numerous and victorious army was now anxious
to be led across the Rubicon of the warring sections.
From harrowing apprehension, from vague dread of indefinable but
imminent peril, the South was transported to the highest round of
confident expectation. The North, which, in the last days of June,
eagerly awaited intelligence of McClellan’s capture of Richmond, now
regarded its own capital as doomed, and did not permit itself to
breathe freely until McClellan announced the safety of Pennsylvania,
when Lee had retired to Virginia.
The inducements which invited a movement of the Confederate
forces across the Potomac were manifold. Whatever judgment the
result may now suggest, the invasion of Maryland was alike dictated
by sound military policy and justified by those moral considerations
which are ever weighty in war. The overwhelming defeat of Pope
more than realized the hope of President Davis and General Lee,
when the strategic design of a movement northward was put in
execution, by which was sought the double purpose of withdrawing
McClellan from James River and effectually checking the advance of
Pope. The successive and decisive defeats of Pope offered the
prospect of an offensive by which the splendid successes of the
campaign might be crowned with even more valuable achievements.
Demoralized, disheartened, in every way disqualified for effectual
resistance, the remnants of the armies which Lee had beaten, each
in succession, and then combined, would be an easy prey to his
victorious legions, could they be brought to a decisive field
engagement. There yet remained time, before the end of the season
of active operations, for crushing blows at the enemy, which would
finish the work thus far triumphantly successful.
To inflict still greater damage upon the enemy—to so occupy him
upon the frontier as to prevent another demonstration against
Richmond during the present year—to indicate friendship and
sympathy for the oppressed people of Maryland—to derive such aid
from them as their condition would enable them to extend, were the
potent inducements inviting the approbation of the Confederate
authorities to a movement across the Potomac. President Davis was
pledged to an invasion of the enemy’s country whenever it should
prove practicable. Now, if ever, that policy was to be initiated.
Hitherto the enemy’s power, not the will of the Confederate
Government, had prevented. Now that power was shattered. The
mighty fabric trembled to its base, and who would now venture to
estimate the consequences of a brilliant victory by Lee, on Maryland
soil, in September, 1862? What supporter of the Union can now
dwell, without a shudder, upon the imagination, even, of a
repetition, at Antietam, of the story of the Chickahominy, or Second
Manassas?
The climax of the Maryland campaign was the battle of Antietam—a
drawn battle, but followed by the early withdrawal of the
Confederate army into Virginia. It is unnecessary to dwell upon the
causes conspiring to give this portion of the campaign many of the
features of failure. With a force greatly reduced by the straggling of
his weary and exhausted troops, Lee was unable to administer the
crushing blow which he had hoped to deliver.[57] As a consequence,
the people of Maryland, of whom a large majority were thoroughly
patriotic and warm in their Southern sympathies, were not
encouraged to make that effective demonstration which would
inevitably have followed a defeat of McClellan.
Nevertheless, there was some compensation in the terrible
punishment inflicted upon the enemy at Antietam; and there was the
heightened prestige, so greatly valued by the South at this period, in
the eyes of Europe, arising from the temper and capacity of the
weaker combatant to undertake so bold an enterprise. In the
tangible evidences of success afforded by the capture of Harper’s
Ferry, with its numerous garrison supplies of arms and military
stores, was seen additional compensation for the abandonment of
the scheme of invasion.
An interval of repose was permitted the Army of Northern Virginia,
after its return from Maryland, in its encampments near Winchester,
during which it was actively strengthened and recruited to the point
of adequate preparation for expected demonstrations of the enemy.
The operations of the Western army, in many respects, were a
brilliant counterpart to the campaign in Virginia, though lacking its
brilliant fruits. We have mentioned the circumstance which placed
General Braxton Bragg in command of the Western army, after its
successful evacuation of Corinth. General Bragg was equally high in
the confidence of the President and the Southern people. Greatly
distinguished by his services in Mexico, his skillful handling, at
Shiloh, of the magnificent corps of troops, which his discipline had
made a model of efficiency, more than confirmed his Mexican fame.
Space does not permit us to follow, in detail, the execution of the
able and comprehensive strategy, by which General Bragg relieved
large sections of Tennessee and Alabama from the presence of the
enemy, penetrated the heart of Kentucky, maintained an active
offensive during the summer, and transferred the seat of war to the
Federal frontier. A part of these operations was the hurried retreat of
Buell’s immense army, from its posts in Alabama and Tennessee, for
the defense of Louisville and Cincinnati; large captures of prisoners,
horses, arms and military stores; and the brilliant progress and
successive victories of Kirby Smith and Morgan. For weeks the
situation in Kentucky seemed to promise the unqualified success of
the entire Western campaign. There was, indeed, reasonable hope
of a permanent occupation of the larger portion of Kentucky and
Tennessee by the Confederate forces.
But the battle of Perryville—an engagement not unlike Antietam in
its doubtful claim as a Federal victory—was followed by the retreat
of General Bragg, which was executed with skill, and with results
going far to relieve the disappointment of the popular hope of a
permanent occupation of Kentucky. Buell, on his arrival at Louisville,
whither he had retreated, received heavy reënforcements, which
greatly increased his already superior numbers; and Perryville, a
battle which General Bragg fought, rather to secure his retreat than
with the expectation of a decisive victory, would have been an
overwhelming Confederate success, had Bragg been sufficiently
strong to follow up his advantage.
No Confederate commander, save Lee and Jackson, was ever able to
present a claim of a successful campaign so well grounded as the
Kentucky campaign of Bragg. With a force of forty thousand men, he
killed, wounded, and captured more than twenty thousand of the
enemy; took thirty pieces of artillery, thousands of small arms; a
large supply of wagons, harness, and horses; and an immense
amount of subsistence, ample not only for the support of his own
army, but of other forces of the Confederacy. During the succeeding
autumn and winter, Bragg’s army was conspicuous for its superior
organization, admirable condition and tone; was abundantly supplied
with food and clothing, and in larger numbers than when it started
upon its campaign in August. Moreover, General Bragg redeemed
North Alabama and Middle Tennessee, and recovered possession of
Cumberland Gap, the doorway, through the mountains, to Knoxville
and the Virginia and Tennessee Railroad—the main avenue from
Richmond to the heart of the Confederacy. Evincing his
determination to hold the recovered territory, General Bragg, within
a month from his return from Kentucky, was confronting the
principal army of the enemy, in the West, before Nashville.
Incidental to the movement of Bragg into Kentucky, and constituting
a part of the programme, attempted upon the large theatre of the
Western campaign, were the repulse of the first attack of the enemy
upon Vicksburg, the partial failure of General Breckinridge’s
expedition to Baton Rouge, and the serious reverse sustained by Van
Dorn at Corinth. In connection with the more important
demonstration into Kentucky, these incidents of the Western
campaign may be briefly aggregated as the recovery of the country
between Nashville and Chattanooga, and the important advantage of
a secure occupation of Vicksburg and Port Hudson, thus closing the
Mississippi to the enemy for two hundred miles.
Subsequent operations in Virginia, at the close of 1862, were entirely
favorable to the Confederacy. While the two armies were confronting
each other, with the imminent prospect of active and important
operations, General McClellan was relieved, and one of his corps
commanders, General Burnside, assigned to the command of the
Federal army of the Potomac. As is now universally acknowledged,
General McClellan was sacrificed to the clamor of a political faction.
By this act Mr. Lincoln became responsible for much of the ill-fortune
which awaited the Federal arms in Virginia.
Perhaps among his countrymen, a Southern tribute to General
McClellan may constitute but feeble praise. He was unquestionably
the ablest and most accomplished soldier exhibited by the war on
the Northern side. “Had there been no McClellan,” General Meade is
reported to have said, “there would have been no Grant.” In
retirement, if not exile, General McClellan saw the armies which his
genius created, achieve undeserved distinction for men, his inferiors
in all that constitutes true generalship. He saw the feeble and
wasted remnant of an army, with which he had grappled in the day
of its glory and strength, surrender to a multitudinous host, doubly
as large as the army with which he had given Lee his first check at
Antietam. A true soldier, McClellan was also a true gentleman, an
enemy whose talents the South respects none the less, because he
did not wantonly ravage its homes, nor make war upon the helpless,
the aged, and infirm. President Davis, who, while Federal Secretary
of War, conferred upon McClellan a special distinction, held his
genius and attainments in high estimation. He received the
intelligence of his removal with profound satisfaction.
The North was not required to wait long for a competent test of the
new commander’s capacity. Foiled and deceived by Lee, in a series
of maneuvres, the results of which made him only less ridiculous
than the gasconading Pope among Federal commanders, Burnside
finally assailed Lee, on the 13th December, at Fredericksburg. The
result was a bloody slaughter, unequaled in previous annals of the
war, an overwhelming repulse, and a demoralized retreat across the
Rappahannock.
The Western campaign terminated with the battle of Murfreesboro’.
The Federal commander, Rosecrans, the successor of Buell,
advanced from Nashville to drive Bragg from his position. A brilliant
and vigorous attack by Bragg, on the 31st December, routed an
entire wing of the Federal army; on the second day the action was
more favorable to Rosecrans, who had retreated, after his reverse on
the first day, to stronger positions. Receiving information that the
enemy was strongly reënforcing, General Bragg fell back to
Tullahoma, a position more favorable for strategic and defensive
purposes.
The transfer, after the battle of Shiloh, of the troops of Price and Van
Dorn to the army east of the Mississippi, had almost divested the
Trans-Mississippi Department of interest in the public mind. After Elk
Horn, there was but one considerable engagement, in 1862, west of
the Mississippi. This was the battle of Prairie Grove, a fruitless
victory, won by General Hindman, about the middle of December.
The country north of the Arkansas River continued to be nominally
held by the Federal forces.
Thus, in nearly every quarter, the second year of the war terminated
with events favorable to the prospects of Southern independence.
Though the territorial jurisdiction of the Confederacy was contracted,
the world was not far from regarding the task of subjugation as
already a demonstrated and hopeless failure. All the invasive
campaigns of the enemy, save the first shock of his overwhelming
onsets against weak and untenable posts, in the winter and early
spring, had been brought to grief, and nowhere had he maintained
himself away from his water facilities. An unexampled prestige
among nations now belonged to the infant power, which had carried
its arms from the Tennessee to the Ohio, had achieved a week of
victories before its own capital, and carried the war back to its
threshold. After such achievements the Southern Confederacy rightly
claimed from those powers which have assumed to be the arbiters
of international right an instant recognition upon the list of declared
and established nationalities.
In our brief and cursory glance at military operations, we have
omitted to mention the action of the Government designed to
promote the successful prosecution of the war. This action is mainly
comprehended by the various suggestions of the President’s
messages to Congress. These recommendations related chiefly to
measures having in view the increased efficiency of the service. He
invited the attention of Congress, especially, to the necessity of
measures securing the proper execution of the conscription law, and
the consolidation of companies, battalions and regiments, when so
reduced in strength as to impair that uniformity of organization,
which was necessary in the army. Legislation was urged, having in
view a better control of military transportation on the railroads, and
the improvement of their defective condition. The President also
recommended various propositions relating to organization of the
army, and an extension of the provisions of the conscription law,
embracing persons between the ages of thirty-five and forty-five
years.
About the middle of December President Davis visited the camps of
the Western Department, spending several weeks in obtaining
information as to the condition and wants of that section of the
Confederacy, and devising expedients for a more successful defense
in a quarter where the Confederate cause was always seriously
menaced. His presence was highly beneficial in allaying popular
distrust, founded upon the supposition that Virginia and the Atlantic
region engrossed the attention of the Government to the exclusion
of concern for the West and the Mississippi Valley. When the
President returned to Richmond, there were signs of popular
animation in the South-west, which justified a more confident hope
of the cause, than the South was permitted to indulge at any other
period of the struggle.
An incident of this visit was the address of the President before the
Mississippi Legislature. The warm affection of Mr. Davis for
Mississippi is more than reciprocated by the noble and chivalrous
people of that State. He was always proud of the confidence reposed
in him by such a community, and Mississippi can never abate her
affection for one who so illustrated her name in the council chamber
and upon the field of battle. In this address he alluded, with much
tenderness, to this reciprocal attachment, declaring, that though “as
President of the Confederate States, he had determined to make no
distinction between the various parts of the country—to know no
separate State—yet his heart always beat more warmly for
Mississippi, and he had looked on Mississippi soldiers with a pride
and emotion, such as no others inspired.”
Declaring that his course had been dictated by the sincere purpose
of promoting the cause of independence, he admonished the
country to prepare for a desperate contest, with a power armed for
the purposes of conquest and subjugation. He characterized severely
the conduct of the war by the North. Reviewing its progress, and
recounting the immense disadvantages, with which the South
contended, he maintained that the South should congratulate itself
on its achievements, and not complain that more had not been
accomplished. The conscription law was explained and defended as
to many of its features not clearly understood by the people. We
give an extract from Mr. Davis’ remarks as to the Confederate
conscription, a subject of vast misrepresentation during the war, and
of much ignorant censure since:
“I am told that this act has excited some discontentment, and that it
has provoked censure far more severe, I believe, than it deserves. It
has been said that it exempts the rich from military service, and
forces the poor to fight the battles of the country. The poor do,
indeed, fight the battles of the country. It is the poor who save
nations and make revolutions. But is it true that, in this war, the men
of property have shrunk from the ordeal of the battle-field? Look
through the army; cast your eyes upon the maimed heroes of the
war whom you meet in your streets and in the hospitals; remember
the martyrs of the conflict; and I am sure you will find among them
more than a fair proportion drawn from the ranks of men of
property. The object of that portion of the act which exempts those
having charge of twenty or more negroes, was not to draw any
distinction of classes, but simply to provide a force, in the nature of
a police force, sufficient to keep our negroes in control. This was the
sole object of the clause. Had it been otherwise, it would never have
received my signature. As I have already said, we have no cause to
complain of the rich. All our people have done well; and, while the
poor have nobly discharged their duties, most of the wealthiest and
most distinguished families of the South have representatives in the
ranks. I take, as an example, the case of one of your own
representatives in Congress, who was nominated for Congress and
elected, but still did a sentinel’s duty until Congress met. Nor is this a
solitary instance, for men of largest fortune in Mississippi are now
serving in the ranks.”
The President strongly and eloquently recommended the provision
by the Legislature for the families of the absent soldiers of
Mississippi. Said he: “Let this provision be made for the objects of
his affection and his solicitude, and the soldier, engaged in fighting
the battles of his country, will no longer be disturbed in his slumbers
by dreams of an unprotected and neglected family at home. Let him
know that his mother Mississippi has spread her protecting mantle
over those he loves, and he will be ready to fight your battles, to
protect your honor, and in your cause to die.”
The address concluded with an earnest appeal for unrelaxed
exertion, and the declaration that, “in all respects, moral as well as
physical, the Confederacy was better prepared than it was a year
previous”—a declaration verified not less by the favorable situation
than by the evident apprehension of the North and the expectations
of Europe.
CHAPTER XIV.
RESPECT OF MANKIND FOR THE SOUTH—THE
MOST PROSPEROUS PERIOD OF THE WAR—HOW
MR. DAVIS CONTRIBUTED TO THE DISTINCTION OF
THE SOUTH—FACTION SILENCED—THE EUROPEAN
ESTIMATE OF JEFFERSON DAVIS—HOW HE
DIGNIFIED THE CAUSE OF THE SOUTH—HIS STATE
PAPERS—HIS ADMINISTRATION OF CIVIL MATTERS
—THE CONTRAST BETWEEN THE TWO PRESIDENTS
—MR. DAVIS’ OBSERVANCE OF CONSTITUTIONAL
RESTRAINTS—ARBITRARY ADMINISTRATION OF
MR. LINCOLN—MR. DAVIS’ MODERATION—HE
SEEKS TO CONDUCT THE WAR UPON CIVILIZED
IDEAS—AN ENGLISH CHARACTERIZATION OF DAVIS
—COLONEL FREEMANTLE’S INTERVIEW WITH HIM
—MR. GLADSTONE’S OPINION—THE PURELY
PERSONAL AND SENTIMENTAL ADMIRATION OF
EUROPE FOR THE SOUTH—INCONSISTENT
CONDUCT OF THE EUROPEAN GREAT POWERS—
THE LONDON “TIMES” BEFORE M’CLELLAN’S
DEFEAT—THE CONFEDERACY ENTITLED TO
RECOGNITION BY EUROPE—ENGLAND’S SYMPATHY
WITH THE NORTH—DIGNIFIED ATTITUDE OF
PRESIDENT DAVIS UPON THE SUBJECT OF
RECOGNITION—HIS EARLY PREDICTION UPON THE
SUBJECT—FRANCE AND ENGLAND EXPOSED TO
INJURIOUS SUSPICIONS—TERGIVERSATIONS OF
THE PALMERSTON CABINET—THE BROAD FARCE OF
“BRITISH NEUTRALITY”—ENGLAND DECLINES TO
UNITE WITH FRANCE IN AN OFFER OF MEDIATION
BETWEEN THE AMERICAN BELLIGERENTS—
ENGLAND’S “POLICY”—SHE SOUGHT THE RUIN OF
BOTH SECTIONS OF AMERICA—CULMINATION OF
THE ANTISLAVERY POLICY OF THE NORTH—MR.
LINCOLN’S CONVERSATION WITH A KENTUCKY
MEMBER OF CONGRESS—THE WAR A “CRIME” BY
MR. LINCOLN’S OWN SHOWING—VIOLATION OF
PLEDGES AND ARBITRARY ACTS OF THE FEDERAL
GOVERNMENT—THE MASK REMOVED AFTER THE
BATTLE OF ANTIETAM—THE REAL PURPOSE OF
EMANCIPATION—MR. DAVIS’ ALLUSION TO THE
SUBJECT—INDIGNATION OF THE SOUTH AT THE
MEASURE—MILITARY OPERATIONS IN TEXAS AND
MISSISSIPPI—VICKSBURG—PORT HUDSON—LOSS
OF ARKANSAS POST—FEDERAL FLEET REPULSED AT
CHARLESTON—PREPARATIONS FOR THE CAMPAIGN
—UNITY AND CONFIDENCE OF THE SOUTH—MR.
DAVIS’ ADDRESS TO THE COUNTRY—IMPORTANT
EXTRACTS—GENERAL LEE PREPARES FOR BATTLE—
HIS CONFIDENCE—CONDITION OF HIS ARMY—
BATTLE OF CHANCELLORSVILLE—JEFFERSON
DAVIS’ TRIBUTE TO STONEWALL JACKSON.
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.
ebookname.com