2006/unicorn/src/org/w3c/unicorn Init.java,1.1.2.4,1.1.2.5 Controller.java,1.1.2.4,1.1.2.5

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn
In directory hutz:/tmp/cvs-serv28986/src/org/w3c/unicorn

Modified Files:
      Tag: dev2
	Init.java Controller.java 
Log Message:
worked on jigsaw compatibility

Index: Controller.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/Attic/Controller.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -d -r1.1.2.4 -r1.1.2.5
--- Controller.java	6 Aug 2009 12:46:57 -0000	1.1.2.4
+++ Controller.java	6 Aug 2009 15:04:25 -0000	1.1.2.5
@@ -33,7 +33,14 @@
 	}
 
 	protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-		logger.info("Processing request: " + request.getRequestURL());
+		// getRequestURI, le seul à être compatible Jigsaw
+		
+		logger.info("Processing request: " + request.getRequestURI());// + request.getRequestURL());
+		logger.info("Servlet Path: " + request.getServletPath());
+		logger.info("Servlet Context: " + this.getServletContext().getContextPath());
+		logger.info("Servlet Name: " + getServletName());
+		
+		request.getRequestURI();
 		Route route = RouteParser.getRoute(request);
 		
 		if (route.isSetUrl()) {
@@ -48,8 +55,8 @@
 				response.sendError(501, error);
 			} else {
 				try {
-					dispatcher.forward(request, response);
 					logger.info("Request dispatched to: " + route.getAction());
+					dispatcher.forward(request, response);
 				} catch (Exception e) {
 					logger.error("ERROR: " + e.getMessage(), e);
 					response.sendError(501, "ERROR: " + e.getMessage());

Index: Init.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/Attic/Init.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -d -r1.1.2.4 -r1.1.2.5
--- Init.java	6 Aug 2009 12:46:57 -0000	1.1.2.4
+++ Init.java	6 Aug 2009 15:04:25 -0000	1.1.2.5
@@ -22,16 +22,17 @@
 		
 		// Checks that unicorn.home (JVM parameter) is set to an existing directory
 		String ucnHome = System.getProperty("unicorn.home");
+		File ucnHomeFile = new File(ucnHome);
 		if (ucnHome == null) {
 			String error = "ERROR: \"unicorn.home\" is not set in the JVM parameters. Please read the README file before trying to install Unicorn";
 			System.err.println(error);
 			throw new Exception(error);
-		} else if (!(new File(ucnHome)).exists() && (new File(ucnHome).isDirectory())){
+		} else if (!ucnHomeFile.exists() && ucnHomeFile.isDirectory()) {
 			String error = "ERROR: \"unicorn.home\" is not an existing directory: " + System.getProperty("unicorn.home");
 			System.err.println(error);
 			throw new Exception(error);
 		} else {
-			unicornHome = (new File(ucnHome)).toURI();
+			unicornHome = ucnHomeFile.toURI();
 			System.out.println("OK - \"unicorn.home\" was found: " + unicornHome.getPath());
 		}
 		

Received on Thursday, 6 August 2009 15:04:41 UTC