Info : Spider-Man 2 is a 2004 American superhero film directed by Sam Raimi and written by Alvin Sargent , from a story by Alfred Gough , Miles Millar and Michael Chabon . A sequel to the 2002 film Spider-Man , it is the second installment in the Spider-Man trilogy based on the fictional Marvel Comics character of the same name . Tobey Maguire , Kirsten Dunst , James Franco and J. K. Simmons reprise their respective roles as Peter Parker / Spider-Man , Mary Jane Watson , Harry Osborn and J. Jonah Jameson , while Alfred Molina joins the cast as Otto Octavius / Doctor Octopus . Set two years after the events of Spider-Man , the film finds Peter Parker struggling to manage both his personal life and his duties as Spider-Man, while Dr. Otto Octavius becomes a diabolical villain after a failed ...