You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nguyen Xuan Son <ya...@gmail.com> on 2009/12/10 18:06:28 UTC

excute method will not work without the form's button

dear all
I realized that the execute method could not be reached without the form's
button
in detail, my example is that
i want to display the data table using display tag whenever the page is open
i placed all the source code in the execute method
however nothing is displayed

after i inserted the button within the form which contain my display tag
after i clicked the button the source code is executed
all the requested data is displayed

is there any way that whenever I access to the JSP webpage
the source code which helps display data using display tag will be execute?

thank you very much
I can attach those files which I've implemented if you want to know in
detail

-- 
=======================================================================
Ritsumeikan University, Asia JinZai Project
Master of Information Science
Nguyen Xuan Son

Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu
Rien, Room 103
Tel/Fax  : 81-(0)90-3976 2246
Email    : nr0003xx@ed.ritsumei.ac.jp
Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
=======================================================================

Re: excute method will not work without the form's button

Posted by Saeed Iqbal <sa...@gmail.com>.
Or index only instead of index.action

On Fri, Dec 11, 2009 at 12:06 PM, Lukasz Lenart <
lukasz.lenart@googlemail.com> wrote:

> 2009/12/11 Nguyen Xuan Son <ya...@gmail.com>:
> > can you tell me more in detail?
> > thank you very much
>
> You're probably accessing your application like that
> http://localhost:8080/myapp/index.jsp
>
> And in such case, action isn't executed. Try to create action that
> will have execute() method and will return SUCCESS and the result will
> the index.jsp, then you access your application in that way
> http://localhost:8080/myapp/index.action
>
> It's a good practice in Struts not to access jsp (or other) pages
> directly, all the time define actions and the forward to jsp
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Re: excute method will not work without the form's button

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/12/11 Nguyen Xuan Son <ya...@gmail.com>:
> can you tell me more in detail?
> thank you very much

You're probably accessing your application like that
http://localhost:8080/myapp/index.jsp

And in such case, action isn't executed. Try to create action that
will have execute() method and will return SUCCESS and the result will
the index.jsp, then you access your application in that way
http://localhost:8080/myapp/index.action

It's a good practice in Struts not to access jsp (or other) pages
directly, all the time define actions and the forward to jsp


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


Re: excute method will not work without the form's button

Posted by Nguyen Xuan Son <ya...@gmail.com>.
can you tell me more in detail?
thank you very much

2009/12/11 Lukasz Lenart <lu...@googlemail.com>

> 2009/12/10 Nguyen Xuan Son <ya...@gmail.com>:
> > is there any way that whenever I access to the JSP webpage
> > the source code which helps display data using display tag will be
> execute?
>
> Yes, do not go directly to jsp pages, always access them through actions
> ;-)
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
=======================================================================
Ritsumeikan University, Asia JinZai Project
Master of Information Science
Nguyen Xuan Son

Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu
Rien, Room 103
Tel/Fax  : 81-(0)90-3976 2246
Email    : nr0003xx@ed.ritsumei.ac.jp
Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
=======================================================================

Re: excute method will not work without the form's button

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/12/10 Nguyen Xuan Son <ya...@gmail.com>:
> is there any way that whenever I access to the JSP webpage
> the source code which helps display data using display tag will be execute?

Yes, do not go directly to jsp pages, always access them through actions ;-)


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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