Thanks for the intriguing comments, Joseph. While they are all true, I am talking about Applet, not Servlet. Is there a way to do that in Applet?
Thanks again. -----Original Message----- From: Joseph Ottinger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 2:06 PM To: JDJList Subject: [jdjlist] Re: URL of the page that contains an applet I know it's very hard to believe, but the Servlet API does in fact give you the way to build a complete URL, including parameters, of the invoked resource. It doesn't give you the full URL, because that's not always accurate due to the fact that parameters can come via POST or GET - with GET, they're in the URL, with POST they're not. Check out the (very mysterious) HttpRequest object; if you look hard you'll see strangely named functions like "getParameterNames()" which - difficult to believe, but it's true! - will give you the names of all parameters passed to the resource. With the names in hand, you can do odd things like query their values. And if you can manage that, with sweat upon your brow, you can build a full query string (resolving all POSTed parameters to their GET equivalent, naturally) to your heart's content. >From: "Patrick Li" <[EMAIL PROTECTED]> >Reply-To: "JDJList" <[EMAIL PROTECTED]> >To: "JDJList" <[EMAIL PROTECTED]> >Subject: [jdjlist] URL of the page that contains an applet >Date: Wed, 21 Aug 2002 12:36:00 -0400 > >Hi, > >I am try to get the URL, including parameters passed to it, of the page >that contains an applet while running the applet itself. The form of url >will be something like this: > >http://host.com/default.htm?parm1=xxx.yyy > >I have searched a few books and google, but didn't get anywhere. Any >help is appreciated. > >Patrick > >To change your membership options, refer to: >http://www.sys-con.com/java/list.cfm ----------------------------------------------- Joseph B. Ottinger [EMAIL PROTECTED] http://enigmastation.com IT Consultant _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com To change your membership options, refer to: http://www.sys-con.com/java/list.cfm To change your membership options, refer to: http://www.sys-con.com/java/list.cfm
