The Struts Action returns an ActoinForward object. The path property of 
determines which resource gets control. The resource can be anything, 
not just a JSP or Struts Action. So if you had a servlet that rendered 
XML, you could forward to that instead.

The Expresso framework has a standard option for using XML/XLS with 
Struts. The Stxx extension also looks quite good.

http://jakarta.apache.org/struts/resources/views.html

Depending on what you need to do, another technique is to use the 
digester to convert XML to a JavaBean (if the XML is someplace where the
Action can get it), and then pass that down to the JSP. There are also 
tags for doing XML/XLS conversions within the JSP.

http://jakarta.apache.org/taglibs/doc/xsl-doc/intro.html

-Ted.


Billy Ng wrote:

> Hi folks,
> 
> I am thinking to repsonse the XML instead of HTML.  In Struts, how can I response to 
>the browser without displaying the JSP as the view?
> 
> Thanks!
> 
> Billy Ng
> 
> 


-- 
Ted Husted, Husted dot Com, Fairport NY US
co-author, Java Web Development with Struts
Order it today:
<http://husted.com/struts/book.html>


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

Reply via email to