• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring MVC Portlet not able to get the form GET parameters

 
Mohamed Alla Pitchai
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am not able to get the parameters in my handleActionRequestInternal() method when I submit my form using "GET". But when I use the method "POST" I am able to get the parameters passed.

The following is the snippet from the JSP

<form name="globalform" method="get" action="<portlet:ActionURL/>" id="gs_form">
<div id="gs_basic_search">
<input type="text" name="keyword" id="gs_search_text_input" value="" />
<button name="submit" type="submit"> <img src="/images/buttons/search_button.gif" alt="submit search form" /> </button>
</div>

After submitting, in the handleActionRequestInternal() I tried to get all the parameter names I passed in from the form and iterate them for display.
The following is the code which does this.

Enumeration e = request.getParameterNames();


while(e.hasMoreElements())
{
String s = (String) e.nextElement();

System.out.println("passed element is " + s);
}

For the "POST" request the above code returns names of all the passed parameters. But for "GET" it is not displaying anything. Not sure why.

Environment:
-------------
IDE: Netbeans 6.0
Server: OpenPortlet Portlet Container 2.0 Beta


Any good suggestion is really appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic