Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirect Proxy Filter

 
Robert Garrido
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a big trouble, we wrote three different wap apps. for different purposes, these wap apps. make redirections between each other depending on the client status.

As an example, consider a client makes this request:

begin
get /app_a
returns redirect /app_a/
get /app_a/
returns redirect /app_b/?from=app_a
get /app_b/?from=app_a
returns redirect /app_b/?from=app_a/
get /app_b/?from=app_a/
returns redirect /app_c/?from=app_b
returns get /app_c/?from=app_b/
returns final real page
end

The problem is that is it's not only very inefficient but we have problems with some handsets that don't like these redirections, they just blow up. Using forwards does not work since it does not work for servlets or jsps in different contexts.

The solution is to create a filter proxy that makes all the job, it would get the initial request from the client, then process all redirections and deliver the final page.

I would appreciate any guidance about how to do that, from how to intercept any request to any of the three wap apps, to how to handle the interim redirections and how to return the final result. If by coincidence you know any web page with code that works somehow similar to my needs please let me know.

Thanks indeed!

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic