This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I want to use jsp:forward for taking the user to the servlet
I know it is the current idiom to say "buttons on the jsp" but for clarity of thought you should say two buttons on the HTML page generated by the jsp. The action for one button will be a request to a jsp URL and the other a request to a servlet URL.
Are you using a web framework, such as JSF?
Are you using JSP scripting elements?
Do you just want to use HTML, maybe?
What I want to do here is:
On clicking on the ADD button the request should be forwarded to a servlet.
On clicking on the CANCEL button I want direct the user to a html page.
Earlier both ADD and CANCEL were taking the user to html pages.
If all you are doing is "forwarding" to another page, then did you know that you can achieve this with HTML button click events? Are you actually submitting a form for the Servlet to process, or are you just wanting to navigate to one page or another based on the button clicked?