• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

*.do and *.action

 
hari gutta
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Pie
Posts: 9257
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
".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.
 
hari gutta
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic