Java's type safety is far far weaker than Rust's and it doesn't have the borrowing system, so you don't get the "if it compiles it works" experience you do in Rust and (so I'm told) Haskell.
It does have a very mature server side web ecosystem so it's a perfectly reasonable option. I've written Java web servers before and it was fine.
I wouldn't use it for client side though (a la GWT). Debugging nightmare.