• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can I forward(return) a url from Struts Action

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have one action class, Can I forward(return) a url from Struts Action.
I don't want to return success or failure.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts Action returns a ActionForward object. So you can not return or forward a URL.
 
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you can do it,



But why do want to forward it to URL instead of following the struts way. More explanations on your requirement would help you to get the best solution.

Ananth Chellathurai
 
swati mittal
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ananth Chellathurai,

I want to redirect my jsp page to any payment gateway from my action in struts by post method.
so please let me know How to send URL through action to any site through method post.
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to redirect or forward user to some Payment Gateway URL, then why do you require Action , just Provide some buttons, like 'Pay', in <form action="URL_FOR_PAYMENT_GATEWAY"...></form> code..

By the way, Which Payment Gateway you want to integrate ??
 
swati mittal
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But I am doing cheksum calculation in my action and i also want to send that parameter into url.
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, then Either, you save "URL + checksum" value in a request object OR Only cheksum value in request object and transfer it to JSP page, and retrieve in Pay button form action, like this



Hope this Helps,

I once again ask you which Payment Gateway , you are integrating with ?

I have an experience of PayPal, Authorize.net and Google Checkout , and neither of this requires the arrangement as you want !
 
reply
    Bookmark Topic Watch Topic
  • New Topic