background preloader

Struts

Facebook Twitter

AJAX Struts File Upload Progress Meter. ** This Post is a work in progress, and is still being worked on, it hasn't been edited yet, and may contain errors, use at your own risk ** Over the course of the last year or so I have been hearing a lot about AJAX, and how cool it is, and what neat stuff you can do with it. At first I wasn't too impressed, mostly because I have heard it all before.

It wasn't until I saw google maps that I realized how cool it was. I have been itching to use Ajax ever since. My first attempt at AJAX was using the Google Maps API to add a map to the search results page on CampRate.com. It is fairly simple, the search allows the visitor to search for campgrounds given a zip code and a search radius. Once I finished the Google Map hack, I was looking for something else to do. Once I knew what I was going to work on, I needed to figure out how I could improve on the design.

What I wanted to change in the example. Struts Changes What is left to do Ken Co. Jax magazine :: The Premier Online Resource for Java, Apache, XML, and Web Services. Julien Carnelos Blog » AJAX et Struts par l’exemple. Premier vrai et long article technique de ce blog… Préambule On trouve aujourd’hui beaucoup de références sur le net sur AJAX ( XmlHTTPRequest en réalité ) mais peu d’éléments sur l’intégration de AJAX sur le framework Struts. Concernant les ressources francaises sur le sujet, c’est quasi inexistant en recherche sur Google. Je me suis donc décidé à écrire ce petit article technique. Attention, cet article n’explique pas réellement le fonctionnement de la technologie AJAX mais plutôt de son intégration avec le framework Struts.

Concept Pour rappeler très briévement la technologie AJAX, il s’agit de permettre au navigateur d’effectuer des requêtes HTTP sur le serveur en Javascript et de mettre à jour dynamiquement le contenu de la page (via DHTML) sans recharger toute la fenêtre. Rappel des étapes : Pour plus d’informations, il existe de nombreux sites en parlant mieux que moi… Intégration avec Struts Mon exemple sera l’implémentation d’une page donnant l’heure du serveur.

<! Etape 4 : Le test. Ajax using XMLHttpRequest and Struts. ONess Doc - About ONess. Extending Struts. By Sunil Patil 11/10/2004 Introduction I have seen lot of projects where the developers implemented a proprietary MVC framework, not because they wanted to do something fundamentally different from Struts, but because they were not aware of how to extend Struts. You can get total control by developing your own MVC framework, but it also means you have to commit a lot of resources to it, something that may not be possible in projects with tight schedules. Struts is not only a very powerful framework, but also very extensible. PlugIn: Create your own PlugIn class if you want to execute some business logic at application startup or shutdown. In this article, we will use a sample Struts application to demonstrate how to extend Struts using each of these three approaches.

I assume that you are already familiar with the Struts framework and know how to create simple applications using it. PlugIn How a Request is Processed Creating Your own RequestProcessor ActionServlet Conclusion Resources. Planet Struts. Learntechnology.net. AJAX et Struts par l'exemple - Julien Carnelos Blog. Ajax Impact : AJAX Struts File Upload Progress Meter. Ken Cochrane have posted a simple tutorial on creating the Ajax upload progress bar using struts and DWR. He writes "Over the course of the last year or so I have been hearing a lot about AJAX, and how cool it is, and what neat stuff you can do with it. At first I wasn't too impressed, mostly because I have heard it all before. It wasn't until I saw google maps that I realized how cool it was.

I have been itching to use Ajax ever since. " He further explains: What I wanted to change in the example. Get the example to work with struts get the file to upload to a selected directory show the status of the file in the progress meter when the file is uploaded don't leave the page, stay on the same page (no redirect or refresh). What I did. I downloaded the war file with source code from the article refactored the project directory changed the build script setup struts, log4j added logging statements for easier debugging Download the code for AJAX Struts File Upload Progress.