Specialist Versus Generalist

These days job descriptions list many technologies for open positions. There are some common skill sets like OOP. However you got to know the right frameworks and have lots of experience with the right tools.

So what happened to the general purpose programmer? You should be able to get a CS degree and work at any job. But the employers won't look twice at you unless you specialize in what they need.

I am personally trying to expand the range of technologies I am familiar with. For example I want to learn Java. And I also am trying to beef up my web programming skills. The hope is that this will make me more marketable. However the experts say I should further specialize. What is a general programmer to do?