Wrox Programmer Forums
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2006, 12:02 PM
Registered User
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Serving images

Hi,

I have some difficulty displaying images in a popup window. The server apparently sends them with a content type of utf-8 text, which leads to an exception page shown in the popup window instead of the picture.

In web.xml I checked the mime-mapping for the images:

    <mime-mapping>
        <extension>jpg</extension>
        <mime-type>image/jpeg</mime-type>
    </mime-mapping>
etc.

The html part is this:

<a href="#" onclick="window.open('${image.path}', '',
'status=no,width=${image.width},height=${image.hei ght}');">Show Picture</a>

How can I get the server to send the images with the proper Content-types?

Thanks,
Laszlo Borsos





Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Images from and Save Images to a Database cyndie VB.NET 2 August 17th, 2008 06:42 AM
serving a growing file ab_dev Beginning PHP 1 April 9th, 2006 12:50 PM
Serving ASP?? Oldon Classic ASP Basics 1 January 21st, 2005 06:41 PM
One instance of C# compo. serving multiple clients Nalin General .NET 1 January 14th, 2005 03:53 AM
How much faster is Apache serving HTML angrycat Apache Tomcat 1 September 27th, 2004 05:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.