RedirectResolution using POST

View: New views
12 Messages — Rating Filter:   Alert me  

RedirectResolution using POST

by Grzegorz Krugły :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm integrating with an online payments service and would love to POST
to their URL instead of GETting it. Is it possible to do so using
RedirectResolution or some other means?

Best regards,
Grzegorz


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by Aaron Porter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Grzegorz,
Unfortunately, the HTTP spec doesn't provide a way to redirect a POST if
that's what you're asking.

There are 2 normal ways to use a payment processor:
1. Use the payment processor's API so the customer only sees your site
and your site talks to the processor on the backend.
2. Send the user to the processor's site to checkout.

Are you trying to use Stripe's validation before sending to the
processor? If not I don't understand why you'd want to redirect instead
of just POSTing to the processor's site.

Aaron

Grzegorz Krugły wrote:

> Hi,
>
> I'm integrating with an online payments service and would love to POST
> to their URL instead of GETting it. Is it possible to do so using
> RedirectResolution or some other means?
>
> Best regards,
> Grzegorz
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>  


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by Grzegorz Krugły :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What I'm doing is POSTing to MY code which save the order in temporary
state, etc. and THEN I redirect to payment processor's site. They accept
GET method, but recommend POST and I would like having "hidden"
parameters more, too.

I guess I'll have to live with GET then.

Aaron Porter pisze:

> Hi Grzegorz,
> Unfortunately, the HTTP spec doesn't provide a way to redirect a POST if
> that's what you're asking.
>
> There are 2 normal ways to use a payment processor:
> 1. Use the payment processor's API so the customer only sees your site
> and your site talks to the processor on the backend.
> 2. Send the user to the processor's site to checkout.
>
> Are you trying to use Stripe's validation before sending to the
> processor? If not I don't understand why you'd want to redirect instead
> of just POSTing to the processor's site.
>
> Aaron
>
> Grzegorz Krugły wrote:
>  
>> Hi,
>>
>> I'm integrating with an online payments service and would love to POST
>> to their URL instead of GETting it. Is it possible to do so using
>> RedirectResolution or some other means?
>>
>> Best regards,
>> Grzegorz
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@...
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>  
>>    
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>  


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by Stone, Timothy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Stripes-users] RedirectResolution using POST Aaron is correct, the HTTP spec does not preserve POST values and Apache enforces this specification.

You might want to look at leveraging mod_rewrite + mod_proxy to preserve the POST values.

I did a YouTube video showing how to use it... http://www.youtube.com/watch?v=i4G5I4YdWVE

HTTPS is tricky, but should be possible with the directive SSLProxyEngine.

Regards,
Tim


On 11/9/09 5:02 PM, "Grzegorz Krugły" <gk@...> wrote:

What I'm doing is POSTing to MY code which save the order in temporary
state, etc. and THEN I redirect to payment processor's site. They accept
GET method, but recommend POST and I would like having "hidden"
parameters more, too.

I guess I'll have to live with GET then.

Aaron Porter pisze:
> Hi Grzegorz,
> Unfortunately, the HTTP spec doesn't provide a way to redirect a POST if
> that's what you're asking.
>
> There are 2 normal ways to use a payment processor:
> 1. Use the payment processor's API so the customer only sees your site
> and your site talks to the processor on the backend.
> 2. Send the user to the processor's site to checkout.
>
> Are you trying to use Stripe's validation before sending to the
> processor? If not I don't understand why you'd want to redirect instead
> of just POSTing to the processor's site.
>
> Aaron
>
> Grzegorz Krugły wrote:
>  
>> Hi,
>>
>> I'm integrating with an online payments service and would love to POST
>> to their URL instead of GETting it. Is it possible to do so using
>> RedirectResolution or some other means?
>>
>> Best regards,
>> Grzegorz
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@...
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>  
>>    
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>  


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Timothy Stone   |   Application Developer Technical Lead
Barclaycard   
|    Business Technology Group, Strategic Development
125 S. West Street   
|   Wilmington, DE    |   19801
USA   
|   www.barclaycardus.com
+1 302 255 8044 direct
|   +1 410 441 9450 cell
 
COMPANY CONFIDENTIAL

P Before printing this e-mail, or any other document, ask yourself whether you need a hard copy



_______________________________________________________

Barclays
www.barclaycardus.com
_______________________________________________________

This e-mail and any files transmitted with it may contain confidential and/or proprietary information. It is intended solely for the use of the individual or entity who is the intended recipient. Unauthorized use of this information is prohibited. If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by Aaron Porter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had forgotten all about it but several years ago I did this same type of thing by creating an apparently blank page containing a form populated with hidden fields. Then on page load I  submitted via JavaScript. Won't work if your user doesn't have JavaScript enabled.

Aaron

Grzegorz Krugły wrote:
What I'm doing is POSTing to MY code which save the order in temporary 
state, etc. and THEN I redirect to payment processor's site. They accept 
GET method, but recommend POST and I would like having "hidden" 
parameters more, too.

I guess I'll have to live with GET then.

Aaron Porter pisze:
  
Hi Grzegorz,
Unfortunately, the HTTP spec doesn't provide a way to redirect a POST if 
that's what you're asking.

There are 2 normal ways to use a payment processor:
1. Use the payment processor's API so the customer only sees your site 
and your site talks to the processor on the backend.
2. Send the user to the processor's site to checkout.

Are you trying to use Stripe's validation before sending to the 
processor? If not I don't understand why you'd want to redirect instead 
of just POSTing to the processor's site.

Aaron

Grzegorz Krugły wrote:
  
    
Hi,

I'm integrating with an online payments service and would love to POST 
to their URL instead of GETting it. Is it possible to do so using 
RedirectResolution or some other means?

Best regards,
Grzegorz


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

  
    
      
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users
  
    


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users
  


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by Ben Gunter-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It might also be possible to redirect to a page on your site that renders a hidden form whose action is the URL you want to POST to and automatically submit the form with a call to form.submit() from the window.onload event.

-Ben

2009/11/9 Stone, Timothy <tstone@...>
Aaron is correct, the HTTP spec does not preserve POST values and Apache enforces this specification.

You might want to look at leveraging mod_rewrite + mod_proxy to preserve the POST values.

I did a YouTube video showing how to use it... http://www.youtube.com/watch?v=i4G5I4YdWVE

HTTPS is tricky, but should be possible with the directive SSLProxyEngine.

Regards,
Tim



On 11/9/09 5:02 PM, "Grzegorz Krugły" <gk@...> wrote:

What I'm doing is POSTing to MY code which save the order in temporary
state, etc. and THEN I redirect to payment processor's site. They accept
GET method, but recommend POST and I would like having "hidden"
parameters more, too.

I guess I'll have to live with GET then.

Aaron Porter pisze:
> Hi Grzegorz,
> Unfortunately, the HTTP spec doesn't provide a way to redirect a POST if
> that's what you're asking.
>
> There are 2 normal ways to use a payment processor:
> 1. Use the payment processor's API so the customer only sees your site
> and your site talks to the processor on the backend.
> 2. Send the user to the processor's site to checkout.
>
> Are you trying to use Stripe's validation before sending to the
> processor? If not I don't understand why you'd want to redirect instead
> of just POSTing to the processor's site.
>
> Aaron
>
> Grzegorz Krugły wrote:
>  
>> Hi,
>>
>> I'm integrating with an online payments service and would love to POST
>> to their URL instead of GETting it. Is it possible to do so using
>> RedirectResolution or some other means?
>>
>> Best regards,
>> Grzegorz
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@...
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>  
>>    
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>  


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Timothy Stone   |   Application Developer Technical Lead
Barclaycard   
|    Business Technology Group, Strategic Development
125 S. West Street   
|   Wilmington, DE    |   19801
USA   
|   www.barclaycardus.com
+1 302 255 8044 direct
|   +1 410 441 9450 cell
 
COMPANY CONFIDENTIAL

P Before printing this e-mail, or any other document, ask yourself whether you need a hard copy



_______________________________________________________

Barclays
www.barclaycardus.com
_______________________________________________________

This e-mail and any files transmitted with it may contain confidential and/or proprietary information. It is intended solely for the use of the individual or entity who is the intended recipient. Unauthorized use of this information is prohibited. If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by Grzegorz Krugły :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ben Gunter pisze:
> It might also be possible to redirect to a page on your site that
> renders a hidden form whose action is the URL you want to POST to and
> automatically submit the form with a call to form.submit() from the
> window.onload event.
>

That would break the whole process for users with javascript disabled.
Seeing solutions proposed (hidden forms, mod_proxy, etc) I came to a
conclusion that what I wanted to do is impossible to do in a proper way
:) So I'm sticking with GET.

Thank You all for replies. Another new thing learned :-)

Best regards,
Grzegorz


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by jockeeriksson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I would go with the URL Connection class, this will give you the possibility to implement failover when
needed. 

> Date: Mon, 9 Nov 2009 19:54:48 +0100
> From: gk@...
> To: stripes-users@...
> Subject: [Stripes-users] RedirectResolution using POST
>
> Hi,
>
> I'm integrating with an online payments service and would love to POST
> to their URL instead of GETting it. Is it possible to do so using
> RedirectResolution or some other means?
>
> Best regards,
> Grzegorz
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users


Hitta kärleken! Klicka här Hitta en dator som passar dig!
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by Stone, Timothy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Stripes-users] RedirectResolution using POST Jocke,

I personally would like to hear more about this solution and possibly see some code samples.

Generally speaking, I have found that many applications do not really correctly implement GET and POST. Many leverage POST to circumvent GET limitations or prevent information from being written to logs.

The use of mod_rewrite + mod_proxy is really just masking the problem and working around the specification, but I like the solution better than a “form shell” that auto submits (for reasons of accessibility, though those can be worked around by providing a button when Javascript is disabled...).

A controller solution is very intriguing as, while another specification workaround, it is hidden from the view and the protocol layers preserving the data being passed around.

Regards,
TIm


On 11/10/09 2:15 AM, "Jocke Eriksson" <jockeeriksson@...> wrote:

I would go with the URL Connection class, this will give you the possibility to implement failover when
needed.

> Date: Mon, 9 Nov 2009 19:54:48 +0100
> From: gk@...
> To: stripes-users@...
> Subject: [Stripes-users] RedirectResolution using POST
>
> Hi,
>
> I'm integrating with an online payments service and would love to POST
> to their URL instead of GETting it. Is it possible to do so using
> RedirectResolution or some other means?
>
> Best regards,
> Grzegorz
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
       

Hitta kärleken! Klicka här Hitta en dator som passar dig! <http://windows.microsoft.com/shop>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

--
Timothy Stone   |   Application Developer Technical Lead
Barclaycard   
|    Business Technology Group, Strategic Development
125 S. West Street   
|   Wilmington, DE    |   19801
USA   
|   www.barclaycardus.com
+1 302 255 8044 direct
|   +1 410 441 9450 cell
 
COMPANY CONFIDENTIAL

P Before printing this e-mail, or any other document, ask yourself whether you need a hard copy



_______________________________________________________

Barclays
www.barclaycardus.com
_______________________________________________________

This e-mail and any files transmitted with it may contain confidential and/or proprietary information. It is intended solely for the use of the individual or entity who is the intended recipient. Unauthorized use of this information is prohibited. If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by Newman, John W :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Re: [Stripes-users] RedirectResolution using POST

You could also use apache http client to build & execute the post and send the resulting input stream to your httpresponse.  Might be a bit overkill but is probably a not so bad way of doing it.  I’m sure there’s an easier way?

 

I’ve used http client a few times, it is pretty simple to get up and running.  It’s just the error handling that can take time, but your use case any errors would just be a pass through.

 

From: Stone, Timothy [mailto:tstone@...]
Sent: Tuesday, November 10, 2009 5:08 PM
To: Stripes Users List
Subject: Re: [Stripes-users] RedirectResolution using POST

 

Jocke,

I personally would like to hear more about this solution and possibly see some code samples.

Generally speaking, I have found that many applications do not really correctly implement GET and POST. Many leverage POST to circumvent GET limitations or prevent information from being written to logs.

The use of mod_rewrite + mod_proxy is really just masking the problem and working around the specification, but I like the solution better than a “form shell” that auto submits (for reasons of accessibility, though those can be worked around by providing a button when Javascript is disabled...).

A controller solution is very intriguing as, while another specification workaround, it is hidden from the view and the protocol layers preserving the data being passed around.

Regards,
TIm


On 11/10/09 2:15 AM, "Jocke Eriksson" <jockeeriksson@...> wrote:

I would go with the URL Connection class, this will give you the possibility to implement failover when
needed.

> Date: Mon, 9 Nov 2009 19:54:48 +0100
> From: gk@...
> To: stripes-users@...
> Subject: [Stripes-users] RedirectResolution using POST
>
> Hi,
>
> I'm integrating with an online payments service and would love to POST
> to their URL instead of GETting it. Is it possible to do so using
> RedirectResolution or some other means?
>
> Best regards,
> Grzegorz
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
       


Hitta kärleken! Klicka här Hitta en dator som passar dig! <http://windows.microsoft.com/shop>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july


--
Timothy Stone   |   Application Developer Technical Lead
Barclaycard   
|    Business Technology Group, Strategic Development
125 S. West Street   
|   Wilmington, DE    |   19801
USA   
|   www.barclaycardus.com
+1 302 255 8044 direct
|   +1 410 441 9450 cell
 
COMPANY CONFIDENTIAL

P Before printing this e-mail, or any other document, ask yourself whether you need a hard copy



_______________________________________________________

Barclays
www.barclaycardus.com
_______________________________________________________

This e-mail and any files transmitted with it may contain confidential and/or proprietary information. It is intended solely for the use of the individual or entity who is the intended recipient. Unauthorized use of this information is prohibited. If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by Newman, John W :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Re: [Stripes-users] RedirectResolution using POST

AH I hit ctrl+enter, instead of enter, before I was finished.  I need to change that setting..

 

I wanted to add, it is kind of weird to have your web server also acting like a web client.  Here we have 0 visibility to the production machine, so it may have some sort of outbound proxy or something preventing a POST or a GET from that machine to another one.  If it doesn’t for initial release, they might install something tomorrow who knows.

 

So I would probably go with the forward to a page with <form action=http://... and <script>form.submit()… that is weird, but not quite as weird as making your server ask for pages.  And if you put a button inside the <noscript> tag, it’s still accessible.  It is still pretty odd though, there’s got to be a better way?

 

From: Newman, John W [mailto:John.newman@...]
Sent: Tuesday, November 10, 2009 5:37 PM
To: Stripes Users List
Subject: Re: [Stripes-users] RedirectResolution using POST

 

You could also use apache http client to build & execute the post and send the resulting input stream to your httpresponse.  Might be a bit overkill but is probably a not so bad way of doing it.  I’m sure there’s an easier way?

 

I’ve used http client a few times, it is pretty simple to get up and running.  It’s just the error handling that can take time, but your use case any errors would just be a pass through.

 

From: Stone, Timothy [mailto:tstone@...]
Sent: Tuesday, November 10, 2009 5:08 PM
To: Stripes Users List
Subject: Re: [Stripes-users] RedirectResolution using POST

 

Jocke,

I personally would like to hear more about this solution and possibly see some code samples.

Generally speaking, I have found that many applications do not really correctly implement GET and POST. Many leverage POST to circumvent GET limitations or prevent information from being written to logs.

The use of mod_rewrite + mod_proxy is really just masking the problem and working around the specification, but I like the solution better than a “form shell” that auto submits (for reasons of accessibility, though those can be worked around by providing a button when Javascript is disabled...).

A controller solution is very intriguing as, while another specification workaround, it is hidden from the view and the protocol layers preserving the data being passed around.

Regards,
TIm


On 11/10/09 2:15 AM, "Jocke Eriksson" <jockeeriksson@...> wrote:

I would go with the URL Connection class, this will give you the possibility to implement failover when
needed.

> Date: Mon, 9 Nov 2009 19:54:48 +0100
> From: gk@...
> To: stripes-users@...
> Subject: [Stripes-users] RedirectResolution using POST
>
> Hi,
>
> I'm integrating with an online payments service and would love to POST
> to their URL instead of GETting it. Is it possible to do so using
> RedirectResolution or some other means?
>
> Best regards,
> Grzegorz
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
       


Hitta kärleken! Klicka här Hitta en dator som passar dig! <http://windows.microsoft.com/shop>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july


--
Timothy Stone   |   Application Developer Technical Lead
Barclaycard   
|    Business Technology Group, Strategic Development
125 S. West Street   
|   Wilmington, DE    |   19801
USA   
|   www.barclaycardus.com
+1 302 255 8044 direct
|   +1 410 441 9450 cell
 
COMPANY CONFIDENTIAL

P Before printing this e-mail, or any other document, ask yourself whether you need a hard copy



_______________________________________________________

Barclays
www.barclaycardus.com
_______________________________________________________

This e-mail and any files transmitted with it may contain confidential and/or proprietary information. It is intended solely for the use of the individual or entity who is the intended recipient. Unauthorized use of this information is prohibited. If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: RedirectResolution using POST

by jockeeriksson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Sure it's simple, do this in your service layer, maybe in a new thread up to the implementation. And of course implement better error handling.   

  private String createQueryString() {
        StringBuilder sb = new StringBuilder();
        sb.append("var1=");
        sb.append(URLEncoder.encode(value1, "UTF-8"));

        return sb.toString();
    }



private String makeRequest(String urlToCall, query) throws IOException {

        String response = null;

        try {
            URL urlCall = new URL(urlToCall);
            HttpURLConnection con = (HttpURLConnection) urlCall.openConnection();
            con.setDoInput(true);
            con.setDoOutput(true);
            con.setUseCaches(false);
            con.setRequestMethod("POST");
            con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
            DataOutputStream printout = new DataOutputStream(con.getOutputStream());
            printout.writeBytes(query);
            printout.flush();
            printout.close();

            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));
            String str;
            StringBuffer bf = new StringBuffer();

            while (null != ((str = bufferedReader.readLine()))) {
                bf.append(str);

            }

            bufferedReader.close();

            response = bf.toString();
            logger.finest("got response " + response);

        } catch (MalformedURLException ex1) {
            logger.severe(ex1.getMessage());
        }

        return response;
    }










Date: Tue, 10 Nov 2009 17:08:25 -0500
From: tstone@...
To: stripes-users@...
Subject: Re: [Stripes-users] RedirectResolution using POST

Re: [Stripes-users] RedirectResolution using POST Jocke,

I personally would like to hear more about this solution and possibly see some code samples.

Generally speaking, I have found that many applications do not really correctly implement GET and POST. Many leverage POST to circumvent GET limitations or prevent information from being written to logs.

The use of mod_rewrite + mod_proxy is really just masking the problem and working around the specification, but I like the solution better than a “form shell” that auto submits (for reasons of accessibility, though those can be worked around by providing a button when Javascript is disabled...).

A controller solution is very intriguing as, while another specification workaround, it is hidden from the view and the protocol layers preserving the data being passed around.

Regards,
TIm


On 11/10/09 2:15 AM, "Jocke Eriksson" <jockeeriksson@...> wrote:

I would go with the URL Connection class, this will give you the possibility to implement failover when
needed.

> Date: Mon, 9 Nov 2009 19:54:48 +0100
> From: gk@...
> To: stripes-users@...
> Subject: [Stripes-users] RedirectResolution using POST
>
> Hi,
>
> I'm integrating with an online payments service and would love to POST
> to their URL instead of GETting it. Is it possible to do so using
> RedirectResolution or some other means?
>
> Best regards,
> Grzegorz
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
       

Hitta kärleken! Klicka här Hitta en dator som passar dig! <http://windows.microsoft.com/shop>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

--
Timothy Stone   |   Application Developer Technical Lead
Barclaycard   
|    Business Technology Group, Strategic Development
125 S. West Street   
|   Wilmington, DE    |   19801
USA   
|   www.barclaycardus.com
+1 302 255 8044 direct
|   +1 410 441 9450 cell
 
COMPANY CONFIDENTIAL

P Before printing this e-mail, or any other document, ask yourself whether you need a hard copy



_______________________________________________________

Barclays
www.barclaycardus.com
_______________________________________________________

This e-mail and any files transmitted with it may contain confidential and/or proprietary information. It is intended solely for the use of the individual or entity who is the intended recipient. Unauthorized use of this information is prohibited. If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on.


Ladda ner nya Internet Explorer 8! Ladda ner nya Internet Explorer 8!
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users