Yes sir you are right on the money. So you are saying I should use a FilterChain to process calles to the ActionServlet and prepare the request per the needs of my ajax call before action servlet gets ahold of it. The only problem with that is that I have a specific xml struture explained here http://www.xoscript.org/opencms/opencms/documentation/howitworks.html that I need to rely on in the returned PrintWriter. I have a request and response wrapper that I can give to an RequestProcessor and offer it a dummy PrintWriter when it writes to response.getOut(). One I get the output back and can write it to the appropriate xml structure and hand it back to the client javascript that called the method.
I guess I should ask if I am understanding your solution or am I off base. Bryan LaPlante ---------- Original Message ----------- From: "Frank W. Zammetti" <[EMAIL PROTECTED]> To: "Struts Developers List" <dev@struts.apache.org> Cc: "Struts Developers List" <dev@struts.apache.org> Sent: Wed, 1 Feb 2006 10:22:27 -0500 (EST) Subject: Re: Help adding Struts to AJAX impl > Hi Bryan, > > I'm not sure I'm clear on what your trying to do... it sounds like you > have a separate servlet running along side ActionServlet that receives > your AJAX requests, and this servlet you want to call Actions, is that > correct? > > If so, I would suggest perhaps a better approach is to modify the request > processing chain (in 1.3) to recognize an AJAX request (perhaps some > specific parameter) and change the request accordingly. If you want to > support pre-1.3, your talking about a custom RequestProcessor... both of > these are done in my Struts Web Services project > (http://sourceforge.net/projects/strutsws). > > Or am I off-base to begin with? :) > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > AIM: fzammetti > Yahoo: fzammetti > MSN: [EMAIL PROTECTED] > > On Wed, February 1, 2006 9:08 am, Bryan LaPlante said: > > I had a chance to look at this in more detail yesterday. It appears that I > > will need to write a class to load up all the resources the same way the > > init method in ActionServlet does. Am I in the right place to ask for help > > understanding the API? It has been roughly a week and no reply. > > > > ----- Original Message ----- > > From: <[EMAIL PROTECTED]> > > To: <dev@struts.apache.org> > > Sent: Friday, January 27, 2006 1:27 PM > > Subject: Help adding Struts to AJAX impl > > > > > >> Hello fellow developers, > >> > >> I am new to your list. I have enjoyed using Struts for about 3 years > >> now. > > I > >> have searched the dev archive concerning my current task and I am not > >> sure > > how > >> to word my query. I am coming up with a lot of results labeled as a > >> commit > > to > >> your code base. > >> > >> I have an AJAX implementation at http://www.xoscript.org/ and I want to > > build > >> support for Struts into the API. In a nutshell I need to find a factory > > class > >> in Struts that will allow me to obtain the current configuration so that > >> I > > can > >> allow my users to pass an appropriate ActionMapping at runtime. Below is > > the > >> basic layout of the process. For more details about how xoscript works > > visit > >> the getting started and how it works links from the site above. > >> > >> A UerDefinedClass calls a UerDefinedActionClass.execute passing request > > and > >> response obtained from the AJAX API. The user will also need to pass an > >> ActionMapping and an ActionForm to the execute method. I am trying to > >> find > > a > >> way to get to this line in ActionServlet but I can not violate the > >> getServletContext from one servlet to another. The over all concern is > > that I > >> am trying to keep my OutputStream from the response formatted in a > >> certain > > way > >> and I can not just forward the request to the ActionServlet. > >> > >> ModuleUtils.getInstance().selectModule(request, getServletContext()); > >> ModuleConfig config = getModuleConfig(request); > >> > >> Any help would be greatly appreciated. > >> > >> Bryan LaPlante > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] ------- End of Original Message ------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]