The home page of nutch is ugly and implements some basic pages, like Baidu. If you perform secondary development on it, you have to read the source code and then repackage build. XML in Tomcat to release it. Of course. Here I have read and write it.
Pages in the nutch are written in XSLT and written in the source code src/web/style/nutch-page.xsl. Here there is a source code in the XSL format. Here you should understand the basic structure of it, otherwise it will fail to build. xml. So you have to try it step by step.
Basic Structure:
<? XML version = "1.0"?>
<XSL: stylesheet xmlns: XSL = "http://www.w3.org/1999/XSL/Transform"
Version = "1.0">
<XSL: output method = "html" doctype-Public = "-// W3C // dtd html 4.01 transitional // en"/>
<XSL: template match = "page">
<HTML>
<XSL: Comment>
This page is automatically generated. Do not edit!
</XSL: Comment>
<Head>
<! -- Page title -->
<Title>
<XSL: Text> your own title
</XSL: Text>
<XSL: value-of select = "title" Disable-output-escaping = "yes"/>
</Title>
<! -- Insert style insert your style
-->
<XSL: copy-of select = "document ('../include/style.html')"/>
<! -- Specify icon file introduces JS package
-->
<Script language = "JavaScript" src = "../resources/JS/navMore-min.js"> </SCRIPT>
<SCRIPT src = "../resources/JS/autoComplete-min.js"> </SCRIPT>
<SCRIPT src = "../resources/JS/goso-slide-min.js"> </SCRIPT>
<SCRIPT src = "../resources/JS/goso-waterMark-min.js"> </SCRIPT>
<SCRIPT src = "../resources/JS/helpers-min.js"> </SCRIPT>
<Script language = "JavaScript" src = "../resources/JS/index. js"> </SCRIPT>
<SCRIPT type = "text/JavaScript">
<XSL: Comment>
Function queryfocus (){
Search = Document. search;
If (search! = NULL) {search. query. Focus ();}
}
<XSL: Text> // </XSL: Text>
</XSL: Comment>
</SCRIPT>
</Head>
<Body class = "homelink" onLoad = "queryfocus ();">
<XSL: Call-Template Name = "body"/>
<XSL: copy-of select = "document ('../include/footer.html')"/>
</Body>
</Html>
</XSL: Template>
<! -- Included menu -->
<XSL: Template Name = "subnavi">
</XSL: Template>
<! --/Sorted ded menu -->
<! -- Included body -->
<XSL: Template Name = "body">
Your body
</XSL: Template>
<! --/Included body -->
</XSL: stylesheet>
I made a simple addition, deletion, and you should be able to see its changes carefully.
In this way, the re-packaging and deployment should be fine.