Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

webwork stream result type

Steve Loft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2013

Should this example work with Confluence?

I get an NPE at com.opensymphony.xwork.util.TextParseUtil.translateVariables(TextParseUtil.java:28) and my getInputStream method is never invoked.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2013

Hi Steve,

Confluence uses WebWork v1 (WebWork before it was merged with Struts), so some parts of the Apache Struts documentation will not apply to WebWork in Confluence.

If you have access to Confluence's source code (which you can get as a commercial/academic/starter license holder), you can see all the available WebWork result types by looking at Confluence's xwork.xml:

<package name="default">
        <result-types>
            <result-type name="dispatcher" class="com.opensymphony.webwork.dispatcher.ServletDispatcherResult"/>
            <result-type name="stream" class="com.opensymphony.webwork.dispatcher.StreamResult"/>
            <result-type name="redirect" class="com.atlassian.confluence.xwork.RedirectResult"/>
            <result-type name="redirectwithflash" class="com.atlassian.confluence.xwork.RedirectWithFlashResult"/>
            <result-type name="velocity" class="com.atlassian.confluence.setup.webwork.EncodingVelocityResult"/>
            <result-type name="velocity-xml" class="com.atlassian.xwork.results.XmlVelocityResult"/>
            <result-type name="velocity-css" class="com.atlassian.xwork.results.CSSVelocityResult"/>
            <result-type name="httpheader" class="com.opensymphony.webwork.dispatcher.HttpHeaderResult"/>
            <result-type name="chain" class="com.opensymphony.xwork.ActionChainResult"/>
            <result-type name="rawText" class="com.atlassian.confluence.setup.webwork.RawTextResult"/>
            <result-type name="rss" class="com.atlassian.xwork.results.RssResult"/>
            <result-type name="json" class="com.atlassian.confluence.json.JsonResult"/>
        </result-types>

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2013

Oh, sorry. I see that we do indeed support the "stream" result.

Let me see if I can get it work locally.

Also, make sure that your action class extends ConfluenceActionSupport, not ActionSupport.

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2013

Also, if you just want to return raw text, and are not especially interested in doing this in a "streaming" fashion, just use the RawTextResult.

Steve Loft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2013

Thanks, I'll look into RawTextResult. I've also been experimenting with the json result and that looks suitable.

Adrien Ragot 2
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2014
Derek Hardison May 13, 2015

How about returning raw text? I want to make a JSONP action.

TAGS
AUG Leaders

Atlassian Community Events