|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 13
Messages: 13
Messages: 13
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
Extending Struts
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
|
|
Message #145872
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Extending Struts
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
|
|
Message #145877
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
BeeHive and PageFlows
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
|
|
Message #145942
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Extending Struts
Thanks Artem for taking interest in extending struts article. Hope it is helpful.
Sunil
|
|
Message #145958
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Extending Struts
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.
|
|
Message #146059
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
What's the different between RequestProcessor and Action?
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?
|
|
Message #146121
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Extending Struts
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!
|
|
Message #146147
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
extending struts...
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.....
|
|
Message #146183
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
What's the different between RequestProcessor and Action?
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
|
|
Message #146198
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Extending Struts
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!
|
|
Message #146212
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
using struts with FDF/PDF forms
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
|
|
Message #146532
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Extending Struts
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.
|
|
Message #201739
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Struts Extention
i didn't understand the reason for i could extends struts framework to Spring Framework. Can you explain it to me? Thanks.
|
|
Message #202001
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Plese Help!
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 ???
|
|
 |
New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com |
 |
 |
Reza Rahman continues to explore the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(January 21, Article)
Ted Neward is an independent consultant specializing in high-scale enterprise systems, and an authority in Java and .NET technologies. He is the author and co-author of several books, including Effective Enterprise Java. At TheServerSide Java Symposium in March, he will be presenting sessions on pragmatic architecture, ECMAScript and Scala.
(January 15, Article)
Now that Oracle is absorbing Sun Microsystems, there mixed views on what should come of the Java Community Process (JCP). While some say Oracle should become the new steward of Java and keep the JCP much as it was, others argue that it may be time to open-source this widespread language.
(November 24, Article)
Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(November 2, Article)
SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options.
(September 28, Article)
Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team.
(September 22, Article)
Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies.
(July 14, Article)
JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags.
(June 29, Article)
In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project.
(June 23, Tech Talk)
Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now.
(June 15, Tech Talk)
In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements.
(June 15, Tech Talk)
In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls.
(June 4, Tech Talk)
Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable.
(May 28, Tech Talk)
This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work.
(May 26, Tech Talk)
Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers.
(May 21, Tech Talk)
Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application.
(May 19, Article)
Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)
The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)
|
|