• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

request.getParameter()giving null

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i written below line in my jsp code:


<% ArrayList fileDisp1=(ArrayList)session.getAttribute("arrlist");
List list=new ArrayList();
list.addAll(fileDisp1);
Iterator iterValue=list.iterator();
while(iterValue.hasNext())
{
String dispValue=(String)iterValue.next();
%<
<a href="/DL"?FileName="<%=dispValue%>"< <%=dispValue%< </a<<%
}


inorder to get that value "dispValue" to the servlet,i wote like this:

String originalFileName=request.getParameter("dispvalue");
System.out.println(originalFileName);

when i run this ,it is printing "null" in System.out.println().
why it is so?
can anyone help?
Regards,
Sreelakshmi
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sreelakshmi kolla:
i written below line in my jsp code:


<% ArrayList fileDisp1=(ArrayList)session.getAttribute("arrlist");
List list=new ArrayList();
list.addAll(fileDisp1);
Iterator iterValue=list.iterator();
while(iterValue.hasNext())
{
String dispValue=(String)iterValue.next();
%<
<a href="/DL"?FileName="<%=dispValue%>"< <%=dispValue%< </a<<%
}


inorder to get that value "dispValue" to the servlet,i wote like this:

String originalFileName=request.getParameter("dispvalue");
System.out.println(originalFileName);

when i run this ,it is printing "null" in System.out.println().
why it is so?
can anyone help?
Regards,
Sreelakshmi



Your parameter's name is FileName and not dispvalue; use getParameter("FileName") instead.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic