Re: Strange Problem submitting data to WO [5.2.5, W2K]
"Jerry W. Walker" <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Peter,
I would suggest logging your WORequests and WOResponses to see what
the browser is sending your app and vice-versa each time, so when the
values seem to get lost, you can determine exactly what the browser
sent and narrow your problem down.
When problems start occurring on a page intermittently, my suspicions
nearly always turn to the old pernicious problem of changing the
structure of a page between appendToResponse and
takeValuesFromRequest. However, if you're logging the requests and
responses, you'll be able to confirm that this is the problem before
wasting time looking for it.
Here is code that will help you log the requests and the responses if
you use it in Application to override the dispatchRequest method:
===================================
public WOResponse dispatchRequest(WORequest aRequest)
{
System.out.println("\nvvvvvvvvvv Cycle Start vvvvvvvvvv");
System.out.println("Request for " + aRequest.uri());
System.out.println(" from Session " + aRequest.sessionID() +
" : " + aRequest);
System.out.println(" cookies " + aRequest.cookieValues());
System.out.println("^^^^^^^^^^^ Cycle Start ^^^^^^^^^^^\n");
WOResponse result = super.dispatchRequest(aRequest);
System.out.println("\nvvvvvvvvvv Cycle End vvvvvvvvvv");
System.out.println("Response cookies " + result.cookies());
System.out.println("^^^^^^^^^^^ Cycle End ^^^^^^^^^^^\n");
return result;
}
===================================
I normally use log4j and replace the "System.out.println" calls with
logger.debug calls, but I distribute it as shown above to keep it
independent of other frameworks.
This code is, of course, a minor reworking of the example from the
Hill, Mallais book, Practical WebObjects, from which you might get
other good ideas for resolving this.
Regards,
Jerry
On Aug 8, 2006, at 7:25 AM, COAST wrote:
> Hi list
>
> we have a strange problem submitting data to the WO app.
>
> Filling in a form with changes, the changes sometimes are not
> submitted to WO.
> The "sometimes" is the big problem.
> You can do about 20 changes everything is working, then suddenly
> the form seems not to be submitted to the server. The next time:
> Everything is o.k.
>
> We checked different things like "multiple submit = yes", the
> submit button placed
> on the form for sure etc.
>
> We have to say that this strange behaviour seems to occur only if
> doing a direct conntect
> to the app (developing) . We have not seen the problem via the Web
> Server IIS (deployment).
> But we have a really bad feeling about this...
>
> We debuged the story by printing the following in
> takesValueFromRequest
> (just after super):
>
> ec.updatedObjects().count()
>
> if everything is o.k. count = 1 (one object has changed)
> if it goes wrong count = 0 (which is telling that no changes have
> been submitted ?!)
>
> What could be the problem ?
> Where to go further on with debuging ?
> Is it really only a problem with direct connect ?
>
> Thanks
> Peter
> _______________________________________________
> WebObjects-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
[email protected]
203 278-4085 office