Forums Register Login

Submitting parameter in MVC is not working in MVC

+Pie Number of slices to send: Send
I have a strange problem in WebSphere Application Server 3.5.5:
I pass a parameter in a page that submits to a handler in a form that uses method="post", and I put an alert before submitting in java script, and I'm sure from the output that I'm sending a parameter named "Page". This works fine in my machine with Visual age 3.5.2 with tomcat test environment & working on WebSphere Application Server 3.3.5 working in Oracle 8.1.7 on Solaris fine.
But when I'm moving on WebSphere application Server in the customer locvation which uses DB2 as reposotry ==> the variable in the parameter comes with null value.
My code is as follows & also I send the output of the System.out.println in the default output of the application server.
String l_szpageParameter = p_Request.getParameter( REQUEST_PAGE );
System.out.println( " l_szpageParameter : " + l_szpageParameter );
String l_szactionParameter = p_Request.getParameter( REQUEST_ACTION );
System.out.println( " l_szactionParameter : " + l_szactionParameter );
String l_szpageAttribute = (String)p_Request.getAttribute( REQUEST_PAGE );
System.out.println( " l_szpageAttribute : " + l_szpageAttribute );
String l_szactionAttribute = (String)p_Request.getAttribute( REQUEST_ACTION );
System.out.println( " l_szactionAttribute : " + l_szactionAttribute );
The output:
==============
l_szpageParameter : null
l_szactionParameter : null
l_szpageAttribute : null
l_szactionAttribute : null
I don't know how to trace to get the reason of this & why specially this page which have nothing than submit form with action and method="post".
The javascript for submit is as follows:
=========================================
function doClose( formName, actionName)
{
document.forms[formName].action = actionName;
document.forms[formName].submit();
}
The action name that was used in calling is like this:
============================================
/appname/controller/InetHandler?Page=create
And I can't get the "Page" using request.getParameter( "Page" )
I tried to solve & it worked when I defined "Page" as a hidden input in the form, but the problem is that there are too many pages using this script & changes will need too much testing, also there are pages that use multi-part form for uploading files & I think u can't define
hidden inputs in it.
Any thoughts
+Pie Number of slices to send: Send
Ashraf
Please do not cross post your questions to multiple forums. Most of the visitors here read in many of the forums and it is frustrating to see the same question repeated over and over. You have a better chance of getting a correct and timely answer if you post it to the most appropriate forum instead of using the shotgun approach and hoping you'll hit something.
You posted the exact same question yesterday in the servlets forum and have received answers to it. If the answers don't satisfy then please continue the conversation in the same thread and let them know what you dont understand or what your problem is with the answers you were given. Posting in a new forum won't help because most of the same people come to both forums.
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


Reply locked
This thread has been viewed 1046 times.
Similar Threads
Don't get the parameter in handler in MVC
using ajax and struts iterate tags
Submitting hidden values on the form with onSelect option
session management problem with iframes
Request.getParameter() coming as Null in IE
Passing object from Servlet to JSP throws Exception
2 threads generated in MVC model, don't know why?
document.form.action problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:11:10.