You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2006/04/04 20:31:57 UTC

Has anyone intregrated DWR with AJAX?

hi
I have a website which is developed using struts, I am
looking to convert some of it to AJAX and working on
different approaches, 
In my current application, i have a common Action
class which has all the common functions like getting
the information stored in ServletContext, or Session
or getting the connection from JNDI
I am using Ibatis SQL mapping to run SQL querries,
with SqlMapClient stored in ServletContext.
What would be the best way to start converting to DWR,
in DWR i can just define simple java beans (POJO).
I can get access to servlet request, etc using 
WebContext ctx = WebContextFactory.get();
req = ctx.getHttpServletRequest();

This is what i am planning, using Action class and
ActionForm to load initial data on jsp, and then use
DWR to update information on this screen jsp after
user does some funtions.

Is this the right approach?
Can i access this form bean (in request scope in java
bean class)

What are other possible ways to do so

Ashish

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Has anyone intregrated DWR with AJAX?

Posted by Joe Germuska <Jo...@Germuska.com>.
At 11:31 AM -0700 4/4/06, Ashish Kulkarni wrote:
>hi
>I have a website which is developed using struts, I am
>looking to convert some of it to AJAX and working on
>different approaches,
>In my current application, i have a common Action
>class which has all the common functions like getting
>the information stored in ServletContext, or Session
>or getting the connection from JNDI
>I am using Ibatis SQL mapping to run SQL querries,
>with SqlMapClient stored in ServletContext.
>What would be the best way to start converting to DWR,
>in DWR i can just define simple java beans (POJO).
>I can get access to servlet request, etc using
>WebContext ctx = WebContextFactory.get();
>req = ctx.getHttpServletRequest();
>
>This is what i am planning, using Action class and
>ActionForm to load initial data on jsp, and then use
>DWR to update information on this screen jsp after
>user does some funtions.
>
>Is this the right approach?
>Can i access this form bean (in request scope in java
>bean class)

see http://getahead.ltd.uk/dwr/server/struts

Personally, I don't think there's much point to trying to use Struts 
objects in your DWR code.  As noted on that page, you may be just as 
well off refactoring your code to a more general model which can be 
used both by the action and by the object you expose remotely via DWR.

Joe

-- 
Joe Germuska
Joe@Germuska.com * http://blog.germuska.com    

"You really can't burn anything out by trying something new, and
even if you can burn it out, it can be fixed.  Try something new."
	-- Robert Moog

Re: Has anyone intregrated DWR with AJAX?

Posted by Greg Ludington <gl...@gmail.com>.
You may want to ask this on the DWR users list; in version 1.1 there
is some support for accessing form beans directly from DWR.  The base
documentation page for DWR/Struts is here:

http://getahead.ltd.uk/dwr/server/struts

On 4/4/06, Ashish Kulkarni <ku...@yahoo.com> wrote:
> hi
> I have a website which is developed using struts, I am
> looking to convert some of it to AJAX and working on
> different approaches,
> In my current application, i have a common Action
> class which has all the common functions like getting
> the information stored in ServletContext, or Session
> or getting the connection from JNDI
> I am using Ibatis SQL mapping to run SQL querries,
> with SqlMapClient stored in ServletContext.
> What would be the best way to start converting to DWR,
> in DWR i can just define simple java beans (POJO).
> I can get access to servlet request, etc using
> WebContext ctx = WebContextFactory.get();
> req = ctx.getHttpServletRequest();
>
> This is what i am planning, using Action class and
> ActionForm to load initial data on jsp, and then use
> DWR to update information on this screen jsp after
> user does some funtions.
>
> Is this the right approach?
> Can i access this form bean (in request scope in java
> bean class)
>
> What are other possible ways to do so
>
> Ashish
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org