Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
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
Updated 13-Mar-13 20:24pm
v5
Comments
Shubhashish_Mandal 14-Mar-13 2:01am    
is this a kind of question to ask? Please give more information so that one can understand your problem.
Member 9826052 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

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
 
Share this answer
 
Comments
Member 9826052 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 14-Mar-13 3:10am    
And everything works out in sequence, isn't it?
Member 9826052 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 14-Mar-13 11:41am    
I don't quite understand what do you mean by "opening API"...
—SA
Member 9826052 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900