This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts" Watch "Struts" New topic
Author

Struts

sreejith panampilly
Ranch Hand

Joined: Jun 15, 2006
Posts: 49
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

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts
 
Similar Threads
Session management & virtual hosting...
Paging in Struts
Problem passing query string....
struts blank.war
Problem in web.xml in declaring listener