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

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