One of the main reason for Java not catching up with PHP in web programming, is the hassles that are involved in hosting a Java web application. As your Java web application is going be on a shared server, which will also shared by some other applications as well, maintaining your application on this environment becomes hard. You can not release a new version of your app, with out affecting other applications. If a change in your web app needed a re-start of server which may not be possible at all in a shared environment. But for PHP, none of these matters. That’s the reason you can see a n-number of PHP hosting providers, but very few for Java.
Security – there are two big reasons to consider a secure website —server shutdown and virus prevention. You’ll usually pay a bit more for them, but you won’t want the server crashing during the holiday shopping season. You’ll also want to avoid nasty viruses that steal your personal information and shut down your computer.