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 8471641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:51:03+00:00 2026-06-10T16:51:03+00:00

FYI: I’m running Windows Server 2008 R2, with IIS 7.5 and Apache Tomcat 5.5.

  • 0

FYI: I’m running Windows Server 2008 R2, with IIS 7.5 and Apache Tomcat 5.5. IIS talks to Tomcat, via the AJP Connector, version 1.3. Tomcat is SSL enabled; so, the web site is enabled for both HTTP and HTTPS traffic. I also have a security constraint in the web.xml file to redirect to enforce HTTPS traffic for a particular file, via the url-pattern.

Having said all that, I have created a servlet filter that is supposed to redirect https to http. Unfortunately, when I restart the tomcat server and type in the login page, I get the following error:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

I created the class in Eclipse and exported it as a JAR file called RedirectToHTTP.jar, and I placed this file in the WEB-INF/lib directgory of the application, NOT in the Tomcat installation directory.

I don’t know what the problem is and I would appreciate any feedback. Thank you.

Update

Upon recommendation in the comments, I checked the log files found an error related to my filter

— Exception starting filter redirectFilter

java.lang.UnsupportedClassVersionError: myfilterpkg/RedirectToHTTPFilter : Unsupported major.minor version 51.0.

I compiled the filter with JRE 1.7. I think Tomcat might be using a lower version of JRE. Could that be the problem?

Here is the relevant data in the web.xml file:

<filter>
    <filter-name>UTF8Encoder</filter-name>
     <filter-class>com.remedy.arsys.support.UTF8EncodingFilter</filter-class>
     <init-param>
         <param-name>Param1</param-name>
         <param-value>0</param-value>
     </init-param>
</filter>

<filter>
    <filter-name>redirectFilter</filter-name>
    <filter-class>myfilterpkg.RedirectToHTTPFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>UTF8Encoder</filter-name>
    <servlet-name>*.jsp</servlet-name>
</filter-mapping>

<filter-mapping>
    <filter-name>redirectFilter</filter-name>
    <url-pattern>/index.jsp</url-pattern>
</filter-mapping>

Here is the Java class:

package myfilterpkg;

import java.io.IOException;  

import javax.servlet.Filter;  
import javax.servlet.FilterChain;  
import javax.servlet.FilterConfig;  
import javax.servlet.ServletException;  
import javax.servlet.ServletRequest;  
import javax.servlet.ServletResponse;  
import javax.servlet.http.HttpServletRequest;  
import javax.servlet.http.HttpServletResponse;  
import javax.servlet.http.HttpSession; 

@SuppressWarnings("unused")
public class RedirectToHTTPFilter implements Filter {

    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        if ((request instanceof HttpServletRequest) && (response instanceof HttpServletResponse)) {
            String redirectTarget = ((HttpServletRequest)request).getRequestURL().toString().replaceFirst("https", "http");

            if(request.isSecure()) {
                ((HttpServletResponse)response).sendRedirect(redirectTarget);
            }
            else {
                chain.doFilter(request, response);
            }
        }
    }

    @Override
    public void destroy() {
    }

    @Override
    public void init(FilterConfig arg0) throws ServletException {
    }
}
  • 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-10T16:51:04+00:00Added an answer on June 10, 2026 at 4:51 pm

    The filter must be compiled with the source level of the runtime the tomcat server actually runs in. Otherwise you will get above error when classloading.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

FYI, ShadowBox is a javscript media viewer/lightbox. http://www.shadowbox-js.com/ Running into an issue when trying
FYI: SQL Server 2005 I have a database user account (user_web) that has the
FYI This is homework. I have to build a Java Chat server. I have
Edit: FYI for future readers, this issue has been fixed as of version 2.3.606.0
I need to profile a server-client Java application (based on Jersey/REST FYI). I have
I am having several problems with tessdll in Visual Studio 2008. FYI, I created
FYI: I'm fairly new to ggplot2 and ggmap so I apologize for the sloppy
FYI I'm programming in objective-C but anyone might be able to help. I've been
FYI, There is some overlap in the initial description of this question with a
Ok, so I have the code below (Objective-C FYI) and I was wondering if

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.