Most critics agree that the setting of Stephen Crane's The Red Badge of Courage is in Virginia, and the battle that is mentioned with the question: The Battle of Chancellorsville, a major battle of the Civil War which took place from April 30 to May 6 in 1863. This battle pitted the Union Army against a Confederate army half its size, a battle that came to be known as Lee's "perfect battle" because of its risky but successful division of his army in the presence of such a puissant force.
The Chancellorsville campaign began with the crossing of the Rappahannock River by the Union Army on the morning of April 27, 1863. Heavy fighting began on May 1 and did not end until the Union forces retreated across the river on the nights of May 5-6.
Crane's descriptions of the bush and thicket is suggestive of the wilderness a few miles west of Fredericksburg, Virginia and the battle on May 1, 1963, in which Hooker ordered an advance to strike Anderson. a battle seen by many Union commanders as a key to victory. Perhaps, this is the victorious battle in which Henry Fleming and his friend Wilson lead the 304th regiment so valorously.