You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Steve Vanspall <st...@crmsoftware.com.au> on 2002/09/25 07:35:01 UTC

form submission problem

Hi, 

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page doesn't work properly.

I try, using Javacript to set the value of a hidden <input type="hidden" name="action"> field when an <input type="image"> button is pushed, this part works fine, have checked the value after it is set. 

However it is not passing the value through to the request. Instead when I do a request.getParameter("action") all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve

Re: form submission problem

Posted by Steve Vanspall <st...@crmsoftware.com.au>.
YEah it's strange

what even more strange, is that I do exactley the same thing in a number of
other pages, and it works fine.

In fact this page used to work also.

My Struts version hasn't changed, only the Tomcat Version.

Will keep battling on, hopefully I will find the problem. Will probably
ending kicking myself because of it's simplicity

Tnaks Anyway
----- Original Message -----
From: "Andrew Hill" <an...@gridnode.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, September 25, 2002 3:53 PM
Subject: RE: form submission problem


> Is it a multipart form (multipart/form-data encoding) and the associated
> action in which you are trying to read that parameter does not have an
> ActionForm associated with it?
> (Though I dont think thats your problem as in that situation you get a
null
> and not an empty string)
> Hmmm...
>
> -----Original Message-----
> From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
> Sent: Wednesday, September 25, 2002 13:48
> To: Struts Users Mailing List
> Subject: RE: form submission problem
>
>
> Oops. Sorry mate!
> Just read it a second time and realised I didnt pay enough attention!
> "The tags are placed properly withink the form tags."
>
> -----Original Message-----
> From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
> Sent: Wednesday, September 25, 2002 13:42
> To: Struts Users Mailing List
> Subject: RE: form submission problem
>
>
> Is that field located within the start and close of the form tag on the
> page?
>
> btw: naming your field "action" is naughty as it will shadow the action
> property of the form object in JavaScript. (Though this wont hurt unless
you
> try accessing (for example to change) the form action in javascript - at
> which point it will give you your field action instead of the form
property
> action!)
>
>
> -----Original Message-----
> From: Steve Vanspall [mailto:steve@crmsoftware.com.au]
> Sent: Wednesday, September 25, 2002 13:35
> To: Struts User Mailing List
> Subject: form submission problem
>
>
> Hi,
>
> I have a fairly new problem with one of my JSP's.
>
> I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
> doesn't work properly.
>
> I try, using Javacript to set the value of a hidden <input type="hidden"
> name="action"> field when an <input type="image"> button is pushed, this
> part works fine, have checked the value after it is set.
>
> However it is not passing the value through to the request. Instead when I
> do a request.getParameter("action") all I get is a blank String.
>
> All my other pages that do this, are working fine. The tags are placed
> properly withink the form tags.
>
> Has anyone else has a similar problem with just one page.
>
> Any help would be appreciated
>
> Regards
>
> Steve
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: form submission problem

Posted by Andrew Hill <an...@gridnode.com>.
Is it a multipart form (multipart/form-data encoding) and the associated
action in which you are trying to read that parameter does not have an
ActionForm associated with it?
(Though I dont think thats your problem as in that situation you get a null
and not an empty string)
Hmmm...

-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Wednesday, September 25, 2002 13:48
To: Struts Users Mailing List
Subject: RE: form submission problem


Oops. Sorry mate!
Just read it a second time and realised I didnt pay enough attention!
"The tags are placed properly withink the form tags."

-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Wednesday, September 25, 2002 13:42
To: Struts Users Mailing List
Subject: RE: form submission problem


Is that field located within the start and close of the form tag on the
page?

btw: naming your field "action" is naughty as it will shadow the action
property of the form object in JavaScript. (Though this wont hurt unless you
try accessing (for example to change) the form action in javascript - at
which point it will give you your field action instead of the form property
action!)


-----Original Message-----
From: Steve Vanspall [mailto:steve@crmsoftware.com.au]
Sent: Wednesday, September 25, 2002 13:35
To: Struts User Mailing List
Subject: form submission problem


Hi,

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
doesn't work properly.

I try, using Javacript to set the value of a hidden <input type="hidden"
name="action"> field when an <input type="image"> button is pushed, this
part works fine, have checked the value after it is set.

However it is not passing the value through to the request. Instead when I
do a request.getParameter("action") all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed
properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: form submission problem

Posted by Andrew Hill <an...@gridnode.com>.
Oops. Sorry mate!
Just read it a second time and realised I didnt pay enough attention!
"The tags are placed properly withink the form tags."

-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Wednesday, September 25, 2002 13:42
To: Struts Users Mailing List
Subject: RE: form submission problem


Is that field located within the start and close of the form tag on the
page?

btw: naming your field "action" is naughty as it will shadow the action
property of the form object in JavaScript. (Though this wont hurt unless you
try accessing (for example to change) the form action in javascript - at
which point it will give you your field action instead of the form property
action!)


-----Original Message-----
From: Steve Vanspall [mailto:steve@crmsoftware.com.au]
Sent: Wednesday, September 25, 2002 13:35
To: Struts User Mailing List
Subject: form submission problem


Hi,

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
doesn't work properly.

I try, using Javacript to set the value of a hidden <input type="hidden"
name="action"> field when an <input type="image"> button is pushed, this
part works fine, have checked the value after it is set.

However it is not passing the value through to the request. Instead when I
do a request.getParameter("action") all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed
properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: form submission problem

Posted by Andrew Hill <an...@gridnode.com>.
Is that field located within the start and close of the form tag on the
page?

btw: naming your field "action" is naughty as it will shadow the action
property of the form object in JavaScript. (Though this wont hurt unless you
try accessing (for example to change) the form action in javascript - at
which point it will give you your field action instead of the form property
action!)


-----Original Message-----
From: Steve Vanspall [mailto:steve@crmsoftware.com.au]
Sent: Wednesday, September 25, 2002 13:35
To: Struts User Mailing List
Subject: form submission problem


Hi,

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
doesn't work properly.

I try, using Javacript to set the value of a hidden <input type="hidden"
name="action"> field when an <input type="image"> button is pushed, this
part works fine, have checked the value after it is set.

However it is not passing the value through to the request. Instead when I
do a request.getParameter("action") all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed
properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: form submission problem - Problem Solved

Posted by Steve Vanspall <st...@crmsoftware.com.au>.
Thanks Miguel, that wasn't the problem, but thanks anyway.

As I suspected, the problem was very small and very simple, and I proceeded
to kick myself several times when I found it

So thanks Mugeul and Andrew for your help


----- Original Message -----
From: "Miguel Angel Mulero Martinez" <mi...@mad.tecsidel.es>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, September 25, 2002 10:52 PM
Subject: RE: form submission problem


> You're using windows? There's a bug in 4.1.10. Update to 4.1.12 (there is
a
> security bug in earlier versions too).
>
>
>
> -----Mensaje original-----
> De: Steve Vanspall [mailto:steve@crmsoftware.com.au]
> Enviado el: miƩrcoles, 25 de septiembre de 2002 7:35
> Para: Struts User Mailing List
> Asunto: form submission problem
>
> Hi,
>
> I have a fairly new problem with one of my JSP's.
>
> I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
> doesn't work properly.
>
> I try, using Javacript to set the value of a hidden <input type="hidden"
> name="action"> field when an <input type="image"> button is pushed, this
> part works fine, have checked the value after it is set.
>
> However it is not passing the value through to the request. Instead when
> I do a request.getParameter("action") all I get is a blank String.
>
> All my other pages that do this, are working fine. The tags are placed
> properly withink the form tags.
>
> Has anyone else has a similar problem with just one page.
>
> Any help would be appreciated
>
> Regards
>
> Steve
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: form submission problem

Posted by Miguel Angel Mulero Martinez <mi...@mad.tecsidel.es>.
You're using windows? There's a bug in 4.1.10. Update to 4.1.12 (there is a
security bug in earlier versions too).



-----Mensaje original-----
De: Steve Vanspall [mailto:steve@crmsoftware.com.au]
Enviado el: miƩrcoles, 25 de septiembre de 2002 7:35
Para: Struts User Mailing List
Asunto: form submission problem

Hi,

I have a fairly new problem with one of my JSP's.

I recently changed to Tomcat 4.1.10, now all of a sudden, this one page
doesn't work properly.

I try, using Javacript to set the value of a hidden <input type="hidden"
name="action"> field when an <input type="image"> button is pushed, this
part works fine, have checked the value after it is set.

However it is not passing the value through to the request. Instead when
I do a request.getParameter("action") all I get is a blank String.

All my other pages that do this, are working fine. The tags are placed
properly withink the form tags.

Has anyone else has a similar problem with just one page.

Any help would be appreciated

Regards

Steve


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>