This kind of story happened in at least three of The Three Stooges short, and all of them are pretty funny. This wasn't as good as the others until the last five minutes when it takes a strange turn with a big cannon, and then finishes strong.
The basic storyline - see if this sounds familiar - is the boys are in the army, are lazy slobs and then get picked on my a gruff sergeant. They are discharged (or the war is over), the boys immediately get revenge on the sergeant when they find out he has no power over them anymore. Later, through a mistake, they re-up into the army and now face that same sergeant, who is out to kill them, at this point.
Here, it's 1918 and World War I is raging. We see real footage of soldiers on the battlefield, running and shooting. Then we see the Three Stooges snoring away in a foxhole. The sergeant gives them the business. The same day, it's announced the war is over and on their way out the door, the Stooges really do a number on the Sarge, beating the crap out of him.
There are parts of this comedy, I might say, that almost shocked me in that some of it wasn't slapstick, but almost downright meanness and torture. The violence goes past the normal laughs. For example, in one scene the Sargent has the boys put their heads underwater and then fires a pistol in the water, deafening the boys. That is nasty. It reminded of a brutal scene in the film noir, "The Big Combo."
Anyway, fast-forward to 1935. It's the Depression and the boys are desperate for work. (They haven't aged a bit, by the way.) Because they are kind of ignorant and never read signs, they wind up re-enlisting....and, of course, the same sergeant is there! What happens afterward is a bit of a surprise. The gag turns out to be something else besides the animosity between the Stooges and the Sarge, but the boys' misuse of a huge cannon during a supposed practice session. The Stooges wind up blowing up houses, chimneys and finally, a ship in our own Navy! Those scenes with the cannon are very funny and ends this comedic short on a high note.