struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohit_Arora" <Rohit_Ar...@infosys.com>
Subject RE: what is .do mapping?
Date Fri, 26 Sep 2003 09:47:21 GMT
Hi Abhijeet,
  The .do is added due to the action servlet mapping as defined in the web.xml

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

You can use any suffix instead of the '.do' but you will have to define the same in the web.xml.
But it is a general convention to use the *.do . The other way with which you define the action
servlet mapping is using  <url-pattern>/do/*</url-pattern>

The mapping defines how your actions will work.

Hope this is of use for you

Regards,
Rohit Arora


-----Original Message-----
From: Abhijeet Mahalkar [mailto:Abhijeet.Mahalkar@indussoft.com]
Sent: Friday, September 26, 2003 2:38 PM
To: Struts Users Mailing List
Subject: what is .do mapping?


When invoke the jsp using 

http://localhost/xyz/pages/UserGroupMaster.jsp

URL and when i submit the page trhu submit button the URL gets changed to following will anybody
tell me why? and what is ".do" stands for? where do we make the entry of this.?

is it the action mapping we are using in struts -config.xml file ?

 <action
         path="/usergroupmaster"
         type="ActionUserGroupMaster"
         name="UserGroupMasterActionForm"
         scope="request"
         validate="false"
         input="/pages/UserGroupMaster.jsp" parameter="action">
         
      <forward name="success" path="/pages/success.jsp"/>
     <forward name="failure" path="/pages/failure.jsp"/>
     <forward name="usergroupmaster" path="/pages/UserGroupMaster.jsp"/>
     </action>


http://localhost/xyz/usergroupmaster.do

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message