Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about web.xml file.

 
sharma anurag
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi to all my friends of javaranch.!!

i want to know that if i am creating servlet so for that i have to write respective web.xml file also from which the server gets the information about my servlet right.
I want to know that for every servlet i have to write the this following lines of code right.

ok so i want to know that will my above code is right or not??? please help me out from this .... and please give the correct coding also for this above web.xml ok.

Thanks in advance.!!!

[BPSouther: Added code tags]
[ September 06, 2007: Message edited by: Ben Souther ]
 
fred rosenberger
lowercase baba
Bartender
Posts: 12183
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to move this to our servlets forum
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At a glance, your deployment descriptor (web.xml file) looks fine.

If you want to avoid the need to configure a servlet for each and every component you write, look up the Front Controller or Command pattern.

We have an example in our code barn under Servlets.
Also Bear Bibeault has written an article in our Journal about the front controller pattern as used by his FrontMan framework.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The article Ben mentioned.

Also, an implementation of Front Man is available. Click on link in my sig.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic