100% found this document useful (1 vote)
8 views

Java EE 5 Development with NetBeans 6 1st Edition Heffelfinger download

The document provides information about the book 'Java EE 5 Development with NetBeans 6' by David Heffelfinger, which focuses on developing enterprise Java applications using the NetBeans IDE. It includes details about the book's content, including chapters on web applications, JavaServer Faces, and database interaction, as well as author and reviewer backgrounds. The book is available for download along with other related Java and NetBeans resources from ebookultra.com.

Uploaded by

arcatamangaa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
8 views

Java EE 5 Development with NetBeans 6 1st Edition Heffelfinger download

The document provides information about the book 'Java EE 5 Development with NetBeans 6' by David Heffelfinger, which focuses on developing enterprise Java applications using the NetBeans IDE. It includes details about the book's content, including chapters on web applications, JavaServer Faces, and database interaction, as well as author and reviewer backgrounds. The book is available for download along with other related Java and NetBeans resources from ebookultra.com.

Uploaded by

arcatamangaa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Java EE 5 Development with NetBeans 6 1st

Edition Heffelfinger download

https://ebookultra.com/download/java-ee-5-development-with-
netbeans-6-1st-edition-heffelfinger/

Explore and download more ebooks or textbooks


at ebookultra.com
We believe these products will be a great fit for you. Click
the link to download now, or visit ebookultra.com
to discover even more!

Java EE 5 Development using GlassFish Application Server


1st Ed. Edition David Heffelfinger

https://ebookultra.com/download/java-ee-5-development-using-glassfish-
application-server-1st-ed-edition-david-heffelfinger/

Big Java Compatible with Java 5 6 and 7 4th Edition Cay S.


Horstmann

https://ebookultra.com/download/big-java-compatible-with-
java-5-6-and-7-4th-edition-cay-s-horstmann/

The Java EE 6 Tutorial Basic Concepts 4th Edition Eric


Jendrock

https://ebookultra.com/download/the-java-ee-6-tutorial-basic-
concepts-4th-edition-eric-jendrock/

Java EE 7 Essentials 1st Edition Arun Gupta

https://ebookultra.com/download/java-ee-7-essentials-1st-edition-arun-
gupta/
Java EE 7 for Beginners 1st Edition Sharanam Shah

https://ebookultra.com/download/java-ee-7-for-beginners-1st-edition-
sharanam-shah/

Pro Netbeans IDE 6 Rich Client Platform Edition Adam Myatt

https://ebookultra.com/download/pro-netbeans-ide-6-rich-client-
platform-edition-adam-myatt/

Starting Out with Java Early Objects 5 E 5th Edition Tony


Gaddis

https://ebookultra.com/download/starting-out-with-java-early-
objects-5-e-5th-edition-tony-gaddis/

Agile Web Development with Rails 5 1st Edition Sam Ruby

https://ebookultra.com/download/agile-web-development-with-
rails-5-1st-edition-sam-ruby/

JBoss R Seam Simplicity and Power Beyond Java TM EE 1st


Edition Michael Juntao Yuan

https://ebookultra.com/download/jboss-r-seam-simplicity-and-power-
beyond-java-tm-ee-1st-edition-michael-juntao-yuan/
Java EE 5 Development with NetBeans 6 1st Edition
Heffelfinger Digital Instant Download
Author(s): Heffelfinger, David
ISBN(s): 9781847195463, 1847195466
Edition: 1
File Details: PDF, 23.45 MB
Year: 2008
Language: english
Java EE 5
Development with NetBeans 6

Develop professional enterprise Java EE 5 applications


quickly and easily with this popular IDE

David R. Heffelfinger

BIRMINGHAM - MUMBAI

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Java EE 5 Development with NetBeans 6

Copyright © 2008 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the author, Packt Publishing,
nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: October 2008

Production Reference: 2241008

Published by Packt Publishing Ltd.


32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.

ISBN 978-1-847195-46-3
www.packtpub.com

Cover Image by Michelle O'Kane (michelle@kofe.ie)

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Credits

Author Project Manager


David R. Heffelfinger Abhijeet Deobhakta

Reviewers Project Coordinator


David Salter Neelkanth Mehta
Mario Pérez Madueño
Indexer
Senior Acquisition Editor Monica Ajmera
Douglas Paterson
Proofreader
Development Editor Cathy Cumberlidge
Swapna V. Verlekar
Production Coordinator
Technical Editor Shantanu Zagade
Bhupali Khule
Cover Work
Editorial Team Leader Shantanu Zagade
Akshara Aware

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
About the Author

David Heffelfinger is the Chief Technology Officer of Ensode Technology, LLC,


