my dog learned polymorphism*
The moose likes Struts and the fly likes .do files in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark ".do files in struts" Watch ".do files in struts" New topic

.do files in struts

Rajesh Navduri
Ranch Hand

Joined: Jun 28, 2001
Posts: 31
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??
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 565
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?

I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Rajesh Navduri
Ranch Hand

Joined: Jun 28, 2001
Posts: 31
Thanks adam, this is what I need.
Chuck Lowry

Joined: May 29, 2002
Posts: 13
*.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, 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

Joined: Nov 09, 2000
Posts: 6450
Personally I prefer /do/*, but maybe that's just me.
Junilu Lacar

Joined: Feb 26, 2001
Posts: 4445

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.

Junilu - [How to Ask Questions] [How to Answer Questions]
Jason Menard

Joined: Nov 09, 2000
Posts: 6450
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.
I agree. Here's the link:
subject: .do files in struts
Similar Threads
File download
Struts error
Struts Taglibs and web.xml
problem in seperate modules in struts
struts blank.war