vaadin app embedded in JSP in struts 2

Ok, seems i’ve done it, the struts 2 just needs to send the intercepted UIDL to ‘there be dragons’, since it isn’t suppose to do anything to it.

  <struts>
	<package name="default" extends="struts-default">
		<action name="VaadinStruts2Application/UIDL/">
			<result type="redirectAction">test.html</result>
			<result name="success">relief.jsp</result>
		</action>
	</package>
</struts>  

This is how to ignore anything but stuff suffixed with .action.

<struts>
<constant name="struts.action.extension" value="action" />
	<package name="default" extends="struts-default">
		
	</package>
</struts>

Explanations in the link below.
http://www.coderanch.com/t/477738/Struts/Application-Frameworks/Struts-Vaadin

P.S. Also works with jsp:include
11158.war (7.2 MB)

solved

Hi there,
our solution was to make an own ActionMapper which returns an Action for all UIDL requests, this Action simply forwards the original request.

@Override
public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
    String uri = getUri(request);
    Object done = request.getAttribute("done");
    if (done == null && uri.endsWith("/UIDL/")) {
        request.setAttribute("done", "true");
        // let my vaadin action handle the request
        ActionMapping am = new ActionMapping("struts2UIDL", "/vaadin", "execute", null);
        return am;
    }
    return null;
}

The Action looks as follows:

public class UIDLAction {
    private String uri;
    public String execute() {
        HttpServletRequest request = ServletActionContext.getRequest();
        this.uri = "?" + request.getQueryString();
        return "success";
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getUri() {
        return uri;
    }
}

And the struts-config like this:

<action name="struts2UIDL" class="UIDLAction">
    <interceptor-ref name="someSimpleStack"/>
    <result name="success">%{uri}</result>
</action>