You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eda Srinivasareddy Eda <ed...@yahoo.com> on 2001/06/11 09:39:58 UTC

Where should I use .do and where .jsp for the same file

Hi 
Here is a small doubt. Please inform me where should I call a file with .do extension and where should I call the same file with .jsp extension.
Looking forward
Srinivas



---------------------------------
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.

Re: Where should I use .do and where .jsp for the same file

Posted by Oleg V Alexeev <go...@penza.net>.
Hello Eda,

Monday, June 11, 2001, 11:39:58 AM, you wrote:

ESE> Hi
ESE> Here is a small doubt. Please inform me where should I call a
ESE> file with .do extension and where should I call the same file
ESE> with .jsp extension.

*.do is not file - web.xml maps all requests to this extension to the
ActionServlet. ActionServlet uses information from struts-config to
process such request and uses to this purpose Action classes -

    <action    path="/news"
               type="com.sv.action.BaseViewAction"/>

Each Action class contains perform method. ActionServlet call this one
and it returns ActionForward class to switch to appropriate page
(*.jsp) to display result of processing or error page or another
purpose page.

Another words - *.do is mapping to the Action class to perform some
activity at server and *.jsp is view to display result of such
activity.
               
-- 
Best regards,
 Oleg                            mailto:gonza@penza.net



Re: Where should I use .do and where .jsp for the same file

Posted by Eda Srinivasareddy Eda <ed...@yahoo.com>.
 Hi 
The main utilization of .do arises with the <html:link...> tag. '.do' is used only to call a mapping not to call a jsp. If u wanted to call a mapping through a link we can't call it as '/mappingname'.We can  call it only as '/mappingname.do' . For clarity see the following code.
<html:link page="/iterate" style="text-decoration:none" target="_self"> is WRONG
<html:link page="/iterate.do" style="text-decoration:none" target="_self"> is CORRECT.
But with the submit button we can call a mapping as '/mappingname'. Here no need to use .do extension.
Are there any more points regarding this with any one of u pals.
Eda
 
  Eda Srinivasareddy Eda <ed...@yahoo.com> wrote: 
Hi 
Here is a small doubt. Please inform me where should I call a file with .do extension and where should I call the same file with .jsp extension. 
Looking forward 
Srinivas



---------------------------------
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.


---------------------------------
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.