• Post Reply Bookmark Topic Watch Topic
  • New Topic

redirection and fetch response

 
Bhavin Sanghani
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to redirect control to particular URL based on some action. Once it is redirected then want to do some processing and send the response.

Can anyone suggest how can I achieve this?

Also, I am thinking it to redirect from HttpServer and fetch response using Apache modules. Is this possible? If yes then how? I saw Apache module configuration but could not figure out how response will be parsed and send it in browser.

Thanks,
Bhavin
[ October 22, 2008: Message edited by: Bear Bibeault ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35744
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bhavin,
Are you trying to do the redirect after the processing? If so, you can just store the URL in a variable and call the redirect at the end.

If you want to do the redirect right away, the called URL would have to trigger the processing.
 
Bhavin Sanghani
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,

I am trying to pass some information from (client.com) to (server.com) via URL. Once information is received to server.com then it will do some processing and it may return some data (e.g. transactionid) to the original request. I am trying to figure out from following options:

1) Should I use Apache module to send request and receive data?
2) Should I open connection from my code and stream the data and accept the response?
3) Should I send request with session and redirect it. Then server.com will do processing and send request to the incoming request??
4) Should I implement thread and use wait() till the time response is received?
5) Should I use web services call?

Can you suggest me the best option ?

Thanks,
Bhavin
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a web service is what might work best for you.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35744
412
Eclipse IDE Java VI Editor
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should also add that creating web services isn't as daunting as it used to be. The current trend is for RESTful web services which are easier to set up than traditional SOAP services. Especially now that JSR133 is finalized and the Jersey project reference implementation is available.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!