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
[EMAIL PROTECTED] * 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

Reply via email to