• 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

HOw to avoid ActionForward

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i have an application in which i am updating my database by calling method from execute method of action class but from here i dont want to forward to any page if any one is having any idea please reply immediately


thanks in advance
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the HTTP protocol, there is always a request and a response. When a user makes an HTTP request, the server must provide a response. There's no way around that. If you want to go back to the same page, that's fine: Just forward to the same page that submitted the request.

If you're handling the response outside of the Struts framework, such as by getting the output stream from the HTTPServletResponse object and writing to it, that's fine also. In that case, just return null from the execute() method.

It's important to realize, though, that in each of the above cases, a response is still being given to the request, and there's no way to avoid that requirement.
[ July 27, 2007: Message edited by: Merrill Higginson ]
 
amod gole
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Merrill Higginson
 
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic