Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

JSP & is it a seperator

Options
  • 09-05-2007 3:22pm
    #1
    Registered Users Posts: 1,552 ✭✭✭


    Okay Im using request.getParameter to retrieve a value from an actual address entered in at the top of the screen.

    I was just wondering if Ive got this big long string with
    tryryrury&cmd=0

    would
    req.getParameter("cmd")

    return a string saying "0"?


Comments

  • Closed Accounts Posts: 291 ✭✭imeatingchips


    aye


  • Registered Users Posts: 139 ✭✭Higgsy


    Thats sounds about right.......

    Do you have a choice of whether or not you have to use JSP?


  • Registered Users Posts: 11,980 ✭✭✭✭Giblet


    You can do stuff like this as well
    Map<String,String[]> parameters = req.getParameterMap();
    for(String key: req.keySet()) 
    {      
           System.out.println("KEY: "+key+" - VALUE: "+parameters.get(key)[0]);
    }
    

    Which would list all parameters and their values, handy for checking multiple parameters.


  • Registered Users Posts: 1,552 ✭✭✭quinnd6


    Nope gotta use jsp.
    Cheers guys for the info.


  • Closed Accounts Posts: 4,655 ✭✭✭Ph3n0m


    dont forget that

    ${param.nameofparameter} also works well


  • Advertisement
Advertisement