KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > velocity > ClientVelocityServlet


1 /*
2  * Created on Apr 7, 2005
3  *
4  */

5 package com.dotmarketing.velocity;
6
7 import javax.servlet.http.HttpServletRequest JavaDoc;
8
9 import org.apache.velocity.tools.view.context.ChainedContext;
10
11 import com.dotmarketing.util.Config;
12
13 /**
14  * @author maria
15  */

16 public class ClientVelocityServlet extends VelocityServlet {
17
18     /**
19      *
20      */

21     private static final long serialVersionUID = 1L;
22
23     //EACH CLIENT MAY HAVE ITS OWN VARIABLES
24
protected void _setClientVariablesOnContext(HttpServletRequest JavaDoc request, ChainedContext context) {
25         String JavaDoc URI = request.getRequestURI();
26         String JavaDoc serverName = request.getServerName();
27         boolean inStore = false;
28         if (serverName.equals(Config.getStringProperty("FSP_SERVER_NAME")))
29         {
30             inStore = true;
31         }
32         context.put("inStore",inStore);
33         
34         String JavaDoc FSP_SERVER_NAME = Config.getStringProperty("FSP_SERVER_NAME");
35         context.put("FSP_SERVER_NAME",FSP_SERVER_NAME);
36     }
37 }
38
Popular Tags