home | career | drupal | java | mac | mysql | perl | scala | uml | unix

Groovy example source code file (web.xml)

This example Groovy source code file (web.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

gsp, gsp, gstring, gstring, xml, xml

The Groovy web.xml source code

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_3.xsd"
    version="2.3">

  <servlet>
    <servlet-name>Groovlet
    <servlet-class>groovy.servlet.GroovyServlet
    <init-param>
      <param-name>verbose
      <param-value>true
    </init-param>
    <init-param>
      <param-name>resource.name.regex
      <param-value>none
    </init-param>
    <init-param>
      <param-name>resource.name.replacement
      <param-value>none
    </init-param>
  </servlet>
    
  <servlet>
    <servlet-name>Template|GSP
    <servlet-class>groovy.servlet.TemplateServlet
  </servlet>
  
  <servlet>
    <servlet-name>Template|GString
    <servlet-class>groovy.servlet.TemplateServlet
    <init-param>
      <param-name>template.engine
      <param-value>groovy.text.GStringTemplateEngine
    </init-param>
  </servlet>
  
  <servlet>
    <servlet-name>Template|XML
    <servlet-class>groovy.servlet.TemplateServlet
    <init-param>
      <param-name>template.engine
      <param-value>groovy.text.XmlTemplateEngine
    </init-param>
  </servlet>
  
  <servlet-mapping>
    <servlet-name>Template|GSP
    <url-pattern>*.html
  </servlet-mapping>
  
  <servlet-mapping>
    <servlet-name>Template|XML
    <url-pattern>*.xhtml
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>Groovlet
    <url-pattern>*.groovy
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>index.xhtml
    <welcome-file>index.html
    <welcome-file>index.jsp
    <welcome-file>index.jspx
    <welcome-file>index.groovy
  </welcome-file-list>

</web-app>

Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy web.xml source code file:

new blog posts

 

Copyright 1998-2013 Alvin Alexander, alvinalexander.com
All Rights Reserved.