This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have 2 relativly similar JSP's that are sharing a common servlet because of a specific task that they perform. However, depending on which form called the servlet, I need to forward to a different page.
I know how to determine which Button was pressed and for all intent and purposes I could just name the buttons on both pages differently and check for that, however, is there a way to retrieve the calling form in a servlet?
No. The form name is a client-side element that is not passed to the back end. You could do the button thing or better yet, include a hidden parameter in the form. I prefer the latter because it's a purer "API" than relying on client-side artifacts such as button names.