BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

URL parameter

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Applet Issues
View previous topic :: View next topic  
Author Message
Owen
Guest





PostPosted: Tue Apr 20, 2004 5:22 pm    Post subject: URL parameter Reply with quote



Hello:

How can I get the full URL or the parameter from de ur, like this
http://somesite.com/testapplet.asp?para1=value1¶2=value2

I want to ger para1 and para2

Best Regards.
Owen.


Back to top
Lori M Olson (TeamB)
Guest





PostPosted: Wed Apr 21, 2004 4:22 am    Post subject: Re: URL parameter Reply with quote



Owen wrote:

Quote:
Hello:

How can I get the full URL or the parameter from de ur, like this
http://somesite.com/testapplet.asp?para1=value1¶2=value2

I want to ger para1 and para2

Best Regards.
Owen.



URL myUrl = new
URL("http://somesite.com/testapplet.asp?para1=value1¶2=value2");
String queryPart = myUrl.getQuery();

Then use a StringTokenizer to decompose the query into the parts you
want. Note that the query part of the URL is everything after the '?'

--

Regards,

Lori Olson (TeamB)

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html


Back to top
Owen
Guest





PostPosted: Wed Apr 21, 2004 8:21 pm    Post subject: Re: URL parameter Reply with quote



Thanks, but I read that already, I want to know How can I get the full URL
inside a applet, but you pass to URL constructor a const, I want to get the
URL dynamic.

Thanks
Owen.


"Lori M Olson (TeamB)" <javadragon (AT) techie (DOT) com> wrote

Quote:
Owen wrote:

Hello:

How can I get the full URL or the parameter from de ur, like this
http://somesite.com/testapplet.asp?para1=value1¶2=value2

I want to ger para1 and para2

Best Regards.
Owen.



URL myUrl = new
URL("http://somesite.com/testapplet.asp?para1=value1¶2=value2");
String queryPart = myUrl.getQuery();

Then use a StringTokenizer to decompose the query into the parts you
want. Note that the query part of the URL is everything after the '?'

--

Regards,

Lori Olson (TeamB)

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html




Back to top
Tor Iver Wilhelmsen
Guest





PostPosted: Thu Apr 22, 2004 6:39 am    Post subject: Re: URL parameter Reply with quote

"Owen" <anibal (AT) prensa-latina (DOT) cu> writes:

Quote:
Thanks, but I read that already, I want to know How can I get the full URL
inside a applet, but you pass to URL constructor a const, I want to get the
URL dynamic.

Inside an applet, look at the value returned by getDocumentBase().

Back to top
Owen
Guest





PostPosted: Thu Apr 22, 2004 4:32 pm    Post subject: Re: URL parameter Reply with quote

Thanks very much. it that what I want, really want

Owen.


"Tor Iver Wilhelmsen (TeamB)" <tor.wilhelmsen (AT) ergo (DOT) no> wrote

Quote:
"Owen" <anibal (AT) prensa-latina (DOT) cu> writes:

Thanks, but I read that already, I want to know How can I get the full
URL
inside a applet, but you pass to URL constructor a const, I want to get
the
URL dynamic.

Inside an applet, look at the value returned by getDocumentBase().



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Applet Issues All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.