You can have something like this in your web.xml:

<servlet-mapping>
  <servlet-name>velocity</servlet-name>
  <url-pattern>/web/*</url-pattern>
</servlet-mapping>


If you are using tomcat, using your browser you can do something like:

http://localhost:8080/<webapps-dir-name>/web

The your home page should appear, whatever you have in the following entry
in your TurbineResources.properties file:

...
template.homepage=Index.vm
...

As you know, turbine first will load and run the corresponding screen class
to that template which is Index.java class, after that then it will parse
the Index.vm velocity template, and the output of that is what you are going
to see in your browser.

Depending of your screen class you can switch to another velocity template,
which is the default behavior of the parent class of the Index.java, which
is SecureScreen.java that checks if there's an user already logged in and if
not it will "redirect" to the Login.vm template, which loads&runs the
Login.java class, and so on.

Rogelio

  -----Original Message-----
  From: brian [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, June 03, 2004 9:33 AM
  To: 'Turbine Users List'
  Subject: RE: servlet mapping
  
  
  This is the current entry in my web.xml file
  <servlet>
         <servlet-name>velocity</servlet-name>
         <display-name>GLO Velocity Application</display-name>
       <description>This is the initial servlet.</description>
       <servlet-class>org.apache.turbine.Turbine</servlet-class>
         <init-param>
         <param-name>applicationRoot</param-name>
         <param-value>webContext</param-value>
       </init-param>
         <init-param>
         <param-name>properties</param-name>
   
  <param-value>/WEB-INF/conf/TurbineResources.properties</param-value>
       </init-param>
       <load-on-startup></load-on-startup>
      </servlet>
  
       <servlet-mapping>
       <servlet-name>velocity</servlet-name>
       <url-pattern>*.vm</url-pattern>
       </servlet-mapping>
  
  -----Original Message-----
  From: brian [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, June 03, 2004 12:29 PM
  To: [EMAIL PROTECTED]
  Subject: servlet mapping
  
  I am trying to display the first page of my turbine 
  application.  I tried to map the turbine servlet to .vm files 
  but this doesn't work. What class should I be mapping from 
  turbine to the .vm files in my web.xml file?
  
   
  
  Brian A
  
   
  
  
  
  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to