The moose likes Struts and the fly likes return null from dispatch action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "return null from dispatch action" Watch "return null from dispatch action" New topic

return null from dispatch action

subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203
Hi Ranchers,

What will happen if i'll return null from my action/dispatch action class is it right thing to do?

Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
I think that nothing will be returned to the client that initiated the request
subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203
Its's returning the blank html page but it doesn't sound good to me is their any way to disable this feature if showing nothing because i like to see the exception instead.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
If an exception is occurring in your code and you want to display information to the user about the error then you should return a mapping that directs the user to an error page.

- Brent
I agree. Here's the link: http://aspose.com/file-tools
subject: return null from dispatch action
Similar Threads
How to set values in select box using request scope
dispatch action not working
the data in form is not being displayed :
Name of Dispatch
Dyna Action Vs Dispatch Action