Just to follow up on that, the catch is that parameters you're probably interested in are the ones added to the Map that is associated with ActionContext.PARAMETERS.
-Pat ----- Original Message ----- From: "Jason Carreira" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 10, 2003 8:00 PM Subject: RE: [OS-webwork] xwork newbie You can look at ServletDispatcher from WebWork2 for an example: Here's some code: HashMap extraContext = new HashMap(); extraContext.put(ActionContext.PARAMETERS, request.getParameterMap()); extraContext.put(ActionContext.SESSION, new SessionMap(request.getSession())); extraContext.put(ActionContext.APPLICATION, new ApplicationMap(getServletContext())); extraContext.put(HTTP_REQUEST, request); extraContext.put(HTTP_RESPONSE, response); extraContext.put(SERVLET_CONFIG, getServletConfig()); extraContext.put(COMPONENT_MANAGER, request.getAttribute("DefaultComponentManager")); extraContext.put(SERLVET_DISPATCHER, this); try { ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy(actionPath, actionName, extraContext); request.setAttribute("webwork.valueStack", proxy.getValueStack()); proxy.execute(); } catch (Exception e) { ... } > -----Original Message----- > From: Anthony Baker [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 10, 2003 8:34 PM > To: [EMAIL PROTECTED] > Subject: [OS-webwork] xwork newbie > > > Hi, > > I'm looking into using xwork as a standalone framework > and ran into the following questions: > > 1) How does xwork get configured? What do I need to > call to load xwork.xml? If you're using xwork.xml, you don't need to call anything, just use it as above. The XmlConfigurationProvider is the default config provider and xwork.xml in the root of the classpath is the default file it loads, so it will just do this automatically if you don't tell it to do anything else. > > 2) Is this the correct way to dispatch to an action? > > ActionProxy proxy = > ActionProxyFactory.getFactory().createActionFactory(...); > proxy.execute(); See above > > 3) Is this how I would send values to an action? > > ActionContext.getContext.put("aName", "aValue"); > Nope, see above > > Basically I'm looking for a good example that shows > how to load xwork and dispatch messages to actions. I > need to be able to send parameters and return data. The above should be all you need, but you can look at the whole ServletDispatcher class in WebWork2 if you'd like. > > TIA, > Anthony > Let me know if there's anything else I can do to help. > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design > software http://sitebuilder.yahoo.com > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork