1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
2 | <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> |
---|
3 | |
---|
4 | <!-- |
---|
5 | Configure a custom context for the eepsite. |
---|
6 | |
---|
7 | * CGI Servlet. |
---|
8 | * |
---|
9 | * The cgi bin directory can be set with the "cgibinResourceBase" init parameter |
---|
10 | * or it will default to the resource base of the context. |
---|
11 | * |
---|
12 | * The "commandPrefix" init parameter may be used to set a prefix to all |
---|
13 | * commands passed to exec. This can be used on systems that need assistance to |
---|
14 | * execute a particular file type. For example on windows this can be set to |
---|
15 | * "perl" so that perl scripts are executed. |
---|
16 | * |
---|
17 | * The "Path" init param is passed to the exec environment as PATH. Note: Must |
---|
18 | * be run unpacked somewhere in the filesystem. |
---|
19 | * |
---|
20 | * Any initParameter that starts with ENV_ is used to set an environment |
---|
21 | * variable with the name stripped of the leading ENV_ and using the init |
---|
22 | * parameter value. |
---|
23 | --> |
---|
24 | |
---|
25 | <Configure class="org.eclipse.jetty.servlet.ServletContextHandler"> |
---|
26 | <Set name="contextPath">/cgi-bin</Set> |
---|
27 | <Set name="resourceBase">./eepsite/cgi-bin/</Set> |
---|
28 | <Call name="setInitParameter"> |
---|
29 | <Arg>Path</Arg> |
---|
30 | <Arg>/usr/local/bin:/bin:/usr/bin</Arg> |
---|
31 | </Call> |
---|
32 | <Call name="addServlet"> |
---|
33 | <Arg>org.eclipse.jetty.servlets.CGI</Arg> |
---|
34 | <Arg>/</Arg> |
---|
35 | </Call> |
---|
36 | <Call name="addFilter"> |
---|
37 | <!-- See base-context.xml for info. |
---|
38 | Unlike for DefaultServlet, there's not even a theoretical |
---|
39 | inefficiency for using this. |
---|
40 | --> |
---|
41 | <Arg> |
---|
42 | <New class="org.eclipse.jetty.servlet.FilterHolder" > |
---|
43 | <Arg> |
---|
44 | <New class="org.eclipse.jetty.servlets.GzipFilter" /> |
---|
45 | </Arg> |
---|
46 | <Call name="setInitParameter"> |
---|
47 | <Arg>minGzipSize</Arg> |
---|
48 | <Arg>512</Arg> |
---|
49 | </Call> |
---|
50 | <Call name="setInitParameter"> |
---|
51 | <Arg>mimeTypes</Arg> |
---|
52 | <Arg>application/pdf,application/x-javascript,application/xhtml+xml,application/xml,image/svg+xml,text/css,text/html,text/plain</Arg> |
---|
53 | </Call> |
---|
54 | </New> |
---|
55 | </Arg> |
---|
56 | <Arg>/*</Arg> |
---|
57 | <Arg> |
---|
58 | <Call class="java.util.EnumSet" name="of" > |
---|
59 | <Arg> |
---|
60 | <Call class="javax.servlet.DispatcherType" name="valueOf" > |
---|
61 | <Arg>REQUEST</Arg> |
---|
62 | </Call> |
---|
63 | </Arg> |
---|
64 | </Call> |
---|
65 | </Arg> |
---|
66 | </Call> |
---|
67 | </Configure> |
---|