The code in my servlet method which processes the request contains a long if else statement and I'm not sure if this may be an indication that I've not written the method well. The method process request, called from doGet and doPost asks about the presence of various parameters in order to determine what code should execute. So it looks like this...
if the paramater "foo" is defined
then do this
else if parameter "bar" is defined
then do that
else if the request URI contains the following string "foobar"
then do something else
...... so on.....
end if
And this looks wrong to me from the standpoint of object oriented development. But maybe it's fine considering this is a servlet and maybe this sort of thing is supposed to take place. Is this sort of code inevitable in a servlet or avoidable in general in OOP...
I appreciate and welcome any feedback.