cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/servlet CocoonServlet.java
Date Wed, 22 May 2002 15:07:17 GMT
vgritsenko    02/05/22 08:07:17

  Modified:    src/java/org/apache/cocoon/servlet CocoonServlet.java
  Log:
  Fix bug 3372: Volume-Name SYS: becomes protocol on Novell Netware
  
  Revision  Changes    Path
  1.23      +10 -3     xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- CocoonServlet.java	30 Apr 2002 14:31:00 -0000	1.22
  +++ CocoonServlet.java	22 May 2002 15:07:17 -0000	1.23
  @@ -117,7 +117,7 @@
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
  - * @version CVS $Id: CocoonServlet.java,v 1.22 2002/04/30 14:31:00 cziegeler Exp $
  + * @version CVS $Id: CocoonServlet.java,v 1.23 2002/05/22 15:07:17 vgritsenko Exp $
    */
   public class CocoonServlet extends HttpServlet {
   
  @@ -271,10 +271,17 @@
               if (path.indexOf(':') > 1) {
                   this.servletContextURL = new URL(path);
               } else {
  -                this.servletContextURL = (new File(path)).toURL();
  +                this.servletContextURL = new File(path).toURL();
               }
           } catch (java.net.MalformedURLException me) {
  -            throw new ServletException("Unable to determine servlet context URL.", me);
  +            // VG: Novell has absolute file names starting with the
  +            // volume name which is easily more then one letter.
  +            // Examples: sys:/apache/cocoon or sys:\apache\cocoon
  +            try {
  +                this.servletContextURL = new File(path).toURL();
  +            } catch (java.net.MalformedURLException ignored) {
  +                throw new ServletException("Unable to determine servlet context URL.",
me);
  +            }
           }
           if (log.isDebugEnabled()) {
               log.debug("URL for Root: " + this.servletContextURL);
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message