This content has been marked as final. Show 8 replies
Where *exactly* are you trying to dump the form variable?
Can you describe the application flow when the orRequestStart detects an
Here's chunks of the code:
... after login, create currentUser object and store on session
<cfif Not isDefined("session.currentUser")>
<cfif not isDefined("Form.j_username") >
<cfset timeOut = true /> ... used to display timeout code...
<cfinclude template="headNoBanner.cfm" />
<cfinclude template="dspLogin.cfm" />
<cfinclude template="foot.cfm" />
<cfreturn false />
... assign other session variables
I've tried the dump where shown, at the beginning of onRequestStart and on the dspLogin.cfm page, all with same results: nothing!
Do you know if there are any coldfusion.runtime. java objects availble with the form variables?
> I've tried the dump where shown, at the beginning of onRequestStart and on the
> dspLogin.cfm page, all with same results: nothing!
> Do you know if there are any coldfusion.runtime. java objects availble with
> the form variables?
What is #ColdFusion#. That is not a default variable scope, it would
have to be something built by your code.
I would expect you to be dumping the form scope. I.E. <cfdump
var="#form#">; or the URL scope if your form happens to use the get
method instead of the post method.
Sorry, the #ColdFusion# was an error. when I cut and pasted, I was in the process and entering a string into the Java runtime and trying to dump a list of java objects.
I have tried #Form#, and even #Description# where 'Description' is the name of one of the <input> fields on the form. When I used #Form# I got an empty structure and when I used #Description# I got variable not defined. I'm trying to find something, such as GetPagecontext().getVariableScope() that provides what is in the form, but without success. Any syggestions on these runtime methods?
Sorry for the confusion.
> Sorry for the confusion.
Ok. that does clarify things. I have no idea where a form structure
would be buried inside of the Java underpinnings of ColdFusion, but I
don't think you need to go there just yet.
What you are trying to do should be working as expected. That tells me
your application is doing something unexpected. The trick with the form
and url scopes is that they *only* exist in the request that sent them.
If your server does anything to jump to another request they will be
That is why the first thing I looked for when you provided the code was
a <cflocation...> a common way of redirecting users to a login page.
That would have definitely lost any form data sent to the original request.
The overall flow is that the user comletes a form on their browser and clicks submit. Unfortunately, their session has expired, so the original request is never completed. I'm trying to capture their work in the "onRequestStart" method in application.cfc. It is my understanding that ColdFusion executes onRequestStart first before it does anything else, so the Form data should be there, but it is not. Is there some other order of events on the server after a user clicks submit?
Well, I just had a couple of minutes and I gave this a try.
I am surprised, but it does look like the form scope is not available to
the onRequestStart method.
That really surprises me.
Ian Skinner wrote:
> I am surprised, but it does look like the form scope is not available to
> the onRequestStart method.
Let me reverse that!!!!
Stupid me, I did not have a name for my form field so the browser was
not posting anything... DUH!
This works as I would expect it.
this.name = "NewApplicationA";
#dateFormat(now(),'dd mmmm yyyy')#<br/>
<form action="simpleCFML.cfm" method="post">
<input name="George" type="hidden" value="FOOBAR" />
<input type="submit" />