Results 1 to 3 of 3
  1. #1
    jjsaw5 is offline Member
    Join Date
    Aug 2007
    Posts
    2
    Rep Power
    0

    Default alphabetizing parameters

    Hello,

    I am very new to Java and my knowledge of it is VERY limited. I have been asked to try and develope a Java method that will take the URL string and alphabetizes the parameters. I have no idea where to start or even where to look to try and help myself out. Any help would be greatly appreciated.

  2. #2
    Join Date
    Aug 2007
    Posts
    25
    Rep Power
    0

    Default

    The String class has many useful methods for this sort of thing. I don't want to do your homework for you, but here are some pointers:

    URL parameters are easy to find in a URL, e.g. prefix.yoururl.whatever<b>?param1=value1&param2=va lue2&param3=value3</b>


    Try

    1. Converting the URL to a string.
    2. Clipping the string at the question-mark, to retain just the parameter list.
    3. Using the indexOf method (for example, you could also use regular expressions to great effect here) to split the remainder into parameters and values.

    Good Luck,

    Joe

  3. #3
    jjsaw5 is offline Member
    Join Date
    Aug 2007
    Posts
    2
    Rep Power
    0

    Default

    what do you think about about using the String.split() method?

Similar Threads

  1. NULL Value Of parameters
    By riders in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-14-2008, 03:29 PM
  2. Hiding parameters from URL
    By Saurabh321 in forum New To Java
    Replies: 0
    Last Post: 02-05-2008, 01:43 PM
  3. Alphabetizing
    By carderne in forum New To Java
    Replies: 3
    Last Post: 11-07-2007, 08:21 AM
  4. get parameters in jsp
    By cecily in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-05-2007, 05:29 AM

Posting Permissions

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