velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-velocity Wiki] Update of "VelocityAndSpringStepByStep" by ShinobuKawaiYoshida
Date Thu, 19 May 2005 17:30:25 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-velocity Wiki" for change
notification.

The following page has been changed by ShinobuKawaiYoshida:
http://wiki.apache.org/jakarta-velocity/VelocityAndSpringStepByStep

The comment on the change is:
remove VVS

------------------------------------------------------------------------------
  
  = Part 2 - Developing and Configuring the Application =
  
- TODO: Think of a better way to do Step 13.  :(
- 
  == Step 13 - Improve index.jsp ==
  
  We won't be needing an {{{include.vm}}}, but let's make the {{{springapp/war/WEB-INF/velocity}}}
directory anyways.
  
- ''Couldn't think of a neat way to convert this into velocity, so we'll cheat by installing
!VelocityViewServlet.''
+ Add Velocity jar to {{{springapp/war/WEB-INF/lib}}}
  
- Add Velocity and VelocityTools jar to {{{springapp/war/WEB-INF/lib}}}
+ {{{web.xml}}} : Change welcome file to {{{hello.htm}}} and add a servlet mapping to it
+ {{{
+   <servlet-mapping>
+     <servlet-name>springapp</servlet-name>
+     <url-pattern>*.htm</url-pattern>
+   </servlet-mapping>
+   <servlet-mapping>
+     <servlet-name>springapp</servlet-name>
+     <url-pattern>/hello.htm</url-pattern>
+   </servlet-mapping>
  
+   <welcome-file-list>
+     <welcome-file>
+       hello.htm
+     </welcome-file>
+   </welcome-file-list>
- {{{web.xml}}} : Add !VelocityViewServlet settings
- {{{
-   <servlet>
-     <servlet-name>velocity</servlet-name>
-     <servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</servlet-class>
-     <load-on-startup>10</load-on-startup>
-   </servlet>
- 
-   <servlet-mapping>
-     <servlet-name>velocity</servlet-name>
-     <url-pattern>*.vm</url-pattern>
-   </servlet-mapping>
  }}}
  
+ Now, we won't even need an {{{index.vm}}}.  Thanks to Marcelo Bello for the [http://issues.apache.org/bugzilla/show_bug.cgi?id=26452#c6
post in bugzilla], and Maarten Bosteels for [http://sourceforge.net/mailarchive/message.php?msg_id=11804228
finding this].  :)
- And finally, {{{index.vm}}} : Use VTL instead of JSTL
- {{{
- ## Redirected because we can't set the welcome page to a virtual URL.
- $response.sendRedirect("$request.getContextPath()/hello.htm")
- }}}
- 
- TODO: Think of a better way to do this.  ie. Don't use VVS.
  
  == Step 14 - Improve the view and the controller ==
  

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Mime
View raw message