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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:33:10+00:00 2026-05-23T09:33:10+00:00

What url-pattern should we be putting in web.xml for making my servlet listen on

  • 0

What url-pattern should we be putting in web.xml for making my servlet listen on this path, /{name}/servlet?

Here, name is a variable so I should be able to listen on
http:8080//testproject/xyz/servlet

or

http:8080//testproject/abc/servlet.

Here xyz is a variable name. This is basically a REST URL with parameters, though i can use @Path and @PathParam, but I want to do it in web.xml only.

<servlet-name> A </servlet-name>
<url-pattern> /{}/sevlet </url-pattern> 

Any clues to what put for variable string in the url

  • 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-23T09:33:11+00:00Added an answer on May 23, 2026 at 9:33 am

    You can look into servlet filters

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

Sidebar

Related Questions

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>
Say in my web.xml file, I define a servlet like so: <url-pattern>/MyURL/*</url-pattern> How do
<servlet> <servlet-name>myservlet</servlet-name> <servlet-class>workflow.WDispatcher</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>myservlet</servlet-name> <url-pattern>*NEXTEVENT*</url-pattern> </servlet-mapping> Above is the snippet from
My URLconf contains this pattern: url(r'^accounts/logout/$','django.contrib.auth.views.logout', name=logout), And I've trying to reverse that in
I need some suggestions. I have defined servlet mapping as <servlet-mapping> <servlet-name>My Servlet</servlet-name> <url-pattern>/</url-pattern>
Here is the example code from my web.xml <security-constraint> <display-name> change password</display-name> <web-resource-collection> <web-resource-name>change
I'd like to specify a Servlet URL pattern to match a URL that ends
How to tell web.xml that it should not handle .htc files and so leave
This should be an easy question. I have two url patterns in Django: url(r'^wiki/page/(?P<page_title>.*)',
webapps | |----helloworld | |----WEB-INF | |-----classes-HelloWorldServlet.class |-----lib----servlet-api.jar |-----web.xml The above is my directory

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.