In the java world, specialization can be very tricky. In the .NET world there is generally one way of doing things and it benefits to specialize in that, but in the Java world there are many options to choose from and the development process continuously evolves.
So I would say, do not specialize at all but get a firm basis in java development. If you know how java web environments/J2EE works, the step to for example Spring is not such a big one.