Dave Newton on 04/05/06 19:13, wrote:
Adam Hardy wrote:
In the last couple of days someone said that they separated the two
flows using GET and POST - or at least I thought so.
It sounded interesting but on looking at the struts-config DTD, there
seems no way to do this.
I can't find the thread in the archive now. Did I misread that
previous posting?
Nope, but you might have misunderstood: it's about as far from magic as
one can get.
Everything was handled with a base Action pseudocoded (very) roughly as
follows. Mind you, this isn't how I would do things now, but it served
its purpose for a pretty darn long time (just like Struts! :)
execute
if isError(handleSetup(request_, event_))
return setupError
if isPost(request)
return executeGet
if isError(validateForm)
return validationError
return executePost
There were various over-ridables for setting up the form differently (if
necessary) for GET/POST, blah blah blah.
OK, I see, you coded it yourself.
I wish that sort of mechanism had gone into the Struts ActionServlet.
In your case you had to recode something from the servlet container
level that struts had smothered - not a good situation.
I can see though that some might disagree if they are seeking to
encapsulate and hide the HTTP layer. However I think that web
programmers should be intimately aware of the HTTP layer if they intend
to create a robust webapp.
rgds
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]