Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Don't get the parameter in handler in MVC

 
Ashraf Fouad
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • 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.
plz help
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about you change the form method temporarily to GET so that you can see the values are fine?
 
Ashraf Fouad
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved the problem by changing the parameter to hidden input in the page form, I still don't know till now what is the problem but it worked thankx GOD
 
Ashraf Fouad
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortuantly, I can't apply this to a form with mult-part request which I'm using for upload, still pressist.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic