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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:00:59+00:00 2026-05-28T00:00:59+00:00

I have a @WebServlet() and a @WebFilter(urlPatterns = {, /, /*}, asyncSupported = true)

  • 0

I have a @WebServlet("") and a @WebFilter(urlPatterns = {"", "/", "/*"}, asyncSupported = true)

But the filter is not being invoked for the servlet 🙁

I am using @WebServlet("") instead of @WebServlet("/") based on instructions in: http://www.java.net/node/700651?force=613

I am using the Glassfish version bundled in the latest Java EE 6 SDK bundled with Java SE 7. (I switched from using the latest GA of Jetty because Jetty incorrectly implements @WebServlet(""))

  • 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-05-28T00:01:00+00:00Added an answer on May 28, 2026 at 12:01 am

    This is a bug in Glassfish and according to a kind member on the Glassfish forum: http://www.java.net/node/700651#comment-821081 the workaround is to filter by servlet name in addition to the URL patterns. This also requires giving a name to the servlet. So the annotations would be: @WebServlet(name = "foo", urlPatterns = "") and @WebFilter(servletNames = "foo", urlPatterns = {"", "/*"}) and once the bug is fixed you can remove the name of the servlet and the explicit reference to it in the filter.

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

Sidebar

Related Questions

I have created a servlet 3.0 to explore asynchronous request processing: @WebServlet(name=MyTest, urlPatterns={/MyTest}, asyncSupported=true)
The idea: I have a JAX-RS webservice servlet (Object called webServlet ) which instantiates
I have a servlet like this: @WebServlet(/a/path) @WebInitParam(name=name, value=name_value) public class MyServlet extends HttpServlet
I have set up i18n to my web app using Spring.It works fine.But I
I have a view resolver: <bean id=jspViewResolver class=org.springframework.web.servlet.view.InternalResourceViewResolver> <property name=viewClass value=org.springframework.web.servlet.view.JstlView/> <property name=prefix value=/WEB-INF/jsp//>
I have some webserver resources protected with Form based Authentication. The requirement is to
I am using Spring 3 MVC and MySQL 5 as my DB. I have
i have a web.xml with these 2 servlet: <servlet> <servlet-name>ApplicationContextFactory</servlet-name> <servlet-class>com.bamboo.common.factory.ApplicationContextFactory</servlet-class> <load-on-startup>1</load-on-startup> </servlet> AND
In my appname-servlet.xml I have: <!-- freemarker config --> <bean id=freemarkerConfig class=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer> <property name=templateLoaderPath
Problem with i18n and Spring 3 mvc namespace I have not figured out how

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.