You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Brill Pappin <br...@jmonkey.com> on 2000/01/27 17:31:20 UTC

Question

Are the context interceptors and context class definitions (from server.xml)
working in M1 yet?

- Brill Pappin
  www.jmonkey.com



Re: Path Translated not working?

Posted by Brill Pappin <br...@jmonkey.com>.
Right... that sounds more like what I expect...
However, it still means its not returning the correct data.


- Brill Pappin
  www.jmonkey.com


----- Original Message -----
From: Hans Bergsten <ha...@gefionsoftware.com>
To: <to...@jakarta.apache.org>
Sent: Friday, January 28, 2000 8:08 AM
Subject: Re: Path Translated not working?


> Brill Pappin wrote:
> >
> > PathTraslated appears to be returning an incorrect path when requested
> > of/from a servlet.
> > See: http://www.jmonkey.com/~bpappin/servlet/SnoopServlet
> >
> > notice that the path translated comes out as:
> > /export/home/bpappin/public_html/servlet/SnoopServlet
> > Shouldn't it be:
/export/home/bpappin/public_html/classes/SnoopServlet.class
> > <== the physical file
> > or even: /export/home/bpappin/public_html/classes/SnoopServlet <== or
the
> > class
>
> No, getPathTranslated() is supposed to return the pathInfo part of the
> URI, converted to the location of the corresponding file path in the
> (file based) document structure for the context. So if you invoke a
servlet
> like above, it should be null since there's no pathInfo in the URI.
> If you instead invoke it like /servlet/SnoopServlet/foo, it should return
> the file path corresponding to "foo".
>
> The Servlet 2.2 spec is pretty clear on all of this, and even includes
> examples as far as I can remember.
>
> Hans
> --
> Hans Bergsten hans@gefionsoftware.com
> Gefion Software http://www.gefionsoftware.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>


Re: Path Translated not working?

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Brill Pappin wrote:
> 
> PathTraslated appears to be returning an incorrect path when requested
> of/from a servlet.
> See: http://www.jmonkey.com/~bpappin/servlet/SnoopServlet
> 
> notice that the path translated comes out as:
> /export/home/bpappin/public_html/servlet/SnoopServlet
> Shouldn't it be: /export/home/bpappin/public_html/classes/SnoopServlet.class
> <== the physical file
> or even: /export/home/bpappin/public_html/classes/SnoopServlet <== or the
> class

No, getPathTranslated() is supposed to return the pathInfo part of the
URI, converted to the location of the corresponding file path in the
(file based) document structure for the context. So if you invoke a servlet
like above, it should be null since there's no pathInfo in the URI.
If you instead invoke it like /servlet/SnoopServlet/foo, it should return
the file path corresponding to "foo".

The Servlet 2.2 spec is pretty clear on all of this, and even includes
examples as far as I can remember.

Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com

Path Translated not working?

Posted by Brill Pappin <br...@jmonkey.com>.
PathTraslated appears to be returning an incorrect path when requested
of/from a servlet.
See: http://www.jmonkey.com/~bpappin/servlet/SnoopServlet

notice that the path translated comes out as:
/export/home/bpappin/public_html/servlet/SnoopServlet
Shouldn't it be: /export/home/bpappin/public_html/classes/SnoopServlet.class
<== the physical file
or even: /export/home/bpappin/public_html/classes/SnoopServlet <== or the
class

??


- Brill Pappin
  www.jmonkey.com





Re: Question

Posted by co...@eng.sun.com.
> Are the context interceptors and context class definitions (from server.xml)
> working in M1 yet?

Not completely, still hardcoded - but that's easy to fix if someone starts
creating new interceptors. 

Costin