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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:34:21+00:00 2026-05-26T19:34:21+00:00

The following web.xml doesn’t seem to work: <servlet-mapping> <servlet-name>MyServlet</servlet-name> <url-pattern>*.wfn</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>SelectSessionServer.wfn</welcome-file> </welcome-file-list>

  • 0

The following web.xml doesn’t seem to work:

<servlet-mapping>
    <servlet-name>MyServlet</servlet-name>
    <url-pattern>*.wfn</url-pattern>
</servlet-mapping>

<welcome-file-list>
    <welcome-file>SelectSessionServer.wfn</welcome-file>
</welcome-file-list>

Instead, a directory listing is shown. I have an index.html file in there, and that index.html file has a link to exactly the same SelectSessionServer URL, and then it works properly.

(“it” = Glassfish & Tomcat)

How come ?

I’ve seen this question ( servlet as welcome-file-list in tomcat 7 ) and its responses seem to suggest that my setup should be working.

  • 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-26T19:34:22+00:00Added an answer on May 26, 2026 at 7:34 pm

    Make sure that your web.xml root declaration conforms Servlet 3.0 in order to map a servlet on a welcome file. You’re using Tomcat 7 and (supposedly) Glassfish 3, which are Servlet 3.0 containers, so you should make sure that your web.xml is also declared as such.

    <web-app 
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
        version="3.0">
    

    It’ll also give additional benefits of new Servlet 3.0 features such as @WebServlet annotation and so on.

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

Sidebar

Related Questions

If I do not specify the following in my web.xml file: <session-config> <session-timeout>10</session-timeout> </session-config>
In the web.xml of my web app I have configured the server as following:
I have an application web.xml with the following entry: <error-page> <error-code>404</error-code> <location>/system_files/error/p_notfound.jsp</location> </error-page> However,
Say I have the following web.config: <?xml version=1.0 encoding=utf-8?> <configuration> <system.web> <authentication mode=Windows></authentication> </system.web>
I have the following xml that's sent to me from a web service. I'm
Mime-types are specified in Tomcat's conf/web.xml file. It's look like this: <mime-mapping> <extension>txt</extension> <mime-type>text/plain</mime-type>
I have a WCF web service for a silverlight application that doesn't seem to
I'm trying to add a mime-mapping element to the web.xml. My current best stab
I made a web.config ( full file , it doesn't show XML errors) <?xml
Given a URL rewrite rule like the following: <rule name=RewriteUserFriendlyThings stopProcessing=true> <match url=^cat/sub-cat/(\d+)/([^/]+)/?$ />

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.