聚合物入门套件路由问题

Polymer starter kit routing issue

我正在使用 Polymer 入门套件代码并通过 主页、联系人 用户菜单 获取 GUI。我在 Eclipse 中使用 Java 动态 Web 项目。所以基础 url 是:

我尝试将 app.js 文件中的默认基础 url 设置为:

如果在 routing.html 中,我会进行以下更改: -

page('/TestProject/', function() {
          app.route = 'home';
          setFocus(app.route);
        });

没有任何变化。但是如果我改变 index.html:

<paper-menu class="app-menu" attr-for-selected="data-route" selected="[[route]]">
      <a data-route="home" href="{{baseUrl}}TestProject">
        <iron-icon icon="home"></iron-icon>
        <span>Home</span>
      </a>

那么首页url就变成了:

http://localhost:8080/TestProject/#!/TestProject/

但应该是:

http://localhost:8080/TestProject/

http://localhost:8080/TestProject/#!/home

伙计们,我哪里错了。或者我应该在哪里进行更改以实现家庭url。
非常感谢。

较新版本的 PSK 在 router.html 中有以下部分:

// Removes end / from app.baseUrl which page.base requires for production
if (window.location.port === '') {  // if production
  page.base(app.baseUrl.replace(/\/$/, ''));
}

page('/',updateRedux, function() {
  page.redirect('/start');
});

page(app.baseUrl,updateRedux, function() {
  page.redirect('/start');
});