Results 1 to 2 of 2
  1. #1
    nn12 is offline Member
    Join Date
    Sep 2008
    Posts
    85
    Rep Power
    0

    Default Unable to pass parameter to servlet through JSP

    hi, I have a a href tag which on clicking should pass a value to servlet. Here is my code in the JSP
    Java Code:
    <a href='Servlet?name=value'>CLick here</a>
    Here is my code in the servlet

    Java Code:
    String param= request.getParameter("name");
    The servlet gets executed properly, but my param values turns out to be null.

    Thank you

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    Are you sure the parameter hey ("name") is the same on both? Same case and all?
    List all the parameters that arrive at the servlet.

Similar Threads

  1. how to pass value of table cell as parameter/attribute
    By ajincoep in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 02-08-2011, 03:04 PM
  2. how to pass parameter from one jsp to another jsp
    By kader_sit in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-10-2010, 02:04 PM
  3. I can't seem to pass a file through a parameter
    By daletron3030 in forum New To Java
    Replies: 5
    Last Post: 01-15-2009, 06:07 AM
  4. Replies: 1
    Last Post: 08-22-2008, 06:28 PM
  5. How to pass two parameter in struts-config using dynaActionForm
    By 82rathi.angara in forum Web Frameworks
    Replies: 2
    Last Post: 06-10-2008, 02:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •