The cannons boomed Friday afternoon, and the 990 midshipmen of the U.S. Naval Academy's Class of 2004 tossed their white caps in the air.

They pinned on their new ranks -- ensign's shoulder boards for those heading to the Navy and gold second lieutenant's bars for the Marines. Then they marched off to war.

It was like this two years ago for the 965 members of the Class of 2002, the first to experience the mix of celebration and solemnity that has marked academy graduations since Sept. 11, 2001. When the midshipmen graduated in 2002, Vice President Dick Cheney promised them a role in the then-fresh war on terrorism.

"This afternoon, you will step into history," Cheney said two years ago. "Much has happened since that day, but there is still a great deal to do, and you will help us on the path to victory."

The Class of 2002's wartime role has grown since the day they threw their white caps aloft. The former mids, nearly all promoted to Navy lieutenant junior grade or Marine first lieutenant last week, are flowing steadily onto the front line, where they will be called upon to wage war at the most personal level.

They will fly planes, steer ships and command platoons of young soldiers and sailors in battle, enduring the stresses of military service brought home to them from their very first day at the Naval Academy in 1998, when the nation was at peace and hardly anyone had heard of Osama bin Laden or al Qaeda.

For most of the 2002 graduates, it will be about time.

"On September 11, every senior here would have graduated that day and gone out into the fleet," then-midshipman Mark Conley said just before his graduation two years ago. A 5-foot-6-inch wrestler brimming with energy and determination, he is instead now part of the elite Navy SEALs, the special operations force that carries out some of the country's most dangerous missions, often cloaked in secrecy.

Conley's name has not appeared often in the Naval Academy's alumni magazine, "Shipmate," where graduates write in with reports on how they have been doing. The letters are more likely to celebrate weddings, births and reunion parties than action in combat, but the undercurrent of duty is always there.

Here's how one of the 2002 graduates checked in. "After six months of Nuclear Power School in Charleston, S.C., and then another six months of prototype in South Carolina or New York, we are all ready to finish Sub School in Groton [Conn.] and finally join the rest of our classmates in the fleet," wrote Lt. j.g. Sean Stein, one of the 127 graduates from his class who went into the submarine force. (The largest number of midshipmen, 281, went on to serve in the surface fleet, and almost all are now serving aboard warships.)

Like the 257 midshipmen from 2002 who went into the demanding naval aviation program -- 54 more tried out to become Marine aviators -- the submariners have had to wait a long time before going to sea. But the future jet pilots have had to wait even longer before getting assigned to squadrons where they will learn to fly planes such as the F/A-18 Hornet, the Navy's frontline jet fighter; the P-3 Orion, a patrol plane that can hunt for submarines; or the AV-8 Harrier, a jump jet used by the Marines.

Right now, Lt. j.g. Jason Duffie of the 2002 class is learning to fly the less glamorous T-45 Goshawk at Naval Air Station Kingsville in Texas. He had thought of being a submariner, following his father, who had also graduated from the academy. But a ride aboard a P-3 convinced him otherwise. At first he didn't make the cut, instead being chosen as an alternate. He remembered crying when, two weeks before graduation, he was told that he could be a Navy pilot.

Duffie (pronounced do-fee-yay) turned out to be a good one. In a recent interview from Kingsville, he said he was likely to be chosen to fly the F/A-18, the ultimate jet for most aspiring aviators.

"I wouldn't think that this is the real Navy yet; it still feels like we're training," said Duffie. "We don't think about what's going on in the fleet yet, what's it like going on a mission. We don't really learn any of that. We're just learning the monkey skills of learning to fly a jet."

Duffie's schedule gives him little time to think about the future, anyway. He'll fly twice a day, spending 10 or 12 hours a day at the base or in the air. Then he can return home to his wife and two boys.

"I get so focused on my training that I don't watch the news," he said. "By the time you actually fly a combat mission, you're almost four years out. By then, who knows what we'll be doing? Who knows what the battle will be?"

The midshipmen who went into the surface fleet were the first to see the real Navy. Many of them saw service in the invasion of Iraq.

"Those of us who were part of [Task Force] West -- 'The Magnificent Seven' -- transported many of the Marines that led the charge on Baghdad," then-Ens. Josh Welle, a surface warfare officer aboard the transport ship USS Pearl Harbor, wrote to "Shipmate." "Our deployment was full of ups and downs -- we got qualified [officer of the deck], ate some pig ears, unknowingly danced with countless enlisted sailors, and ran one small boat aground."

Right now the center of fighting is in Iraq, where 1st Lt. Ben Wagner, a 2002 graduate who once commanded the Brigade of Midshipmen, now leads a platoon of Marine infantrymen in Echo Company of the 2nd Battalion, 1st Regiment of the 1st Marine Division. He is one of 105 midshipmen who joined the Marine ground force after graduation.

Duffie had heard that Wagner had been wounded in action, but that he was fine. Marine public affairs officials in the Pentagon and at his unit's home base, Camp Pendleton in California, were unable to confirm his status, or even that he had been wounded. His father, a pastor from Chula Vista, Calif., did not return telephone calls.

But Wagner made the news recently when his unit captured a mosque in Fallujah that had been held by Iraqi insurgents. And he had the sad task of writing to the family of Marine Lance Cpl. Robert Zurheide, who had died under his command.

Zurheide was killed a month before his wife was to deliver their son. "We want his child to know his dad was a good Marine," Wagner said in a story in the Los Angeles Times. "He never balked, he always volunteered, he went out of his way to help others."

There, in the sizzling desert, far from the shining glories and starched uniforms of Annapolis, was the grave duty these midshipmen had been promised.

Cheney promised the Class of 2002 a role in the then-fresh war on terror.Mark Conley, pictured before his 2002 graduation, is now a Navy SEAL.