W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2009

2006/unicorn/src/org/w3c/unicorn/action TestAction.java,NONE,1.1.2.1

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 19 Aug 2009 17:41:38 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MdpAI-0004YG-V5@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv17482/src/org/w3c/unicorn/action

Added Files:
      Tag: dev2
	TestAction.java 
Log Message:
a new action for testing purposes

--- NEW FILE: TestAction.java ---
package org.w3c.unicorn.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.velocity.VelocityContext;
import org.w3c.unicorn.Framework;
import org.w3c.unicorn.language.Language;
import org.w3c.unicorn.util.Property;

/**
 * Servlet implementation class TestAction
 */
public class TestAction extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
	
	private VelocityContext velocityContext;
    /**
     * @see HttpServlet#HttpServlet()
     */
    public TestAction() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		
		PrintWriter out = resp.getWriter();
		
		for (String key : Framework.mapOfTask.keySet()) {
			out.println(Framework.mapOfTask.get(key));
			
			
		}
		
		/*resp.setContentType("text/html; charset=UTF-8");
		
		// Language negotiation
		
		velocityContext = new VelocityContext();
		
		velocityContext.put("task", Framework.mapOfTask.get("conformance"));
		
		Framework.getTemplate("parameters").merge(velocityContext, resp.getWriter());
		resp.getWriter().close();*/
		
	}

}
Received on Wednesday, 19 August 2009 17:41:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:38 UTC