This is normal behaviour; the "#" has a special significance, i.e. tells
browsers to jump directly to an anchor within the page, therefore anything
from the "#" onwards will not be sent to the servlet. You need to escape
characters like this (and "&", "?", etc) by using the "%nn" notation, so in
this case:
"window.location='homepage://test.html?key1=value1%23&key2=value2'"
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Jonnalagadda Pradeep.
Sent: 07 February 2001 16:46
To: [EMAIL PROTECTED]
Subject: Re: URL Problem
try this:
var val1=eval(value1 +"#");
and invoke the servlet with
window.location="homepage://test.html?key1="+val1+"&key2="+value2
u should get it
> -----Original Message-----
> From: happyone W [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, February 06, 2001 12:02 AM
> To: [EMAIL PROTECTED]
> Subject: URL Problem
>
> Hi,
> When I use
> "window.location='homepage://test.html?key1=value1#&key2=value2'" to
> invoke the doGet() of my testServlet,
> when I use getParameter("key1") to get the value of key1,I only get String
> "value1" the "#" is missing!How can I avoid this?
>
> thx a lot!
>
> happyone
>
> _____________________________________________
> 263Commail£¬ÆóÒµµÄµç×ÓÓʼþר¼Ò http://mail.263.net
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html