Win a copy of Head First Android this week in the Android 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 ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

what can i do with web.xml?

 
Ranch Hand
Posts: 1143
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what can i do with web.xml??
i mean what-what things i can do with web.xml??
and can i use annotations instead of web.xml?
 
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you rephrase the question? What are you asking?

In general, you *have* to use web.xml. You don't have a choice. You use it to declare key aspects of your web application.
 
Punit Jain
Ranch Hand
Posts: 1143
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we give the <url-pattern> of our servlet in web.xml, and i read somewhere that we can also give this into the servlet itself using annotations, and we can easily change the url-pattern from class itself, no need to go for web.xml..

also i want to know what other things i can do in web.xml??
(ie. we can do error handling.)
 
Ranch Hand
Posts: 53
1
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For J2EE application web.xml is vital part.And also it is not possible to explain all things because it is depends on situation.but some part i would like explain here

1-par application should have one web.xml file.
2-you can able to define the welcome pages.
3-when server going to deployed any J2EE application it will look for only web.xml first
3-all Servlet entry should we present in this file
4-you can also add filter class
5.you can also mentioned dependency.
6-Secutiry
7-EJB reference
8-Tag Library
9-Message Destination
10-Session time out
11-Error pages

and also many more .i would like to recommend the Head first servlet and jsp .

Thanks
Prateek
 
Punit Jain
Ranch Hand
Posts: 1143
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay...thank you...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic