I would suggest experimenting with Groovy/Grails on some weekend projects. Grails is similar to Rails so you could easily leverage this knowledge if you ever wanted to move to RoR.
Beyond that I would agree with earlier commentators that the real action over the next few years will be in JavaScript. Both server and clientside. The former being particularly interesting.