> On 三月 27, 2017, 5:51 p.m., Alejandro Fernandez wrote: > > ambari-views/examples/phone-list-upgrade-view/src/main/java/org/apache/ambari/view/phonelist/PhoneListServlet.java > > Lines 73 (patched) > > <https://reviews.apache.org/r/57716/diff/1/?file=1666608#file1666608line73> > > > > I'm not familiar with this View. Is it now rendering the HTML instead > > of returning a text back?
Yes.It's very easy to verify by STR. It is a Java Servlet problem essentially. The browser don't know how to render the HTML codes returned by method doPost() in servlet. We should specify the Content-Type explicitly in method doPost() just like doGet() - yao ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57716/#review170202 ----------------------------------------------------------- On 三月 17, 2017, 1:47 a.m., yao lei wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57716/ > ----------------------------------------------------------- > > (Updated 三月 17, 2017, 1:47 a.m.) > > > Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav > Nagar, and Tom Beerbower. > > > Bugs: AMBARI-20476 > https://issues.apache.org/jira/browse/AMBARI-20476 > > > Repository: ambari > > > Description > ------- > > Problem: > After adding/updating/deleting one record,the web page displays html code > directly as shown in attached pictures. > > Steps to reproduce: > 1.cd ambari-views/examples > 2.cd phone-list-upgrade-view & mvn clean package > 3.cd phone-list-view & mvn clean package > 4.copy phone-list-upgrade-view/target/phone-list-upgrade-view-*.jar, > phone-list-view/target/phone-list-view-*.jar > to /var/lib/ambari-server/resources/views > 5.ambari-server restart > 6.open the view and add/update/delete record. > > Solution: add response header to method doPost() in PhoneListServlet.java > > > Diffs > ----- > > > ambari-views/examples/phone-list-upgrade-view/src/main/java/org/apache/ambari/view/phonelist/PhoneListServlet.java > 6ed87cd > > ambari-views/examples/phone-list-view/src/main/java/org/apache/ambari/view/phonelist/PhoneListServlet.java > 146a8e3 > > > Diff: https://reviews.apache.org/r/57716/diff/1/ > > > Testing > ------- > > Tested in a cluster > > > Thanks, > > yao lei > >
