The cloud has many benefits, but when it comes to application development, how does the cloud help enterprises and development teams create custom software and applications that end users actually care about? Using real world examples from Adobe, Herff Jones and Navy Federal Credit Union, this session will highlight the advantages cloud computing provides for quickly developing custom software and applications with compelling user experiences.
In their general session at the 10th International ...| By Kris Vishwanathan | Article Rating: |
|
| August 9, 2007 01:00 PM EDT | Reads: |
28,280 |
The Struts Framework from Apache is a very popular, robust Web application framework. Many corporate companies have deployed tons of Web applications using Struts. And they hit the ground with abundant technical resources. They can develop newer applications quickly. Portal implementations offer a new challenge by introducing new frameworks and APIs. To leverage existing assets and skills, WebSphere Portal supports the Struts Portlet Framework so Struts Web applications can be easily migrated to a portal.
AJAX, or Asynchronous JavaScript and XML, is a new happening technology to make Web applications function like client/server applications. I mean Web pages triggering requests based on events (asynchronously) that refresh only specific parts of a page as opposed to refreshing the whole page.
The Struts Framework
There's tons of information on Struts, AJAX, and the Struts Portlet Framework available on the Web. In this article I'm going to provide a brief introduction to these topics; for more details check out the resources section.
The Struts Framework is an implementation of the MVC architecture, with Model being the business logic represented using JavaBeans, EJBs, etc., View the presentation layer represented by using JSPs, ActionForms, and tag libraries, and Controller the ActionServlet and Action classes (see Figure 1).
Struts Control Flow
Here is the typical request-response cycle for the Web application using Struts:
- The client requests a path matching the Action URI pattern.
- The Web container passes the request to the ActionServlet.
- The ActionServlet looks for the Struts configuration file, if this application has multiple modules it looks for the appropriate mapping for the given path in any of the Struts configuration file.
- If the mapping specifies a form bean, ActionServlet looks to see if one exists or it creates one.
- Once the form bean is created, ActionServlet populates values from the HTTP request. If the mapping has a validate property as true, ActionServlet invokes the validate method on the form bean. If the validation fails, the control flow ends there.
- If the Struts configuration file specifies action mapping then the appropriate action class 'execute' method is invoked with an instantiated form bean as a parameter.
- The Action may call other business objects and repopulate the form bean with the latest values and other business functions as needed.
- Based on where you want to send the control next, the Action reads ActionForward and the Action URI from the Struts configuration file and returns to the ActionServlet.
- If the ActionForward is a URI to the JSP to display the page, the control flow ends by sending the output to the browser or if it's forwarded to another Action URI the above flow starts again.
AJAX Control Flow
- A Web page sends its requests using an XMLHttpRequest object and JavaScript function, which handles talking to the server.
- Nothing has changed for the Web application server; it still responds to each request, the way it did it before.
- The server's response only has the data it needs in the XML form, without any markup or presentation.
- The JavaScript dynamically updates the Web page without redrawing the whole page.
- Most of the page doesn't change, only the parts of the page that need to change is updated, and that asynchronously.
A portlet processes and renders differently than a servlet. A servlet will do all its processing in the service method, while the portlet will divide action processing and rendering into two separate methods, hence portlet processing is defined as a two-phase approach. Figure 3 explains the two-phase processing approach of a Struts portlet. To invoke actions in the rendering phase there is a new interface called IStrutsPrepareRenderer. For more details see Executing Struts actions during the render phase of IBM WebSphere Portal.
IBM supports Struts Portlet Framework for both IBM API and JSR 168 API portlet containers. Users can easily migrate existing Struts applications to Struts portlet applications using either of the portlet's APIs. For more information on migrating and developing newer applications using the Struts Portlet Framework see the Portal Info Center.
Struts Portlets with AJAX
Though AJAX isn't the right solution for every Web application, there's increasing curiosity and enthusiasm among organizations to explore its benefits and see how it works for their applications. AJAX isn't new, but it's all on the client side and making it work with different server-side frameworks is a challenge. This article is a result of my client experience in developing Struts portlet applications with AJAX. In the sections above I briefly described Struts and AJAX. In the sections below I'll describe some of the challenges faced during implementation. To develop AJAX applications there are several toolkits such as Google Web Toolkit (GWT), DOJO, AJAX Faces, and JSON, but for simplicity's sake we chose a plain vanilla implementation.
The tricks to rendering content asynchronously using AJAX has more to do with JavaScript and XMLHttpRequestObject than any server-side technology, however, getting the blend of AJAX working with server-side frameworks involves careful design and architectural thinking.
Making asynchronous calls to the server using AJAX best fits a portal scenario with different portlets representing different back-end application views. However, this feature isn't supported with portlet URLs since each response from the portlet container represents a portal page with different portlets with different window states and modes. Given this limitation, the alternative we have is the XMLHttpRequest object calling a servlet from a servlet container as depicted in Figure 4.
To demonstrate the above scenario I have used the simple downloadable example shown below.
As in Figure 5 and Figure 6, when the user clicks on the menu items, the right-side blue box items get refreshed without unloading the whole page.
Below are some of the challenges we had and I'll explained how we addressed them.
Published August 9, 2007 Reads 28,280
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Kris Vishwanathan
Kris Vishwanathan is an IT Architect who has been with IBM since 2003. He worked as a senior developer and architect for IBM Systems and Technology Group before joining IBM Software Services for Lotus at the end of 2004. He has been part of the delivery team implementing WebSphere Portal and Web Content Management (WCM) solutions. In addition to architecting solutions for clients, he also sets up portal production environments involving portal clustering, Tivoli Access Manager, LDAP, user registry configurations, and portlet development using JSR168, JSF, IBM API, and WCM API. He is an IBM Certified WebSphere Portal System Administrator and Solution Developer.
![]() |
suwei 04/07/08 10:11:46 AM EDT | |||
where does download the strutsAJAXportlet.war ? |
||||
![]() |
Chrisf 11/13/07 01:17:01 PM EST | |||
Hi, Can we get the source code for this article please? Thanks. |
||||
![]() |
sharkbob 05/16/07 07:53:23 AM EDT | |||
I cannot find a reference to the war file thanks |
||||
- Agile Adoption – Crossing the Chasm
- Architecture Governance – the TOGAF Way
- Cisco Unveils Visual Collaboration Solutions in the Post-PC Era, Extending the Reach of TelePresence With New Mobile-to-Immersive Offerings
- Agile Development & Enterprise Architecture Practice – Can They Coexist?
- Cross-Platform Hybrid Mobile Application Development
- Adobe Study Shows Social Media Impact Undervalued by Nearly 100 Percent
- Trends in Social Media – 2012
- Apply Agile When Deploying Apps
- The Web – Changing the Way We Work
- Cloud Expo New York: Making the Enterprise Comfortable with the Cloud
- User Group Malaise?
- Improving the Mobile Experience with HTML5
- Agile Adoption – Crossing the Chasm
- Architecture Governance – the TOGAF Way
- Cisco Unveils Visual Collaboration Solutions in the Post-PC Era, Extending the Reach of TelePresence With New Mobile-to-Immersive Offerings
- Agile Development & Enterprise Architecture Practice – Can They Coexist?
- Cross-Platform Hybrid Mobile Application Development
- Adobe Study Shows Social Media Impact Undervalued by Nearly 100 Percent
- Trends in Social Media – 2012
- Apply Agile When Deploying Apps
- The Web – Changing the Way We Work
- Oops! HTML5 Does It Again
- Cloud Expo New York: Making the Enterprise Comfortable with the Cloud
- User Group Malaise?
- Building a Drag-and-Drop Shopping Cart with AJAX
- What Is AJAX?
- Google Maps! AJAX-Style Web Development Using ASP.NET
- Flashback to January 2006: Exclusive SYS-CON.TV Interviews on "OpenAjax Alliance" Announcement
- How and Why AJAX, Not Java, Became the Favored Technology for Rich Internet Applications
- AJAXWorld Conference & Expo to Take Place October 2-4, 2006, at the Santa Clara Convention Center, California
- AJAX Sponsor Webcasts Are Now Available at AJAXWorld Website
- "Real-World AJAX" One-Day Seminar Arrives in Silicon Valley
- Where Are RIA Technologies Headed in 2008?
- AJAXWorld University Announces AJAX Developer Bootcamp
- AJAX Support In JadeLiquid WebRenderer v3.1
- Struts Validations Framework Using AJAX
The cloud has many benefits, but when it comes to application development, how does the cloud help enterprises and development teams create custom software and applications that end users actually care about? Using real world examples from Adobe, Herff Jones and Navy Federal Credit Union, this session will highlight the advantages cloud computing provides for quickly developing custom software and applications with compelling user experiences.
In their general session at the 10th International ...May. 16, 2012 05:45 PM EDT Reads: 842 |
By Pat Romanski Nearly every enterprise is evaluating cloud computing solutions either today or in the near term. Many have already made the leap, and many more are getting close to putting that first toe in the water. But there are key considerations that should be made, questions to be asked, and designs to consider before you can feel secure with your provider.
In his session at the 10th International Cloud Expo, David Gulick, Product Manager, Hosting Product Management at Savvis, will help give you food f...May. 16, 2012 03:06 PM EDT Reads: 340 |
By Jeremy Geelan With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference...
We have technical and strategy sessions for you dealing with every nook and cranny of Cloud Computing, but what of those who are presenting? Who are they, where do they work, what else have they written and/or said about the Cloud that is t...May. 16, 2012 02:30 PM EDT Reads: 4,431 |
By Liz McMillan SYS-CON Events announced today that Super Micro Computer, Inc., a global leader in high-performance, high-efficiency server technology and green computing, will exhibit at SYS-CON's 10th International Cloud Expo, which will take place on June 11–14, 2012, at the Javits Center in New York City, New York.
Supermicro (NASDAQ: SMCI), the leading innovator in high-performance, high-efficiency server technology, is a premier provider of advanced server Building Block Solutions for Embedded Systems, E...May. 16, 2012 02:15 PM EDT Reads: 357 |
By Pat Romanski SYS-CON Events announced today that ScaleMP, a leading provider of virtualization solutions for high-end computing, will exhibit at SYS-CON's 10th International Cloud Expo, which will take place on June 11–14, 2012, at the Javits Center in New York City, New York.
ScaleMP is the leader in virtualization for high-end computing, providing maximum performance and lower total cost of ownership (TCO). The innovative Versatile SMP (vSMP) architecture aggregates multiple independent systems into a sin...May. 16, 2012 12:00 PM EDT Reads: 622 |
By Elizabeth White Come learn real-world examples where cloud and mobile are changing the way business works and the impact they're having on efficiency and productivity.
In his session at the 10th International Cloud Expo, Rodrigo Coutinho Senior Product Marketing Manager at OutSystems, will look at how mobile and the cloud are interwoven and the wave of change these two 2012 megatrends will bring to your organization. He will also provide a roadmap to assure you can navigate this sea change for business succes...May. 16, 2012 11:58 AM EDT Reads: 335 |
By Pat Romanski Enterprise IT organizations want to deploy a virtualized data center fabric that will provide the foundation for agile private cloud computing. Getting there does not have to be difficult, but it does require a new approach to data center infrastructure design – an approach that is non-disruptive, vendor-agnostic, and very adaptable to changing business requirements.
In his session at the 10th International Cloud Expo, Bruce Fingles, Chief Information Officer and VP of Product Quality at Xsigo...May. 16, 2012 10:30 AM EDT Reads: 1,585 |
By Jeremy Geelan With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference...May. 16, 2012 10:15 AM EDT Reads: 1,362 |
By Pat Romanski How can businesses harness the power of APIs to reach new customers and markets?
In his session at the 10th International Cloud Expo, Alistair Farquharson, CTO at SOA Software, will walk the audience through the growth and evolution of the API, why effective API management is important, and how the game changes when companies expose business applications to the outside world. He will also discuss:
A brief history of the API
How to use APIs to make money, save money, build brand
"Appificatio...May. 16, 2012 10:00 AM EDT Reads: 647 |
By Jeremy Geelan With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference...May. 16, 2012 10:00 AM EDT Reads: 4,921 |









Nearly every enterprise is evaluating cloud computing solutions either today or in the near term. Many have already made the leap, and many more are getting close to putting that first toe in the water. But there are key considerations that should be made, questions to be asked, and designs to consider before you can feel secure with your provider.
In his session at the 10th International Cloud Expo, David Gulick, Product Manager, Hosting Product Management at Savvis, will help give you food f...
With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference...
We have technical and strategy sessions for you dealing with every nook and cranny of Cloud Computing, but what of those who are presenting? Who are they, where do they work, what else have they written and/or said about the Cloud that is t...
SYS-CON Events announced today that Super Micro Computer, Inc., a global leader in high-performance, high-efficiency server technology and green computing, will exhibit at SYS-CON's 10th International Cloud Expo, which will take place on June 11–14, 2012, at the Javits Center in New York City, New York.
Supermicro (NASDAQ: SMCI), the leading innovator in high-performance, high-efficiency server technology, is a premier provider of advanced server Building Block Solutions for Embedded Systems, E...
SYS-CON Events announced today that ScaleMP, a leading provider of virtualization solutions for high-end computing, will exhibit at SYS-CON's 10th International Cloud Expo, which will take place on June 11–14, 2012, at the Javits Center in New York City, New York.
ScaleMP is the leader in virtualization for high-end computing, providing maximum performance and lower total cost of ownership (TCO). The innovative Versatile SMP (vSMP) architecture aggregates multiple independent systems into a sin...
Come learn real-world examples where cloud and mobile are changing the way business works and the impact they're having on efficiency and productivity.
In his session at the 10th International Cloud Expo, Rodrigo Coutinho Senior Product Marketing Manager at OutSystems, will look at how mobile and the cloud are interwoven and the wave of change these two 2012 megatrends will bring to your organization. He will also provide a roadmap to assure you can navigate this sea change for business succes...
Enterprise IT organizations want to deploy a virtualized data center fabric that will provide the foundation for agile private cloud computing. Getting there does not have to be difficult, but it does require a new approach to data center infrastructure design – an approach that is non-disruptive, vendor-agnostic, and very adaptable to changing business requirements.
In his session at the 10th International Cloud Expo, Bruce Fingles, Chief Information Officer and VP of Product Quality at Xsigo...
With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference...
How can businesses harness the power of APIs to reach new customers and markets?
In his session at the 10th International Cloud Expo, Alistair Farquharson, CTO at SOA Software, will walk the audience through the growth and evolution of the API, why effective API management is important, and how the game changes when companies expose business applications to the outside world. He will also discuss:
A brief history of the API
How to use APIs to make money, save money, build brand
"Appificatio...
With Cloud Expo 2012 New York (10th Cloud Expo) now under four weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference...
It was at Netscape, in the early days of the internet, when co-founders Lou Montulli and Jeff Whitehead first worked together and began to notice how the amount of their data was constantly growing, but the process for adding storage and protecting that data wasn't improving over time.
"Zetta is a ...
Okay – this is easy… or is it?
Lots of people continue to perpetuate the idea that the AWS APIs are a de facto standard, so we should just all move on about it. At the same time, everybody seems to acknowledge the fact that Amazon has never ever indicated that they want to be a true standard. Are...
When it comes to building new cloud services, there is a large opportunity for new services built around Big Data.
So when you look at consulting firms that provide application development and integration services, are there opportunities for them to leverage Big Data in their service portfolio?
...
All the buzz surrounding OpenStack over the past few months may beg the question of whether Openstack can repeat for Cloud what Linux has done for server operating systems over the past several years. With an enthusiastic following and a compelling, if not industry-leading set of functionality, the ...
Throughout history there has been a cycle that ebbs and flows where new technology makes production more efficient and reduces the need for manpower in a particular space, thus forcing those in charge into the difficult position of deciding who stays and who goes. This is normally replaced by an u...
As I mentioned in my last blog post, the promise of cost reduction is compelling many enterprises to move their workloads into the Cloud but many IT leaders are reluctant to do so, for fear of compromising the security and availability of their services. These concerns are well-founded but the benef...
Late today the FedRAMP Program Management Office released the first list of certified Third Party Assessment Organizations (3PAOs). These companies are accredited to perform initial and periodic assessment of cloud service provider (CSP) systems per FedRAMP requirements, provide evidence of complian...
With HP Cloud Storage, you can access it from web browser or from Application Programming Interface (API). With Gladinet, it is much easier to access HP Cloud Storage from all major web browser with Windows Explorer like interface. It is also easy to share and collaborate with colleagues from web br...
As the role of cloud computing is growing around the globe, many CIOs and other senior IT decision makers are facing challenges with their existing network infrastructure -- to support the migration of their business applications to the cloud. A new international study by Cisco Systems revealed the ...
Major changes have taken place in the network in the past 15 years. The type of data that users are passing across the pipes is significantly different in size and composition. And, the coming “data explosion” promises to put even the most robust networks to the test.
When you add in technologies l...










