View File | Revision Log | Show Annotations | Download File | View Changeset
/hippo/attic/forge/hstlogin/hstlogin/tags/hstlogin-1.01.01/src/site/xdoc/usage.xml
Revision: 58788
Committed: Thu Mar 2 21:08:50 2017 UTC (2 years, 6 months ago) by jhoffman
Content type: text/xml
File size: 6138 byte(s)
Log Message:
Moved project from forge.onehippo.org/svn/ without history

File Contents

# Content
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE document PUBLIC
3 "-//Apache Software Foundation//DTD XDOC 1.0//EN"
4 "http://maven.apache.org/dtd/xdoc_1_0.dtd">
5 <!--
6 Copyright 2009 Hippo Licensed under the Apache License, Version
7 2.0 (the "License"); you may not use this file except in
8 compliance with the License. You may obtain a copy of the
9 License at http://www.apache.org/licenses/LICENSE-2.0 Unless
10 required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS"
12 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 express or implied. See the License for the specific language
14 governing permissions and limitations under the License.
15 -->
16 <document>
17 <properties>
18 <title>Usage Instructions</title>
19 </properties>
20 <body>
21 <section name="Usage">
22 <subsection name="Prerequisites">
23 <p>
24 These instruction assume that you have an HST project based on the HST
25 archetype, i.e.
26 a Maven multiproject consisting of three submodules: cms, site and
27 content.
28 </p>
29 </subsection>
30
31 <subsection name="Installation">
32 <ol>
33 <li>
34 <p>
35 Add to the pom.xml of your
36 <i>site</i>
37 module:
38 </p>
39 <source><![CDATA[
40 <dependency>
41 <groupId>org.onehippo.forge</groupId>
42 <artifactId>hstlogin</artifactId>
43 <version>1.01.00</version>
44 </dependency>]]></source>
45 </li>
46 <li>
47 <p>
48 Add the following code in your web.xml of your site
49 </p>
50 <source><![CDATA[
51 <servlet>
52 <servlet-name>LoginProxyServlet</servlet-name>
53 <servlet-class>org.onehippo.forge.servlets.LoginProxyServlet</servlet-class>
54 </servlet>
55
56 <servlet>
57 <servlet-name>LoginRedirectorServlet</servlet-name>
58 <servlet-class>org.onehippo.forge.servlets.LoginRedirectorServlet</servlet-class>
59 </servlet>
60
61 <servlet>
62 <servlet-name>LoginServlet</servlet-name>
63 <servlet-class>org.onehippo.forge.servlets.LoginServlet</servlet-class>
64 </servlet>
65
66 <servlet>
67 <servlet-name>LogoutServlet</servlet-name>
68 <servlet-class>org.onehippo.forge.servlets.LogoutServlet</servlet-class>
69 </servlet>
70
71 <servlet-mapping>
72 <servlet-name>LoginRedirectorServlet</servlet-name>
73 <url-pattern>/login/redirector</url-pattern>
74 </servlet-mapping>
75
76 <servlet-mapping>
77 <servlet-name>LoginProxyServlet</servlet-name>
78 <url-pattern>/login/proxy</url-pattern>
79 </servlet-mapping>
80
81 <servlet-mapping>
82 <servlet-name>LoginServlet</servlet-name>
83 <url-pattern>/login/login</url-pattern>
84 </servlet-mapping>
85
86 <servlet-mapping>
87 <servlet-name>LogoutServlet</servlet-name>
88 <url-pattern>/logout</url-pattern>
89 </servlet-mapping>]]></source>
90 </li>
91 <li>
92 <p>
93 Copy
94 <a href="downloads/login.jsp">login.jsp</a>
95 to
96 <i>src/main/webapp/jsp/templates/</i>
97 in your
98 <i>site</i>
99 module.
100 </p>
101 </li>
102 <li>
103 <p>Add the following beans to the
104 beans-annotated-classes.xml</p>
105 <source><![CDATA[
106 <annotated-class>org.onehippo.forge.robotstxt.annotated.Robotstxt</annotated-class>
107 <annotated-class>org.onehippo.forge.robotstxt.annotated.Section</annotated-class>]]></source>
108 </li>
109 <li>
110 <p>
111 Rebuild your project using Maven.
112 </p>
113 </li>
114 <li>
115 In the CMS create a file
116 <i>robots.txt</i>
117 and add configuration, for example:
118 <br />
119 User-agent: *
120 <br />
121 Disallow: /donotindex
122 </li>
123 <li>
124 In the HST editor add configuration for
125 robots.txt
126 <ul>
127 <li>Add a template "robotstxt" with
128 renderpath
129 jsp/templates/robotstxt.jsp</li>
130 <li>Add a Web Page Design "robotstxt" with
131 componentclassname
132 "org.onehippo.forge.robotstxt.components.RobotstxtComponent"
133 and
134 template "robotstxt"</li>
135 <li>Add a URL Design with Level pattern
136 "robots.txt", Content
137 path &lt;path to the robots.txt file&gt;, Template "robotstxt"</li>
138 </ul>
139 </li>
140 </ol>
141
142 </subsection>
143
144
145 <subsection name="Admire the result">
146 <p>
147 Open your site in your browser, and check out the
148 test page!
149 <a href="http://localhost:8085/site/preview/robots.txt">http://localhost:8085/site/preview/robots.txt
150 </a>
151 </p>
152 <pre>
153 User-agent: *
154 Disallow: /donotindex/
155 Disallow: /search/
156
157 User-agent: Googlebot
158 Disallow: /hide/for/googlebot/
159
160 User-agent: EvilBot
161 Disallow: /
162 </pre>
163 </subsection>
164
165
166 </section>
167 </body>
168 </document>

Properties

Name Value
svn:eol-style native
svn:keywords Id