You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2018/06/13 16:06:37 UTC

Re: [OT] creation of virtual directories

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Igal,

On 6/12/18 2:09 PM, Igal @ Lucee.org wrote:
> On 6/12/2018 10:48 AM, Christopher Schultz wrote:
>> <snip/>
>>> You want 
>>> http://tomcat.apache.org/tomcat-9.0-doc/config/resources.html
>>> 
>>> 
>>> You'd add something like this:
>>> 
>>> <Resources> <PostResources base="W:\some\path" 
>>> className="org.apache.catalina.webresources.DirResourceSet" 
>>> webAppMount="/"/> </Resources>
>>> 
>>> Which would make the content of W:\some\path visible at the
>>> root of the web application. Note that normally handling will
>>> apply. So, for example, anything named *.jsp will get treated
>>> as as JSP page.
>> You'll want to edit your web application's META-INF/context.xml
>> file.
>> 
>> If no such file exists, create a new one with this in it:
>> 
>> <Context> </Context>
>> 
>> Then nest everything else inside that XML element wrapper.
> I thought that the XML declaration is required but testing shows
> that it is not, and that the above example works (further
> investigation revealed that in XML 1.1 the declaration is required
> but we're using XML 1.0 here).
> 
> Good to know.

The XML declaration (<?xml?>) is always optional, but does provide
important information if it's different from the default.
Specifically, it tells the parser what version of XML is being used
(default: 1.0) and what character encoding is being used (default: UTF-8
).

I would say that it's probably best to include the XML declaration,
especially if the documents are expected to be read/written by humans.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlshQQ0ACgkQHPApP6U8
pFgjjxAAhivdr5C9PgtP6V5Ahmw97t/Up/rwmDw0Q7SWNmg4TDXn9bcUmWIWxUcO
W0v696vrh5gUrbiuP4VqBOoadPjGC6y56u6gmVsJHtkyZxvlV7gc/V6bxqJCmrgX
p54zOMH5U398wTigEfDC5PnO5WqdlE4YKzKno6pYa4qJDAxX+lkXpNVjtDxOhXO7
W9vdlVYBahd7ZDOcV8xDPpK9EMciDOQ7QWRm0nxGHN1QkTcnTNUkFDiW863s3cV3
W0GcSbZbQREv2cJgU7KJwjBwXMyzRf2bjDTiWwWZhUqJ8FZb1FJGPrU0E9WMc9Qj
p3KpIt/JoxfbHNLOf7b0q8z2QbfXEbyHQ4NBtOl5tsoYrLP7PhaL9RpD8Jq2JQzA
sc1//ssvV+d02VmVGdqgiJBvJxE5H7uIybyZ1AgTazUvl6D4cgDC9kKu7CmziTeA
OQO/OSJjYjH6gyImjCeiX86eC8+cF3w+ulmDtAaJMC2uZAW9g5AxO6ejxkoakcrs
DaDJ1W/8eny4OF3AAUoCxFZXzPzC4b5MM+IYQJF1Zh0mhZFmUJBTmxdZhYzaHpP7
q1CO5d+4gu3+UxzzWsju0M7ch/yd5XlWF+7zOTzGfiQY+bslGmMUXco03+3Olz/L
Fb6oV8B67SpAWfJNJVrRCpvEK/tQAPBvh3YxlehMes7YtrpKq7g=
=aOv1
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] creation of virtual directories

Posted by Igal Sapir <is...@apache.org>.
On 6/13/2018 9:06 AM, Christopher Schultz wrote:
> The XML declaration (<?xml?>) is always optional, but does provide
> important information if it's different from the default.
> Specifically, it tells the parser what version of XML is being used
> (default: 1.0) and what character encoding is being used (default: UTF-8
> ).
>
> I would say that it's probably best to include the XML declaration,
> especially if the documents are expected to be read/written by humans.

Yep.  Makes sense.


Igal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org