The walls of the cylinder will have a longitudinal stress as well as a circumferential stress.
Consider now again the same figure and the vessel could be considered to have closed ends and contains a fluid under a gage pressure p.Then the walls of the cylinder will have a longitudinal stress as well as a ciccumferential stress.
Total force on the end of the cylinder owing to internal pressure
= pressure x area
= p x π d2 /4
Area of metal resisting this force = πd.t. (approximately)
because πd is the circumference and this is multiplied by the wall thickness