/samples/scalate-sample/src/main/webapp/WEB-INF/web.xml

http://github.com/scalate/scalate · XML · 96 lines · 62 code · 9 blank · 25 comment · 0 complexity · 81260b136e6f3d6808baf7f0a93fefc8 MD5 · raw file

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (C) 2009-2011 the original author or authors.
  4. See the notice.md file distributed with this work for additional
  5. information regarding copyright ownership.
  6. Licensed under the Apache License, Version 2.0 (the "License");
  7. you may not use this file except in compliance with the License.
  8. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  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. <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  17. xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  18. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  19. version="2.5">
  20. <display-name>Scalate Sample</display-name>
  21. <description>
  22. Scalate Sample
  23. </description>
  24. <!-- START: JAX RS config -->
  25. <filter>
  26. <filter-name>Jersey Filter</filter-name>
  27. <filter-class>com.sun.jersey.spi.container.servlet.ServletContainer</filter-class>
  28. <init-param>
  29. <param-name>com.sun.jersey.config.feature.Trace</param-name>
  30. <param-value>true</param-value>
  31. </init-param>
  32. <init-param>
  33. <param-name>com.sun.jersey.config.feature.Redirect</param-name>
  34. <param-value>true</param-value>
  35. </init-param>
  36. <init-param>
  37. <param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
  38. <param-value>true</param-value>
  39. </init-param>
  40. <init-param>
  41. <param-name>com.sun.jersey.config.property.packages</param-name>
  42. <param-value>org.fusesource.scalate.sample.resources;org.fusesource.scalate.console</param-value>
  43. </init-param>
  44. <init-param>
  45. <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
  46. <param-value>true</param-value>
  47. </init-param>
  48. </filter>
  49. <filter-mapping>
  50. <filter-name>Jersey Filter</filter-name>
  51. <url-pattern>/*</url-pattern>
  52. </filter-mapping>
  53. <!-- END: JAX RS config -->
  54. <!-- START: Scalate config -->
  55. <filter>
  56. <filter-name>TemplateEngineFilter</filter-name>
  57. <filter-class>org.fusesource.scalate.servlet.TemplateEngineFilter</filter-class>
  58. </filter>
  59. <filter-mapping>
  60. <filter-name>TemplateEngineFilter</filter-name>
  61. <url-pattern>/*</url-pattern>
  62. </filter-mapping>
  63. <!-- END: Scalate config -->
  64. <!-- START: Sample servlets -->
  65. <servlet>
  66. <servlet-name>SampleServlet</servlet-name>
  67. <servlet-class>org.fusesource.scalate.sample.SampleServlet</servlet-class>
  68. <load-on-startup>1</load-on-startup>
  69. </servlet>
  70. <servlet-mapping>
  71. <servlet-name>SampleServlet</servlet-name>
  72. <url-pattern>/sampleServlet</url-pattern>
  73. </servlet-mapping>
  74. <!-- END: Sample servlets -->
  75. <welcome-file-list>
  76. <welcome-file>index.ssp</welcome-file>
  77. </welcome-file-list>
  78. <error-page>
  79. <error-code>500</error-code>
  80. <location>/WEB-INF/scalate/errors/500.scaml</location>
  81. </error-page>
  82. </web-app>