Struts foward question
I'm having some trouble finding an elegant way to handle a situation I've discovered.
I am writing a Struts based WebSphere application. I'm not using any WebSphere specific classes at this time, so it's a straight J2EE/Struts issue.
I have a data entry form, which uses as its action an Action Class that saves the data as a new record in a database. That works fine. However, when it succeeds, it forwards to the page that displays the information stored in the newly created record. This also works fine. The problem is that after the foward, the URL is still "saveAdminAction.do", so if the user presses Refresh, it wants to save another new record with identical data in it, rather than merely refreshing the display page.
Does anyone know how to have the forward in the Action Class change the page focus from saveAdminAction.do to displayAdmin.jsp?
I know I could have the action class forward to a page that contains javascript window.navigate code to get around this, but that's kludgy.
Thanks,
Eric
I am writing a Struts based WebSphere application. I'm not using any WebSphere specific classes at this time, so it's a straight J2EE/Struts issue.
I have a data entry form, which uses as its action an Action Class that saves the data as a new record in a database. That works fine. However, when it succeeds, it forwards to the page that displays the information stored in the newly created record. This also works fine. The problem is that after the foward, the URL is still "saveAdminAction.do", so if the user presses Refresh, it wants to save another new record with identical data in it, rather than merely refreshing the display page.
Does anyone know how to have the forward in the Action Class change the page focus from saveAdminAction.do to displayAdmin.jsp?
I know I could have the action class forward to a page that contains javascript window.navigate code to get around this, but that's kludgy.
Thanks,
Eric
