- From: Yves Lafon <ylafon@w3.org>
- Date: Mon, 26 Apr 1999 10:50:54 +0200 (MET DST)
- To: Christopher William Turner <cwturner@cycom.co.uk>
- cc: "www-jigsaw@w3.org" <www-jigsaw@w3.org>
On Sun, 25 Apr 1999, Christopher William Turner wrote:
> I have a servlet which generates an html formatted entry from a
> database.
> It currently accepts a URL like this:-
>
> http://www.trade-submit.com:8001/t?8154082
>
> I would like the URL to be indistinguishable from a static html file.
> e.g
>
> http://www.trade-submit.com:8001/t/8154082.html
>
> How can I do this?
You already have this, look at the snoopservlet output:
http://ender.inria.fr:8006/servlet/SnoopServlet/foo/bar/9239842.html
Requested URL:
http://ender.inria.fr:8006/servlet/SnoopServlet/foo/bar/9239842.html
Simple Servlet Output
This is output from SimpleServlet.
Request information:
Request method: GET
Request URI: /servlet/SimpleServlet
Request protocol: HTTP/1.0
Servlet path: /servlet/SimpleServlet
Path info: /foo/bar/9239842.html
Path translated: <none>
Query string: <none>
Content length: <none>
Content type: <none>
Server name: ender.inria.fr
Server port: 8006
Remote user: <none>
Remote address: 138.96.10.3
Remote host: tarantula.inria.fr
Authorization scheme: <none>
Request headers:
connection: Keep-Alive
accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
*/*
accept-charset: iso-8859-1,*,utf-8
accept-encoding: gzip
accept-language: fr,en
host: ender.inria.fr:8006
user-agent: Mozilla/4.08 [en] (X11; I; SunOS 5.6 sun4u; Nav)
So you may replace the ? by / and strip off/add .html ad the end of the
URI, you will have everything in Path Info.
Regards,
/\ - Yves Lafon - World Wide Web Consortium -
/\ / \ Architecture Domain - Jigsaw Activity Leader
/ \ \/\
/ \ / \ http://www.w3.org/People/Lafon - ylafon@w3.org
Received on Monday, 26 April 1999 04:51:01 UTC