PHP and JSP comparison of these two Web development techniques, in the current situation is in fact PHP and Java is more of Web development. The following is my comment on a few aspects of the comparison:

First, compare the language to explain the implementation of PHP is a server scripting language, first of all, there are simple and easy to use php characteristics. Comparison of grammar and language as c, so to learn c language programmers can quickly develop familiarity with the php. Need to learn java and java syntax and familiar with some of the core class library, object-oriented programming to understand design. Therefore, learn php as java.
First of all, to compile into Java bytecode. Class files, java virtual machine and then explain the implementation. First of all, Java-Web development is most likely to think of JSP (The time has come to JSP2.0), the original development of java are using the Web to achieve the servlet, the servlet programmer needs to develop in the java source files embedded in a large number of html code. Therefore, later on a JSP, JSP can be easily embedded into html documents, in fact, jsp file on the server when the first implementation will be converted to application server servlet, then the compiler implementation. Servlet and Jsp through JavaBean strong support function. JavaBean is a reusable, cross-platform software components. Javabean can easily use the java code and html to achieve the separation, can enhance the function of the system and software reusability.
Java-Web development company belonging to the definition of SUN One J2EE specification. And J2EE, including the java of all aspects of Web development, such as: JSP, Servlet, JDBC, JNDI, JAVABEAN, EJB, etc.. J2EE is particularly suited to do so on large-scale enterprise-class applications.

Second, compare Java database access through JDBC to access databases, different database through a database-driven manufacturers to provide easy access to the database. Access the database more consistent interface.
PHP for the different databases use different database access interface, so a common database access code is not strong. For example: using Java to develop Web applications from the MySQL database to Oracle database only need to be very few changes. And PHP would do a lot of modification.

Third, the system architecture of the Web compared the use of Java technology, the need to use object-oriented system design methodology, and PHP or process-oriented development methods. Therefore, the use of Java needs to be done to develop a large number of pre-system analysis and design work.

Fourth, cross-platform nature of Java and PHP has a very good cross-platform features. Almost can not make any changes in the case of Linux or Windows running on different operating systems.

Fifth, the development of a cost comparison between the combination of PHP is the most classic: PHP + MySQL + Apache. Very suitable for the development of small and medium-sized Web applications, faster development. And all open source software is free, and can reduce the input.
Java, a free Web application server Tomcat, JBoss and so on, if you need a better commercial services: Web Sphere and Web logic.

6, distributed multi-layer structure of relatively simple PHP only two or three-tier distributed architecture, and in this regard JAVA is more powerful and can achieve multi-tier network architecture. Database layer (persistence layer), application (business) logic layer, logic layer that is separate, but now have a different level of development of some mature support framework. Struts is a java example, the use of the Web development technology to achieve the MVC design pattern, and also in the Business Logic Tier Spring framework, database persistence layer frameworks such as Hibernate. Can facilitate the development of these frameworks are efficient, rational, scientific framework for a multi-layered business applications.
Following a brief talk about Struts, it is in the JSP Model2 essentially based on a MVC (Model, View, Controler) Framework. JSPModel2 architecture is a joint use of JSP and Servlet to provide a method of dynamic content. In the Struts framework, model, business logic components JavaBean or EJB, Servlet achieved by the controller, view by a group of JSP files. Struts can be used a clear definition of roles and development of web page designers and the division of labor. And more complex projects, the more obvious advantages.

VII PHP source code to develop safety procedures for the source code is open to the public, other people get php development process can be modified.
Java development process, end-users is just to get some type of compiled class, unable to see the complete source code safe.

8, Performance Comparison
Test was done, the two were doing all kinds of language performance test loop and test access to Oracle databases.
Performance test in the cycle, JSP only a staggering four seconds on the end of 20000 the 20000 * loop. The PHP test is 2000 * 2000 cycles (an order of magnitude less), but spent 63 seconds, respectively.
Database testing, both of Oracle 8, respectively, for 1000 Insert, Update, Select and Delete: JSP need 13 seconds, PHP needs 69 seconds.

PHP JAVA project
Low reusability high speed easy to maintain the development of poor excellent excellent portability-Linux Windows, Unix
The development of low-high-security high-rise low-cost structure of poor excellent database access interface is not a unified interface scalability poor poor excellent excellent object-oriented light of the above, I personally think, PHP is suitable for rapid development, small and medium-sized applications, the development of low cost, able to make changes in the demand for rapid response. And suitable for the development of large-scale Java applications, the prospects for broader application, the system easy to maintain, better reusability. In addition, the same system function of the system using Java development PHP development system than the price higher.