a software consulting firm based in the greater Washington DC area. He has been
architecting, designing, and developing software professionally since 1995, and has
been using Java as his primary programming language since 1996. He has worked
on many large scale projects for several clients including the US Department of
Homeland Security, Freddie Mac, Fannie Mae, and the US Department of Defense.
He has a Masters degree in Software Engineering from Southern Methodist
University. David is editor in chief of Ensode.net (http://www.ensode.net), a web
site about Java, Linux, and other technology topics.

I would like to thank everyone at Packt Publishing for making this


book a reality. Douglas, Swapna, Bhupali, Neelkanth, Shantanu,
Abhijeet, Monica, Camilie, Akshara, without your help and
direction, this book wouldn't have been possible.

I would also like to thank the technical reviewers, David Salter and
Mario Pérez Madueño; your feedback certainly was essential, greatly
improving the quality of the material presented in the book.

Last, and most certainly not least, I would like to thank my wife and
daughter for enduring the long hours I spent working on the book,
unable to spend time with my family.

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
About the Reviewers

David Salter is an enterprise software architect who has been developing software
professionally since 1991. His relationship with Java goes right back to the beginning,
using Java 1.0 for writing desktop applications and applets for interactive web
sites. David has been developing Enterprise Java Applications using both the J2EE
standards and open source solutions for the last five years. David runs the Java
community web site, Develop In Java, a web site for all levels of Java developers.
David co-authored the book Building SOA-Based Composite Applications Using
NetBeans IDE 6.

Mario Pérez Madueño started developing applications for Zeus Sistemas in 1995
using Borland C++ Builder. He graduated in computer science in 2006 and is still
studying to obtain a Master's degree in the EHEA, although what he actually would
like is the Java programming with passion graduate.

Mario also works most recently as software engineer for Altra Software, helping to
develop Java desktop and EE5 applications.

Nothing attracts as much enthusiasm as an IDE for the developer, so Mario is


a NetBeans fan. His lastest contributions have been in the NetBeans 6 Spanish
localization process and currently as NetCAT 6.5 backup team member.

As technical reviewer, Mario also worked for Packt Publishing on the title Building
SOA-Based Composite Applications Using NetBeans IDE 6.

My warm acknowledgments always go to María for still supporting


or being compatible with Martín, with me, and now also with the
great thing she has in her paunch.

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Table of Contents
Preface 1
Chapter 1: Getting Started with NetBeans 7
Introduction 7
Downloading NetBeans 9
Installing NetBeans 12
Microsoft Windows 12
Mac OS X 13
Linux and Solaris 13
Other Platforms 13
Installation Procedure 14
Starting NetBeans for the First Time 19
Configuring NetBeans for Java EE Development 20
Integrating NetBeans with a Third Party Application Server 21
Integrating NetBeans with a Third Party RDBMS 24
Adding a JDBC Driver to NetBeans 24
Connecting to a Third Party RDBMS 26
Deploying Our First Application 28
NetBeans Tips for Effective Development 33
Code Completion 33
Code Templates 37
Keyboard Shortcuts 38
Understanding NetBeans Visual Cues 42
Summary 44
Chapter 2: Developing Web Applications with Servlets
and JSPs 45
Creating Our First Web Application 45
Modifying NetBeans' Generated Code 52
Developing the Input Page 52
Developing the Output Page 61

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Table of Contents

Servlet Development 68
Adding a Servlet to Our Application 68
Securing Web Applications 77
Implementing Form Based Authentication 79
Implementing the Login Page 79
Implementing a Login Error Page 81
Configuring Our Application for Form-Based Authentication 82
JSP Fragments 90
Creating a JSP Fragment in NetBeans 91
Monitoring Web Applications with NetBeans HTTP Monitor 93
Summary 100
Chapter 3: Enhancing JSP Functionality with JSTL
and Custom Tags 101
Core JSTL Tags 102
Conditionally Displaying Part of a Page with the <c:if> Tag 102
Displaying Mutually Exclusive Markup with the <c:choose> Tag 105
Iterating through Arrays or Collections with the <c:forEach> Tag 109
SQL JSTL Tags 112
Retrieving Database Data with the <sql:query> Tag 115
Modifying Database Data with the <sql:update> Tag 119
Inserting Database Data 119
Updating Database Data 123
Deleting Database Data 125
Closing Remarks about JSTL 128
Custom JSP Tags 128
Summary 134
Chapter 4: Developing Web Applications using
JavaServer Faces 135
Developing Our first JSF Application 136
Creating a New JSF Project 137
Modifying Our JSP to Capture User Data 141
Creating Our Managed Bean 147
Implementing Navigation 152
Executing Our Application 156
JSF Validation 158
Displaying Tabular Data 162
Summary 171
Chapter 5: Interacting with Databases through
the Java Persistence API 173
Creating Our First JPA Entity 174
Adding Persistent Fields to Our Entity 182

[ ii ]

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Table of Contents

Creating a Data Access Object (DAO) 183


Generating the User Interface 188
Implementing the Controller 191
Trying Out Our Application 193
Automated Generation of JPA Entities 196
Named Queries and JPQL 203
Entity Relationships 204
Generating JSF Applications from JPA Entities 210
Summary 218
Chapter 6: Visual Web JSF Development 219
Writing Our first Visual Web Application 219
Adding Additional Components to Our Application 232
Adding Additional Text Fields 232
Adding a Drop-Down List Component 235
Adding a Message Component to Each Input Field 239
Grouping Error Messages with the Message Group Component 242
Ajax Autovalidation 244
Organizing Our Page into Tabs 249
Binding a Drop-Down List to a Database Table 253
Ajax-Enabling Visual Web Applications 256
Summary 261
Chapter 7: Implementing the Business Tier
with Session Beans 263
Introduction to Session Beans 264
Creating a Session Bean in NetBeans 264
Accessing the Bean from a Client 272
Executing the Client 274
Session Bean Transaction Management 276
Implementing Aspect-Oriented Programming with Interceptors 278
Implementing the Interceptor Class 279
Decorating the EJB with the @Interceptors Annotations 281
EJB Timer Service 282
Implementing the Client 284
Generating Session Beans from JPA Entities 286
Summary 290
Chapter 8: Messaging with JMS and Message Driven Beans 291
Introduction to JMS 291
Creating the Project and JMS Resources 293
Creating a JMS Destination 294
Sending Messages to a Message Destination 298
Processing JMS Messages with Message Driven Beans 303
Summary 306
[ iii ]

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Table of Contents

Chapter 9: Web Services 307


Introduction to Web Services 307
Creating a Simple Web Service 308
Testing Our Web Service 314
Developing a Client for Our Web Service 316
Exposing EJBs as Web Services 320
Implementing New Web Services as EJBs 321
Exposing Existing EJBs as Web Services 324
Creating a Web Service from an Existing WSDL 327
Summary 329
Chapter 10: Putting it all Together 331
Creating Our Enterprise Project 331
Implementing the Data Access Layer 334
Implementing the User Interface Layer 338
Adding User Interface Components to the Page 339
Populating the Table 344
Testing Our Application 346
Adding Missing Functionality 346
Defining Navigation Rules 361
Testing the Completed Application 362
Summary 365
Appendix A: Debugging Enterprise Applications
with the NetBeans Debugger 367
Debugging Enterprise Applications 367
Summary 374
Appendix B: Identifying Performance Issues
with NetBeans Profiler 375
Profiling Our Application 375
Summary 379
Index 381

[ iv ]

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Preface
In 1999, Sun Microsystems split the Java language into three editions, J2SE
(Java 2, Standard Edition), J2ME (Java 2, Micro Edition), and J2EE (Java 2, Enterprise
Edition). The reason for the split was that the Java language was covering a lot of
territory, and not all developers used all the features of the language. To make the
language more manageable, the decision was made to split the language into the
three editions.

Since then, the different editions of the language have been renamed to Java SE,
Java ME, and Java EE. The reason for renaming the different editions was that the
Java platform obtained brand recognition among consumers, and Sun Microsystems
wanted to make it obvious that Java SE, ME, and EE were recognized as part of the
Java platform.

All three editions share the core of the Java language, but additional APIs are
included in each edition that are not available in the others. In this book we will
cover Java EE, and how to use NetBeans to more effectively write applications
conforming to the Java EE specification.

What This Book Covers


Chapter 1 provides an introduction to NetBeans, giving time saving tips and tricks
that will result in more efficient development of Java applications.

Chapter 2 covers how NetBeans aids in the development of web applications using
the servlet API and JavaServer Pages.

Chapter 3 shows how NetBeans can help us create maintainable web applications by
taking advantage of JavaServer Pages Standard Tag Library (JSTL), and it also covers
how to write our own custom JSP tags.

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Preface

Chapter 4 explains how NetBeans can help us easily develop web applications that
take advantage of the JavaServer Faces framework.

Chapter 5 explains how NetBeans allows us to easily develop applications taking


advantage of the Java Persistence API (JPA), including how to automatically
generate JPA entities from existing schemas. This chapter also covers how complete
web based applications can be generated with a few clicks from an existing
database schema.

Chapter 6 covers the NetBeans visual web JSF designer, which allows us to visually
build JSF applications by dragging and dropping components into our JSF pages.

Chapter 7 discusses how NetBeans simplifies EJB 3 session bean development.

Chapter 8 addresses Java EE messaging technologies such as the Java Messaging


Service (JMS) and Message Driven Beans (MDB), covering NetBeans features that
simplify application development taking advantage of these APIs.

Chapter 9 explains how NetBeans can help us easily develop web services based on
the Java API for XML Web Services (JAX-WS) API.

Chapter 10 provides a sample application taking advantages of most of the material


covered in the book, including Visual Web JSF, EJB 3, and JPA .

Appendix A provides an introduction to the NetBeans debugger, and how it can be


used to discover defects in our application.

Appendix B covers the NetBeans profiler, explaining how it can be used to analyze
performance issues in our applications.

Who is This Book For


The book is aimed at three different types of developers:

• Java developers (not necessarily familiar with NetBeans) wishing to


become proficient in Java EE 5, and who wish to use NetBeans for
Java EE development.
• NetBeans users wishing to find out how to use their IDE of choice to develop
Java EE applications.
• Experienced Java EE 5 developers wishing to find out how NetBeans can
make their Java EE 5 development easier.

[]

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Preface

Conventions
In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles, and an
explanation of their meaning.

Code words in text are shown as follows: "Earlier in this chapter we discussed how
the required attribute for JSF input fields allows us to easily make input
fields mandatory."
A block of code will be set as follows:
<navigation-rule>
<from-view-id>/welcomeJSF.jsp</from-view-id>
<navigation-case>
<from-outcome>submit</from-outcome>
<to-view-id>/confirmation.jsp</to-view-id>
</navigation-case>
</navigation-rule>

When we wish to draw your attention to a particular part of a code block, the
relevant lines or items will be made bold:
<h:inputText id="email" label="Email Address"
required="true" value="#{RegistrationBean.email}">
<f:validator validatorId="emailValidator"/>
</h:inputText>

Any command-line input and output is written as follows:


chmod +x ./filename.sh

New terms and important words are introduced in a bold-type font. Words that
you see on the screen, in menus or dialog boxes for example, appear in our text
like this: " At this point JSF navigation "kicks-in", and we are taken to the
Confirmation Page."

Important notes appear in a box like this.

Tips and tricks appear like this.

[]

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Preface

Reader Feedback
Feedback from our readers is always welcome. Let us know what you think about
this book, what you liked or may have disliked. Reader feedback is important for us
to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to feedback@packtpub.com,


making sure to mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please
send us a note in the SUGGEST A TITLE form on www.packtpub.com or
email suggest@packtpub.com.

If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer Support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.

Downloading the Example Code for the Book


Visit http://www.packtpub.com/files/code/5463_Code.zip to directly
download the example code.

The downloadable files contain instructions on how to use them.

Errata
Although we have taken every care to ensure the accuracy of our contents, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in text or
code—we would be grateful if you would report this to us. By doing this you can
save other readers from frustration, and help to improve subsequent versions of
this book. If you find any errata, report them by visiting http://www.packtpub.
com/support, selecting your book, clicking on the let us know link, and entering
the details of your errata. Once your errata are verified, your submission will be
accepted and the errata added to the list of existing errata. The existing errata can be
viewed by selecting your title from http://www.packtpub.com/support.

[]

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Preface

Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media.
At Packt, we take the protection of our copyright and licenses very seriously. If
you come across any illegal copies of our works in any form on the Internet, please
provide the location address or website name immediately so we can pursue
a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected


pirated material.

We appreciate your help in protecting our authors, and our ability to bring you
valuable content.

Questions
You can contact us at questions@packtpub.com if you are having a problem with
some aspect of the book, and we will do our best to address it.

[]

This material is copyright and is licensed for the sole use by Henry Vanyan on 26th July 2009
7406 Valaho Dr, , Tujunga, , 91042
Random documents with unrelated
content Scribd suggests to you:
open field expect not the stimulus of praise; the soldier sees his foe,
and his British courage rises at each step; but he who, after perhaps a
night-march of great length, has to ascend mountains, or penetrate
dense bush and ravines, filled probably with a daring and intrepid
enemy, as resolute as athletic, ready to murder any one who may fall
into his hands, and when warfare is of the most stealthy and
enterprising kind, appreciates the praise of his commander, because,
when his acts are conspicuously daring, he is conscious he deserves it.
He does his duty; but human nature renders even the soldier’s intrepid
heart sensible of the approbation of his superior, which he is proud to
know may reach the eye of his parents and friends.”
[456] We regret exceedingly that we have been unable to procure an
authentic portrait of Colonel Seton.
[457] This officer met his death by a sad mischance in 1873, at one of
the London Metropolitan Railway Stations.
[458] His bust is on page 583, vol. ii.
[459] Brevet Lieut.-Colonel.
[460] Brevet Lieut.-Colonel, 30th June 1813
[461] Brevet Major, 21st June 1813.
[462] Brevet Lieut.-Colonel. 9th Dec. 1872
S E V E N T Y- F I F T H R E G I M E N T.
1787–1809.
Raising of the Regiment—India—Home—Ceases to be a Highland Regiment.

While Major-General Sir Archibald Campbell was appointed Colonel


of the 74th, the colonelcy of its coeval regiment, the 75th, was
conferred on Colonel Robert Abercromby of Tullibody. He had
commanded a light infantry brigade during six campaigns in the
American war; and as several companies of this brigade had been
composed of the light infantry of the Highland regiments then in
America, the colonel was well known to the Highlanders, and had
acquired an influence among them rarely enjoyed by officers born
south of the Grampians. There are instances, no doubt, such as
those of the Marquis of Montrose and Viscount Dundee, and others
of modern date, “where Highland corps have formed attachments to
officers not natives of their country, and not less ardent than to the
chiefs of old;”[463] and if the instances have been few, it must be
attributed entirely to want of tact in officers themselves, who, from
ignorance of the Highland character, or from some other cause, have
failed to gain the attachment of the Highland soldiers.
From personal respect to Colonel Abercromby, many of the
Highlanders, who had served under him in America, and had been
discharged at the peace of 1783, enlisted anew, and with about 300
men who were recruited at Perth, and in the northern counties,
constituted the Highland part of the regiment. According to a
practice which then prevailed, of fixing the head-quarters of a
regiment about to be raised in the neighbourhood of the colonel’s
residence, if a man of family, the town of Stirling was appointed for
the embodying of the 75th; it was accordingly regimented here in
June 1788, and being immediately ordered to England, embarked for
India, where it arrived about the end of that year.
For eighteen months after its arrival in India, the regiment was
subjected to extreme severity of discipline by one of the captains,
who appears to have adopted the old Prussian model for his rule. A
more unfortunate plan for destroying the morale of a Highland
regiment could not have been devised, and the result was, that
during the existence of this discipline, there were more punishments
in the 75th than in any other corps of the same description. But as
soon as the system was modified by the appointment of an officer
who knew the dispositions and feelings of the Highlanders, the
conduct of the men improved.
The regiment took the field in 1790, under the command of
Colonel Hartley, and in the two subsequent years formed part of the
force under Major-General Robert Abercromby, on his two marches
to Seringapatam. The regiment was also employed in the assault on
that capital in 1799, the flank companies having led the left columns.
[464]
From that period down to 1804, the regiment was employed in
the provinces of Malabar, Goa, Goojerat, and elsewhere, and in 1805
was with General Lake’s army in the disastrous attacks on Bhurtpoor.
The regiment was ordered home in 1806; but such of the men as
were desirous of remaining in India were left behind. In 1809 there
were not one hundred men in the regiment who had been born
north of the Tay; on which account, it is believed, the designation of
the regiment was at that time changed.
The regiment, however, still retains its old number, and is known
as the “Stirlingshire Regiment.” It has had a distinguished career,
having been present in many of the engagements which we have
had to notice in connection with the existing Highland regiments. As
will be seen in our account of the 78th Highlanders, the 75th formed
part of the force with which Sir Colin Campbell marched to the relief
of Lucknow in November 1857, it having been left to guard the Alum
Bagh while Sir Colin, with the rest of the force, made his way to the
besieged garrison on the 14th of that month.
F O OT N OT E S :
[463] Jackson’s Characteristics.
[464] See histories of the 71st, 72nd, 73rd, and 74th regiments in this
volume.
THE 78th HIGHLANDERS, OR ROSS-SHIRE BUFFS.
[465]

I.

1793 to 1796.
The Clan Mackenzie—The various Battalions of the 78th—Offers from F. H.
Mackenzie, Esq. of Seaforth, to raise a Regiment for Government—Letter of
service granted to F. H. Mackenzie, Esq., to raise a Regiment of Highlanders,
to be numbered the 78th—The 1st Battalion—List of officers—Inspected and
passed by Sir Hector Munro—Under Lord Moira in Guernsey—The Campaign of
1794–95 in Holland—The Regiment joins the Duke of York on the Waal—
Nimeguen—Disastrous retreat on Deventer—The Regiment returns home—The
Loyalist war in La Vendée—The Quiberon Expedition—Occupation of L’Île-Dieu
—The Regiment returns home—Colonel F. H. Mackenzie’s proposals to raise a
2nd Battalion for the 78th—Letter of Service granted to him for that purpose—
List of Officers—Inspected and passed by Sir Hector Munro—Granted the title
of the Ross-shire Buffs—Ordered to England—Difficulties prior to embarkation
at Portsmouth—The Regiment sails on secret service—Capture of the Cape of
Good Hope—The Regiment goes into quarters at Capetown, until the arrival of
the 1st Battalion.

The clan Mackenzie was, next to the


Campbells, the most considerable in
the Western Highlands, having built
its greatness upon the fallen fortunes
of the Macdonalds. Its military
strength was estimated in 1704, at
1200 men; by Marshal Wade in 1715,
at 3000 men; and by Lord President
Forbes in 1745, at 2500 men; but
probably all these conjectures were
below the mark.[466]
The clan Mackenzie furnished large
contingents to the present 71st and
Assaye. Persia. 72nd Regiments when they were first
Maida. Kooshab. raised.
Java. Lucknow.
In 1793, Francis Humberstone
Mackenzie, heir-male of the family, and afterwards Lord Seaforth,
raised the present 78th Highlanders, and a second battalion in the
following year, when nearly all the men enlisted were from his own
or his clansmen’s estates in Ross-shire and the Lewis. Another
second battalion was subsequently raised in 1804, when, Lord
Seaforth being absent as Governor of Demerara, his personal
influence was not of so much avail. However, again the greater part
of the men were recruited on the estates of the clan by his brother-
in-law, Colonel Alexander Mackenzie of Belmaduthy (who afterwards
adopted the additional surname of Fraser, on succeeding to the
Castle Fraser estates in right of his mother) and Colonel J. R.
Mackenzie of Suddie. Several Fencible, Militia, and local Volunteer
regiments were also raised among the Mackenzies at the end of the
last and beginning of the present century.

COLONELS OF THE 78TH AND 79TH HIGHLANDERS.


A. Fullerton & Co London & Edinburgh.
UPPER
F. H. MACKENZIE OF SEAFORTH. SIR PATRICK GRANT, G.C.B.
LORD SEAFORTH. G.C.M.G.
Col. of 78th Highlrs 7th March 1793 Col. of 78th Highlrs 23rd Octr 1863
—May 1796. —
First Colonel.
LOWER
SIR RONALD CRAUFURD SIR JAMES MACDONELL, K.C.B.
FERGUSON, G.C.B. K.C.H.
Col. of 79th Highlrs 24th March 1828 Col. of 79th Highlrs 14th July 1842—
—10th April 1841. 8th Feb. 1849.
Also Col. of 71st Highlrs 8th Feb.
1849—15th May 1857.

As the early history of the 78th is a little complicated, owing to its


having been twice augmented with a 2nd battalion, it is as well to
remember the following chronology:—
1st Battalion—Letter of Service dated 7th March 1793.
2nd Battalion—Letter of Service dated 10th February 1794.
Both Battalions amalgamated, June 1796.
2nd Battalion—Letter of Service, dated 17th April 1804.
Both Battalions amalgamated, July 1817.
The regiment has ever since remained as a single battalion.
As early as the autumn of 1787 (when the 74th, 75th, 76th, and
77th Regiments were ordered to be raised for service in India),
Francis Humberstone Mackenzie of Seaforth, lineal descendant and
representative of the old earls of Seaforth, had made an offer to the
King for the raising of a Highland corps on his estates in Ross-shire
and the Isles, to be commanded by himself. As the Government,
however, merely accepted his services in the matter of procuring
recruits for the regiments of Sir Archibald Campbell and Colonel
Abercromby (the 74th and 75th), he did not come prominently
forward. On the 19th of May 1790, he again renewed his offer, but
was informed that Government did not contemplate raising fresh
corps, the establishment of the army having been finally fixed at 77
regiments.
Undismayed, however, by the manner in which his offers had been
hitherto shelved, he was the first to step forward, on the declaration
of war, and place his great influence in the Highlands at the disposal
of the Crown. Accordingly, a Letter of Service, dated 7th March,
1793, was granted to him, empowering him, as Lieut.-Colonel
Commandant, to raise a Highland battalion, which, as the first to be
embodied during the war, was to be numbered the 78th. The
strength of the battalion was to be 1 company of grenadiers, 1 of
light infantry, and 8 battalion companies. Seaforth immediately
appointed as his major his brother-in-law, Alexander Mackenzie of
Belmaduthy, son of Mackenzie of Kilcoy, a captain in the 73rd
Regiment, and a man in every way fitted for the post. A notice was
then posted through the counties of Ross and Cromarty, and the
island of Lewis.
Applications for commissions now poured in upon Seaforth; and,
besides his own personal friends, many who were but slightly known
to him solicited favours for their relatives. The following is a list of
those whose names were approved by the King:—
FIRST LIST OF OFFICERS.
Lieut.-Colonel Commandant.—F. H. Mackenzie, afterwards Lord Seaforth,
Lieut.-Gen. 1808. Died 1815. [His portrait is on the Plate of the Colonels of
the 78th and 79th Regiments.]

Lieut.-Colonel.—Alexander Mackenzie of Belmaduthy, afterwards of Castle


Fraser, when he assumed the name of Fraser. Lieut.-General 1808. Died
1809.
Majors.
George, Earl of Errol, died 1799.
Alexander Mackenzie of Fairburn, Lieut.-General 1809.
Captains.
Alexander Malcolm, died 1798.
Thomas Fraser of Leadclune.
John Mackenzie (Gairloch).
Gabriel Murray, Brevet-Major, killed at Tuil, 1794.
Alexander Grant, died 1807.
J. R. Mackenzie of Suddie, Major-General, killed at Talavera 1809.
Alexander Adams, Major-General 1814.
Hon. Geo. Cochrane, son of the Earl of Dundonald.
Captain-Lieutenant—Duncan Munro of Culcairn.
Lieutenants.
Colin Mackenzie.
James Fraser, retired 1795.
Charles Rose.
Hugh Munro, Captain of Invalids.
Charles Adamson.
William Douglas, son of Brigton, Lieut.-Colonel 91st Regiment.
George Bayley, promoted to 44th.
Thomas, Lord Cochrane, Captain Royal Navy.
Ensigns.
Duncan Macrae.
John Macleod, Colonel 1813.
J. Mackenzie Scott, Captain 57th, killed at Albuera, 1811.
Charles Mackenzie (Kilcoy).
John Reid.
David Forbes, Lieut.-Colonel, H.P.
Alexander Rose, Major of Veterans.
John Fraser.
Chaplain—The Rev. Alexander Downie, D.D.
Adjutant—James Fraser.
Quarter-Master—Archibald Macdougall.
Surgeon—Thomas Baillie. He died in India.

Notice posted throughout the Counties of Ross and Cromarty and the
Island of Lewis.
Engraved from a photograph of the original poster.
SEAFORTH’S

HIGHLANDERS
To be forthwith raised for the
Defence of His Glorious Majesty King
George the Third, and the Preservation
of our Happy Constitution in Church
and State.

All LADS of TRUE HIGHLAND BLOOD,


willing to shew their Loyalty and Spirit, may
repair to SEAFORTH, or the Major,
ALEXANDER MACKENZIE of Belmaduthy; Or,
the other Commanding Officers at Head
Quarters, at _____________ where they will
receive HIGH BOUNTIES, and SOLDIER-LIKE
ENTERTAINMENT.

The LADS of this Regiment will LIVE and DIE


together;—as they cannot be DRAUGHTED into
other Regiments, and must be reduced in a BODY
in their OWN COUNTRY.

Now for a Stroke at the Monsieurs


my Boys!
King George for ever!

HUZZA!
The martial spirit of the nation was now so thoroughly roused, and
recruits poured in so rapidly, that, on the 10th of July, 1793, only
four months after the granting of the Letter of Service, the regiment
was inspected at Fort George, and passed by Lieut.-General Sir
Hector Munro. Orders were then issued to augment the corps to
1000 rank and file, and 5 companies, including the flank ones, under
the command of Major Alexander Mackenzie, were embarked for
Guernsey. In October of the same year the remaining 5 companies
were ordered to join their comrades.
“This was an excellent body of men, healthy, vigorous, and
efficient; attached and obedient to their officers, temperate and
regular; in short, possessing those principles of integrity and moral
conduct which constitute a valuable soldier. The duty of officers was
easy with such men, who only required to be told what duty was
expected of them. A young officer, endowed with sufficient judgment
to direct them in the field, possessing energy and spirit to ensure the
respect and confidence of soldiers, and prepared on every occasion
to show them the eye of the enemy, need not desire a command
that would sooner and more permanently establish his professional
character, if employed on an active campaign, than that of 1000
such men as composed this regiment.
“Colonel Mackenzie knew his men, and the value which they
attached to a good name, by tarnishing which they would bring
shame on their country and kindred. In case of any misconduct, he
had only to remonstrate, or threaten to transmit to their parents a
report of their misbehaviour. This was, indeed, to them a grievous
punishment, acting like the curse of Kehama, as a perpetual
banishment from a country to which they could not return with a
bad character.”[467]
After being stationed a short time in Guernsey and the Isle of
Wight, the 78th, in September 1794, embarked with the 80th to join
Lord Mulgrave’s force in Walcheren. While detained by contrary
winds in the Downs, fever broke out on board the transports, which
had recently brought back prisoners of war from the West Indies,
and had not been properly purified; thus several men fell victims to
the disease.
The British troops had landed in Holland, on the 5th of March,
1793, and since then the war had been progressing with varying
success. Without, therefore, giving details of their operations during
the first year and a half, we shall merely sketch the position they
occupied when the 78th landed at Flushing.
On the 1st of July, 1794, the allies having decided to abandon the
line of the Scheldt, the Duke of York retired behind the Dyle, and
was there joined by Lord Moira and 8000 men. On the 22nd the
Duke, having separated from the Austrians, established himself at
Rosendaal, and there remained inactive in his camp the whole of
August and the early part of September; but, on the 15th of
September, Boxtel having fallen into the hands of General Pichegru,
he was constrained to break camp and retire across the Meuse, and
finally across the Waal, establishing his head-quarters at Nimeguen.
At this juncture the 78th and 80th reached Flushing, and found
that Lord Mulgrave was ordered home. They therefore embarked
with the 79th, 84th, and 85th, to join the Duke’s army. Early in
October the 78th landed at Tuil, and proceeded to occupy the village
of Rossem in the Bommeler-Waart, or Island of Bommel, where they
first saw the enemy, scarcely one hundred yards distant, on the
opposite side of the river. Here, through the negligence of a Dutch
Emigrant Officer, a sad accident occurred. This person hearing voices
on the bank of the river, and dreading a surprise, ordered his
gunners to fire an iron 12-pounder, loaded with case shot, by which
discharge the officer of the day, Lieut. Archibald Christie, 78th, and a
sergeant, were seriously wounded while visiting a sentry. They both
recovered, but were unable to serve again; strange to say, the
sentry escaped untouched. While quartered here, by a tacit
understanding, the sentries exchanged no shots, but it was observed
that the French frequently fired howitzers with effect when the
troops were under arms, and that, before the fire commenced, the
sails of a certain windmill were invariably put in motion. The owner
was arrested, found guilty as a spy, and condemned to death, but
was reprieved through the lenity of Lieut.-Colonel Mackenzie, the
commandant, with the full understanding that, on a repetition of the
offence, the last penalty would be enforced.
About the end of October the 78th proceeded to Arnheim, the
Duke of York’s headquarters, and thence, by a night march, to
Nimeguen, against which place the French were erecting batteries.
On the 4th of November a sortie was made, when the 78th was for
the first time under fire, and did such execution with the bayonet, as
to call forth the highest encomiums from experienced and veteran
officers. The loss of the regiment in this engagement was Lieutenant
Martin Cameron (died of his wounds) and seven men, killed;
wounded, Major Malcolm, Captain Hugh Munro, Captain Colin
Mackenzie, Lieutenant Bayley, 4 sergeants, and 56 rank and file.
On the 6th the regiment marched from Nimeguen to Arnheim, and
finally to Dodewaart on the Waal, where they were brigaded with
the 12th, the 33rd, under Lieut.-Colonel Arthur Wellesley (afterwards
Duke of Wellington), and the 42nd under Major Dickson. The
General going home on leave, the command devolved on Colonel
Alexander Mackenzie of the 78th, who, however, still remained with
his regiment.
On the 2nd of December the Duke of York quitted Arnheim for
England, and handed over his command to Lieut.-General Harcourt.
On the 29th of December General Daendels, having crossed the
Waal on the ice and driven back the Dutch, Major-General Sir David
Dundas was ordered to dislodge him. He, therefore, marched
towards Thiel by Buren and Geldermalsen, and came up with the
enemy at Tuil, which village he carried at the point of the bayonet
with comparatively little loss, though Brevet Major Murray and three
men of the light company, 78th, were killed by the bursting of a shell
thrown from a distant battery. After the action the troops lay on their
arms in the snow until the evening of the 31st, and the French
recrossed the Waal.
On the 3rd of January 1795 the French repossessed themselves of
Tuil, and on the 5th they drove in the British outposts at Meteren,
capturing two three-pounders, which were, however, recovered later
in the day. They then attacked Geldermalsen. The 78th were in
advance, supported by the 42nd, when they were charged by a
Republican cavalry corps, dressed in the same uniform as the French
Emigrant Regiment of Choiseul. They advanced towards the
Highlanders with loud cries of “Choiseul! Choiseul!” and the 78th,
believing them to be that regiment, forbore to fire upon them until
they were quite close, when, discovering the mistake, they gave
them a warm reception, and those of the enemy who had
penetrated beyond their line were destroyed by the 42nd. The
infantry then came up, the officers shouting “Avançez,
Carmagnoles!” but the 78th, reserving their fire till the foe had
almost closed with them, poured in such a withering volley, that they
were completely demoralised and retreated in great confusion. It
was remarked that in this action the French were all half drunk, and
one officer, who was wounded and taken, was completely tipsy. The
loss of the 78th was four men killed, and Captain Duncan Munro and
seven men wounded. It was on this occasion that a company of the
78th, commanded by Lieutenant Forbes, showed an example of
steadiness that would have done honour to the oldest soldiers,
presenting and recovering arms without firing a shot upon the
cavalry as they were coming down. The whole behaved with great
coolness, and fired nearly 60 rounds per man.
On the night of the 5th the troops retired to Buren. On the 6th the
British and Hanoverians retired across the Leck, with the exception
of the 6th Brigade, Lord Cathcart’s, which remained at Kuilenburg.
On the 8th both parties assumed the offensive, but the British
advance was countermanded on account of the severity of the
weather. It happened, however, luckily for the picquet of the 4th
Brigade, which was at Burenmalsen, opposite to Geldermalsen, that
the order did not reach Lord Cathcart until he had arrived at Buren,
as being driven in, it must otherwise have been taken. Here a long
action took place, which ended in the repulse of the French. The 4th
and a Hessian Brigade went into Buren, and the British into the
castle.
The day the troops remained here, a man in the town was
discovered selling gin to the soldiers at such a low price as must
have caused him an obvious loss, and several of the men being
already drunk, the liquor was seized, and ordered by General
Dundas to be divided among the different corps, to be issued at the
discretion of commanding officers. Thus what the French intended to
be a means of destruction, turned out to be of the greatest comfort
and assistance to the men during their fearful marches through ice
and snow. During the afternoon a man was apprehended at the
outposts, who had been sent to ascertain whether the trick had
taken effect, and whether the troops were sufficiently drunk to be
attacked with success.
Abercromby and Hammerstein having been unable to reach Thiel,
were, with Wurmb’s Hessians, united to Dundas at Buren. On the
10th the French crossed the Waal, and General Regnier crossing the
Oeg, drove the British from Opheusden, back upon Wageningen and
Arnheim, with a loss of fifty killed and wounded. Abercromby,
therefore, withdrew, and the British retired across the Rhine at
Rhenen. This sealed the fate of Holland, and on the 20th General
Pichegru entered Amsterdam.
The inclemency of the season increased, and the rivers, estuaries,
and inundations froze as they had never been known to do before,
so that the whole country, land and water, was one unbroken sheet
of ice.
The Rhine was thus crossed on the ice on the night of the 9th of
February, and for two more nights the 78th lay upon their arms in
the snow, and then marched for Wyk. On the 14th Rhenen was
attacked by the French, who were repulsed by the Guards, with a
loss of 20 men; however, the same night it was determined to
abandon the Rhine, and thus Rhenen, the Grand Hospital of the
army, fell into the hands of the French, who, nevertheless, treated
the sick and wounded with consideration. After resting two hours in
the snow during the night, the 78th resumed their march, passed
through Amersfoort, and about 11 A.M. on the 15th lay down in some
tobacco barns, having marched nearly 40 miles. It had been decided
to occupy the line of the Yssel, and Deventer therefore became the
destination. On the 16th at daybreak the regiment commenced its
march across the horrible waste called the Veluwe. Food was not to
be obtained, the inhabitants were inhospitable; with the enemy in
their rear, the snow knee deep, and blown in swirls by the wind into
their faces, until they were partially or entirely blinded, their plight
was most pitiable.
They had now a new enemy to encounter. Not only was the
weather still most severe, and the Republicans supposed to be in
pursuit, but the British had, in consequence of French emissaries, a
concealed enemy in every Dutch town and village through which
they had to pass. Notwithstanding the severity of the climate,—the
cold being so intense that brandy froze in bottles—the 78th, 79th
(both young soldiers), and the recruits of the 42nd, wore their kilts,
and yet the loss was incomparably less than that sustained by the
other corps.
After halting at Loo to allow the officers and men to take off their
accoutrements, which they had worn day and night since the 26th
December, they on the 18th marched to Hattem on the Yssel. Finally,
on the 28th of March the 78th entered Bremen, and the army being
embarked, the fleet sailed on the 12th of April. On the 9th of May,
1795, the shores of Old England brought tears into the eyes of the
war-worn soldiers, and the first battalion of the Ross-shire Buffs
landed at Harwich, and proceeded to Chelmsford, where they took
over the barracks. After making up the returns, and striking off the
names of all men supposed to be dead or prisoners, the regiment,
which had embarked on the previous September 950 strong, and in
excellent health, was found to be reduced to 600 men, which
number included the disabled and sick who had not been yet
invalided. The 78th remained three weeks at Chelmsford, and
marched to Harwich, where it was brigaded with the 19th, under
command of General Sir Ralph Abercromby. It then proceeded to
Nutshalling (now Nursling) Common, where a force was assembling
under the Earl of Moira, with a view to making a descent on the
French coast.
On the 18th of August the 78th, in company with the 12th, 80th,
and 90th Regiments, and some artillery, embarked under the
command of Major-General W. Ellis Doyle, and sailed for Quiberon
Bay; the design was to assist the French Royalists. They bore down
on Noirmoutier, but finding the island strongly reinforced, and a
landing impracticable, they made for L’Île-Dieu, where they landed
without opposition. Here they remained for some time, enduring the
hardships entailed by continued wet weather and a want of proper
accommodation, coupled with an almost total failure of the
commissariat, but were unable to assist Charette or his royalist
companions in any way. Finally, the expedition embarked in the
middle of December, joined the grand fleet in Quiberon Bay, and
proceeded with it to Spithead.
On the 13th of October 1793, Seaforth made an offer to
Government to raise a second battalion for the 78th Highlanders;
and on the 30th Lord Amherst signed the king’s approval of his
raising 500 additional men on his then existing letter of service.
However, this was not what he wanted; and on the 28th of
December he submitted three proposals for a second battalion to
Government.
On the 7th of February 1794, the Government agreed to one
battalion being raised, with eight battalion and two flank companies,
each company to consist of “one hundred private men,”[468] with the
usual complement of officers and non-commissioned officers. But
Seaforth’s services were ill requited by Government; for while he
contemplated raising a second battalion to his regiment, Lord
Amherst had issued orders that it was to be considered as a
separate corps. The following is a copy of the letter addressed to Mr
Secretary Dundas by Lieut.-Colonel Commandant F. H.
Mackenzie[469]:—
“St Alban’s Street,
“8th Feb. 1794.
“Sir,—I had sincerely hoped I should not be obliged to trouble you
again; but on my going to-day to the War Office about my letter of
service (having yesterday, as I thought, finally agreed with Lord
Amherst), I was, to my amazement, told that Lord Amherst had
ordered that the 1000 men I am to raise were not to be a second
battalion of the 78th, but a separate corps. It will, I am sure, occur
to you that should I undertake such a thing, it would destroy my
influence among the people of my country entirely; and instead of
appearing as a loyal honest chieftain calling out his friends to
support their king and country, I should be gibbeted as a jobber of
the attachment my neighbours bear to me. Recollecting what passed
between you and me, I barely state this circumstance; and I am,
with great respect and attachment, Sir, your most obliged and
obedient servant,
“F. H. Mackenzie.”

This argument had its weight; Lord Amherst’s order was


rescinded, and on the 10th February 1794, a letter of service was
granted to Seaforth, empowering him, as Lieut.-Colonel
Commandant, to add a second battalion to the 78th Highlanders, of
which the strength was to be “one company of grenadiers, one of
light infantry, and eight battalion companies.”[470]
Stewart states that of this number 560 men were of the same
country and character as the first, and 190 from different parts of
Scotland; but he alludes to the first six companies, as the regiment
was almost entirely composed of Highlanders.
The following is a list of the officers appointed to the regiment:—
Lieutenant-Colonel Commandant.
F. H. Mackenzie of Seaforth.
Lieutenant-Colonel.
Alexander Mackenzie of Fairburn, from first battalion.
Majors.
J. R. Mackenzie of Suddie, from first battalion.
Michael Monypenny, promoted to 73d, dead.
Captains.
J. H. Brown, killed in a duel in India.
Simon Mackenzie.
William Campbell, Major, killed in Java, 1811.
John Mackenzie, Major-General, 1813.
Patrick M’Leod (Geanies), killed at El Hamet, 1807. [His portrait will be found
on page 650.]
Hercules Scott of Benholm, Lieut.-Colonel 103d Regiment, 1814, killed in
Canada.
John Scott.
John Macleod, Colonel, 1813, from first battalion.
Lieutenants.
James Hanson.
Alexander Macneil.
Æneas Sutherland.
Murdoch Mackenzie.
Archd. C. B. Crawford.
Norman Macleod, Lieut.-Colonel Royal Scots.
Thomas Leslie.
Alexander Sutherland, sen.
Alexander Sutherland, jun.
P. Macintosh.
John Douglas.
George Macgregor.
B. G. Mackay.
Donald Cameron.
James Hay.
Thomas Davidson.
William Gordon.
Robert Johnstone.
Hon. W. D. Halyburton, Colonel, half-pay.
John Macneil.
John Dunbar.
Ensigns.
George Macgregor, Lieut.-Colonel 59th Regiment.
Donald Cameron.
John Macneil.
William Polson.
Alexander Wishart.
Chaplain.—The Rev. Charles Proby.
Adjutant.—James Hanson.
Quarter-Master.—Alexander Wishart.
The records of this battalion having been lost many years since,
the only knowledge we can derive of its movements is to be
obtained from the Seaforth papers. The regiment was inspected and
passed at Fort-George by Sir Hector Munro in June 1794. In July his
Majesty authorised the regiment to adopt the name of “The Ross-
shire Buffs” as a distinctive title. In August six companies embarked
for England, and proceeded to Netley Camp, where they were
brigaded with the 90th, 97th, and 98th. The troops suffered much
from fever, ague, and rheumatism, the situation being very
unfavourable; but here again the 78th was found to be more healthy
than their neighbours. The young battalion was chafing at this
enforced idleness, and longed to go on active service. On the 5th of
November, the regiment marched from Netley, four companies
proceeding to Poole, one to Wimborne, and one to Wareham, Corff
Castle, &c.
In the end of February 1795, the second battalion of the 78th
Highlanders, Lieut.-Colonel Alexander Mackenzie of Fairburn in
command, embarked, under Major-General Craig, with a secret
expedition. Major J. R. Mackenzie of Suddie, writing to Seaforth
under date “Portsmouth, 4th March 1795,” narrates the following
unpleasant circumstance which happened on the day previous to
embarkation:—
“The orders for marching from Poole were so sudden that there
was no time then for settling the men’s arrears. They were perfectly
satisfied then, and expressed the utmost confidence in their officers,
which continued until they marched into this infernal place. Here the
publicans and some of the invalids persuaded the men that they
were to be embarked without their officers, and that they would be
sold, as well as lose their arrears. This operated so far on men who
had never behaved ill before in a single instance, that they desired
to have their accounts settled before they embarked. Several
publicans and other villains in this place were guilty of the most
atrocious conduct even on the parade, urging on the men to demand
their rights, as they called it. Fairburn having some intimation of
what was passing, and unwilling that it should come to any height,
addressed the men, told them it was impossible to settle their
accounts in the short time previous to embarkation, but that he had
ordered a sum to be paid to each man nearly equal to the amount of
their credit. This was all the publicans wanted, among whom the
greatest part of the money rested. Next morning the men embarked
in the best and quietest manner possible, and I believe they were
most thoroughly ashamed of their conduct. I passed a most
miserable time from receiving Fairburn’s letter in London till I came
down here, when it had all ended so well; for well as I knew the
inclinations of the men to have been, it was impossible to say how
far they might have been misled.
“There is little doubt of the expedition being intended for the East.
It is said the fleet is to run down the coast of Guinea, proceed to the
Cape, which they hope to take by negotiation; but if unsuccessful, to
go on to the other Dutch possessions.”
The fleet sailed on the morning of Sunday the 1st of March. 1
major, 1 ensign, 4 sergeants, 1 drummer, and 124 privates were left
behind; and the most of them, with others, were incorporated with
the first battalion, on its amalgamation with the second battalion.
Holland having entirely submitted to France, as detailed in the
record of the first battalion, and Britain being fully aware that
submission to France became equivalent to a compulsory declaration
of war against her, it behoved her to turn her attention to the Dutch
colonies, which, from their proximity to India, would prove of
immense importance to an enemy.
In June 1795 a British fleet under Sir G. Elphinstone arrived off the
Cape, having Major-General Craig and the 78th Highlanders (second
battalion) on board; and the commanders immediately entered into
negotiations with Governor Slugsken for the cession of the colony to
Great Britain in trust for the Stadtholder. A determination to resist
the force having been openly expressed, the commanders
determined to disembark their troops and occupy a position.
Accordingly, the 78th and the Marines were landed at Simon’s Bay
on the 14th, and proceeded to take possession of Simon’s Town
without opposition. The Dutch were strongly posted in their fortified
camp at Muysenberg, six miles on this side of Capetown; and
accordingly a force of 800 seamen having been sent to co-operate
with the troops on shore, the whole body moved to its attack; while
the ships of the fleet, covering them from the sea, opened such a
terrific fire upon the colonists that they fled precipitately.
Muysenberg was taken on the 7th of August, and on the 9th a
detachment arrived from St Helena with some field-pieces; but it
was not till the 3rd of September, when Sir A. Clarke, at the head of
three regiments, put into the bay, that an advance became
practicable. Accordingly, the Dutch position at Wineberg was forced
on the 14th, and on the 15th Capetown capitulated, the garrison
marching out with the honours of war. Thus, after a two months’
campaign, during which they suffered severely from the
unhealthiness of their situation, the scarcity of provisions, and the
frequent night attacks of the enemy, this young battalion, whose
conduct throughout had been exemplary in the highest degree, saw
the object of the expedition accomplished, and the colony taken
possession of in the name of his Britannic Majesty.
Under date “Cape of Good Hope, 19th September 1795,” Lieut.-
Colonel Alexander Mackenzie of Fairburn, commanding the second
battalion of the 78th Highlanders, sends a long account of the
transactions at the Cape to Lieut.-Colonel F. H. Mackenzie of
Seaforth. We are sorry that our space permits us to give only the
following extracts:—
“I think if you will not be inclined to allow that the hardships have
been so great, you will at all events grant that the comforts have
been few, when I assure you that I have not had my clothes off for
nearly nine weeks, nor my boots, except when I could get a dry pair
to put on.
“ ... If the regiment is put on the East India establishment, which
is supposed will be the case, it will be equally the same for you as if
they were in India. I must observe it is fortunate for us that we are
in a warm climate, as we are actually without a coat to put on; we
are so naked that we can do no duty in town....
“I cannot tell you how much I am puzzled about clothing. The
other corps have all two years’ clothing not made up, and I should
not be surprised if this alone was to turn the scale with regard to
their going to India. General Clarke advises mo to buy cloth, but I
fear putting you to expense; however, if the clothing does not come
out in the first ship I shall be obliged to do something, but what, I
am sure I don’t know. I hope your first battalion may come out, as
there cannot be a more desirable quarter for the colonel or the
regiment. We are getting into excellent barracks, and the regiment
will soon get well of the dysentery and other complaints. They are
now immensely rich, and I shall endeavour to lay out their money
properly for them. I shall bid you adieu by saying that I do not care
how soon a good peace may be brought about. I think we have at
last turned up a good trump card for you, and I daresay the Ministry
will play the negotiating game well.”
In Capetown the regiment remained quartered until the arrival of
the first battalion in June 1796.

II.

1 7 9 6 – 1 8 1 7.
1st and 2d Battalions amalgamated—The Regiment sails for the Cape—The
consolidation completed—Capture of a Dutch fleet—Ordered to India—
Lucknow—Cession of Allahabad—Various changes of Quarters—Colonels
Alexander Mackenzie and J. R. Mackenzie quit the Regiment—Ordered to
Bombay—Join General Wellesley’s Army—The Mahrattas—The Treaty of Bassein
—Lake and Wellesley take the field—War between the British and the
Mahrattas—Ahmednuggur taken—Battle of Assaye—Colours granted to the
74th and 78th—Wellesley’s pursuit of the Enemy—Battle of Argaum—
Gawilghur taken—The Regiment goes to Goojerat—From Bombay to Goa—
Excellent conduct—Ordered to Madras and thence to Java—Landing near
Batavia, which is invested—The Cantonment of Waltevreeden forced—The
Fortification of Cornelis captured, when General Jansens flies—Colonel
Gillespie defeats Jansens—The French army surrender and evacuate the Island
—Rebellion of the Sultan of Djokjokarta—His Capital is taken, and he is
deposed—Colonel Fraser and Captain Macpherson murdered by Banditti at
Probolingo—Major Forbes defeats the Insurgents—Thanks of Government to
the Regiment—Expeditions against the Islands of Bali and Celebes—The
Regiment sails for Calcutta—Six Companies wrecked on the Island of Preparis
—General Orders by the Indian Government—The Regiment lands at
Portsmouth and proceeds to Aberdeen—Unfounded charge against the
Highland Regiments.

On the 28th of November, 1795, the Duke of York had issued orders
for the consolidation of both battalions, and accordingly, on the
arrival of the 1st battalion from L’Île-Dieu, the work was commenced
by the attachment to it of that part of the 2nd battalion which had
been left behind. On the 26th of February, 1796, only seven weeks
after its return from abroad, the battalion proceeded from Poole to
Portsmouth, where it embarked for the Cape in two divisions under
the command of Lieut.-Colonel Alexander Mackenzie of Belmaduthy,
and sailed on the 6th of March. On the 30th of May the 78th arrived
in Simon’s Bay, and on the 1st of June landed and commenced its
march to Capetown. Here the work of consolidation was completed,
and the supernumerary officers and men ordered home. The
regiment now presented the appearance of a splendid body of men,
and mustered 970 Highlanders, 129 Lowlanders, and 14 English and
Irish, the last chiefly bandsmen. The Batavian Republic had formally
declared war against England in May; and, accordingly, on the 3rd of
August, apparently with the view of attempting the recapture of the
Cape, a Dutch fleet under Admiral Lucas anchored in Saldanha Bay.
General Craig, the commander of the troops, marched up a force,
which included the grenadier and light battalions of the 78th. As the
Dutch fleet, however, surrendered, the troops marched back to a
place called Groenekloof, about half-way to Capetown, where they
remained encamped for three or four weeks, when the 78th
marched to Capetown, and occupied the hill near the Castle until the
transports were ready to convey them to India.
On the 4th of November the regiment embarked, and sailed on
the 10th; it had a long passage, during which scurvy made its
appearance, but to no formidable extent. On the 10th of February
1797 the transports reached Calcutta, and the following day the
regiment marched into Fort William. Ten days later it embarked in
boats on the Hoogly, and proceeded to Burhampoor, the voyage
occupying fourteen days. About the 1st of August, on the
embarkation of the 33rd Regiment with the expedition intended
against Manilla, the 78th proceeded to Fort William. In the beginning
of October six companies were again embarked in boats, and
proceeded to Chunar. From Chunar, about the end of November, the
division, having drawn camp equipment from the magazine, was
ordered to drop down to Benares, there to land, and form part of a
large escort to the Governor-General (Sir John Shore), and the
Commander-in-Chief (Sir A. Clarke), about to proceed to Lucknow.
The division accordingly landed at Benares on the 6th of December
and marched to Sheopoor, six miles on the road, where it halted to
complete its field equipment. In the beginning of November, the
33rd having returned to Fort William, the second division of the 78th
embarked and proceeded to Chunar, where it was landed and
encamped until the following March.
On the 9th of December the first division was joined by a part of
the 3rd Native Infantry, some artillery with field-pieces, and two
russallahs or squadrons of Irregular Hindoostani Cavalry, formerly
the body-guard of General De Boigne, a Savoyard in Sindiah’s
service, and marched forward, forming the escort above mentioned.
The march was continued without halting for fifteen days, which
brought the force to the race-course of Lucknow, where it was
joined by the remainder of the 3rd Native Infantry. It is unnecessary
to enter here into the complications of native Indian politics. It is
enough to say that on the death, in 1797, of the troublesome Asoph-
ud-Dowla, the Nawaub Vizir of Oudh, he was succeeded by his
equally troublesome and weak-minded son, Mirza Ali.
The young prince had barely ascended the throne, however, ere
reports were brought to the Governor-General of his incapacity,
faithless character, and prodigality. It was on receiving these reports,
therefore, that Sir John Shore determined to proceed to Lucknow in
person, and, by actual observation, satisfy himself of the merits of
the case. The narrative is resumed from the regimental records of
the 78th.
“On the frontier of the Nawaub Vizir’s dominions, we had been
met by the new Nawaub Vizir, Ali, a young lad of known faithless
principles, with a large force; and his intentions being considered
very suspicious, each battalion furnished a captain’s outlying picquet,
for the security of the camp at night, which was continued until after
his deposition and the elevation of his successor, Saadut Ali, on the
22nd January 1798.”
By skilful management Vizir Ali was secured without violence, and
his uncle, Saadut Ali, placed in his stead.
On the 23rd of February, the 78th, the 1st Battalion Native
Infantry, and a company of Artillery, under the command of Colonel
Mackenzie of the 78th, marched for the Fort of Allahabad, which had
lately been ceded to the British by Saadut Ali.
After various movements, the 78th found itself in garrison at Fort
William in December 1800. In the October of that year Lieut.-Colonel
Alexander Mackenzie had left for England, handing over his
command to Lieut.-Colonel J. Randoll Mackenzie of Suddie.[471] And
in the latter part of November Lieut.-Colonel Mackenzie also went to
England, and was succeeded in the command of the regiment by
Lieut.-Colonel Adams. The regiment remained in quarters at Fort
William during the whole of 1801 and 1802.
In the middle of January, 1803, the 78th received orders to
prepare for embarkation for Bombay, where head-quarters arrived
on the 26th of March, and immediately received orders to prepare
for field service. The regiment re-embarked on the 4th of April, and
proceeded to Bassein, where it landed on the 7th, and marched at
once to join the camp of Colonel Murray’s detachment at Sachpara,
7 miles from the town; being formed as an escort to His Highness
the Peshwah, who had been driven from his dominions by Holkar
during the previous October.
The detachment set out on the 18th of April, and marched by
Panwell and the Bhore Ghât. In the beginning of June the 78th
joined at Poonah the army under General Wellesley, destined to act
against Sindiah and the Mahrattas. The regiment was posted to the
brigade commanded by Lieut.-Colonel Harness, 80th Regiment,
which was called the 4th brigade, with reference to the Grand
Madras Army, from which General Wellesley was detached, but
which formed the right of the General’s force. Its post in line was the
right of the centre, which was occupied by the park, and on the left
of the park was the 74th Highlanders, in the brigade commanded by
Colonel Wallace, 74th, and called the 5th Brigade. Besides these two
brigades of infantry there was one of cavalry, commanded by Lieut.-
Colonel Maxwell, 19th Light Dragoons; each brigade consisted of 1
European and 3 native regiments. The train consisted of four iron
and four brass 12-pounders, besides two 5½-inch howitzers, and
some spare field-pieces.
A very few days after the army moved forward the rainy season
commenced, but was by no means a severe one; the great want of
forage, however, at the commencement of this campaign, destroyed
much cattle, and the 78th Highlanders, who were by no means so
well equipped as the other corps, were a good deal distressed at
first. The movements of the army were slow, making long halts, and
not keeping in a straight direction till the beginning of August, when
it encamped about 8 miles south of Ahmednuggur, in which position
it was when negotiations were broken off and war declared with
Dowlut Rao Sindiah and the Rajah of Berar, Ragojee Bhoonslah.
On the 8th of August the advanced guard was reinforced by the
flank companies of the 74th and 78th Highlanders, and the city of
Ahmednuggur was attacked and carried by storm in three columns,
of which the advanced guard formed one, the other two being led by
battalion companies of the same regiments. “The fort of
Ahmednuggur is one of the strongest in India, built of stone and a
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