• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

to .do or not to .do?

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get confused sometimes where to put the .do extension.
Assuming struts is setup to handle all the *.do extension:

<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

Is it safe to assume all the abcs.do in jsp pages will be treated like /abcs ? Can't we just not put .do extention at all? Because sometimes I see places with .do, sometimes I don't.

I know some places if you put .do it may actually crash the program. Such as in Struts-config.xml in the action mapping area...
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The rule of thumb that I follow is:

If it's in a Struts tag, don't use .do. If it's not a Struts tag, you must use .do. Examples:



While Struts tags will generally accept .do, it's generally less confusing if you leave it out.
 
reply
    Bookmark Topic Watch Topic
  • New Topic