• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts

 
sreejith panampilly
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a beginner in Struts please tell me what is the need foe giving *.do in the url pattern of web.xml

one more question do we have to write the action servlet or is it implemented by the container.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the need foe giving *.do in the url pattern of web.xml


It's a way of telling the Application Server to call the Struts action servlet. If you specified "*.*" as the url pattern, everything, including image files, css files, etc. would cause the action servlet to be called, and this is not what you want.

do we have to write the action servlet or is it implemented by the container.

It is not implemented by the container, but it is provided by the authors of the Struts framework, and it resides in the struts.jar file that is in your classpath. You definitely don't have to write it and probably don't have to extend it unless you're doing something very unusual.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic