,ch14.9433  Page 476  Monday, February 14, 2005  12:55 PM
velocimacro.permissions.allow.inline = true
velocimacro.permissions.allow.inline.to.replace.global = false
velocimacro.permissions.allow.inline.local.scope = false
velocimacro.context.localscope = false
#                                                                            
# INTERPOLATION
#                                                                            
# turn off and on interpolation of references and directives in string
# literals.  ON by default :)
#                                                                            
runtime.interpolate.string.literals = true
#                                                                            
# RESOURCE MANAGEMENT
#                                                                            
# Allows alternative ResourceManager and ResourceCache implementations
# to be plugged in.
#                                                                            
resource.manager.class = org.apache.velocity.runtime.resource.ResourceManagerImpl
resource.manager.cache.class = org.apache.velocity.runtime.resource.ResourceCacheImp
Now, you create the Velocity template itself. Suppose you wanted to replace a JSP
page with an equivalent Velocity template. Example 14 28 shows the welcome.jsp
page from the Struts MailReader application.
Example 14 28. Welcome page from the Struts example application
<%@ page contentType="text/html;charset=UTF 8" language="java" %>
<%@ taglib uri="/tags/struts bean" prefix="bean" %>
<%@ taglib uri="/tags/struts html" prefix="html" %>
<bean:message key="index.title"/>

  • registration"/>
  • Language Options

  • English
  • Japanese
  • li>
    476 | Chapter 14: Tiles and Other Presentation Approaches
    This is the Title of the Book, eMatter Edition
    Copyright   2005 O'Reilly & Associates, Inc. All rights reserved.
    
    
    
    
    
    
    footer
    
    
    
    
    

     

     

     

     

     Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

    strutsweb hosting

     

    Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved