tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core Context.java
Date Wed, 05 Apr 2000 03:36:43 GMT
costin      00/04/04 20:36:43

  Modified:    src/share/org/apache/jasper/runtime JspServlet.java
               src/share/org/apache/tomcat/core Context.java
  Log:
  Fix #177 - another confusion in getRealPath() - all paths are relative
  to the context, this is the servlet standard, whatever the rest of the
  world uses is irelevant.
  
  Thanks to pjacobs@splitrock.net for finding that out ( as a jsp bug)
  
  Submitted by:	pjacobs@splitrock.net
  
  Revision  Changes    Path
  1.21      +0 -1      jakarta-tomcat/src/share/org/apache/jasper/runtime/JspServlet.java
  
  Index: JspServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspServlet.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- JspServlet.java	2000/04/05 03:16:16	1.20
  +++ JspServlet.java	2000/04/05 03:36:42	1.21
  @@ -401,7 +401,6 @@
       {
   	Class jspClass = (Class) loadedJSPs.get(name);
   	boolean firstTime = jspClass == null;
  -
           JspCompilationContext ctxt = new JspEngineContext(loader, classpath,
                                                        context, name, 
                                                        isErrorPage, options,
  
  
  
  1.77      +6 -4      jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
  
  Index: Context.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- Context.java	2000/04/02 20:39:57	1.76
  +++ Context.java	2000/04/05 03:36:42	1.77
  @@ -756,7 +756,6 @@
   
   	Request req=contextM.createRequest( base , normP );
   	contextM.processRequest(req);
  -
   	String mappedPath = req.getMappedPath();
   
   	// XXX workaround - need to fix mapper to return mapped path
  @@ -765,10 +764,13 @@
   	if(mappedPath == null )
   	    mappedPath=req.getLookupPath();
   
  +	// All paths have to be relative to the context - it's not so
  +	// logical ( IMHO - costin ), but that's the spec.
  +	// 
   	// Strip off URI path that brought us to this context.
  -	if (0 == mappedPath.indexOf(this.getPath())) {
  -	    mappedPath = mappedPath.substring(this.getPath().length());
  -	}
  +	//  	if (0 == mappedPath.indexOf(this.getPath())) {
  +	// 	    mappedPath = mappedPath.substring(this.getPath().length());
  +	// 	}
   
   	Context targetContext=req.getContext();
   	String realPath= targetContext.getDocBase() + mappedPath;
  
  
  

Mime
View raw message