Skip to content

Commit

Permalink
WW-4564 Solves issue with postback result rendered as plain/text in C…
Browse files Browse the repository at this point in the history
…hrome

Closes apache#62
  • Loading branch information
lukaszlenart committed Jan 2, 2016
2 parents 3480bc3 + ac4199e commit 8aebdc3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
*/
public class PostbackResult extends StrutsResultSupport {

private static final long serialVersionUID = -2283504349296877429L;

private String actionName;
private String namespace;
private String method;
Expand All @@ -97,6 +99,9 @@ protected void doExecute(String finalLocation, ActionInvocation invocation) thro
response.setDateHeader("Expires", 0); // Proxies
}

//set contenttype @see ww-4564
response.setContentType("text/html");

// Render
PrintWriter pw = new PrintWriter(response.getOutputStream());
pw.write("<!DOCTYPE html><html><body><form action=\"" + finalLocation + "\" method=\"POST\">");
Expand Down

0 comments on commit 8aebdc3

Please sign in to comment.