- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 07 Aug 2009 12:03:44 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn
In directory hutz:/tmp/cvs-serv7256/src/org/w3c/unicorn
Modified Files:
Tag: dev2
Init.java Controller.java
Added Files:
Tag: dev2
Parameters.java
Log Message:
new libs
bypassed controller
implemented some language properties
Index: Controller.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/Attic/Controller.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- Controller.java 6 Aug 2009 15:04:25 -0000 1.1.2.5
+++ Controller.java 7 Aug 2009 12:03:42 -0000 1.1.2.6
@@ -35,9 +35,9 @@
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// getRequestURI, le seul à être compatible Jigsaw
- logger.info("Processing request: " + request.getRequestURI());// + request.getRequestURL());
+ logger.info("Processing request: " + request.getRequestURL());// + request.getRequestURL());
logger.info("Servlet Path: " + request.getServletPath());
- logger.info("Servlet Context: " + this.getServletContext().getContextPath());
+ //logger.info("Servlet Context: " + this.getServletContext().getContextPath());
logger.info("Servlet Name: " + getServletName());
request.getRequestURI();
--- NEW FILE: Parameters.java ---
package org.w3c.unicorn;
import java.util.Hashtable;
public class Parameters {
public static Hashtable<String, String> outputParams = new Hashtable<String, String>();
static {
outputParams.put("text", "text/html");
outputParams.put("xml", "application/xml");
outputParams.put("text", "text/plain");
}
}
Index: Init.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/Attic/Init.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -d -r1.1.2.5 -r1.1.2.6
--- Init.java 6 Aug 2009 15:04:25 -0000 1.1.2.5
+++ Init.java 7 Aug 2009 12:03:42 -0000 1.1.2.6
@@ -3,7 +3,6 @@
import java.io.File;
import java.net.URI;
import java.util.List;
-
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.w3.unicorn.route.Route;
@@ -92,8 +91,14 @@
}
RoutesDocument routesXML = RoutesDocument.Factory.parse(routesFile);
List<Route> tempRouteList = routesXML.getRoutes().getRouteList();
- for(Route route : tempRouteList) {
- logger.debug("Route found: " + route.xmlText());
+ for (Route route : tempRouteList) {
+ if (route.isSetUrl())
+ logger.debug("Route found for redirection to " + route.getUrl());
+ else
+ logger.debug("Route found for action " + route.getAction());
+ for (String pattern : route.getPatternList()) {
+ logger.debug("> Pattern: " + pattern);
+ }
if (route.isSetType() && route.getType().equals("index")) {
logger.debug("> This route is the Index route");
RouteParser.setIndex(route);
@@ -106,11 +111,11 @@
}
}
if (RouteParser.getIndex() == null) {
- String error = "There is non Index route. RouteParser is not initialized properly.";
+ String error = "There is no Index route. RouteParser is not initialized properly.";
logger.error(error);
throw new Exception(error);
} else if (RouteParser.getError404() == null) {
- String error = "There is non 404 route. RouteParser is not initialized properly.";
+ String error = "There is no 404 route. RouteParser is not initialized properly.";
logger.error(error);
throw new Exception(error);
} else {
Received on Friday, 7 August 2009 12:04:02 UTC