我正在尝试运行管理控制台,但是我点击了管理按钮,空白浏览器打开时没有任何内容。我错过了什么?我查看了常见问题解答和论坛,但仍然无法解决问题。我有server.properties文件,我已将sqlserver.jar添加到lib
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='mysgwt'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name="com.smartgwt.tools.SmartGwtTools" />
<inherits name="com.smartgwtpower.SmartGwtPower" />
<inherits name="com.smartgwtpower.tools.Tools" />
<!-- Specify the app entry point class. -->
<entry-point class='org.kai.client.MySGWT' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
代码:
public class MySGWT implements EntryPoint {
private HLayout hLayout;
public void onModuleLoad() {
if (!GWT.isScript()) {
KeyIdentifier debugKey = new KeyIdentifier();
debugKey.setCtrlKey(true);
debugKey.setKeyName("D");
Page.registerKey(debugKey, new KeyCallback() {
public void execute(String keyName) {
SC.showConsole();
}
});
}
GWT.log("init OnLoadModule()...", null);
hLayout = new HLayout();
IButton adminButton = new IButton("Admin Console");
adminButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
com.smartgwtpower.tools.client.SCPOWER.openDataSourceConsole ();
}
});
IButton visualButton = new IButton("Visual Console");
visualButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
com.smartgwtpower.tools.client.SCPOWER.openVisualBuilder();
}
});
hLayout.setMembersMargin(20);
hLayout.addMember(adminButton);
hLayout.addMember(visualButton);
hLayout.draw();
}
}
代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="MySGWT.css">
<title>MySGWT Project</title>
<script> var isomorphicDir = "mySGWT/sc/"; </script>
<script type="text/javascript" language="javascript" src="mysgwt/mysgwt.nocache.js"></script>
</head>
<body>
<!-- OPTIONAL: include this if you want history support -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
<noscript>
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
</body>
</html>`
这是日食记录
log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext).
log4j:WARN Please initialize the log4j system properly.
[WARN] Aliased resource: file:/C:/myworkspace/mySGWT/war/mySGWT/sc/skins/Enterprise/images/button/button_Over_stretch.png==fil e:/C:/myworkspace/mySGWT/war/mysgwt/sc/skins/Enterprise/images/button/button_Over_stretch.png
[WARN] Aliased resource: file:/C:/myworkspace/mySGWT/war/mySGWT/sc/skins/Enterprise/images/button/button_Over_stretch.png==fil e:/C:/myworkspace/mySGWT/war/mysgwt/sc/skins/Enterprise/images/button/button_Over_stretch.png
[WARN] 404 - GET /mySGWT/sc/skins/Enterprise/images/button/button_Over_stretch.png (127.0.0.1) 1450 bytes