File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes L:ist Of if else Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "L:ist Of if else " Watch "L:ist Of if else " New topic

L:ist Of if else

raj joe
Ranch Hand

Joined: Mar 17, 2005
Posts: 99
One of my action classes is using lots of if else checking to call 6 private methods based on some request paramater (just selection in screen)

What is the best pratice to avoid such if else code in my action class?
Does struts provide any option?is reflection recomdnded for this scenerio?
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
Go for DispatchAction
Uma Mahi
Ranch Hand

Joined: Jan 11, 2006
Posts: 34
Check this


Umaa Mahi<br />--SCJP1.4
I agree. Here's the link:
subject: L:ist Of if else
It's not a secret anymore!