Results 1 to 5 of 5

Thread: Retrieving URL Query String

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    50

    Retrieving URL Query String

    How do I retrieve URL query values in Java?
    Keep in mind that javax.servlet.http.HttpUtils is no longer useable in Java (deprecated).

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You mean the part after '?'?

    URL.getQuery and parse.

    Servlets have all values already stored somewhere.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    50
    Ok, let me explain.

    I have a JApplet on a webpage. There is data in the URL (query string), how can my JApplet get those values?
    Example: "http://webpage.com/myAppletPage.html?param=some_value"

    How do I retrieve "some_value" from the query string?

  4. #4

    Thread Starter
    Member
    Join Date
    Jul 2002
    Posts
    50
    Isn't there anyway to get data from an HTML form into a Java Applet on another page?!?

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Told you. Use StringTokenizer to parse it yourself. It's not really hard, the hardest part is are the % replacements.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width