aspose file tools*
The moose likes Struts and the fly likes *.do and *.action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "*.do and *.action" Watch "*.do and *.action" New topic
Author

*.do and *.action

hari gutta
Ranch Hand

Joined: Mar 03, 2013
Posts: 33

Hello all,

I am new to Struts, so my question might look silly but please bear me. I what to know when we specify *.do and *.action.
From what I understood, *.action refers to action page. For instance if we have something like

<tiles-definitions>
<definition name="Systems" extends="defaultLayout" >
<put-attribute name="title" type="string" value="System services" />
<put-attribute name="Content" value="Content.jsp" />
</definition>
</tiles-definitions>

Then I guess they specify it as Systems.action

Even when we have something like

<action name="action1"

Then I thought they would refer it as action1.action, but in one tutorial they referred it as action1.do

So please give me some input. Thanks.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8971
    
    9

".do" was the convention for a URL that is mapped to an action in Struts 1. ".action" is the convention for Struts 2.
In Struts 1, you could see this readily as the web.xml would map any ".do" request to the Struts ActionServlet.


[How To Ask Questions On JavaRanch]
hari gutta
Ranch Hand

Joined: Mar 03, 2013
Posts: 33
Joe Ess wrote:".do" was the convention for a URL that is mapped to an action in Struts 1. ".action" is the convention for Struts 2.
In Struts 1, you could see this readily as the web.xml would map any ".do" request to the Struts ActionServlet.


Thanks for the info.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: *.do and *.action