I like them both, but for different things. I tend to use PHP to build a prototype or for just throwing something together and Java for more substantial projects. One of the things that bugs me about PHP is it's poor OO support - this may not be a problem for you, but I like my interfaces and abstract classes. The lack of a standardised DB API is also a nusiance although things like PEAR make this less of a problem than it used to be.
When I build a Java web app, I typically use a mixture of Servlets and JSP custom tags - I very rarely embed JSP code directly into the page. I'll usually build a servlet which generates XML before running it through an XSLT transform to generate appropriate output.
When I build a Java web app, I typically use a mixture of Servlets and JSP custom tags - I very rarely embed JSP code directly into the page. I'll usually build a servlet which generates XML before running it through an XSLT transform to generate appropriate output.