Specific PHP/JSP questions

From: Date: Thu, 15 Feb 2001 09:04:30 +0000
Subject: Specific PHP/JSP questions
Groups: php.general 
Request: Send a blank email to php-general+get-39857@lists.php.net to get a copy of this message
Hi all. I understand that a lot of JSP Vs. PHP questions have been asked on this list, but they've been philosophical and general in nature. I have some specific questions and was hoping that someone might be able to entertain them: 1) JSPs can persist variables at the page, request, session and application scopes. I believe PHP variables are implicitly page-scoped, and session management can be used for session-scoping. Are there equivalents to request and application scoping? 2) In JSPs, it is possible to do server-side page redirection, i.e. "forward" a request from page A to page B, as if the user actually requested page B. There is no browser involvement in the redirection; it is complete on the server. In this scenario, there are two "page scopes", and one "request scope". How is this server-side redirection done in PHP? 3) In doing the server-side page redirection, variables can be added to a "request" object, which embodies parameters related to a request. Page A can add variables to the request object (perhaps values from an SQL select), which page B can then retrieve and display. How is this done in PHP? 4) JSPs, being a part of J2EE, can use a security system that does authentication and authorization. What is the commonly accepted way to do security with PHP? 5) On a JSP site, I typically arrange things such that a particular JSP (or servlet) accepts requests, processes them and then forwards them to one of a number of different pages, depending on the outcome of the processing. This is in contrast to the alternative approach where one simply goes to a page, which does some processing and then displays the contents of the requested page. What is the typical way to achieving this "funnel all requests to a single point and have it forward the correct response to the user" paradigm? 6) JSPs can be packaged up as an application (a WAR file), and that WAR file has descriptors that allow mapping of URLs to JSPs and servlets. This allows me to just drop in a WAR file to a JSP container, like Tomcat, and have it run. Are there equivalents to the "pack it up as an application" and URL mapping concepts in PHP? 7) JSPs can be mapping to multiple URLS, e.g. /alpha/mypage and /beta/mypage can both go to the same JSP. Is there an equivalent to this in PHP? I have several more, but this is a sample. Answers to these questions are quite important to me because at the moment I'm trying to decide whether I should choose JSPs (J2EE actually), PHP or Zope for some projects. Thanks. Gerald.

« previous php.general (#39857) next »