由于Tomcat 8.0寿命已尽,我想直接将应用程序升级到Tomcat 9。
当我将基于Java的App从本地部署到服务器时,我有一个脚本覆盖了server.xml。我将服务器升级到tomcat 9,并尝试将应用程序放入其中,但是尝试启动它时出现错误。
var pie = d3.pie()
.sort(null)
.value(d => this.width);
var arc = d3Shape.arc()
.innerRadius(this.innerRadius)
.outerRadius(function (d) {
return (this.radius - this.innerRadius) * (88 / 100.0) + this.innerRadius;
});
var outlineArc = d3Shape.arc()
.innerRadius(this.innerRadius)
.outerRadius(this.radius);
var svg = d3.select("#id1").append("svg")
.attr("width", this.width)
.attr("height", this.height)
.attr('viewBox', '0 0 ' + Math.min(this.width, this.height) + ' ' + Math.min(this.width, this.height))
.data(data)
.enter()
.append("g")
.attr("transform", "translate(" + Math.min(this.width, this.height) / 2 + "," + Math.min(this.width, this.height) / 2 + ")");
d3.json(data, function (data) {
data.forEach(function (d) {
d.id = d.id;
d.order = parseFloat(d.order);
d.color = d.color;
d.weight = parseFloat(d.weight);
d.score = parseFloat(d.score);
d.width = parseFloat(d.weight);
d.label = d.label;
});
var path = svg.selectAll(".solidArc")
.data(pie(data))
.enter().append("path")
.attr("fill", function(d) { return data.color ; })
.attr("class", "solidArc")
.attr("stroke", "black")
.attr("d", <any>arc);
var outerPath = svg.selectAll(".outlineArc")
.data(pie(data))
.enter().append("path")
.attr("fill", "none")
.attr("stroke", "black")
.attr("class", "outlineArc")
.attr("d", <any>outlineArc);
var score =
data.reduce(function (a, b) {
//console.log('a:' + a + ', b.score: ' + b.score + ', b.weight: ' + b.weight);
return a + (b.score * b.weight);
}, 0) /
data.reduce(function (a, b) {
return a + b.weight;
}, 0);
svg.append("svg:text")
.attr("class", "aster-score")
.attr("dy", ".35em")
.attr("text-anchor", "middle") // text-align: right
.text(Math.round(score))
});
}
}
Tomcat 9不知道JasperListener。我搜索了此问题,并从apache找到了“ Jasper How to”页面,但我不明白。现在是否已安装Jasper,而无需在server.xml中插入JasperListener?从Tomcat 8升级到9时,我还需要更新其他内容吗?
答案 0 :(得分:0)
org.apache.catalina.core.JasperListener不再需要。因此,如果您的server.xml中存在该文件-请注释掉它!