Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Struts 1 with Prototype

 
Mike Himstead
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic