Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java PHP Web-Development , +
Here's the image link
 
Will this be possible ?? If so let me know how to do it guys.
I ve successfully sent a request from webservice to java API but i couldnt send the response directly to the browser and i dont want to send it back to the apache server from where the request came.
I dont know how to send the response to the browser directly help me guys..
 

Thanks,
 
HOSTGUY
Posted 13-Mar-13 20:42pm
Edited 13-Mar-13 21:24pm
v5
Comments
Shubhashish_Mandal at 14-Mar-13 2:01am
   
is this a kind of question to ask? Please give more information so that one can understand your problem.
HOSTGUY at 14-Mar-13 2:26am
   
i want the response to be send to the browser instead to the apache server bcoz that java api should be opened in the browser directly so tat the scripts and images can be loaded from the java server directly.
 
If the response is send to the browser via apache server means, browser searches for the scripts and images in apache server. can u get it now ??

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

No, you cannot do it. This is a pure client-server architecture.
 
You need to modify the diagram: requests go as you depicted it. Then the response goes from the Tomcat server back to Apache server, and then the Apache server sends HTTP response to the browser.
 
For some background, please see:
http://en.wikipedia.org/wiki/Pull_technology[^],
http://en.wikipedia.org/wiki/Push_technology[^].
 
—SA
  Permalink  
Comments
HOSTGUY at 14-Mar-13 2:36am
   
@ SA

yes u r right but according to my application i've to send the data through the webservice from php to java.
If the response is send to the browser via apache server means, browser searches for the scripts and images in apache server. But those scripts and images are inside Tomcat server.
Sergey Alexandrovich Kryukov at 14-Mar-13 3:10am
   
And everything works out in sequence, isn't it?
HOSTGUY at 14-Mar-13 3:43am
   
@SA yes it works out in an order. Is there any way i can achieve opening my Java api in my browser.
Sergey Alexandrovich Kryukov at 14-Mar-13 11:41am
   
I don't quite understand what do you mean by "opening API"...
—SA
HOSTGUY at 15-Mar-13 0:31am
   
@SA once i send the username and password from webservice to java api, that java Api should open in the browser.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 14 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100