You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by badluck13 <bl...@gmail.com> on 2010/08/26 16:20:51 UTC

[t5] response encode and redirect problem!

Hello,

I'm trying to redirect to different web site and I have token =
"EC-4WT66732GJ787622M"

This is string token that I get from paypal... Now on theirs examples I
should encodeRedirectURL and than redirect to theirs page... like this:

response.sendRedirect(response.encodeRedirectURL(token));

Problem is that tapestry is doing this:

"GET /megapanel/user/payment.checkoutwithpaypal HTTP/1.1"
"GET /megapanel/user/EC-4WT66732GJ787622M HTTP/1.1"

So after I sendRedirect instead to go to paypal authorization page and to
continue with order, its trying to add paypal token to one level down url of
my application...

HOW CAN I ENCODE IT AND REDIRECT IT WITHOUT THIS ISSUES!? 

I tried too many things and I'm looping my head to the wall :D :D


SO this is PRETTY URGENT

CAN ANYONE HELP!!!
-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/t5-response-encode-and-redirect-problem-tp2715046p2715046.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [t5] response encode and redirect problem!

Posted by Josh Canfield <jo...@gmail.com>.
You don't know the URL for the page you are trying to redirect to? You are creating a relative URL, you need to know the server and path so create a new java.net.URL("http://theserver.com/thepath/whatever") and return it from your event handler.

-- Josh

On Aug 26, 2010, at 1:05 PM, badluck13 <bl...@gmail.com> wrote:

> 
> I don't know how to get URL!? :(
> -- 
> View this message in context: http://tapestry.1045711.n5.nabble.com/t5-response-encode-and-redirect-problem-tp2715046p2739157.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [t5] response encode and redirect problem!

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 26 Aug 2010 17:05:00 -0300, badluck13 <bl...@gmail.com> wrote:

> I don't know how to get URL!? :(

new java.net.URL("http://tapestry.apache.org");

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [t5] response encode and redirect problem!

Posted by badluck13 <bl...@gmail.com>.
I don't know how to get URL!? :(
-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/t5-response-encode-and-redirect-problem-tp2715046p2739157.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [t5] response encode and redirect problem!

Posted by Josh Canfield <jo...@gmail.com>.
Don't call sendredirect directly, instead return a URL

-- Josh

On Aug 26, 2010, at 7:20 AM, badluck13 <bl...@gmail.com> wrote:

> 
> Hello,
> 
> I'm trying to redirect to different web site and I have token =
> "EC-4WT66732GJ787622M"
> 
> This is string token that I get from paypal... Now on theirs examples I
> should encodeRedirectURL and than redirect to theirs page... like this:
> 
> response.sendRedirect(response.encodeRedirectURL(token));
> 
> Problem is that tapestry is doing this:
> 
> "GET /megapanel/user/payment.checkoutwithpaypal HTTP/1.1"
> "GET /megapanel/user/EC-4WT66732GJ787622M HTTP/1.1"
> 
> So after I sendRedirect instead to go to paypal authorization page and to
> continue with order, its trying to add paypal token to one level down url of
> my application...
> 
> HOW CAN I ENCODE IT AND REDIRECT IT WITHOUT THIS ISSUES!? 
> 
> I tried too many things and I'm looping my head to the wall :D :D
> 
> 
> SO this is PRETTY URGENT
> 
> CAN ANYONE HELP!!!
> -- 
> View this message in context: http://tapestry.1045711.n5.nabble.com/t5-response-encode-and-redirect-problem-tp2715046p2715046.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org