From: <php...@li...> - 2010-08-12 07:45:34
|
> Your example exactly match my understanding. If there are multiple from.jsp, > e.g. from.jsp -> from2.jsp -> to.php, the javax.servlet.forward will include > the first "from.jsp". Yes. > When the page is forwarded to /index.php, the > getRequestURI() correctly shows it is "/index.php". The forwarding servlet should return "/" and the target servlet should return "/index.php" for getRequestURI(), yes. > Jetty behaves correctly. I don't follow. Doesn't jetty return null for getRequestURI()? > <!-- from.jsp --> > <jsp:forward page="to.php"/> ... > Now, come back to the question of whether Java Bridge should take the source > or the target? it seems to me Java Bridge should always take the source as > it is server side forwarding but not http redirect. How do you expect PHP to evaluate "from.jsp"? It should eval "to.php". > There is no problem in Tomcat because when we make a request to "/", it > transparently take the index file "/index.php" but getRequestURI() remains > at "/". In tomcat targetServlet.getRequestURI() returns "/index.php", as it should be. > For this scenario, JavaBridge should not use the to.php as REQUEST_URI, but > should use the from. If you know how to distinguish "this scenario", we can add a workaround for this jetty bug. Your current patch breaks code like <jsp:forward page="some.php">, so I will not apply it. Regards, Jost Bökemeier |