Before somebody jump on me, I went to a big Heinlein fan site. Seems the book was written in 1958, so the war critics put into the work was aimed not against Vietnam (it would have been difficult!, but against war in general).
Also about the movie, here is a commentary from the fan site:
"Starship Troopers" (1997)
Filmed by Tri-Star Pictures with a budget said to be in the neighborhood of $90 million, and directed by Paul Verhoeven. It manages to faintly resemble the action elements of the novel while missing almost the entire point. What elements of the political and social issues make it into the film are so distorted (a clearly fascist government, Sergeant Zim as a sadistic bully) as to make fans of the novel cry in their popcorn. A wretched mess, best summarized as "Bughunt 90210."
the fan site I refer is
http://www.nitrosyncretic.com/rah/
Seems that Heinlein wrote a ton of scifi books which I didnt knew about. Enjoy!