You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by George Sexton <ge...@mhsoftware.com> on 2016/09/06 23:58:50 UTC

Using server Web.xml Mime Types Data

Is there any easy way that I can use the mime types in the Tomcat server 
level web.xml file?

I know I can parse the XML myself, I was just wondering if there's a way 
to get the data already defined.


-- 
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.connectdaily.com

RE: Using server Web.xml Mime Types Data

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
George,
As I recall, anything in the server's web.xml is merged with the application's web.xml unless overridden by the applications own settings, i.e. if not defined in the app web.xml file.
Was there something specific you were asking that didn't come across in your question?
Jeff

> -----Original Message-----
> From: George Sexton [mailto:georges@mhsoftware.com]
> Sent: Tuesday, September 06, 2016 6:59 PM
> To: Tomcat Users List <us...@tomcat.apache.org>
> Subject: Using server Web.xml Mime Types Data
> 
> Is there any easy way that I can use the mime types in the Tomcat server
> level web.xml file?
> 
> I know I can parse the XML myself, I was just wondering if there's a way
> to get the data already defined.
> 
> 
> --
> George Sexton
> *MH Software, Inc.*
> Voice: 303 438 9585
> http://www.connectdaily.com

Re: Using server Web.xml Mime Types Data

Posted by Mark Thomas <ma...@apache.org>.
On 8 September 2016 17:06:13 BST, George Sexton <ge...@mhsoftware.com> wrote:
>
>
>On 9/7/2016 11:44 AM, Mark Thomas wrote:
>> On 07/09/2016 00:58, George Sexton wrote:
>>> Is there any easy way that I can use the mime types in the Tomcat
>server
>>> level web.xml file?
>>>
>>> I know I can parse the XML myself, I was just wondering if there's a
>way
>>> to get the data already defined.
>> ServletContext.getMimeType(String filename) ?
>
>Thanks for the tip. I honestly did search for some solutions before 
>posting. I feel like a fool now. :(

I wouldn't. Not asking the question would have been the foolish thing to do. If it makes you feel better, I had to look at how the Default servlet did it to be sure I had the right method.

Mark


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


Re: Using server Web.xml Mime Types Data

Posted by George Sexton <ge...@mhsoftware.com>.

On 9/7/2016 11:44 AM, Mark Thomas wrote:
> On 07/09/2016 00:58, George Sexton wrote:
>> Is there any easy way that I can use the mime types in the Tomcat server
>> level web.xml file?
>>
>> I know I can parse the XML myself, I was just wondering if there's a way
>> to get the data already defined.
> ServletContext.getMimeType(String filename) ?

Thanks for the tip. I honestly did search for some solutions before 
posting. I feel like a fool now. :(

Some days are diamonds, and some days are just pieces of coal.

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

-- 
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.connectdaily.com

Re: Using server Web.xml Mime Types Data

Posted by Mark Thomas <ma...@apache.org>.
On 07/09/2016 00:58, George Sexton wrote:
> Is there any easy way that I can use the mime types in the Tomcat server
> level web.xml file?
> 
> I know I can parse the XML myself, I was just wondering if there's a way
> to get the data already defined.

ServletContext.getMimeType(String filename) ?

Mark

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