1 package org.apache.velocity.demo.action; 2 3 18 import javax.servlet.http.HttpServlet ; 20 import javax.servlet.http.HttpServletRequest ; 21 import javax.servlet.http.HttpServletResponse ; 22 23 import org.apache.velocity.context.Context; 25 26 import org.apache.velocity.demo.om.*; 28 29 39 public class ReplyCommand extends Command 40 { 41 42 public static final String REPLY = "reply.vm"; 43 44 public ReplyCommand( HttpServletRequest req, HttpServletResponse resp ) 45 { 46 super( req, resp ); 47 } 48 49 53 public String exec( Context ctx ) 54 { 55 String id = request.getParameter("id"); 56 String subject = request.getParameter("subject"); 57 ctx.put("id", id ); 58 ctx.put("subject", subject); 59 60 return REPLY; 61 } 62 } 63 | Popular Tags |