I learned and developed a lot with Java after PHP and a little Perl, and am quite happy I did that. I realized that in Java circles, there's much more thought and emphasis on building proper software architectures.
Here, I learned a lot on software quality, (agile) development processes, architecture.
It's not like dynamic language communities aren't capable of delivering robust applications or lack the knowledge in general - I come from this world myself, and I alos saw a lot of bullshit code in Java. Still, I learned a lot there.
I also did some small projects with ruby/rails and groovy/grails in the meantime and played a bit with python/django - but goin' back to Java-based approaches at the moment - but you're mileage may vary.
In the end it's good to know multiple languages and frameworks, to be able to chose the best option wherever you are depending on requirements and staff, and I'd recommend not only learn dynamic, web-centered languages and frameworks but also more general ones. With things like Perl(although it's really losing ground due to the power and OO features of the thers), Python and Ruby you have generic languages that are easily available on most systems, can be used for shell scripting, Web, and standalone GUI developments alike - also very good direction!
I still have plain C, scheme/lisp and scala - and many interesting frameworks - on my "to-learn" list.