W
Will
I have a notty problem trying to display
a form initially. The form works fine when
it submits to itself, but throws millons
of errors when it first displays, 'cos it
has no requested parameters yet until
someone hits the submit button. Here
it is:
class MyServlet extends BaseServlet
.....
if (request params == true){
hundreds of lines of code
that process the requested
parameters. } // end of very large if
.....
println("my form etc");
println("my form etc"); hundreds more lines.
end class
It seems ridiculous to put an 'if' {}
statement round hundreds of lines
of code. And I think variables go out
of scope too. But if I do nothing
it just hangs because my hundreds of
lines of code have no parameters.
There must be an easy answer, but
I am getting more and more bogged
down in this problem. Any one hit
this problem before? (JRun app server)
a form initially. The form works fine when
it submits to itself, but throws millons
of errors when it first displays, 'cos it
has no requested parameters yet until
someone hits the submit button. Here
it is:
class MyServlet extends BaseServlet
.....
if (request params == true){
hundreds of lines of code
that process the requested
parameters. } // end of very large if
.....
println("my form etc");
println("my form etc"); hundreds more lines.
end class
It seems ridiculous to put an 'if' {}
statement round hundreds of lines
of code. And I think variables go out
of scope too. But if I do nothing
it just hangs because my hundreds of
lines of code have no parameters.
There must be an easy answer, but
I am getting more and more bogged
down in this problem. Any one hit
this problem before? (JRun app server)