This week's book giveaway is in the Testing forum.
We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line!
See this thread for details.
Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
    Bookmark Topic Watch Topic
  • New Topic

Submitting parameter in MVC is not working in MVC

Ashraf Fouad
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Report post to moderator
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;
The action name that was used in calling is like this:
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
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
    Bookmark Topic Watch Topic
  • New Topic