Don't just hit it. Part of the switch doesn't go through the body.
Remove tailcap, batteries, head and bulb. Point it head down and the switch will rattle, you need to pull this bit off, get a finger nail or a thin blade under and pry off. The rest will push through the battery tube and out.
There should be metal tabs where the bulb pins go, if broken or missing they won't make contact. The switch is pretty simple and self explanatory once you get it apart.
The spring in the cap and batteries push the switch up for on (head loose). With the head tight it closes the switch unit and breaks the connection.