#{...} is not allowed in template text

问题:

jsp页面引用 οnfοcus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-#{%d+1}',maxDate:'%y-%M-#{%d+180}'})"

特殊符号 # 识别不了,运行就报错下面错误:

#{...} is not allowed in template text

<td><input type="text" class="Wdate" placeholder="设置开学日期" name="termStartTime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-#{%d+1}',maxDate:'%y-%M-#{%d+180}'})"></td>
			

解决:

在 page 标签内添加:

deferredSyntaxAllowedAsLiteral="true"

<%@ page language="java" import="java.util.*,dao.*,model.*,servlet.*,util.*,static util.ConstantUtil.*" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" deferredSyntaxAllowedAsLiteral="true"%>

 

# ======================== Elasticsearch Configuration ========================= # # NOTE: Elasticsearch comes with reasonable defaults for most settings. # Before you set out to tweak and tune the configuration, make sure you # understand what are you trying to accomplish and the consequences. # # The primary way of configuring a node is via this file. This template lists # the most important settings you may want to configure for a production cluster. # # Please consult the documentation for further information on configuration options: # https://www.elastic.co/guide/en/elasticsearch/reference/index.html # # ---------------------------------- Cluster ----------------------------------- # # Use a descriptive name for your cluster: # #cluster.name: my-application cluster.name: douban-cluster # # ------------------------------------ Node ------------------------------------ # # Use a descriptive name for the node: # #node.name: node-1 node.name: windows-node # # Add custom attributes to the node: # #node.attr.rack: r1 # # ----------------------------------- Paths ------------------------------------ # # Path to directory where to store the data (separate multiple locations by comma): # #path.data: /path/to/data path.data: E:\elasticsearch-9.0.1-windows-x86_64\elasticsearch-9.0.1\data # # Path to log files: # #path.logs: /path/to/logs path.logs: E:\elasticsearch-9.0.1-windows-x86_64\elasticsearch-9.0.1\logs # # ----------------------------------- Memory ----------------------------------- # # Lock the memory on startup: # #bootstrap.memory_lock: true # # Make sure that the heap size is set to about half the memory available # on the system and that the owner of the process is allowed to use this # limit. # # Elasticsearch performs poorly when the system is swapping the memory. # # ---------------------------------- Network ----------------------------------- # # By default Elasticsearch is only accessible on localhost. Set a different # address here to expose this node on the network: # #network.host: 192.168.0.1 network.host: 0.0.0.0 # By default Elasticsearch listens for HTTP traffic on the first free port it # finds starting at 9200. Set a specific HTTP port here: # #http.port: 9200 http.port: 9200 # # For more information, consult the network module documentation. # # --------------------------------- Discovery ---------------------------------- # # Pass an initial list of hosts to perform discovery when this node is started: # The default list of hosts is ["127.0.0.1", "[::1]"] # # discovery.seed_hosts: ["host1", "host2"] # discovery.type: single-node # Bootstrap the cluster using an initial set of master-eligible nodes: # # # For more information, consult the discovery and cluster formation module documentation. # # ---------------------------------- Various ----------------------------------- # # Allow wildcard deletion of indices: # # action.destructive_requires_name: false #----------------------- BEGIN SECURITY AUTO CONFIGURATION ----------------------- # # The following settings, TLS certificates, and keys have been automatically # generated to configure Elasticsearch security features on 26-05-2025 02:15:52 # # -------------------------------------------------------------------------------- # Enable security features xpack.security.enabled: false xpack.security.enrollment.enabled: true # Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents xpack.security.http.ssl: enabled: true keystore.path: certs/http.p12 # Enable encryption and mutual authentication between cluster nodes xpack.security.transport.ssl: enabled: true verification_mode: certificate keystore.path: certs/transport.p12 truststore.path: certs/transport.p12 # Create a new cluster with the current node only # Additional nodes can still join the cluster later cluster.initial_master_nodes: ["DESKTOP-QRJI156"] # Allow HTTP API connections from anywhere # Connections are encrypted and require user authentication http.host: 0.0.0.0 # Allow other nodes to join the cluster from anywhere # Connections are encrypted and mutually authenticated #transport.host: 0.0.0.0 #----------------------- END SECURITY AUTO CONFIGURATION ------------------------- 运行出现[2025-05-26T15:23:17,442][ERROR][o.e.b.Elasticsearch ] [windows-node] fatal exception while booting Elasticsearchjava.lang.IllegalArgumentException: setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node] at org.elasticsearch.server@9.0.1/org.elasticsearch.cluster.coordination.ClusterBootstrapService.<init>(ClusterBootstrapService.java:88) at org.elasticsearch.server@9.0.1/org.elasticsearch.cluster.coordination.Coordinator.<init>(Coordinator.java:300) at org.elasticsearch.server@9.0.1/org.elasticsearch.discovery.DiscoveryModule.<init>(DiscoveryModule.java:188) at org.elasticsearch.server@9.0.1/org.elasticsearch.node.NodeConstruction.createDiscoveryModule(NodeConstruction.java:1600) at org.elasticsearch.server@9.0.1/org.elasticsearch.node.NodeConstruction.construct(NodeConstruction.java:1069) See logs for more details. ERROR: Elasticsearch did not exit normally - check the logs at E:\elasticsearch-9.0.1-windows-x86_64\elasticsearch-9.0.1\logs\douban-cluster.log
最新发布
05-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值