wood burning stoves 2.0*
The moose likes Struts and the fly likes Using Struts 1 with Prototype Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using Struts 1 with Prototype" Watch "Using Struts 1 with Prototype" New topic
Author

Using Struts 1 with Prototype

Mike Himstead
Ranch Hand

Joined: Apr 12, 2006
Posts: 178
Hi,

we're creating a new form-based application based on Struts 1 and Prototype. We identified a few use cases which would be very suitable for an Ajax-like approach. To be more specific: we plan to load some data containing additional info for the user. That's the only use case we plan to cover and I try to evaluate what we have to do to integrate Struts 1 and Prototype.

1) We need either a dispatch action to take our Ajax.Requests or an action for each specific request. These actions need to be declared in struts-config. Right now I don't see the need for specific contents of the form, am I right?

2) We need to declare forms (and actions)all over the page(s) where we want to make an Ajax request (unless we use a single dispatch action which seems to be better).

3) The Ajax.Request's target URL will be the action (as declared in struts-config.xml), right?

4) We have to take care of the response by ouselves (thus no Struts forwards).

Please feel free to comment on my thought or give additional input. Thanks in advance.
Mike Himstead
Ranch Hand

Joined: Apr 12, 2006
Posts: 178
Mike Himstead wrote:Hi,

we're creating a new form-based application based on Struts 1 and Prototype. We identified a few use cases which would be very suitable for an Ajax-like approach. To be more specific: we plan to load some data containing additional info for the user. That's the only use case we plan to cover and I try to evaluate what we have to do to integrate Struts 1 and Prototype.

1) We need either a dispatch action to take our Ajax.Requests or an action for each specific request. These actions need to be declared in struts-config. Right now I don't see the need for specific contents of the form, am I right?

2) Will we need to declare forms (and actions) all over the page(s) where we want to make an Ajax request tp make Struts aware of the request?

3) The Ajax.Request's target URL will be the action (as declared in struts-config.xml), right?

4) We have to take care of the response by ouselves (thus no Struts forwards).

Please feel free to comment on my thought or give additional input. Thanks in advance.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Using Struts 1 with Prototype
 
Similar Threads
Migrating Application - From Struts with AJAX to JSF with AJAX
HTML to Text via Screen scrape
Struts + Tiles + Form
Struts / Tiles - changing which layout is used at runtime
Questions about Exception handling