The most important thing to consider here is that the government should not punish this person based on the content of their message. That is, if the web page defacer is going to be punished, it should be based on the time, place, and manner of his speech, not on its content. The person should get the same punishment if they put a pro-war message as if they put an anti-war message.
That said, I would certainly want to impose some sort of punishment. It is not right to deface government property, regardless of the message. A person should be able to come up with better ways to protest government policies that they do not like. However, prison would surely be excessive. Unless the web vandalism endangered lives, it is overreacting to put someone in prison for vandalism. I would want to give the person a fairly large number of hours of community service. That way, they could actually do some good for society in a tangible way. This would be appropriate punishment for someone who committed a fairly minor offense for relatively benign reasons.