$FileMakerCtrl->setServerPage("http://" . $ip . ":8080/JavaBridge/poserver.zz");
//此行必须,设置服务器页面
java_set_file_encoding("GBK");
//设置中文编码,若涉及到中文必须设置中文编码
$id = $_REQUEST["id"];
$filepath = "doc/" . $id . "/" . date('Ymd', time());
$type = $_REQUEST['type'];
$doc = new Java("com.zhuozhengsoft.pageoffice.wordwriter.WordDocument");
//声明WordDocument变量
$FileMakerCtrl->UserAgent = $_SERVER['HTTP_USER_AGENT'];
//禁用右击事件
$doc->setDisableWindowRightClick(true);
//给数据区域赋值,即把数据填充到模板中相应的位置
//$doc->openDataRegion("PO_company")->setValue("北京卓正志远软件有限公司");
$FileMakerCtrl->setSaveFilePage("SaveMaker.php?id=" . $id . "&type=" . $type);
$FileMakerCtrl->setWriter($doc);
$FileMakerCtrl->setJsFunction_OnProgressComplete("OnProgressComplete()");
$DocumentOpenType = new Java("com.zhuozhengsoft.pageoffice.DocumentOpenType");
$FileMakerCtrl->fillDocument($filepath . "/" . $type . ".doc", $DocumentOpenType->Word);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<title>My JSP 'FileMaker.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
$PageOfficeCtrl->setServerPage("http://" . $ip . ":8080/JavaBridge/poserver.zz");
java_set_file_encoding("utf8");
$doc = new Java("com.zhuozhengsoft.pageoffice.wordwriter.WordDocument");
$dataRegion1 = $doc->openDataRegion("PO_question");
$dataRegion1->setEditing(true);
$dataRegion1->setValue("");
$dataRegion1->setSubmitAsFile(true);
$dataRegion2 = $doc->openDataRegion("PO_answer");
$dataRegion2->setEditing(true);
$dataRegion2->setValue("");
$dataRegion2->setSubmitAsFile(true);
$dataRegion3 = $doc->openDataRegion("PO_jiexi");
$dataRegion3->setEditing(true);
$dataRegion3->setValue("");
$dataRegion3->setSubmitAsFile(true);
$PageOfficeCtrl->setWriter($doc);
$PageOfficeCtrl->addCustomToolButton("uTeach编题区", "Save", 9);
$PageOfficeCtrl->setSaveDataPage("/Word/SaveData.php?id=" . $_SESSION['uid']);
$PageOfficeCtrl->setMenubar(false);
$PageOfficeCtrl->setTitlebar(false);
$PageOfficeCtrl->UserAgent = $_SERVER['HTTP_USER_AGENT'];
$OpenMode = new Java("com.zhuozhengsoft.pageoffice.OpenModeType");
$PageOfficeCtrl->webOpen($questionDocPath, $OpenMode->docSubmitForm, "张三");
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />