Querystring through hyperlink


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Querystring through hyperlink

Hybrid View

  1. #1
    Sam Pearce Guest

    Querystring through hyperlink


    I am using an Apache Tomcat 4.0 Server.
    I am using JDK 1.3.1.

    The issue that I am trying to accomplish is to pass an integer number through
    a hyperlink by querystring.(EX: ?test=1. When I pass an integer value it
    goes to the next page and is treated as string. I get the String value by
    declaring a String testing= request.getParameter("test"); Then I use the
    Integer.parseInt to covert the information back to an integer. Here is when
    I run into a problem. When I pass it into a function for a select query operation
    , then it comes up with a java.lang.NullPointerException then it says the
    integer value is NULL. I have been beating my brains with the syntax. Help
    would be much appreciated.

  2. #2
    Tony John Guest

    Re: Querystring through hyperlink


    Need more details such as code snipper or something.


    "Sam Pearce" <sampearce@yahoo.com> wrote:
    >
    >I am using an Apache Tomcat 4.0 Server.
    >I am using JDK 1.3.1.
    >
    >The issue that I am trying to accomplish is to pass an integer number through
    >a hyperlink by querystring.(EX: ?test=1. When I pass an integer value it
    >goes to the next page and is treated as string. I get the String value by
    >declaring a String testing= request.getParameter("test"); Then I use the
    >Integer.parseInt to covert the information back to an integer. Here is when
    >I run into a problem. When I pass it into a function for a select query

    operation
    >, then it comes up with a java.lang.NullPointerException then it says the
    >integer value is NULL. I have been beating my brains with the syntax. Help
    >would be much appreciated.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center