jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryuji Hattori<hatt...@hitachizosen.co.jp>
Subject how to tread with a multibyte string parameter in WebRequest.
Date Thu, 26 Jun 2003 05:22:15 GMT

Hello all.

I'm developping Java Servlet based Web Application with 
Japanese character and using Cactus for unit test of server
module. In testing a simple string matching test between 
a string sent as a http request parameter and the same contant 
string value with the parameter one prepared in server side 
test code, with the string of single byte character the test 
works well. but with the string of multibyte the same test
does not work well, fails for some reason. the test case is 
simple one. for instance

    public void beginEncodingTest1(WebRequest theRequest) throws Exception {
	String str = %something to test %....
        theRequest.addParameter("test1", str);

    public void testEncodingTest1() throws Exception {	
	String str = comms.request.getParameter("test1");
	assertEquals(%test string set in begin methods..%, str);
my enviroment is 

OS: 		Windows 2000 SP3
JDK:		JDK1.4.1_003 for Windows
AppServer:  	Enhydra 5.0
Cactus: 	cactus 1.4.1 
 		(+ original extension package for Enhydra Application)  	

please advice me.

With regards.

********* smile brings (^o^) happiness.************
Ryuji Hattori
in Hitz Technical Lab(hattori@hitachizosen.co.jp)        


View raw message