Thanks Carsten,
I was afraid someone was going to say that. That href is being created as part of a 
pretty complex xsl sheet so assuming using URLEncoding/Decoding isn't an option, is 
there any other way to handle it?!!!ie.by special chars and/or escape chars?(think 
I've tried them all already but just in case)..
Thanks again,
Kieran

-----Original Message-----
From: Carsten Lex [mailto:[EMAIL PROTECTED]
Sent: 24 June 2004 11:34
To: Tomcat Users List
Subject: Re: problem passing a param to a servlet


Hi Kieran,

use java.net.URLEncoder.encode("tic=3,tac-4,toe=8","UTF-8");
to encode your parameters before writing to HTML

when you receive Parameter then you have to use
java.net.URLDecoder.decode(request.getParameter("strgame"),"UTF-8")

Carsten

Kieran Buckley (AT/LMI) wrote:

>Hi,
>I am trying to pass a parameter string of structure , "tic=3,tac-4,toe=8" into a 
>servlet like as follows:
>
><a href="/myservlet?strgame=tic=3,tac=4,toe=8">
>I had this working on a windowns platform before I realised I should have escaped the 
>equals sign some way.Solaris platform tomcat threw a null pointer exception in 
>handling this value for the parameter strhgame.Is there a way for the subsequent 
>equals to be escaped so they can be seen as part of the value?
>
>Thanks,
>Kieran
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>

-- 

 



Mit freundlichen Gr��en

Dipl.Inform. Carsten Lex
Gesch�ftsf�hrer 
DeepWeb GmbH

------------------------
DeepWeb GmbH
Universit�t, Geb�ude 30
66123 Saarbr�cken

Tel.:  0681 - 302 6308
Mobil: 0163 - 33 37 002



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

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

Reply via email to