Extending Struts

Discussions

News: Extending Struts

  1. Extending Struts (13 messages)

    Sunil Patil discusses three ways to extend Struts. You can create plugins to execute some business logic at application startup, create your own RequestProcessor if you want to execute some business logic at a particular point during the request-processing phase, or extend the ActionServlet class if you want to execute your business logic at either application startup or shutdown, or during request processing.

    This article uses a sample Struts application to demonstrate how to extend Struts using each of these three approaches. Two of the most successful examples of Struts extensions are the Struts Validation framework and the Tiles framework.

    Read more: Extending Struts

    Threaded Messages (13)

  2. Extending Struts[ Go to top ]

    I've done it for my project and it adds a lot of flexibility and added functionality to your applications while still conforming to the Struts compatibility specs.

    I am glad that somebody has finally wrote an article that gives one an idea on how to do it without extensive trial and error way of figuring things out or looking that much at the Struts source.

    Thanks, Sunil!

    Artem D. Yegorov
    http://www.activexml.org
  3. Extending Struts[ Go to top ]

    Thanks Artem for taking interest in extending struts article. Hope it is helpful.

    Sunil
  4. That means ActionServlet is responsible for handling all of your requests to Struts. You can create a sub-class of the ActionServlet class if you want to do something at application startup or shutdown or on every request, but you should try creating a PlugIn or RequestProcessor before extending the ActionServlet class. Before Servlet 1.1, the Tiles framework was based on extending the ActionServlet class to decorate a generated response. But from 1.1 on, it's used the TilesRequestProcessor class.
    In our project based on Struts Framework, we always extend our work by extending ActionServlet. The kind of session work can be done in the base ActionServlet. What's the different between extending RequestProcessor and ActionServlet? Why "you should try creating a PlugIn or RequestProcessor before extending the ActionServlet class" is reasonable?
  5. You want to extend RequestProcessor if you want to change or extend behaviour of URI to action matching and Forward processing.

    ActionServlet is extended if any additional initalization and actual raw request processing (not reuqest URI) is needed, like triggering some behaviour based on some request values and etc.

    Sincerely,

    Artem D. Yegorov
    http://www.activexml.org
  6. BeeHive and PageFlows[ Go to top ]

    The PageFlows feature of the Apache BeeHive project is basically a big Struts extension. The PageFlows code contains examples of the techniques described by the author, as well as examples of more advanced Struts extension techniques.

    BeeHive: http://incubator.apache.org/beehive/

    Doug
  7. Extending Struts[ Go to top ]

    Extending Struts by changing the RequestProcessor or the ActionServlet is very risky. I think that extending Struts by adding the SpringFramework can be a better choice.
  8. Struts Extention[ Go to top ]

    i didn't understand the reason for i could extends struts framework to Spring Framework.
    Can you explain it to me?
    Thanks.
  9. Extending Struts[ Go to top ]

    Nicely done. Having done both a custom solution and used struts, I feel that extending struts in this manner is incredibly powerful and under-used.<br><br>
    Also very useful as I'm in the process of mentoring a team of newbies onto struts and trying to convince them of its usefulness over Model 1 vanilla JSPs, and this provides yet another excellent reason!
  10. extending struts...[ Go to top ]

    I have found a fourth and best way to extend struts... you simply download webwork1 and delete all those nasty config files and dependency jars :) oh yes, and all that useless form code and servlet code... Ahhh, someone smack Jakarta with a POJO. seriously though, there is an extension to struts which makes the actions be non-reentrant. That solves a huge problem of struts off the bat. Sad Craig disagrees with a more sane model.....
  11. Extending Struts[ Go to top ]

    As another member suggested, u wud be better off convincing them of WebWork or Spring-MVC..
    Nicely done. Having done both a custom solution and used struts, I feel that extending struts in this manner is incredibly powerful and under-used.<br><br>Also very useful as I'm in the process of mentoring a team of newbies onto struts and trying to convince them of its usefulness over Model 1 vanilla JSPs, and this provides yet another excellent reason!
  12. Extending Struts[ Go to top ]

    As another member suggested, u wud be better off convincing them of WebWork or Spring-MVC..
    In a situation were you have J2EE developers on a J2EE system looking for an MVC framework that has a solid background, good documentation (standard docs and books), an excellent and supportive community and has more employment opportunities (220 v 3 on Jobserve this morning[18/11/04]), you have to go for Struts. On an enterprise system where object creation is an issue, especially on an early JVM, Struts will always score better than WW due to its architecture.

    I’m a big fan of OpenSymphony, I think they do some great work (I always try to use clickstream for example), but I think that the big picture favours Struts at the moment. Even thought there are definitely issues such as ActionForm bloat, the market has gone for struts in a big way. I don’t know enough about Spring-MVC to comment but I believe that you can easily inter-op between a Struts presentation layer with a Spring mid-tier which would give you the best of both worlds.
  13. using struts with FDF/PDF forms[ Go to top ]

    Any body can tell me whether can we use PDF forms instead of form in the jsp and struts. FDF toolkit allows us to extract the data filled in pdf forms - we normally use FDF toolkit and servlet to extract the same. But I m not too sure whether can I use this with struts framework.
    if anybody can point some samples/articles on the same it will be great
  14. Plese Help![ Go to top ]

    I was serching about build.xml file, to create .war with ANT. But, is possible the Eclipse generates autimatically this file. Can Eclipse generate automatically the build.xml file ???