I definitely haven't used Pajes, but if the servlet is on the same web app,
perhaps your servlet can access the form in the request attribute.
More comments below

--- "Villalba Arias, Fredy [BILBOMATICA]" <[EMAIL PROTECTED]> wrote:
> HOWEVER, I have not solved yet the data access method part. I MUST
> BE ABLE TO RECOVER THE APPROPRIATE ActionForm object FROM THAT Servlet
> (actually, in a factory class, but I don’t want to bother you with all
> the details) so that the view-generating class can “paint”, WITHOUT
> REPLICATING THE ActionForm Management (especially, the scopes management)
> ALREADY PERFORMED BY Struts. HOW CAN I DO THAT???
>  
> (1) Is there some method (+ class) that, given an Action class
> (/classname),
> returns the ActionForm object its currently associated to? (if any)

Not sure this would be possible.  The actual ActionForm in use depends on the
session, and sometimes even the particular request.  I doubt there's a way to
get to the form object actually in use by just specifying the action class.
If it's the *class* of the ActionForm you want, check out the ActionMapping
object for a particular mapping.

> (2) What’s the minimal information that one needs to retrieve an Action’s
> corresponding ActionForm object?

I would say the request object.

> (3) How can I do it from an ordinary Servlet?

request.getAttribute(formName);
or 
session.getAttribute(formName);
 depending on the scope of the form as declared in struts-config.

> Note that I’m trying to avoid passing it through the Session. My initial
> idea was to take advantage of the classes behind the tag libs that do this,
> but from what I’ve seen so far (I mean, its source code), that is not
> possible (the code is too tied to a JSP environment).
> 
> This is my first “effort”. Therefore, I’m not worried about being able to
> 
> do EVERYTHING that can be done through the tag libs. For now, the only
> 
> thing I look forward is to be able to recover the appropriate ActionForm
> 
> object associated to that Action from where redirection took place
> 
> (ActionForward, that is).
> 
>  
> 
> I’d really appreciate any thoughts on this matter.
> 
>  
> 
> Thanks everybody,
> 
> Freddy.
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003
>  
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to