This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Need help with web.xml file

Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to create an web.xml page
I frequently access a servlet page with this command:
Is it possible to avoid typing this tedious line by using the web.xml file?
Here is what I have tried:

so thus the code now becomes:
2nd question:
I have put the web.xml file at this location:
The file and rest of Java pages are at:
and all my HTML and JSP pages are at:
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With the servlet-mapping tag in place, you shouldn't need /servlet in your url. It also appears that you have a problem with your context. Your webapp folder is called myJSPs-XML, but you are typing myJSPs in your URL. Unless you have changed your context in the Tomcat configuration file, that shouldn't work.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic