January 9th, 2002, 09:27 AM
servlet output- urgent!!
I am sending a username and password to a servlet for authentification. The servlet authentifies and outputs the response as:
<?xml version="1.0" ?>
I need to obtain this response in my PHP code in a variable so that I can parse it later.. Can anyone pl tell me as to how I can send this info from my servlet to my PHP??
January 14th, 2002, 03:48 PM
I've probably read this wrong, but it sound like one of the following
1) http response such as
PrintWriter out = res.getWriter();
2) you want the servlet to send and HTTP request to the PHP (which sound like a weird way of doing something, as it completely negate the transactional approach of servlets), but I don't know your reasoning, so you probably want to do it as below...
HttpURLConnection con = (HttpURLConnection)new URL("http://www.phpserveraddress/phpscript.php?authourise=true");
Is that any help?
January 15th, 2002, 04:29 AM
I do get the data now but hv a diff problem of that of parsing the data..
Hv posted the query on the PHP forum..