Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.do files in struts

 
Rajesh Navduri
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to Struts. I have a seen a file with .do extension. Can anybody tell me what this file does and where will we use this in struts frame work??
Regds
Rajesh
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where was this *.do file? What was it called and which application did it come with?
The only *.do connected to struts that I know about is the .do servlet mapping in the web.xml to route all such requests to the struts action servlet.
Is that what you mean?
 
Rajesh Navduri
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks adam, this is what I need.
 
Chuck Lowry
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*.do is a directive in the web.xml file that tells the application server to send all form actions to the controller. The controller then takes whatever the first part of the statement (eg. if action.do, then uses action) and compares it against what is in your struts-config.xml file to determine which action mapping to use. There are no actuall .do files anwhere.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally I prefer /do/*, but maybe that's just me.
 
Junilu Lacar
Bartender
Pie
Posts: 7316
45
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SBC Ameritech's account management app uses *.struts -- whatever works for you, I guess. We used *.do on the two Struts applications I've worked on.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are reasons for which one might be preferable to the other. Some browsers will ignore the mime-type sometimes, so if you wanted to serve up a dynamic pdf, you might want a pdf extension so the browser recognizes it. On the other hand, to use modules under 1.1 currently only works with extension mapping.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic