My experience with PHP is limited, but the big wins for JSP/Servlets (for me) are:
(1) Objects. I much prefer OO coding, especially when I have to keep session information. It's much easier to keep track of a single object that encapsulates data ( e.g., the user's access privileges ). Beans help you keep your sanity in a larger application.
(2) Tag libraries. You can write custom tags that are somewhat like servlets. This lets you keep Java code out of your .jsp files. They are part of the standard, not an add-on.
(1) Objects. I much prefer OO coding, especially when I have to keep session information. It's much easier to keep track of a single object that encapsulates data ( e.g., the user's access privileges ). Beans help you keep your sanity in a larger application.
(2) Tag libraries. You can write custom tags that are somewhat like servlets. This lets you keep Java code out of your .jsp files. They are part of the standard, not an add-on.