qiny_sunspot_solr 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -0
  3. data/README.rdoc +24 -0
  4. data/bin/sunspot-installer +20 -0
  5. data/bin/sunspot-solr +80 -0
  6. data/lib/sunspot/solr/installer.rb +25 -0
  7. data/lib/sunspot/solr/installer/config_installer.rb +62 -0
  8. data/lib/sunspot/solr/installer/task_helper.rb +13 -0
  9. data/lib/sunspot/solr/java.rb +13 -0
  10. data/lib/sunspot/solr/railtie.rb +15 -0
  11. data/lib/sunspot/solr/server.rb +224 -0
  12. data/lib/sunspot/solr/tasks.rb +49 -0
  13. data/lib/sunspot_solr.rb +5 -0
  14. data/solr/README.txt +42 -0
  15. data/solr/contexts/solr.xml +8 -0
  16. data/solr/etc/jetty.xml +167 -0
  17. data/solr/etc/webdefault.xml +527 -0
  18. data/solr/lib/ext/jcl-over-slf4j-1.6.6.jar +0 -0
  19. data/solr/lib/ext/jul-to-slf4j-1.6.6.jar +0 -0
  20. data/solr/lib/ext/log4j-1.2.16.jar +0 -0
  21. data/solr/lib/ext/log4j.properties +19 -0
  22. data/solr/lib/ext/slf4j-api-1.6.6.jar +0 -0
  23. data/solr/lib/ext/slf4j-log4j12-1.6.6.jar +0 -0
  24. data/solr/lib/jetty-continuation-8.1.8.v20121106.jar +0 -0
  25. data/solr/lib/jetty-deploy-8.1.8.v20121106.jar +0 -0
  26. data/solr/lib/jetty-http-8.1.8.v20121106.jar +0 -0
  27. data/solr/lib/jetty-io-8.1.8.v20121106.jar +0 -0
  28. data/solr/lib/jetty-jmx-8.1.8.v20121106.jar +0 -0
  29. data/solr/lib/jetty-security-8.1.8.v20121106.jar +0 -0
  30. data/solr/lib/jetty-server-8.1.8.v20121106.jar +0 -0
  31. data/solr/lib/jetty-servlet-8.1.8.v20121106.jar +0 -0
  32. data/solr/lib/jetty-util-8.1.8.v20121106.jar +0 -0
  33. data/solr/lib/jetty-webapp-8.1.8.v20121106.jar +0 -0
  34. data/solr/lib/jetty-xml-8.1.8.v20121106.jar +0 -0
  35. data/solr/lib/jsp-2.1/ant-1.6.5.jar +0 -0
  36. data/solr/lib/jsp-2.1/core-3.1.1.jar +0 -0
  37. data/solr/lib/jsp-2.1/jsp-2.1.jar +0 -0
  38. data/solr/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
  39. data/solr/lib/servlet-api-3.0.jar +0 -0
  40. data/solr/solr/.gitignore +1 -0
  41. data/solr/solr/conf/admin-extra.html +31 -0
  42. data/solr/solr/conf/elevate.xml +36 -0
  43. data/solr/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  44. data/solr/solr/conf/protwords.txt +21 -0
  45. data/solr/solr/conf/schema.xml +262 -0
  46. data/solr/solr/conf/scripts.conf +24 -0
  47. data/solr/solr/conf/solrconfig.xml +667 -0
  48. data/solr/solr/conf/spellings.txt +2 -0
  49. data/solr/solr/conf/stopwords.txt +58 -0
  50. data/solr/solr/conf/synonyms.txt +31 -0
  51. data/solr/solr/conf/xslt/example.xsl +132 -0
  52. data/solr/solr/conf/xslt/example_atom.xsl +67 -0
  53. data/solr/solr/conf/xslt/example_rss.xsl +66 -0
  54. data/solr/solr/conf/xslt/luke.xsl +337 -0
  55. data/solr/solr/default/README.txt +54 -0
  56. data/solr/solr/dic/words.dic +149853 -0
  57. data/solr/solr/solr.xml +8 -0
  58. data/solr/start.jar +0 -0
  59. data/solr/webapps/solr.war +0 -0
  60. data/spec/server_spec.rb +98 -0
  61. data/spec/spec_helper.rb +18 -0
  62. data/sunspot_solr.gemspec +40 -0
  63. metadata +165 -0
