i am using the struts tag lib in my code. I have created an image control to use instead of traditional buttons. The submit button works fine but the cancel button is not behaving proprly. It just submits the form instead of cancelling it when the cancel button is pressed. Can any one help me in this?
If you'll look closely at The Taglib documentation, you will see that an html:cancel button does cause a submit button to be rendered. The main difference is that it will bypass any validation. If your action class is a subclass of DispatchAction as yours appears to be, just code a cancelled method to handle the case where the cancel button is pressed. Also, don't forget to put cancellable="true" in the action path definition in your struts-config.xml file.