tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Jose Pablos" <>
Subject Re: Localization and DefaultServlet
Date Mon, 19 Jun 2000 20:38:52 GMT

 > The problem with appending the <locale> is such that in Unix systems, due
> to not having a 'filetype' component as an integral part of a pathname,
> it would force to make too many assumptions on where the insertion of the
> <locale> should happen.

I think you need to define the extension in other to be recognize by tomcat,
appending the locale force the same assumtions of using the extsion to
define the Mime type.
do not you use web.xml to define the Mime-mapping in Unix?
If I remove the .jsp or the .class, Jsp and  servlets won't work, I think
that Mac is diferent but I am not a Mac fan.

> I don't want to do it in such a manner.
It is not the way we already do it for the servlets/JSP?, it is possible to
check how other servlet engine take this problem, maybe there is already a
Standar so if my War file work with language content negotiation in Tomcat,
it could work with other servlet engine.

> So far, I am thinking of changing the locale at the root of the document
> hierarchy (/en/a/b/c/d) - assuming docRoot is '/' in this example, which
> make the search/identification of an existing document simpler, as the
> needs to be prefaced with the locale.
> If in a different context, for example where the docRoot would be
> /services, then /services/dir1/dir2/file.html would be searched first
> as /services/<locale>/dir1/dir2/file.html.

Ok, Make sense, but it means that we can not create any directory that mach
with a especific locale in the document Root or in the Context root isn't
if you create a service/en  folder, for Electronict nany (en), a spanish
person could see the /services without problems, for a english person the
server will display the contents of the /service/en  instead of /services,
the server assume that /en is the language instead of a dummy directory.
(Maybe we can live with that anyway...)

> Like I said before, it introduces some problems as far as the naming of
> resource and assuming that there is indeed a filetype. Imagine for
> example that a pathname has no <implicit> filetype, i.e. /a/b/my_image,
> in such a case the <locale> would be appended and not inserted prior to
> the (last - in this case inexistent) period.

I am not sure  about this but your  Image could not be display if you do not
add the extension anyway , Servlets and JSP need the extesion in order to
In the matter that a file has not got the language extension then you assume
that has got the default language for the context.

 De nada,


View raw message