@@ -0,0 +1,49 @@
1
+ namespace :sunspot do
2
+ namespace :solr do
3
+ desc 'Start the Solr instance'
4
+ task :start => :environment do
5
+ case RUBY_PLATFORM
6
+ when /w(in)?32$/, /java$/
7
+ abort("This command is not supported on #{RUBY_PLATFORM}. " +
8
+ "Use rake sunspot:solr:run to run Solr in the foreground.")
9
+ end
10
+
11
+ if defined?(Sunspot::Rails::Server)
12
+ Sunspot::Rails::Server.new.start
13
+ else
14
+ Sunspot::Solr::Server.new.start
15
+ end
16
+
17
+ puts "Successfully started Solr ..."
18
+ end
19
+
20
+ desc 'Run the Solr instance in the foreground'
21
+ task :run => :environment do
22
+ if defined?(Sunspot::Rails::Server)
23
+ Sunspot::Rails::Server.new.run
24
+ else
25
+ Sunspot::Solr::Server.new.run
26
+ end
27
+ end
28
+
29
+ desc 'Stop the Solr instance'
30
+ task :stop => :environment do
31
+ case RUBY_PLATFORM
32
+ when /w(in)?32$/, /java$/
33
+ abort("This command is not supported on #{RUBY_PLATFORM}. " +
34
+ "Use rake sunspot:solr:run to run Solr in the foreground.")
35
+ end
36
+
37
+ if defined?(Sunspot::Rails::Server)
38
+ Sunspot::Rails::Server.new.stop
39
+ else
40
+ Sunspot::Solr::Server.new.stop
41
+ end
42
+
43
+ puts "Successfully stopped Solr ..."
44
+ end
45
+
46
+ # for backwards compatibility
47
+ task :reindex => :"sunspot:reindex"
48
+ end
49
+ end
@@ -0,0 +1,5 @@
1
+ require 'sunspot/solr/server'
2
+
3
+ if defined?(Rails::Railtie)
4
+ require 'sunspot/solr/railtie'
5
+ end
data/solr/README.txt ADDED
@@ -0,0 +1,42 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ Solr example configuration
17
+ --------------------------
18
+
19
+ To run this example configuration, use
20
+
21
+ java -jar start.jar
22
+
23
+ in this directory, and when Solr is started connect to
24
+
25
+ http://localhost:8983/solr/admin/
26
+
27
+ To add documents to the index, use the post.sh script in the exampledocs
28
+ subdirectory (while Solr is running), for example:
29
+
30
+ cd exampledocs
31
+ ./post.sh *.xml
32
+
33
+ See also README.txt in the solr subdirectory, and check
34
+ http://wiki.apache.org/solr/SolrResources for a list of tutorials and
35
+ introductory articles.
36
+
37
+ NOTE: This Solr example server references SolrCell jars outside of the server
38
+ directory with <lib> statements in the solrconfig.xml. If you make a copy of
39
+ this example server and wish to use the ExtractingRequestHandler (SolrCell),
40
+ you will need to copy the required jars into solr/lib or update the paths to
41
+ the jars in your solrconfig.xml.
42
+
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
3
+ <Configure class="org.eclipse.jetty.webapp.WebAppContext">
4
+ <Set name="contextPath"><SystemProperty name="hostContext" default="/solr"/></Set>
5
+ <Set name="war"><SystemProperty name="jetty.home"/>/webapps/solr.war</Set>
6
+ <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"/>/etc/webdefault.xml</Set>
7
+ <Set name="tempDirectory"><Property name="jetty.home" default="."/>/solr-webapp</Set>
8
+ </Configure>
@@ -0,0 +1,167 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
3
+
4
+ <!-- =============================================================== -->
5
+ <!-- Configure the Jetty Server -->
6
+ <!-- -->
7
+ <!-- Documentation of this file format can be found at: -->
8
+ <!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax -->
9
+ <!-- -->
10
+ <!-- =============================================================== -->
11
+
12
+
13
+ <Configure id="Server" class="org.eclipse.jetty.server.Server">
14
+
15
+ <!-- =========================================================== -->
16
+ <!-- Server Thread Pool -->
17
+ <!-- =========================================================== -->
18
+ <Set name="ThreadPool">
19
+ <!-- Default queued blocking threadpool -->
20
+ <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
21
+ <Set name="minThreads">10</Set>
22
+ <Set name="maxThreads">10000</Set>
23
+ <Set name="detailedDump">false</Set>
24
+ </New>
25
+ </Set>
26
+
27
+ <!-- =========================================================== -->
28
+ <!-- Set connectors -->
29
+ <!-- =========================================================== -->
30
+
31
+ <!--
32
+ <Call name="addConnector">
33
+ <Arg>
34
+ <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
35
+ <Set name="host"><SystemProperty name="jetty.host" /></Set>
36
+ <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
37
+ <Set name="maxIdleTime">50000</Set>
38
+ <Set name="Acceptors">2</Set>
39
+ <Set name="statsOn">false</Set>
40
+ <Set name="confidentialPort">8443</Set>
41
+ <Set name="lowResourcesConnections">5000</Set>
42
+ <Set name="lowResourcesMaxIdleTime">5000</Set>
43
+ </New>
44
+ </Arg>
45
+ </Call>
46
+ -->
47
+
48
+ <!-- This connector is currently being used for Solr because it
49
+ showed better performance than nio.SelectChannelConnector
50
+ for typical Solr requests. -->
51
+ <Call name="addConnector">
52
+ <Arg>
53
+ <New class="org.eclipse.jetty.server.bio.SocketConnector">
54
+ <Set name="host"><SystemProperty name="jetty.host" /></Set>
55
+ <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
56
+ <Set name="maxIdleTime">50000</Set>
57
+ <Set name="lowResourceMaxIdleTime">1500</Set>
58
+ <Set name="statsOn">false</Set>
59
+ </New>
60
+ </Arg>
61
+ </Call>
62
+
63
+ <!-- =========================================================== -->
64
+ <!-- Set handler Collection Structure -->
65
+ <!-- =========================================================== -->
66
+ <Set name="handler">
67
+ <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
68
+ <Set name="handlers">
69
+ <Array type="org.eclipse.jetty.server.Handler">
70
+ <Item>
71
+ <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
72
+ </Item>
73
+ <Item>
74
+ <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
75
+ </Item>
76
+ <Item>
77
+ <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
78
+ </Item>
79
+ </Array>
80
+ </Set>
81
+ </New>
82
+ </Set>
83
+
84
+ <!-- =========================================================== -->
85
+ <!-- Configure Request Log -->
86
+ <!-- =========================================================== -->
87
+ <!--
88
+ <Ref id="Handlers">
89
+ <Call name="addHandler">
90
+ <Arg>
91
+ <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler">
92
+ <Set name="requestLog">
93
+ <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
94
+ <Set name="filename">
95
+ logs/request.yyyy_mm_dd.log
96
+ </Set>
97
+ <Set name="filenameDateFormat">yyyy_MM_dd</Set>
98
+ <Set name="retainDays">90</Set>
99
+ <Set name="append">true</Set>
100
+ <Set name="extended">false</Set>
101
+ <Set name="logCookies">false</Set>
102
+ <Set name="LogTimeZone">UTC</Set>
103
+ </New>
104
+ </Set>
105
+ </New>
106
+ </Arg>
107
+ </Call>
108
+ </Ref>
109
+ -->
110
+
111
+ <!-- =========================================================== -->
112
+ <!-- extra options -->
113
+ <!-- =========================================================== -->
114
+ <Set name="stopAtShutdown">true</Set>
115
+ <Set name="sendServerVersion">false</Set>
116
+ <Set name="sendDateHeader">false</Set>
117
+ <Set name="gracefulShutdown">1000</Set>
118
+ <Set name="dumpAfterStart">false</Set>
119
+ <Set name="dumpBeforeStop">false</Set>
120
+
121
+
122
+
123
+
124
+ <Call name="addBean">
125
+ <Arg>
126
+ <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
127
+ <Set name="contexts">
128
+ <Ref id="Contexts" />
129
+ </Set>
130
+ <Call name="setContextAttribute">
131
+ <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
132
+ <Arg>.*/servlet-api-[^/]*\.jar$</Arg>
133
+ </Call>
134
+
135
+
136
+ <!-- Add a customize step to the deployment lifecycle -->
137
+ <!-- uncomment and replace DebugBinding with your extended AppLifeCycle.Binding class
138
+ <Call name="insertLifeCycleNode">
139
+ <Arg>deployed</Arg>
140
+ <Arg>starting</Arg>
141
+ <Arg>customise</Arg>
142
+ </Call>
143
+ <Call name="addLifeCycleBinding">
144
+ <Arg>
145
+ <New class="org.eclipse.jetty.deploy.bindings.DebugBinding">
146
+ <Arg>customise</Arg>
147
+ </New>
148
+ </Arg>
149
+ </Call>
150
+ -->
151
+
152
+ </New>
153
+ </Arg>
154
+ </Call>
155
+
156
+ <Ref id="DeploymentManager">
157
+ <Call name="addAppProvider">
158
+ <Arg>
159
+ <New class="org.eclipse.jetty.deploy.providers.ContextProvider">
160
+ <Set name="monitoredDirName"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
161
+ <Set name="scanInterval">0</Set>
162
+ </New>
163
+ </Arg>
164
+ </Call>
165
+ </Ref>
166
+
167
+ </Configure>
@@ -0,0 +1,527 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?>
2
+
3
+ <!-- ===================================================================== -->
4
+ <!-- This file contains the default descriptor for web applications. -->
5
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
6
+ <!-- The intent of this descriptor is to include jetty specific or common -->
7
+ <!-- configuration for all webapps. If a context has a webdefault.xml -->
8
+ <!-- descriptor, it is applied before the contexts own web.xml file -->
9
+ <!-- -->
10
+ <!-- A context may be assigned a default descriptor by: -->
11
+ <!-- + Calling WebApplicationContext.setDefaultsDescriptor -->
12
+ <!-- + Passed an arg to addWebApplications -->
13
+ <!-- -->
14
+ <!-- This file is used both as the resource within the jetty.jar (which is -->
15
+ <!-- used as the default if no explicit defaults descriptor is set) and it -->
16
+ <!-- is copied to the etc directory of the Jetty distro and explicitly -->
17
+ <!-- by the jetty.xml file. -->
18
+ <!-- -->
19
+ <!-- ===================================================================== -->
20
+ <web-app
21
+ xmlns="http://java.sun.com/xml/ns/javaee"
22
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
24
+ metadata-complete="true"
25
+ version="2.5"
26
+ >
27
+
28
+ <description>
29
+ Default web.xml file.
30
+ This file is applied to a Web application before it's own WEB_INF/web.xml file
31
+ </description>
32
+
33
+ <!-- ==================================================================== -->
34
+ <!-- Removes static references to beans from javax.el.BeanELResolver to -->
35
+ <!-- ensure webapp classloader can be released on undeploy -->
36
+ <!-- ==================================================================== -->
37
+ <listener>
38
+ <listener-class>org.eclipse.jetty.servlet.listener.ELContextCleaner</listener-class>
39
+ </listener>
40
+
41
+ <!-- ==================================================================== -->
42
+ <!-- Removes static cache of Methods from java.beans.Introspector to -->
43
+ <!-- ensure webapp classloader can be released on undeploy -->
44
+ <!-- ==================================================================== -->
45
+ <listener>
46
+ <listener-class>org.eclipse.jetty.servlet.listener.IntrospectorCleaner</listener-class>
47
+ </listener>
48
+
49
+
50
+ <!-- ==================================================================== -->
51
+ <!-- Context params to control Session Cookies -->
52
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
53
+ <!--
54
+ UNCOMMENT TO ACTIVATE <context-param> <param-name>org.eclipse.jetty.servlet.SessionDomain</param-name> <param-value>127.0.0.1</param-value> </context-param> <context-param>
55
+ <param-name>org.eclipse.jetty.servlet.SessionPath</param-name> <param-value>/</param-value> </context-param> <context-param> <param-name>org.eclipse.jetty.servlet.MaxAge</param-name>
56
+ <param-value>-1</param-value> </context-param>
57
+ -->
58
+
59
+ <!-- ==================================================================== -->
60
+ <!-- The default servlet. -->
61
+ <!-- This servlet, normally mapped to /, provides the handling for static -->
62
+ <!-- content, OPTIONS and TRACE methods for the context. -->
63
+ <!-- The following initParameters are supported: -->
64
+ <!--
65
+ * acceptRanges If true, range requests and responses are
66
+ * supported
67
+ *
68
+ * dirAllowed If true, directory listings are returned if no
69
+ * welcome file is found. Else 403 Forbidden.
70
+ *
71
+ * welcomeServlets If true, attempt to dispatch to welcome files
72
+ * that are servlets, but only after no matching static
73
+ * resources could be found. If false, then a welcome
74
+ * file must exist on disk. If "exact", then exact
75
+ * servlet matches are supported without an existing file.
76
+ * Default is true.
77
+ *
78
+ * This must be false if you want directory listings,
79
+ * but have index.jsp in your welcome file list.
80
+ *
81
+ * redirectWelcome If true, welcome files are redirected rather than
82
+ * forwarded to.
83
+ *
84
+ * gzip If set to true, then static content will be served as
85
+ * gzip content encoded if a matching resource is
86
+ * found ending with ".gz"
87
+ *
88
+ * resourceBase Set to replace the context resource base
89
+ *
90
+ * resourceCache If set, this is a context attribute name, which the servlet
91
+ * will use to look for a shared ResourceCache instance.
92
+ *
93
+ * relativeResourceBase
94
+ * Set with a pathname relative to the base of the
95
+ * servlet context root. Useful for only serving static content out
96
+ * of only specific subdirectories.
97
+ *
98
+ * aliases If True, aliases of resources are allowed (eg. symbolic
99
+ * links and caps variations). May bypass security constraints.
100
+ *
101
+ * maxCacheSize The maximum total size of the cache or 0 for no cache.
102
+ * maxCachedFileSize The maximum size of a file to cache
103
+ * maxCachedFiles The maximum number of files to cache
104
+ *
105
+ * useFileMappedBuffer
106
+ * If set to true, it will use mapped file buffer to serve static content
107
+ * when using NIO connector. Setting this value to false means that
108
+ * a direct buffer will be used instead of a mapped file buffer.
109
+ * By default, this is set to true.
110
+ *
111
+ * cacheControl If set, all static content will have this value set as the cache-control
112
+ * header.
113
+ -->
114
+
115
+
116
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
117
+ <servlet>
118
+ <servlet-name>default</servlet-name>
119
+ <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
120
+ <init-param>
121
+ <param-name>aliases</param-name>
122
+ <param-value>false</param-value>
123
+ </init-param>
124
+ <init-param>
125
+ <param-name>acceptRanges</param-name>
126
+ <param-value>true</param-value>
127
+ </init-param>
128
+ <init-param>
129
+ <param-name>dirAllowed</param-name>
130
+ <param-value>true</param-value>
131
+ </init-param>
132
+ <init-param>
133
+ <param-name>welcomeServlets</param-name>
134
+ <param-value>false</param-value>
135
+ </init-param>
136
+ <init-param>
137
+ <param-name>redirectWelcome</param-name>
138
+ <param-value>false</param-value>
139
+ </init-param>
140
+ <init-param>
141
+ <param-name>maxCacheSize</param-name>
142
+ <param-value>256000000</param-value>
143
+ </init-param>
144
+ <init-param>
145
+ <param-name>maxCachedFileSize</param-name>
146
+ <param-value>200000000</param-value>
147
+ </init-param>
148
+ <init-param>
149
+ <param-name>maxCachedFiles</param-name>
150
+ <param-value>2048</param-value>
151
+ </init-param>
152
+ <init-param>
153
+ <param-name>gzip</param-name>
154
+ <param-value>true</param-value>
155
+ </init-param>
156
+ <init-param>
157
+ <param-name>useFileMappedBuffer</param-name>
158
+ <param-value>true</param-value>
159
+ </init-param>
160
+ <!--
161
+ <init-param>
162
+ <param-name>resourceCache</param-name>
163
+ <param-value>resourceCache</param-value>
164
+ </init-param>
165
+ -->
166
+ <!--
167
+ <init-param>
168
+ <param-name>cacheControl</param-name>
169
+ <param-value>max-age=3600,public</param-value>
170
+ </init-param>
171
+ -->
172
+ <load-on-startup>0</load-on-startup>
173
+ </servlet>
174
+
175
+ <servlet-mapping>
176
+ <servlet-name>default</servlet-name>
177
+ <url-pattern>/</url-pattern>
178
+ </servlet-mapping>
179
+
180
+
181
+ <!-- ==================================================================== -->
182
+ <!-- JSP Servlet -->
183
+ <!-- This is the jasper JSP servlet from the jakarta project -->
184
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
185
+ <!-- The JSP page compiler and execution servlet, which is the mechanism -->
186
+ <!-- used by Glassfish to support JSP pages. Traditionally, this servlet -->
187
+ <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
188
+ <!-- following initialization parameters (default values are in square -->
189
+ <!-- brackets): -->
190
+ <!-- -->
191
+ <!-- checkInterval If development is false and reloading is true, -->
192
+ <!-- background compiles are enabled. checkInterval -->
193
+ <!-- is the time in seconds between checks to see -->
194
+ <!-- if a JSP page needs to be recompiled. [300] -->
195
+ <!-- -->
196
+ <!-- compiler Which compiler Ant should use to compile JSP -->
197
+ <!-- pages. See the Ant documenation for more -->
198
+ <!-- information. [javac] -->
199
+ <!-- -->
200
+ <!-- classdebuginfo Should the class file be compiled with -->
201
+ <!-- debugging information? [true] -->
202
+ <!-- -->
203
+ <!-- classpath What class path should I use while compiling -->
204
+ <!-- generated servlets? [Created dynamically -->
205
+ <!-- based on the current web application] -->
206
+ <!-- Set to ? to make the container explicitly set -->
207
+ <!-- this parameter. -->
208
+ <!-- -->
209
+ <!-- development Is Jasper used in development mode (will check -->
210
+ <!-- for JSP modification on every access)? [true] -->
211
+ <!-- -->
212
+ <!-- enablePooling Determines whether tag handler pooling is -->
213
+ <!-- enabled [true] -->
214
+ <!-- -->
215
+ <!-- fork Tell Ant to fork compiles of JSP pages so that -->
216
+ <!-- a separate JVM is used for JSP page compiles -->
217
+ <!-- from the one Tomcat is running in. [true] -->
218
+ <!-- -->
219
+ <!-- ieClassId The class-id value to be sent to Internet -->
220
+ <!-- Explorer when using <jsp:plugin> tags. -->
221
+ <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
222
+ <!-- -->
223
+ <!-- javaEncoding Java file encoding to use for generating java -->
224
+ <!-- source files. [UTF-8] -->
225
+ <!-- -->
226
+ <!-- keepgenerated Should we keep the generated Java source code -->
227
+ <!-- for each page instead of deleting it? [true] -->
228
+ <!-- -->
229
+ <!-- logVerbosityLevel The level of detailed messages to be produced -->
230
+ <!-- by this servlet. Increasing levels cause the -->
231
+ <!-- generation of more messages. Valid values are -->
232
+ <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
233
+ <!-- [WARNING] -->
234
+ <!-- -->
235
+ <!-- mappedfile Should we generate static content with one -->
236
+ <!-- print statement per input line, to ease -->
237
+ <!-- debugging? [false] -->
238
+ <!-- -->
239
+ <!-- -->
240
+ <!-- reloading Should Jasper check for modified JSPs? [true] -->
241
+ <!-- -->
242
+ <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
243
+ <!-- debugging be suppressed? [false] -->
244
+ <!-- -->
245
+ <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
246
+ <!-- dumped to a file? [false] -->
247
+ <!-- False if suppressSmap is true -->
248
+ <!-- -->
249
+ <!-- scratchdir What scratch directory should we use when -->
250
+ <!-- compiling JSP pages? [default work directory -->
251
+ <!-- for the current web application] -->
252
+ <!-- -->
253
+ <!-- tagpoolMaxSize The maximum tag handler pool size [5] -->
254
+ <!-- -->
255
+ <!-- xpoweredBy Determines whether X-Powered-By response -->
256
+ <!-- header is added by generated servlet [false] -->
257
+ <!-- -->
258
+ <!-- If you wish to use Jikes to compile JSP pages: -->
259
+ <!-- Set the init parameter "compiler" to "jikes". Define -->
260
+ <!-- the property "-Dbuild.compiler.emacs=true" when starting Jetty -->
261
+ <!-- to cause Jikes to emit error messages in a format compatible with -->
262
+ <!-- Jasper. -->
263
+ <!-- If you get an error reporting that jikes can't use UTF-8 encoding, -->
264
+ <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
265
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
266
+ <servlet
267
+ id="jsp"
268
+ >
269
+ <servlet-name>jsp</servlet-name>
270
+ <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
271
+ <init-param>
272
+ <param-name>logVerbosityLevel</param-name>
273
+ <param-value>DEBUG</param-value>
274
+ </init-param>
275
+ <init-param>
276
+ <param-name>fork</param-name>
277
+ <param-value>false</param-value>
278
+ </init-param>
279
+ <init-param>
280
+ <param-name>xpoweredBy</param-name>
281
+ <param-value>false</param-value>
282
+ </init-param>
283
+ <!--
284
+ <init-param>
285
+ <param-name>classpath</param-name>
286
+ <param-value>?</param-value>
287
+ </init-param>
288
+ -->
289
+ <load-on-startup>0</load-on-startup>
290
+ </servlet>
291
+
292
+ <servlet-mapping>
293
+ <servlet-name>jsp</servlet-name>
294
+ <url-pattern>*.jsp</url-pattern>
295
+ <url-pattern>*.jspf</url-pattern>
296
+ <url-pattern>*.jspx</url-pattern>
297
+ <url-pattern>*.xsp</url-pattern>
298
+ <url-pattern>*.JSP</url-pattern>
299
+ <url-pattern>*.JSPF</url-pattern>
300
+ <url-pattern>*.JSPX</url-pattern>
301
+ <url-pattern>*.XSP</url-pattern>
302
+ </servlet-mapping>
303
+
304
+ <!-- ==================================================================== -->
305
+ <!-- Dynamic Servlet Invoker. -->
306
+ <!-- This servlet invokes anonymous servlets that have not been defined -->
307
+ <!-- in the web.xml or by other means. The first element of the pathInfo -->
308
+ <!-- of a request passed to the envoker is treated as a servlet name for -->
309
+ <!-- an existing servlet, or as a class name of a new servlet. -->
310
+ <!-- This servlet is normally mapped to /servlet/* -->
311
+ <!-- This servlet support the following initParams: -->
312
+ <!-- -->
313
+ <!-- nonContextServlets If false, the invoker can only load -->
314
+ <!-- servlets from the contexts classloader. -->
315
+ <!-- This is false by default and setting this -->
316
+ <!-- to true may have security implications. -->
317
+ <!-- -->
318
+ <!-- verbose If true, log dynamic loads -->
319
+ <!-- -->
320
+ <!-- * All other parameters are copied to the -->
321
+ <!-- each dynamic servlet as init parameters -->
322
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
323
+ <!--
324
+ Uncomment for dynamic invocation <servlet> <servlet-name>invoker</servlet-name> <servlet-class>org.eclipse.jetty.servlet.Invoker</servlet-class> <init-param> <param-name>verbose</param-name>
325
+ <param-value>false</param-value> </init-param> <init-param> <param-name>nonContextServlets</param-name> <param-value>false</param-value> </init-param> <init-param>
326
+ <param-name>dynamicParam</param-name> <param-value>anyValue</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>invoker</servlet-name>
327
+ <url-pattern>/servlet/*</url-pattern> </servlet-mapping>
328
+ -->
329
+
330
+
331
+
332
+ <!-- ==================================================================== -->
333
+ <session-config>
334
+ <session-timeout>30</session-timeout>
335
+ </session-config>
336
+
337
+ <!-- ==================================================================== -->
338
+ <!-- Default MIME mappings -->
339
+ <!-- The default MIME mappings are provided by the mime.properties -->
340
+ <!-- resource in the org.eclipse.jetty.server.jar file. Additional or modified -->
341
+ <!-- mappings may be specified here -->
342
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
343
+ <!-- UNCOMMENT TO ACTIVATE
344
+ <mime-mapping>
345
+ <extension>mysuffix</extension>
346
+ <mime-type>mymime/type</mime-type>
347
+ </mime-mapping>
348
+ -->
349
+
350
+ <!-- ==================================================================== -->
351
+ <welcome-file-list>
352
+ <welcome-file>index.html</welcome-file>
353
+ <welcome-file>index.htm</welcome-file>
354
+ <welcome-file>index.jsp</welcome-file>
355
+ </welcome-file-list>
356
+
357
+ <!-- ==================================================================== -->
358
+ <locale-encoding-mapping-list>
359
+ <locale-encoding-mapping>
360
+ <locale>ar</locale>
361
+ <encoding>ISO-8859-6</encoding>
362
+ </locale-encoding-mapping>
363
+ <locale-encoding-mapping>
364
+ <locale>be</locale>
365
+ <encoding>ISO-8859-5</encoding>
366
+ </locale-encoding-mapping>
367
+ <locale-encoding-mapping>
368
+ <locale>bg</locale>
369
+ <encoding>ISO-8859-5</encoding>
370
+ </locale-encoding-mapping>
371
+ <locale-encoding-mapping>
372
+ <locale>ca</locale>
373
+ <encoding>ISO-8859-1</encoding>
374
+ </locale-encoding-mapping>
375
+ <locale-encoding-mapping>
376
+ <locale>cs</locale>
377
+ <encoding>ISO-8859-2</encoding>
378
+ </locale-encoding-mapping>
379
+ <locale-encoding-mapping>
380
+ <locale>da</locale>
381
+ <encoding>ISO-8859-1</encoding>
382
+ </locale-encoding-mapping>
383
+ <locale-encoding-mapping>
384
+ <locale>de</locale>
385
+ <encoding>ISO-8859-1</encoding>
386
+ </locale-encoding-mapping>
387
+ <locale-encoding-mapping>
388
+ <locale>el</locale>
389
+ <encoding>ISO-8859-7</encoding>
390
+ </locale-encoding-mapping>
391
+ <locale-encoding-mapping>
392
+ <locale>en</locale>
393
+ <encoding>ISO-8859-1</encoding>
394
+ </locale-encoding-mapping>
395
+ <locale-encoding-mapping>
396
+ <locale>es</locale>
397
+ <encoding>ISO-8859-1</encoding>
398
+ </locale-encoding-mapping>
399
+ <locale-encoding-mapping>
400
+ <locale>et</locale>
401
+ <encoding>ISO-8859-1</encoding>
402
+ </locale-encoding-mapping>
403
+ <locale-encoding-mapping>
404
+ <locale>fi</locale>
405
+ <encoding>ISO-8859-1</encoding>
406
+ </locale-encoding-mapping>
407
+ <locale-encoding-mapping>
408
+ <locale>fr</locale>
409
+ <encoding>ISO-8859-1</encoding>
410
+ </locale-encoding-mapping>
411
+ <locale-encoding-mapping>
412
+ <locale>hr</locale>
413
+ <encoding>ISO-8859-2</encoding>
414
+ </locale-encoding-mapping>
415
+ <locale-encoding-mapping>
416
+ <locale>hu</locale>
417
+ <encoding>ISO-8859-2</encoding>
418
+ </locale-encoding-mapping>
419
+ <locale-encoding-mapping>
420
+ <locale>is</locale>
421
+ <encoding>ISO-8859-1</encoding>
422
+ </locale-encoding-mapping>
423
+ <locale-encoding-mapping>
424
+ <locale>it</locale>
425
+ <encoding>ISO-8859-1</encoding>
426
+ </locale-encoding-mapping>
427
+ <locale-encoding-mapping>
428
+ <locale>iw</locale>
429
+ <encoding>ISO-8859-8</encoding>
430
+ </locale-encoding-mapping>
431
+ <locale-encoding-mapping>
432
+ <locale>ja</locale>
433
+ <encoding>Shift_JIS</encoding>
434
+ </locale-encoding-mapping>
435
+ <locale-encoding-mapping>
436
+ <locale>ko</locale>
437
+ <encoding>EUC-KR</encoding>
438
+ </locale-encoding-mapping>
439
+ <locale-encoding-mapping>
440
+ <locale>lt</locale>
441
+ <encoding>ISO-8859-2</encoding>
442
+ </locale-encoding-mapping>
443
+ <locale-encoding-mapping>
444
+ <locale>lv</locale>
445
+ <encoding>ISO-8859-2</encoding>
446
+ </locale-encoding-mapping>
447
+ <locale-encoding-mapping>
448
+ <locale>mk</locale>
449
+ <encoding>ISO-8859-5</encoding>
450
+ </locale-encoding-mapping>
451
+ <locale-encoding-mapping>
452
+ <locale>nl</locale>
453
+ <encoding>ISO-8859-1</encoding>
454
+ </locale-encoding-mapping>
455
+ <locale-encoding-mapping>
456
+ <locale>no</locale>
457
+ <encoding>ISO-8859-1</encoding>
458
+ </locale-encoding-mapping>
459
+ <locale-encoding-mapping>
460
+ <locale>pl</locale>
461
+ <encoding>ISO-8859-2</encoding>
462
+ </locale-encoding-mapping>
463
+ <locale-encoding-mapping>
464
+ <locale>pt</locale>
465
+ <encoding>ISO-8859-1</encoding>
466
+ </locale-encoding-mapping>
467
+ <locale-encoding-mapping>
468
+ <locale>ro</locale>
469
+ <encoding>ISO-8859-2</encoding>
470
+ </locale-encoding-mapping>
471
+ <locale-encoding-mapping>
472
+ <locale>ru</locale>
473
+ <encoding>ISO-8859-5</encoding>
474
+ </locale-encoding-mapping>
475
+ <locale-encoding-mapping>
476
+ <locale>sh</locale>
477
+ <encoding>ISO-8859-5</encoding>
478
+ </locale-encoding-mapping>
479
+ <locale-encoding-mapping>
480
+ <locale>sk</locale>
481
+ <encoding>ISO-8859-2</encoding>
482
+ </locale-encoding-mapping>
483
+ <locale-encoding-mapping>
484
+ <locale>sl</locale>
485
+ <encoding>ISO-8859-2</encoding>
486
+ </locale-encoding-mapping>
487
+ <locale-encoding-mapping>
488
+ <locale>sq</locale>
489
+ <encoding>ISO-8859-2</encoding>
490
+ </locale-encoding-mapping>
491
+ <locale-encoding-mapping>
492
+ <locale>sr</locale>
493
+ <encoding>ISO-8859-5</encoding>
494
+ </locale-encoding-mapping>
495
+ <locale-encoding-mapping>
496
+ <locale>sv</locale>
497
+ <encoding>ISO-8859-1</encoding>
498
+ </locale-encoding-mapping>
499
+ <locale-encoding-mapping>
500
+ <locale>tr</locale>
501
+ <encoding>ISO-8859-9</encoding>
502
+ </locale-encoding-mapping>
503
+ <locale-encoding-mapping>
504
+ <locale>uk</locale>
505
+ <encoding>ISO-8859-5</encoding>
506
+ </locale-encoding-mapping>
507
+ <locale-encoding-mapping>
508
+ <locale>zh</locale>
509
+ <encoding>GB2312</encoding>
510
+ </locale-encoding-mapping>
511
+ <locale-encoding-mapping>
512
+ <locale>zh_TW</locale>
513
+ <encoding>Big5</encoding>
514
+ </locale-encoding-mapping>
515
+ </locale-encoding-mapping-list>
516
+
517
+ <security-constraint>
518
+ <web-resource-collection>
519
+ <web-resource-name>Disable TRACE</web-resource-name>
520
+ <url-pattern>/</url-pattern>
521
+ <http-method>TRACE</http-method>
522
+ </web-resource-collection>
523
+ <auth-constraint/>
524
+ </security-constraint>
525
+
526
+ </web-app>
527
+