1

JSF 1.1 を使用してツールを開発していますが、この問題が発生しています。次のように出力されるバッキング Bean に文字列があります。

./src.cpp: In function ‘int main()’:
./src.cpp:4: error: ‘dsdada’ was not declared in this scope

txt ファイルで。

しかし、ah:inputTextArea に配置すると、次のようになります。

./src.cpp: In function ‘int main()’:
./src.cpp:4: error: ‘dsdada’ was not declared in this scope

-

<%@ page contentType="text/html;charset=UTF-8" %>
and this
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>

しかし、それもうまくいきませんでした。誰かがこれを修正する方法を教えてもらえますか。ありがとう

/* String[0] as stdout, String[1] as stderr */
String[] results = sshBO.execCommand(cmd, timeout);

/* Done with SSH things */
sshBO.closeSession();

/* Bring the output and err to the presentation */
msg = results[1]+results[0];
FileServices.saveStringToFile("F:/myoutput.txt", msg);
msg = new String(msg.getBytes("UTF8"), "UTF8"); /* makes no difference */

JSP ページ:

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai" %>

<f:view >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
...

<h:inputTextarea disabled="true" value="#{SSH.msg}" styleClass="myTextArea" />
4

2 に答える 2

1
于 2011-05-15T14:54:02.380 に答える
0
于 2012-06-18T08:46:10.660 に答える