Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8693541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:34:01+00:00 2026-06-13T00:34:01+00:00

I have a UTF-8 character encoding filter and a filter-mapping for *.jsp. However, one

  • 0

I have a UTF-8 character encoding filter and a filter-mapping for *.jsp. However, one of my .jsp files returns a binary response (e.g. GIF) and I’d like to exclude it.

How can I do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:34:02+00:00Added an answer on June 13, 2026 at 12:34 am

    using .jsp return a gif might be a bad practise

    besides a web.xml filter settings
    your can extend the spring one and make it binary safe

    public class BinarySafeCharacterEncodingFilter extends CharacterEncodingFilter {
    
        @Override
        protected void doFilterInternal(HttpServletRequest request,
                HttpServletResponse response, FilterChain filterChain)
                throws ServletException, IOException {
    
            if(!"image/gif".equals(response.getContentType())){
                super.doFilterInternal(request, response, filterChain);
            }
    
    
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I face this problem. I have a filter that sets the character encoding of
How can one set character encoding on external JavaScript files using only Websphere (5.1)?
the HTML file has an encoding like windows-1254 and I have UTF-8, is it
I'm trying to use eclipse encoding UTF-8, for polish characters. Unfortunately, I still have
I have a file UTF-8 encoding in windows, and when i use it under
I have model: # encoding: utf-8 class Tag include Mongoid::Document field :name, type: String
I have a Java project that reads UTF-8 encoded .txt files in order to
I have a problem with character encoding in some HTML pages. It seems that
I have a pretty simple JSP/Servlet 3.0/Spring MVC 3.1 application. On one of my
I have an app and having character encoding problems, the app is in turkish

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.