If CheckURL1 is the url to your servlet 
you should use something like:

out.println("document.location=\"");
out.println(response.encodeUrl("CheckURL1?myReferer=test"));
// The call to encodeUrl ensures that the link will contain 
// the session id if the browser has cookies disabled.
// The separator between the servlet and the first parameter 
// is ?. All further params are separated by &
// e.g.: "CheckURL1?myReferer=test&age=18"
out.println("\";");

> -----Urspr�ngliche Nachricht-----
> Von: Maria Tan [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 30. Juli 2002 16:55
> An: Tomcat Users List
> Betreff: RE: getHeader("Referer") and document location
>
> Would you mind tell me how to urlEncode the my second servlet 
> URL in the javascript.
<snip/> 
> out.println("<SCRIPT LANGUAGE=\"JavaScript\">");
> out.println("function loadcheckmodificationservlet()");
> out.println("{");        
> out.println("document.location=\"CheckURL1&myReferer=test\";");
> out.println("}");
> out.println("</script>");
> 
<snip/> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to