我有一个JBoss AS7.1 Web应用程序。我想使其更安全,因此我在web.xml中添加了一些属性。
checkVisible = (isVisible) => {
if(isVisible){
if(!this.state.visible){
this.setState({visible: true});
}
}else{
if(this.state.visible){
this.setState({visible: false});
}
}
}
render() {
return (
<ScrollView style={{flex: 1}}>
<InViewPort onChange={(isVisible) => this.checkVisible(isVisible)}>
<View style={{flex: 1, height: 200, backgroundColor: 'blue'}}>
<Text style={{color: 'white'}}>View is visible? {this.state.visible}</Text>
</View>
</InViewPort>
<InViewPort onChange={(isVisible) => this.checkVisible(isVisible)}>
<View style={{flex: 1, height: 200, backgroundColor: 'green'}}>
<Text style={{color: 'white'}}>View is visible? {this.state.visible}</Text>
</View>
</InViewPort>
<InViewPort onChange={(isVisible) => this.checkVisible(isVisible)}>
<View style={{flex: 1, height: 200, backgroundColor: 'red'}}>
<Text style={{color: 'white'}}>View is visible? {this.state.visible}</Text>
</View>
</InViewPort>
<InViewPort onChange={onChange={(isVisible) => this.checkVisible(isVisible)}>
<View style={{flex: 1, height: 200, backgroundColor: 'orange'}}>
<Text style={{color: 'white'}}>View is visible? {this.state.visible}</Text>
</View>
</InViewPort>
<InViewPort onChange={(isVisible) => this.checkVisible(isVisible)}>
<View style={{flex: 1, height: 200}}>
<Text>View is visible? {this.state.visible}</Text>
</View>
</InViewPort>
</ScrollView>
);
}
现在,我要检查“ SameSite”属性。我试图创建一个Servlet过滤器,在其中设置“ Set-Cookie”属性的标头,如How to set SameSite attribute?中所述 但它没有用。
任何人都知道,如何将“ SameSite”属性添加到在JBoss AS7.1上运行的JSF Web应用程序中?