Hello, I'm having what seems to me a very strange problem. I'm developing an application that allows additions to a database. When I go through the hierarchy of the screens, enter the data on the
jsp to add to the db and submit, my database add query is successfully executed - twice!
Oddly, if I 'hesitate' on the add screen and wait a minute or so before submitting, the query is only executed once. It behaves as though a duplicate
thread is being spawned, using the same http request.
Has anybody ever heard of such a problem before? I've gone over my
struts config file and everything several times, and will continue to do so, but I was hoping somebody might be able to enlighten me somehow.
I'm absolutely positive that the behavior I've described is what's actually happening (I'm not an idiot, though I sometimes act like one). I compiled with AspectJ and defined a pointcut to display (println) every method invocation. Also, just plain old println's in the methods show the same thing.
Is there any sort of a context block maintained by Struts which would be available to me programmatically - i.e. something similar to an 'Action.getPriorMapping()' call which would show what Struts has currently for whatever would be analagous to a call stack? Or any way for me toe verify that struts is hearing what I believe I'm saying?
The flow is as follows:
Form A - Display all contractsForm B - Display an individual contract, with separate line itemsForm C - Display an individual line item, with it's detail dataForm D - Display all shipments that apply to the current contract line itemForm E - Display an 'Add Shipment' form (jsp) which allows entry of a new shipment All forms are JSPs. When new shipment data is entered, I want to add it to the database and go back to Form C via ActionParameters.setForwardName() to the JSP named in struts-config <global-forwards> section. I tried changing to go back to Form B instead, and observed the same behavior.
Any help much appreciated.
Thanks,
Scott