struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: Calling Struts Action file through command line.
Date Tue, 17 Aug 2010 20:09:02 GMT
Struts 1 or Struts 2? If you're using Struts 2, then I'd say to take a
look at the xwork framework. Struts 2 is built from xwork which is a
stand-alone command-pattern framework (with type conversion,
validation, etc. etc.).

-Wes

On Tue, Aug 17, 2010 at 3:47 PM, E2241 <amuh41@yahoo.com> wrote:
>
> Hi,
> 1.) I would like to know if it is possible to call the struts framework
> through a command line or a console application. Can one call an action
> class? Is there any possibility to do so? I think its not possible as
> everything would depend on the struts-config file and the Http Request
> object. From the config file the request would probably know which action
> class to invoke and the respective bean (if needed for any business logic)
> would be called.
>
> 2.) I have a web application which is based on the struts framework. I know
> for a fact that only once the request is submitted the struts-config would
> map the action and the bean. But what happens in a case where there would be
> no Http Servlet Request object, instead it would be a call from a console
> application trying to invoke an action class to perform the business logic;
> is that possible?
>
> 3.) What if i create a HttpServletRequest object in the console app and then
> call the action class? Can we call the action class in this manner by
> instantiating it and calling execute(). Then I would probably have to call
> the bean in the action class itself beating the MVC pattern framework and
> the use of the config file. Not sure if we can invoke the config file from
> command line.
>
> Please give your thoughts on this. I am not sure if I have been clear enough
> in explaining this. My main requirement is to try and see if i can call and
> execute the business logic implemented on the struts framework (in action
> and bean) through a console application
>
> --
> View this message in context: http://old.nabble.com/Calling-Struts-Action-file-through-command-line.-tp29449294p29449294.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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


Mime
View raw message