我自己的MVC框架DWF的范例包。用实际的例子说明了如何使用我的DWF框架来开发网站。

源代码在线查看: vcommand.java

软件大小: 1771 K
上传用户: yashashi
关键词: DWF MVC 范例 如何使用
下载地址: 免注册下载 普通下载 VIP

相关代码

				package dark.web.frame.example.littleo.command;
				
				import javax.servlet.http.HttpServletRequest;
				import javax.servlet.http.HttpServletResponse;
				
				import dark.web.frame.velocity.VelocityCommand;
				
				import org.apache.velocity.Template;
				import org.apache.velocity.context.Context;
				
				/**
				 * Title:            
				 * Description:      
				 * Copyright:        Copyright (c) 2004
				 * Company:          DIS
				 * Create Time:      2005-2-28 17:39:54
				 * @author             darkhe
				 * @version            1.0
				 */
				public class VCommand extends VelocityCommand
				{
					/**
					 * @param arg0
					 * @param arg1
					 * @param arg2
					 * @return
					 * @throws java.lang.Exception
					 * @see dark.web.frame.velocity.VelocityCommand#process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.velocity.context.Context)
					 */
					public Template process(
						HttpServletRequest request,
						HttpServletResponse response,
						Context context)
						throws Exception
					{
						context.put("hello", "hello, my love");
						Template t = getTemplate("v.vm");
						
						if( t == null )
						{			
							log.info("Template is null");
						}
						else
						{			
							log.info("Template is " + t);
						} 				
						return t;
					}
				
				}
							

相关资源