First, you need to decide on which server/back-end technology you will use. It's either Java or PHP.
If you decide to use Java then you do not need PHP and vice versa.
Deciding which tools to use is important and that will depend on what you are trying to develop.
If you use Java as your server side you will get the data using JDBC connection and creating the result set in Java. Then using the request you populate a JSP page using tags like JSTL.
So for Java, choose a framework: Options are JSF, Struts, Spring and a couple more. Or just use JSP technology.
For PHP, like I mentioned above, you won't need Java. If you're using Java because of some libraries then just stick to Java.. You won't need PHP.
Edit:
JSF is a componenet based framework that has the option to use Facelets for the view, which allows the use of HTML instead of having to write JSPs.
JSPs are basically HTML with Java code.
So you will have to decide JSP or Facelets and not both. JSP is a bit older.
JSF 2.0 with Facelets is a very good option to start learning Java Web development.
So for the differences, there are many posts here that compare all of the frameworks in more than one question and here are some:
What is the difference between JSF, Servlet and JSP?
JSF vs Facelets vs JSP
Spring MVC vs JSF
And there are more.. Start with JSF 2.0 and Facelets and here is a netbeans tutorial http://netbeans.org/kb/docs/web/jsf20-intro.html