Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在OpenSearchDescription xml文件中定义关键字?_Java_Google Chrome_Keyword_Opensearch_Opensearchdescription - Fatal编程技术网

Java 如何在OpenSearchDescription xml文件中定义关键字?

Java 如何在OpenSearchDescription xml文件中定义关键字?,java,google-chrome,keyword,opensearch,opensearchdescription,Java,Google Chrome,Keyword,Opensearch,Opensearchdescription,我正在尝试获得一个开放式搜索定义来处理子域 我已经在html的末尾添加了正确的行 例如: <%@ page isELIgnored="false" %> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>title</title> <link rel="search&

我正在尝试获得一个开放式搜索定义来处理子域

我已经在html的末尾添加了正确的行

例如:

<%@ page isELIgnored="false" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>title</title>
   <link rel="search"
        type="application/opensearchdescription+xml"
        href="http://www.example.org/opensearch.xml"
        title="Example" />
</head>
<body>

</body>
</html>

标题
在opensearch.xml中:

<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Example</ShortName>
<Description>Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<LongName>Search</LongName>
<Url type="text/html" method="get" template="http://www.example.org/search/{searchTerms}"/>
</OpenSearchDescription>

例子
搜寻
UTF-8
搜寻
当我访问Google Chrome时,搜索被正确地添加到omnibox设置中。触发器关键字变为“example.org”

但是,当我访问时(在中有相同的行),搜索会添加触发器关键字“subdomain.example.org”,而不是“example.org”

有办法解决这个问题吗

我在的文档中没有找到关于如何设置触发器关键字的任何信息

我知道如何将默认关键字更改为其他关键字。 我怎么做