onoke
04-11-2005, 11:19 PM
I am trying to get multibyte data throw from lzx to jsp by the "<form>" on lps3.0b1.
If i use the html, the jsp is able to get some multibyte data correctly. But in case of using lzx, the same jsp is not able to get it.
They would be like "???" characters.
I guess it causes the encoding mismatch between the lzx and jsp.
Then let me know, what is the encoding the lzx throw to the jsp? Or could i change it?
The sample of the jsp as following.
<%@ page import="java.util.*,java.io.*" %>
<%
request.setCharacterEncoding("x-sjis");
String key1 = ( String )request.getParameter( "in1" );
FileOutputStream fo = new FileOutputStream( "aaa.txt");
BufferedWriter fw = new BufferedWriter( new OutputStreamWriter( fo, "x-sjis" ));
fw.write( key1, 0, key1.length() );
fw.close();
fo.close();
%>
The sample of the lzx as following.
<?xml version="1.0" encoding="x-sjis"?>
<canvas bgcolor="0xeaeaea" width="640">
<dataset name="echoer" src="http:echo.jsp"/>
<tabs id="tb" x="40" y="$once{tt.y + tt.height}">
<tabpane text="input form">
<form id="ex1">
<submit name="submitter" data="${echoer}"/>
<edittext name="in1"></edittext>
<button isdefault="true" onclick="parent.submitter.submit()">登録</button>
</form>
</tabpane>
</tabs>
</canvas>
And the sample of the html as following.
<html>
<head></head>
<body>
<form method="post" action="aaa.jsp">
<input type="text" name="in1">
<input type="submit" value="submit">
</form>
</body>
</html>
Any advice thanks.
If i use the html, the jsp is able to get some multibyte data correctly. But in case of using lzx, the same jsp is not able to get it.
They would be like "???" characters.
I guess it causes the encoding mismatch between the lzx and jsp.
Then let me know, what is the encoding the lzx throw to the jsp? Or could i change it?
The sample of the jsp as following.
<%@ page import="java.util.*,java.io.*" %>
<%
request.setCharacterEncoding("x-sjis");
String key1 = ( String )request.getParameter( "in1" );
FileOutputStream fo = new FileOutputStream( "aaa.txt");
BufferedWriter fw = new BufferedWriter( new OutputStreamWriter( fo, "x-sjis" ));
fw.write( key1, 0, key1.length() );
fw.close();
fo.close();
%>
The sample of the lzx as following.
<?xml version="1.0" encoding="x-sjis"?>
<canvas bgcolor="0xeaeaea" width="640">
<dataset name="echoer" src="http:echo.jsp"/>
<tabs id="tb" x="40" y="$once{tt.y + tt.height}">
<tabpane text="input form">
<form id="ex1">
<submit name="submitter" data="${echoer}"/>
<edittext name="in1"></edittext>
<button isdefault="true" onclick="parent.submitter.submit()">登録</button>
</form>
</tabpane>
</tabs>
</canvas>
And the sample of the html as following.
<html>
<head></head>
<body>
<form method="post" action="aaa.jsp">
<input type="text" name="in1">
<input type="submit" value="submit">
</form>
</body>
</html>
Any advice thanks.