Berkeley CSUA MOTD:Entry 26965
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/31 [General] UID:1000 Activity:popular
5/31    

2003/1/2 [Uncategorized] UID:26965 Activity:high
1/02    Is there a generally accepted way to embed a URL into a GET
        request?  I want to put a url such as "foo.jsp?cmd=1&id=2"
        into a GET request as a parameter, eg:
        http://bar.com/index.jsp?pageId=34&URL=foo.jsp?cmd=1&id=2
        but I'm worried that the parameters in the main page will be
        parsed as
        pageId == 34
        URL == foo.jsp?cmd=1
        id == 2                 //wrong
        So is there a "good" way to do this, or do I have to muck about
        with quoting and string substitution?
        \_ You'd have to HTML-escape the ?'s and &'s, or else use different
           delimiters and have your program parse them.  -tom
           \_ tom designed the HTML spec.
              \_ I heard it was Jesus who gave it to him.
Cache (249 bytes)
bar.com/index.jsp?pageId=34&URL=foo.jsp?cmd=1&id=2
The page cannot be found The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please try the following: * If you typed the page address in the Address bar, make sure that it is spelled correctly.