Hi all, 

I'm a bit puzzled about the processing of includes and forward
attributes in the struts-config action element vs. the forward element
under the action element

 

I understand why the forward element is there (and I use it quite a lot
, too) but I got a bit confused when I was looking around in the
RequestProcessor.process method:

 

public void process(HttpServletRequest request,

                        HttpServletResponse response)

        throws IOException, ServletException {

 

...........

 

        // Process a forward or include specified by this mapping

        if (!processForward(request, response, mapping)) {

            return;

        }

        if (!processInclude(request, response, mapping)) {

            return;

        }

 

................

        

        // Process the returned ActionForward instance

        processForwardConfig(request, response, forward);

 

    }

 

It looks to me like including a forward attribute  in the action element
will break any forwards you want with a forward element as it calls
RequestDispatcher.forward - which forwards on the output stream, etc...

This question came up when I was digging up info on  RequestDispatcher
forward vs. include and found refrences to these attributes, but no real
examples.   Does struts still support the forward and include attributes
as a legacy or a servlet api spec thing? Or what? 

 

 

Thanks

 

Michael Finger

 

 

Reply via email to