• Post Reply Bookmark Topic Watch Topic
  • New Topic

in form GET method query string problem  RSS feed

 
pardha saradhi74
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am using
<form name="f1" method="get" action="simple.jsp?x=hi"> in my .html ..
and I wrote
out.println(request.getQuertyString("x")); in my .jsp page
but it is returning null value
is there any way to get the query string value using GET method in in jsp?
Thank u in advance
regards
saradhi
 
Nagurva Reddy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
don't say
out.println(request.getQueryString("x"))
say
out.println(request.getQueryString());
(or)
out.println(request.getParameter("x"));
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regardless, I've found that trying to provide extra info in the action attribute is browser dependent. You may or may not get the data passed on.
It's much better to include it as a hidden field in the page.
Dave.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!